From 856c1f99422e00eddad29e9731f7b64cd3de7952 Mon Sep 17 00:00:00 2001 From: Tim Huff Date: Thu, 30 Jul 2026 18:34:12 -0700 Subject: [PATCH 1/9] Add Groundlight.me() for authenticated user identity Expose id, email, username, and customer groups from GET /v1/me so callers can inspect the token's tenant without parsing the raw response. Co-authored-by: Cursor --- src/groundlight/__init__.py | 1 + src/groundlight/cli.py | 1 + src/groundlight/client.py | 24 ++++++++++++++++++++++-- src/groundlight/identity.py | 28 ++++++++++++++++++++++++++++ test/unit/test_user.py | 17 ++++++++++++++++- 5 files changed, 68 insertions(+), 3 deletions(-) create mode 100644 src/groundlight/identity.py diff --git a/src/groundlight/__init__.py b/src/groundlight/__init__.py index 805fdd335..1c6e05f6b 100644 --- a/src/groundlight/__init__.py +++ b/src/groundlight/__init__.py @@ -10,6 +10,7 @@ from .client import GroundlightClientError, ApiTokenError, EdgeNotAvailableError, NotFoundError from .experimental_api import ExperimentalApi from .binary_labels import Label +from .identity import Group, Me from .version import get_version __version__ = get_version() diff --git a/src/groundlight/cli.py b/src/groundlight/cli.py index 698ff655e..f3fec1312 100644 --- a/src/groundlight/cli.py +++ b/src/groundlight/cli.py @@ -190,6 +190,7 @@ def wrapper(*args, **kwargs): _COMMAND_GROUPS: dict[str, str] = { # Account "whoami": "Account", + "me": "Account", "get_month_to_date_usage": "Account", # Detectors "get_detector": "Detectors", diff --git a/src/groundlight/client.py b/src/groundlight/client.py index c988c8f18..19371cb65 100644 --- a/src/groundlight/client.py +++ b/src/groundlight/client.py @@ -43,6 +43,7 @@ from groundlight.binary_labels import Label, convert_internal_label_to_display from groundlight.config import API_TOKEN_MISSING_HELP_MESSAGE, API_TOKEN_VARIABLE_NAME, DISABLE_TLS_VARIABLE_NAME from groundlight.encodings import url_encode_dict +from groundlight.identity import Me from groundlight.images import ByteStreamWrapper, parse_supported_image_types, shrink_image_if_needed from groundlight.internalapi import ( GroundlightApiClient, @@ -280,6 +281,26 @@ def _fixup_image_query(iq: ImageQuery) -> ImageQuery: iq.result.label = convert_internal_label_to_display(iq, iq.result.label) return iq + def me(self) -> Me: + """ + Return identity information for the current API token. + + Calls GET /v1/me and returns the authenticated user's id, email, username, and + customer groups. Extra fields from the server response are ignored. + + **Example usage**:: + + gl = Groundlight() + me = gl.me() + print(f"Authenticated as {me.email} in {[g.name for g in me.groups]}") + + :return: Me object for the authenticated user + :raises ApiTokenError: If the API token is invalid + :raises GroundlightClientError: If there are connectivity issues with the Groundlight service + """ + obj = self.user_api.who_am_i(_request_timeout=DEFAULT_REQUEST_TIMEOUT) + return Me.model_validate(obj.to_dict()) + def whoami(self) -> str: """ Return the username (email address) associated with the current API token. @@ -297,8 +318,7 @@ def whoami(self) -> str: :raises ApiTokenError: If the API token is invalid :raises GroundlightClientError: If there are connectivity issues with the Groundlight service """ - obj = self.user_api.who_am_i(_request_timeout=DEFAULT_REQUEST_TIMEOUT) - return obj["email"] + return self.me().email def _user_is_privileged(self) -> bool: """ diff --git a/src/groundlight/identity.py b/src/groundlight/identity.py new file mode 100644 index 000000000..599f733e5 --- /dev/null +++ b/src/groundlight/identity.py @@ -0,0 +1,28 @@ +"""Models for the authenticated caller returned by Groundlight.me().""" + +from typing import List + +from pydantic import BaseModel, ConfigDict, Field + + +class Group(BaseModel): + """A Groundlight customer group (tenant) the authenticated user belongs to.""" + + model_config = ConfigDict(extra="ignore") + + id: int = Field(..., description="Numeric id of the customer group.") + name: str = Field(..., description="Name of the customer group.") + + +class Me(BaseModel): + """Identity information for the authenticated API token from GET /v1/me.""" + + model_config = ConfigDict(extra="ignore") + + id: int = Field(..., description="Numeric id of the authenticated user.") + email: str = Field(..., description="Email address of the authenticated user.") + username: str = Field(..., description="Username of the authenticated user.") + groups: List[Group] = Field( + ..., + description="Customer groups the authenticated user belongs to.", + ) diff --git a/test/unit/test_user.py b/test/unit/test_user.py index 927da25b8..9f7f7e6a5 100644 --- a/test/unit/test_user.py +++ b/test/unit/test_user.py @@ -1,7 +1,22 @@ -from groundlight import Groundlight +from groundlight import Groundlight, Me +from groundlight.identity import Group def test_whoami(gl: Groundlight): user = gl.whoami() assert user is not None assert isinstance(user, str) + + +def test_me(gl: Groundlight): + """me() returns structured identity including customer groups from /v1/me.""" + me = gl.me() + assert isinstance(me, Me) + assert isinstance(me.id, int) + assert me.email + assert me.username + assert isinstance(me.groups, list) + assert len(me.groups) >= 1 + assert all(isinstance(group, Group) for group in me.groups) + assert all(group.id and group.name for group in me.groups) + assert gl.whoami() == me.email From 98c1bd37f87a67e0274fbbcb3b59bf639845482e Mon Sep 17 00:00:00 2001 From: Tim Huff Date: Thu, 30 Jul 2026 18:36:45 -0700 Subject: [PATCH 2/9] Silence pylint too-few-public-methods on Me/Group models Co-authored-by: Cursor --- src/groundlight/identity.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/groundlight/identity.py b/src/groundlight/identity.py index 599f733e5..11395848e 100644 --- a/src/groundlight/identity.py +++ b/src/groundlight/identity.py @@ -5,7 +5,7 @@ from pydantic import BaseModel, ConfigDict, Field -class Group(BaseModel): +class Group(BaseModel): # pylint: disable=too-few-public-methods """A Groundlight customer group (tenant) the authenticated user belongs to.""" model_config = ConfigDict(extra="ignore") @@ -14,7 +14,7 @@ class Group(BaseModel): name: str = Field(..., description="Name of the customer group.") -class Me(BaseModel): +class Me(BaseModel): # pylint: disable=too-few-public-methods """Identity information for the authenticated API token from GET /v1/me.""" model_config = ConfigDict(extra="ignore") From 0ed7c880e45f4d7b4a790846c0550db48deccc76 Mon Sep 17 00:00:00 2001 From: Tim Huff Date: Fri, 31 Jul 2026 09:59:13 -0700 Subject: [PATCH 3/9] Do not export Group from the groundlight package root Avoid colliding with detector-group concepts; callers that need the type can import it from groundlight.identity. Co-authored-by: Cursor --- src/groundlight/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/groundlight/__init__.py b/src/groundlight/__init__.py index 1c6e05f6b..e94e5a383 100644 --- a/src/groundlight/__init__.py +++ b/src/groundlight/__init__.py @@ -10,7 +10,7 @@ from .client import GroundlightClientError, ApiTokenError, EdgeNotAvailableError, NotFoundError from .experimental_api import ExperimentalApi from .binary_labels import Label -from .identity import Group, Me +from .identity import Me from .version import get_version __version__ = get_version() From 5caaeec938fb8c27f0f83a7a656eb9a68173438a Mon Sep 17 00:00:00 2001 From: Tim Huff Date: Fri, 31 Jul 2026 12:58:16 -0700 Subject: [PATCH 4/9] Generate Me/CustomerGroup models from public OpenAPI spec Replace hand-written identity models with codegen from the updated /v1/me schema, and sync spec/public-api.yaml from zuuul. Co-authored-by: Cursor --- generated/.openapi-generator/FILES | 6 +- generated/README.md | 3 +- generated/docs/ApiToken.md | 4 +- generated/docs/ApiTokenCreateResponse.md | 4 +- ...InlineResponse2002.md => CustomerGroup.md} | 6 +- generated/docs/Me.md | 16 + generated/docs/UserApi.md | 8 +- generated/docs/VlmVerificationsApi.md | 2 +- .../api/actions_api.py | 564 +++++++---- .../api/api_tokens_api.py | 420 ++++++--- .../api/detector_groups_api.py | 200 ++-- .../api/detector_reset_api.py | 105 ++- .../api/detectors_api.py | 884 ++++++++++++------ .../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/priming_groups_api.py | 438 ++++++--- .../api/user_api.py | 100 +- .../api/vlm_verifications_api.py | 144 +-- .../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/api_token.py | 133 ++- .../model/api_token_create_response.py | 143 ++- .../model/api_token_request.py | 104 +-- .../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 ++- ...line_response2002.py => customer_group.py} | 120 +-- .../model/detector.py | 204 ++-- .../model/detector_creation_input_request.py | 220 ++--- .../model/detector_group.py | 98 +- .../model/detector_group_request.py | 97 +- .../model/detector_mode_enum.py | 74 +- .../model/detector_type_enum.py | 66 +- .../model/edge_model_info.py | 152 ++- .../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 | 220 ++--- .../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 +-- .../groundlight_openapi_client/model/me.py | 286 ++++++ .../model/ml_pipeline.py | 231 ++--- .../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/null_enum.py | 66 +- .../model/paginated_api_token_list.py | 114 +-- .../model/paginated_detector_list.py | 114 +-- .../model/paginated_image_query_list.py | 114 +-- .../model/paginated_ml_pipeline_list.py | 114 +-- .../model/paginated_priming_group_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/priming_group.py | 181 ++-- .../priming_group_creation_input_request.py | 138 ++- .../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/verdict_enum.py | 70 +- .../model/vlm_verification.py | 125 ++- .../model/vlm_verification_cost.py | 111 +-- .../model/vlm_verification_result.py | 107 +-- .../model/webhook_action.py | 133 +-- .../model/webhook_action_request.py | 135 ++- .../groundlight_openapi_client/model_utils.py | 690 ++++++++------ .../models/__init__.py | 3 +- generated/groundlight_openapi_client/rest.py | 312 +++---- generated/model.py | 86 +- generated/setup.py | 7 +- ...response2002.py => test_customer_group.py} | 15 +- generated/test/test_me.py | 38 + spec/public-api.yaml | 233 +++-- src/groundlight/__init__.py | 1 - src/groundlight/client.py | 2 +- src/groundlight/identity.py | 28 - test/unit/test_user.py | 5 +- 113 files changed, 7725 insertions(+), 7331 deletions(-) rename generated/docs/{InlineResponse2002.md => CustomerGroup.md} (69%) create mode 100644 generated/docs/Me.md rename generated/groundlight_openapi_client/model/{inline_response2002.py => customer_group.py} (77%) create mode 100644 generated/groundlight_openapi_client/model/me.py rename generated/test/{test_inline_response2002.py => test_customer_group.py} (64%) create mode 100644 generated/test/test_me.py delete mode 100644 src/groundlight/identity.py diff --git a/generated/.openapi-generator/FILES b/generated/.openapi-generator/FILES index 928613a0d..2a41638ef 100644 --- a/generated/.openapi-generator/FILES +++ b/generated/.openapi-generator/FILES @@ -22,6 +22,7 @@ docs/Condition.md docs/ConditionRequest.md docs/CountModeConfiguration.md docs/CountingResult.md +docs/CustomerGroup.md docs/Detector.md docs/DetectorCreationInputRequest.md docs/DetectorGroup.md @@ -40,7 +41,6 @@ docs/ImageQueryTypeEnum.md docs/InlineResponse200.md docs/InlineResponse2001.md docs/InlineResponse2001EvaluationResults.md -docs/InlineResponse2002.md docs/InlineResponse200Summary.md docs/InlineResponse200SummaryClassCounts.md docs/Label.md @@ -48,6 +48,7 @@ docs/LabelValue.md docs/LabelValueRequest.md docs/LabelsApi.md docs/MLPipeline.md +docs/Me.md docs/ModeEnum.md docs/MonthToDateAccountInfoApi.md docs/MultiClassModeConfiguration.md @@ -129,6 +130,7 @@ groundlight_openapi_client/model/condition.py groundlight_openapi_client/model/condition_request.py groundlight_openapi_client/model/count_mode_configuration.py groundlight_openapi_client/model/counting_result.py +groundlight_openapi_client/model/customer_group.py groundlight_openapi_client/model/detector.py groundlight_openapi_client/model/detector_creation_input_request.py groundlight_openapi_client/model/detector_group.py @@ -142,12 +144,12 @@ groundlight_openapi_client/model/image_query_type_enum.py groundlight_openapi_client/model/inline_response200.py groundlight_openapi_client/model/inline_response2001.py groundlight_openapi_client/model/inline_response2001_evaluation_results.py -groundlight_openapi_client/model/inline_response2002.py groundlight_openapi_client/model/inline_response200_summary.py groundlight_openapi_client/model/inline_response200_summary_class_counts.py groundlight_openapi_client/model/label.py groundlight_openapi_client/model/label_value.py groundlight_openapi_client/model/label_value_request.py +groundlight_openapi_client/model/me.py groundlight_openapi_client/model/ml_pipeline.py groundlight_openapi_client/model/mode_enum.py groundlight_openapi_client/model/multi_class_mode_configuration.py diff --git a/generated/README.md b/generated/README.md index fb70bd290..15edcbe41 100644 --- a/generated/README.md +++ b/generated/README.md @@ -175,6 +175,7 @@ Class | Method | HTTP request | Description - [ConditionRequest](docs/ConditionRequest.md) - [CountModeConfiguration](docs/CountModeConfiguration.md) - [CountingResult](docs/CountingResult.md) + - [CustomerGroup](docs/CustomerGroup.md) - [Detector](docs/Detector.md) - [DetectorCreationInputRequest](docs/DetectorCreationInputRequest.md) - [DetectorGroup](docs/DetectorGroup.md) @@ -188,13 +189,13 @@ Class | Method | HTTP request | Description - [InlineResponse200](docs/InlineResponse200.md) - [InlineResponse2001](docs/InlineResponse2001.md) - [InlineResponse2001EvaluationResults](docs/InlineResponse2001EvaluationResults.md) - - [InlineResponse2002](docs/InlineResponse2002.md) - [InlineResponse200Summary](docs/InlineResponse200Summary.md) - [InlineResponse200SummaryClassCounts](docs/InlineResponse200SummaryClassCounts.md) - [Label](docs/Label.md) - [LabelValue](docs/LabelValue.md) - [LabelValueRequest](docs/LabelValueRequest.md) - [MLPipeline](docs/MLPipeline.md) + - [Me](docs/Me.md) - [ModeEnum](docs/ModeEnum.md) - [MultiClassModeConfiguration](docs/MultiClassModeConfiguration.md) - [MultiClassificationResult](docs/MultiClassificationResult.md) diff --git a/generated/docs/ApiToken.md b/generated/docs/ApiToken.md index df7b6b15d..1abfdb2fc 100644 --- a/generated/docs/ApiToken.md +++ b/generated/docs/ApiToken.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes **name** | **str** | An nickname for the API token. This name must be unique for this user. | **raw_key_snippet** | **str** | Since we're storing hashed keys, it can be useful to see the raw prefix snippet of the token. | [readonly] **created_at** | **datetime** | When was this token created? | [readonly] -**last_used_at** | **datetime, none_type** | The most recent time this API token was used. (Helpful for detecting suspicious activity). Null if the token has never been used. | [readonly] +**last_used_at** | **datetime, none_type** | The most recent time this API token was used for authentication. Null until first use. | [readonly] **expires_at** | **datetime, none_type** | When does this token expire? If Null, the token never expires. | [optional] -**token_ttl** | **int, none_type** | Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never expire (no rotation). | [optional] [readonly] +**token_ttl** | **int, none_type** | Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never expire. Omitted only by older servers that do not yet expose this field. | [optional] [readonly] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[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/docs/ApiTokenCreateResponse.md b/generated/docs/ApiTokenCreateResponse.md index c01ee2673..ddb65a7fb 100644 --- a/generated/docs/ApiTokenCreateResponse.md +++ b/generated/docs/ApiTokenCreateResponse.md @@ -8,10 +8,10 @@ Name | Type | Description | Notes **name** | **str** | An nickname for the API token. This name must be unique for this user. | **raw_key_snippet** | **str** | Since we're storing hashed keys, it can be useful to see the raw prefix snippet of the token. | [readonly] **created_at** | **datetime** | When was this token created? | [readonly] -**last_used_at** | **datetime, none_type** | The most recent time this API token was used. (Helpful for detecting suspicious activity). Null if the token has never been used. | [readonly] +**last_used_at** | **datetime, none_type** | The most recent time this API token was used for authentication. Null until first use. | [readonly] **raw_key** | **str** | The full API token secret. Returned only once, when the token is created. | [readonly] **expires_at** | **datetime, none_type** | When does this token expire? If Null, the token never expires. | [optional] -**token_ttl** | **int, none_type** | Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never expire (no rotation). | [optional] [readonly] +**token_ttl** | **int, none_type** | Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never expire. Omitted only by older servers that do not yet expose this field. | [optional] [readonly] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[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/docs/InlineResponse2002.md b/generated/docs/CustomerGroup.md similarity index 69% rename from generated/docs/InlineResponse2002.md rename to generated/docs/CustomerGroup.md index 59b1a320d..ab7edeaea 100644 --- a/generated/docs/InlineResponse2002.md +++ b/generated/docs/CustomerGroup.md @@ -1,10 +1,12 @@ -# InlineResponse2002 +# CustomerGroup +A Groundlight customer group (tenant) the authenticated user belongs to. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**username** | **str** | The user's username | [optional] +**id** | **int** | Numeric id of the customer group. | +**name** | **str** | Name of the customer group. | **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[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/docs/Me.md b/generated/docs/Me.md new file mode 100644 index 000000000..c7dd86ba4 --- /dev/null +++ b/generated/docs/Me.md @@ -0,0 +1,16 @@ +# Me + +Authenticated user identity from GET /v1/me (id, email, username, groups). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Numeric id of the authenticated user. | +**email** | **str** | Email address of the authenticated user. | +**username** | **str** | Username of the authenticated user. | +**groups** | [**[CustomerGroup]**](CustomerGroup.md) | Customer groups the authenticated user belongs to. | +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] + +[[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/docs/UserApi.md b/generated/docs/UserApi.md index b10f06bcf..27825aa56 100644 --- a/generated/docs/UserApi.md +++ b/generated/docs/UserApi.md @@ -8,11 +8,11 @@ Method | HTTP request | Description # **who_am_i** -> InlineResponse2002 who_am_i() +> Me who_am_i() -Retrieve the current user. +Retrieve the authenticated user's id, email, username, and customer groups. ### Example @@ -22,7 +22,7 @@ Retrieve the current user. import time import groundlight_openapi_client from groundlight_openapi_client.api import user_api -from groundlight_openapi_client.model.inline_response2002 import InlineResponse2002 +from groundlight_openapi_client.model.me import Me from pprint import pprint # Defining the host is optional and defaults to https://api.groundlight.ai/device-api # See configuration.py for a list of all supported configuration parameters. @@ -60,7 +60,7 @@ This endpoint does not need any parameter. ### Return type -[**InlineResponse2002**](InlineResponse2002.md) +[**Me**](Me.md) ### Authorization diff --git a/generated/docs/VlmVerificationsApi.md b/generated/docs/VlmVerificationsApi.md index d232225bb..6e35dc5fd 100644 --- a/generated/docs/VlmVerificationsApi.md +++ b/generated/docs/VlmVerificationsApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description - Submit one or more images for VLM-based alert verification. Send as `multipart/form-data`: one to eight `media` image parts, a `query` field, and an optional `model_id` field. Video is not yet supported. For example: ```bash $ curl https://api.groundlight.ai/device-api/v1/vlm-verifications \\ -F \"media=@image.jpg;type=image/jpeg\" \\ -F \"query=Is there a fire?\" ``` + Submit one or more images for VLM-based alert verification. Send everything as `multipart/form-data`: one to eight `media` parts, plus a `query` field and an optional `model_id` field. The `query` describes what each image is and what to look for — the server makes no assumptions about the images' meaning. Images are presented to the model labeled `Image 1`, `Image 2`, ... in upload order, so the query can reference them (e.g. \"Image 1 is the full frame; image 2 is the cropped ROI ...\"). (Video parts are planned but not yet supported and are rejected.) Requires `ENABLE_BEDROCK_VLM_ACCESS` (enabled for Standard_Internal and SciDuck accounts) and accepted terms of service. ```bash curl https://api.groundlight.ai/device-api/v1/vlm-verifications \\ -F \"media=@full_frame.jpg;type=image/jpeg\" \\ -F \"media=@roi.jpg;type=image/jpeg\" \\ -F \"query=Image 1 is the full camera frame; image 2 is the cropped region a detector flagged. Is there really a fire?\" \\ -F \"model_id=gpt-5.4\" ``` ### Example diff --git a/generated/groundlight_openapi_client/api/actions_api.py b/generated/groundlight_openapi_client/api/actions_api.py index b4d3ebd2e..69adca06a 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/api_tokens_api.py b/generated/groundlight_openapi_client/api/api_tokens_api.py index 38720ce26..f6f1e0821 100644 --- a/generated/groundlight_openapi_client/api/api_tokens_api.py +++ b/generated/groundlight_openapi_client/api/api_tokens_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.api_token import ApiToken from groundlight_openapi_client.model.api_token_create_response import ApiTokenCreateResponse @@ -40,166 +41,218 @@ def __init__(self, api_client=None): self.api_client = api_client self.create_api_token_endpoint = _Endpoint( settings={ - "response_type": (ApiTokenCreateResponse,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/api-tokens", - "operation_id": "create_api_token", - "http_method": "POST", - "servers": None, + 'response_type': (ApiTokenCreateResponse,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/api-tokens', + 'operation_id': 'create_api_token', + 'http_method': 'POST', + 'servers': None, }, params_map={ - "all": [ - "api_token_request", + 'all': [ + 'api_token_request', + ], + 'required': [ + 'api_token_request', + ], + 'nullable': [ ], - "required": [ - "api_token_request", + 'enum': [ ], - "nullable": [], - "enum": [], - "validation": [], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "api_token_request": (ApiTokenRequest,), + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'api_token_request': + (ApiTokenRequest,), + }, + 'attribute_map': { }, - "attribute_map": {}, - "location_map": { - "api_token_request": "body", + 'location_map': { + 'api_token_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_api_token_endpoint = _Endpoint( settings={ - "response_type": None, - "auth": ["ApiToken"], - "endpoint_path": "/v1/api-tokens/{name}", - "operation_id": "delete_api_token", - "http_method": "DELETE", - "servers": None, + 'response_type': None, + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/api-tokens/{name}', + 'operation_id': 'delete_api_token', + 'http_method': 'DELETE', + 'servers': None, }, params_map={ - "all": [ - "name", + 'all': [ + 'name', + ], + 'required': [ + 'name', + ], + 'nullable': [ ], - "required": [ - "name", + 'enum': [ ], - "nullable": [], - "enum": [], - "validation": [], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "name": (str,), + 'validations': { }, - "attribute_map": { - "name": "name", + 'allowed_values': { }, - "location_map": { - "name": "path", + 'openapi_types': { + 'name': + (str,), }, - "collection_format_map": {}, + 'attribute_map': { + 'name': 'name', + }, + 'location_map': { + 'name': 'path', + }, + 'collection_format_map': { + } }, headers_map={ - "accept": [], - "content_type": [], + 'accept': [], + 'content_type': [], }, - api_client=api_client, + api_client=api_client ) self.get_api_token_by_snippet_endpoint = _Endpoint( settings={ - "response_type": (ApiToken,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/api-tokens/by-snippet/{snippet}", - "operation_id": "get_api_token_by_snippet", - "http_method": "GET", - "servers": None, + 'response_type': (ApiToken,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/api-tokens/by-snippet/{snippet}', + 'operation_id': 'get_api_token_by_snippet', + 'http_method': 'GET', + 'servers': None, }, params_map={ - "all": [ - "snippet", + 'all': [ + 'snippet', ], - "required": [ - "snippet", + 'required': [ + 'snippet', ], - "nullable": [], - "enum": [], - "validation": [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "snippet": (str,), + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'snippet': + (str,), }, - "attribute_map": { - "snippet": "snippet", + 'attribute_map': { + 'snippet': 'snippet', }, - "location_map": { - "snippet": "path", + 'location_map': { + 'snippet': '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_api_tokens_endpoint = _Endpoint( settings={ - "response_type": (PaginatedApiTokenList,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/api-tokens", - "operation_id": "list_api_tokens", - "http_method": "GET", - "servers": None, + 'response_type': (PaginatedApiTokenList,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/api-tokens', + 'operation_id': 'list_api_tokens', + 'http_method': 'GET', + 'servers': None, }, params_map={ - "all": [ - "page", - "page_size", + 'all': [ + 'page', + 'page_size', + ], + 'required': [], + 'nullable': [ ], - "required": [], - "nullable": [], - "enum": [], - "validation": [], + '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 ) - def create_api_token(self, api_token_request, **kwargs): + def create_api_token( + self, + api_token_request, + **kwargs + ): """create_api_token # noqa: E501 Create a new API token, returning the raw_key exactly once in the response. # noqa: E501 @@ -245,19 +298,39 @@ def create_api_token(self, api_token_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["api_token_request"] = api_token_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['api_token_request'] = \ + api_token_request return self.create_api_token_endpoint.call_with_http_info(**kwargs) - def delete_api_token(self, name, **kwargs): + def delete_api_token( + self, + name, + **kwargs + ): """delete_api_token # noqa: E501 Delete (revoke) an API token by name. The token must belong to the authenticated user. # noqa: E501 @@ -303,19 +376,39 @@ def delete_api_token(self, name, **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["name"] = name + 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['name'] = \ + name return self.delete_api_token_endpoint.call_with_http_info(**kwargs) - def get_api_token_by_snippet(self, snippet, **kwargs): + def get_api_token_by_snippet( + self, + snippet, + **kwargs + ): """get_api_token_by_snippet # noqa: E501 Retrieve a single API token by its raw_key_snippet. Returns metadata only; the raw key is never retrievable after creation. # noqa: E501 @@ -361,19 +454,38 @@ def get_api_token_by_snippet(self, snippet, **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["snippet"] = snippet + 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['snippet'] = \ + snippet return self.get_api_token_by_snippet_endpoint.call_with_http_info(**kwargs) - def list_api_tokens(self, **kwargs): + def list_api_tokens( + self, + **kwargs + ): """list_api_tokens # noqa: E501 List all API tokens for the authenticated user. Returns metadata only; raw keys are never retrievable after creation. # noqa: E501 @@ -419,13 +531,29 @@ def list_api_tokens(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_api_tokens_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 83a2cb4fd..4088d2ba4 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 c50532f8f..1337ff20e 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 c80c89080..623682c9e 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 @@ -43,342 +44,448 @@ 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', + ], + 'nullable': [ ], - "required": [ - "detector_creation_input_request", + 'enum': [ ], - "nullable": [], - "enum": [], - "validation": [], + '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": {}, + 'collection_format_map': { + } }, - headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, - 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", + 'all': [ + 'id', ], - "required": [ - "id", + 'required': [ + 'id', ], - "nullable": [], - "enum": [], - "validation": [], + 'nullable': [ + ], + 'enum': [ + ], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "id": (str,), + 'validations': { + }, + 'allowed_values': { }, - "attribute_map": { - "id": "id", + 'openapi_types': { + 'id': + (str,), }, - "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_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', ], - "required": [ - "id", + 'nullable': [ ], - "nullable": [], - "enum": [], - "validation": [], + 'enum': [ + ], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "id": (str,), + 'validations': { + }, + 'allowed_values': { }, - "attribute_map": { - "id": "id", + 'openapi_types': { + 'id': + (str,), }, - "location_map": { - "id": "path", + 'attribute_map': { + 'id': 'id', }, - "collection_format_map": {}, + '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", + '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 ) self.list_detector_pipelines_endpoint = _Endpoint( settings={ - "response_type": (PaginatedMLPipelineList,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/detectors/{detector_id}/pipelines", - "operation_id": "list_detector_pipelines", - "http_method": "GET", - "servers": None, + 'response_type': (PaginatedMLPipelineList,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/detectors/{detector_id}/pipelines', + 'operation_id': 'list_detector_pipelines', + 'http_method': 'GET', + 'servers': None, }, params_map={ - "all": [ - "detector_id", - "ordering", - "page", - "page_size", - "search", + 'all': [ + 'detector_id', + 'ordering', + 'page', + 'page_size', + 'search', + ], + 'required': [ + 'detector_id', ], - "required": [ - "detector_id", + 'nullable': [ ], - "nullable": [], - "enum": [], - "validation": [], + 'enum': [ + ], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "detector_id": (str,), - "ordering": (str,), - "page": (int,), - "page_size": (int,), - "search": (str,), - }, - "attribute_map": { - "detector_id": "detector_id", - "ordering": "ordering", - "page": "page", - "page_size": "page_size", - "search": "search", - }, - "location_map": { - "detector_id": "path", - "ordering": "query", - "page": "query", - "page_size": "query", - "search": "query", - }, - "collection_format_map": {}, + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'detector_id': + (str,), + 'ordering': + (str,), + 'page': + (int,), + 'page_size': + (int,), + 'search': + (str,), + }, + 'attribute_map': { + 'detector_id': 'detector_id', + 'ordering': 'ordering', + 'page': 'page', + 'page_size': 'page_size', + 'search': 'search', + }, + 'location_map': { + 'detector_id': 'path', + 'ordering': 'query', + 'page': 'query', + 'page_size': 'query', + 'search': '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_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", + 'all': [ + 'page', + 'page_size', + ], + 'required': [], + 'nullable': [ ], - "required": [], - "nullable": [], - "enum": [], - "validation": [], + 'enum': [ + ], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "page": (int,), - "page_size": (int,), + 'validations': { + }, + 'allowed_values': { }, - "attribute_map": { - "page": "page", - "page_size": "page_size", + 'openapi_types': { + 'page': + (int,), + 'page_size': + (int,), }, - "location_map": { - "page": "query", - "page_size": "query", + 'attribute_map': { + 'page': 'page', + 'page_size': 'page_size', }, - "collection_format_map": {}, + 'location_map': { + '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.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": [], - "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 @@ -424,19 +531,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 @@ -482,19 +609,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 @@ -540,19 +687,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 @@ -598,19 +765,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 @@ -656,19 +843,39 @@ 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_detector_pipelines(self, detector_id, **kwargs): + def list_detector_pipelines( + self, + detector_id, + **kwargs + ): """list_detector_pipelines # noqa: E501 List all MLPipelines for a detector. # noqa: E501 @@ -718,19 +925,38 @@ def list_detector_pipelines(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_pipelines_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 @@ -776,18 +1002,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 @@ -834,14 +1079,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 a0b3187d2..09229eb00 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 03ad2600e..8c601a076 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 fd948a9f5..3a9f141d2 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 ed4670350..1df2695e9 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 f1af2cb52..d5a842d13 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/priming_groups_api.py b/generated/groundlight_openapi_client/api/priming_groups_api.py index ca17a4c75..99fdee56d 100644 --- a/generated/groundlight_openapi_client/api/priming_groups_api.py +++ b/generated/groundlight_openapi_client/api/priming_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.paginated_priming_group_list import PaginatedPrimingGroupList from groundlight_openapi_client.model.priming_group import PrimingGroup @@ -39,174 +40,228 @@ def __init__(self, api_client=None): self.api_client = api_client self.create_priming_group_endpoint = _Endpoint( settings={ - "response_type": (PrimingGroup,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/priming-groups", - "operation_id": "create_priming_group", - "http_method": "POST", - "servers": None, + 'response_type': (PrimingGroup,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/priming-groups', + 'operation_id': 'create_priming_group', + 'http_method': 'POST', + 'servers': None, }, params_map={ - "all": [ - "priming_group_creation_input_request", + 'all': [ + 'priming_group_creation_input_request', + ], + 'required': [ + 'priming_group_creation_input_request', + ], + 'nullable': [ ], - "required": [ - "priming_group_creation_input_request", + 'enum': [ ], - "nullable": [], - "enum": [], - "validation": [], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "priming_group_creation_input_request": (PrimingGroupCreationInputRequest,), + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'priming_group_creation_input_request': + (PrimingGroupCreationInputRequest,), + }, + 'attribute_map': { }, - "attribute_map": {}, - "location_map": { - "priming_group_creation_input_request": "body", + 'location_map': { + 'priming_group_creation_input_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_priming_group_endpoint = _Endpoint( settings={ - "response_type": None, - "auth": ["ApiToken"], - "endpoint_path": "/v1/priming-groups/{id}", - "operation_id": "delete_priming_group", - "http_method": "DELETE", - "servers": None, + 'response_type': None, + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/priming-groups/{id}', + 'operation_id': 'delete_priming_group', + '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 ) self.get_priming_group_endpoint = _Endpoint( settings={ - "response_type": (PrimingGroup,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/priming-groups/{id}", - "operation_id": "get_priming_group", - "http_method": "GET", - "servers": None, + 'response_type': (PrimingGroup,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/priming-groups/{id}', + 'operation_id': 'get_priming_group', + '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": (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": ["application/json"], - "content_type": [], + 'accept': [ + 'application/json' + ], + 'content_type': [], }, - api_client=api_client, + api_client=api_client ) self.list_priming_groups_endpoint = _Endpoint( settings={ - "response_type": (PaginatedPrimingGroupList,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/priming-groups", - "operation_id": "list_priming_groups", - "http_method": "GET", - "servers": None, + 'response_type': (PaginatedPrimingGroupList,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/priming-groups', + 'operation_id': 'list_priming_groups', + 'http_method': 'GET', + 'servers': None, }, params_map={ - "all": [ - "ordering", - "page", - "page_size", - "search", + 'all': [ + 'ordering', + 'page', + 'page_size', + 'search', + ], + 'required': [], + 'nullable': [ ], - "required": [], - "nullable": [], - "enum": [], - "validation": [], + 'enum': [ + ], + 'validation': [ + ] }, root_map={ - "validations": {}, - "allowed_values": {}, - "openapi_types": { - "ordering": (str,), - "page": (int,), - "page_size": (int,), - "search": (str,), + 'validations': { + }, + 'allowed_values': { + }, + 'openapi_types': { + 'ordering': + (str,), + 'page': + (int,), + 'page_size': + (int,), + 'search': + (str,), }, - "attribute_map": { - "ordering": "ordering", - "page": "page", - "page_size": "page_size", - "search": "search", + 'attribute_map': { + 'ordering': 'ordering', + 'page': 'page', + 'page_size': 'page_size', + 'search': 'search', }, - "location_map": { - "ordering": "query", - "page": "query", - "page_size": "query", - "search": "query", + 'location_map': { + 'ordering': 'query', + 'page': 'query', + 'page_size': 'query', + 'search': '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_priming_group(self, priming_group_creation_input_request, **kwargs): + def create_priming_group( + self, + priming_group_creation_input_request, + **kwargs + ): """create_priming_group # noqa: E501 Create a new priming group seeded from an existing trained MLPipeline. The cached_vizlogic_key from the source pipeline is copied as the base binary. No FK to the source pipeline is stored, so deleting the source detector does not affect this priming group. # noqa: E501 @@ -252,19 +307,39 @@ def create_priming_group(self, priming_group_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["priming_group_creation_input_request"] = priming_group_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['priming_group_creation_input_request'] = \ + priming_group_creation_input_request return self.create_priming_group_endpoint.call_with_http_info(**kwargs) - def delete_priming_group(self, id, **kwargs): + def delete_priming_group( + self, + id, + **kwargs + ): """delete_priming_group # noqa: E501 Delete a priming group. Only the owning user's account may delete it. # noqa: E501 @@ -310,19 +385,39 @@ def delete_priming_group(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_priming_group_endpoint.call_with_http_info(**kwargs) - def get_priming_group(self, id, **kwargs): + def get_priming_group( + self, + id, + **kwargs + ): """get_priming_group # noqa: E501 Retrieve a priming group by its ID. # noqa: E501 @@ -368,19 +463,38 @@ def get_priming_group(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_priming_group_endpoint.call_with_http_info(**kwargs) - def list_priming_groups(self, **kwargs): + def list_priming_groups( + self, + **kwargs + ): """list_priming_groups # noqa: E501 List all priming groups either owned by the authenticated user, or with is_global=True. # noqa: E501 @@ -428,13 +542,29 @@ def list_priming_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.list_priming_groups_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 a14200f25..5fcf4e14f 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,9 +20,9 @@ datetime, file_type, none_type, - validate_and_convert_types, + validate_and_convert_types ) -from groundlight_openapi_client.model.inline_response2002 import InlineResponse2002 +from groundlight_openapi_client.model.me import Me class UserApi(object): @@ -37,33 +38,56 @@ 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': (Me,), + '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 + Retrieve the authenticated user's id, email, username, and customer groups. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -100,17 +124,33 @@ def who_am_i(self, **kwargs): async_req (bool): execute request asynchronously Returns: - InlineResponse2002 + Me 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/vlm_verifications_api.py b/generated/groundlight_openapi_client/api/vlm_verifications_api.py index 721ae2c7c..d9badbf75 100644 --- a/generated/groundlight_openapi_client/api/vlm_verifications_api.py +++ b/generated/groundlight_openapi_client/api/vlm_verifications_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.vlm_verification import VlmVerification @@ -37,64 +38,85 @@ def __init__(self, api_client=None): self.api_client = api_client self.submit_vlm_verification_endpoint = _Endpoint( settings={ - "response_type": (VlmVerification,), - "auth": ["ApiToken"], - "endpoint_path": "/v1/vlm-verifications", - "operation_id": "submit_vlm_verification", - "http_method": "POST", - "servers": None, + 'response_type': (VlmVerification,), + 'auth': [ + 'ApiToken' + ], + 'endpoint_path': '/v1/vlm-verifications', + 'operation_id': 'submit_vlm_verification', + 'http_method': 'POST', + 'servers': None, }, params_map={ - "all": [ - "media", - "query", - "model_id", + 'all': [ + 'media', + 'query', + 'model_id', ], - "required": [ - "media", - "query", + 'required': [ + 'media', + 'query', ], - "nullable": [], - "enum": [], - "validation": [ - "media", + 'nullable': [ ], + 'enum': [ + ], + 'validation': [ + 'media', + ] }, root_map={ - "validations": { - ("media",): { - "max_items": 8, - "min_items": 1, + 'validations': { + ('media',): { + + 'max_items': 8, + 'min_items': 1, }, }, - "allowed_values": {}, - "openapi_types": { - "media": ([file_type],), - "query": (str,), - "model_id": (str,), + 'allowed_values': { }, - "attribute_map": { - "media": "media", - "query": "query", - "model_id": "model_id", + 'openapi_types': { + 'media': + ([file_type],), + 'query': + (str,), + 'model_id': + (str,), }, - "location_map": { - "media": "form", - "query": "form", - "model_id": "form", + 'attribute_map': { + 'media': 'media', + 'query': 'query', + 'model_id': 'model_id', }, - "collection_format_map": { - "media": "csv", + 'location_map': { + 'media': 'form', + 'query': 'form', + 'model_id': 'form', }, + 'collection_format_map': { + 'media': 'csv', + } }, - headers_map={"accept": ["application/json"], "content_type": ["multipart/form-data"]}, - api_client=api_client, + headers_map={ + 'accept': [ + 'application/json' + ], + 'content_type': [ + 'multipart/form-data' + ] + }, + api_client=api_client ) - def submit_vlm_verification(self, media, query, **kwargs): + def submit_vlm_verification( + self, + media, + query, + **kwargs + ): """submit_vlm_verification # noqa: E501 - Submit one or more images for VLM-based alert verification. Send as `multipart/form-data`: one to eight `media` image parts, a `query` field, and an optional `model_id` field. Video is not yet supported. For example: ```bash $ curl https://api.groundlight.ai/device-api/v1/vlm-verifications \\ -F \"media=@image.jpg;type=image/jpeg\" \\ -F \"query=Is there a fire?\" ``` # noqa: E501 + Submit one or more images for VLM-based alert verification. Send everything as `multipart/form-data`: one to eight `media` parts, plus a `query` field and an optional `model_id` field. The `query` describes what each image is and what to look for — the server makes no assumptions about the images' meaning. Images are presented to the model labeled `Image 1`, `Image 2`, ... in upload order, so the query can reference them (e.g. \"Image 1 is the full frame; image 2 is the cropped ROI ...\"). (Video parts are planned but not yet supported and are rejected.) Requires `ENABLE_BEDROCK_VLM_ACCESS` (enabled for Standard_Internal and SciDuck accounts) and accepted terms of service. ```bash curl https://api.groundlight.ai/device-api/v1/vlm-verifications \\ -F \"media=@full_frame.jpg;type=image/jpeg\" \\ -F \"media=@roi.jpg;type=image/jpeg\" \\ -F \"query=Image 1 is the full camera frame; image 2 is the cropped region a detector flagged. Is there really a fire?\" \\ -F \"model_id=gpt-5.4\" ``` # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -139,15 +161,33 @@ def submit_vlm_verification(self, media, query, **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["media"] = media - kwargs["query"] = query + 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['media'] = \ + media + kwargs['query'] = \ + query return self.submit_vlm_verification_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 da2e348ab..e18e15faa 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 ec3642609..5c14b1716 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 654b832fc..ac1146ca3 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 393dbba83..5cb07d28d 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 98dd18e3b..ff8a5a916 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 8308d44b3..516ab4d9c 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 a38fae043..604f75ae5 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 89da5af16..2e3cb921f 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 1e1f6b8f8..5b9a80a46 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/api_token.py b/generated/groundlight_openapi_client/model/api_token.py index e967be455..fcef95261 100644 --- a/generated/groundlight_openapi_client/model/api_token.py +++ b/generated/groundlight_openapi_client/model/api_token.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 ApiToken(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,11 +55,12 @@ class ApiToken(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("name",): { - "max_length": 64, + ('name',): { + 'max_length': 64, }, } @@ -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,41 +85,33 @@ def openapi_types(): and the value is attribute type. """ return { - "name": (str,), # noqa: E501 - "raw_key_snippet": (str,), # noqa: E501 - "created_at": (datetime,), # noqa: E501 - "last_used_at": ( - datetime, - none_type, - ), # noqa: E501 - "expires_at": ( - datetime, - none_type, - ), # noqa: E501 - "token_ttl": ( - int, - none_type, - ), # noqa: E501 + 'name': (str,), # noqa: E501 + 'raw_key_snippet': (str,), # noqa: E501 + 'created_at': (datetime,), # noqa: E501 + 'last_used_at': (datetime, none_type,), # noqa: E501 + 'expires_at': (datetime, none_type,), # noqa: E501 + 'token_ttl': (int, none_type,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "name": "name", # noqa: E501 - "raw_key_snippet": "raw_key_snippet", # noqa: E501 - "created_at": "created_at", # noqa: E501 - "last_used_at": "last_used_at", # noqa: E501 - "expires_at": "expires_at", # noqa: E501 - "token_ttl": "token_ttl", # noqa: E501 + 'name': 'name', # noqa: E501 + 'raw_key_snippet': 'raw_key_snippet', # noqa: E501 + 'created_at': 'created_at', # noqa: E501 + 'last_used_at': 'last_used_at', # noqa: E501 + 'expires_at': 'expires_at', # noqa: E501 + 'token_ttl': 'token_ttl', # noqa: E501 } read_only_vars = { - "raw_key_snippet", # noqa: E501 - "created_at", # noqa: E501 - "last_used_at", # noqa: E501 - "token_ttl", # noqa: E501 + 'raw_key_snippet', # noqa: E501 + 'created_at', # noqa: E501 + 'last_used_at', # noqa: E501 + 'token_ttl', # noqa: E501 } _composed_schemas = {} @@ -140,7 +125,7 @@ def _from_openapi_data(cls, name, raw_key_snippet, created_at, last_used_at, *ar name (str): An nickname for the API token. This name must be unique for this user. raw_key_snippet (str): Since we're storing hashed keys, it can be useful to see the raw prefix snippet of the token. created_at (datetime): When was this token created? - last_used_at (datetime): The most recent time this API token was used. (Helpful for detecting suspicious activity). + last_used_at (datetime, none_type): The most recent time this API token was used for authentication. Null until first use. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -174,20 +159,20 @@ def _from_openapi_data(cls, name, raw_key_snippet, created_at, last_used_at, *ar through its discriminator because we passed in _visited_composed_classes = (Animal,) expires_at (datetime, none_type): When does this token expire? If Null, the token never expires.. [optional] # noqa: E501 + token_ttl (int, none_type): Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never expire. Omitted only by older servers that do not yet expose this field.. [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,24 +192,22 @@ def _from_openapi_data(cls, name, raw_key_snippet, created_at, last_used_at, *ar self.created_at = created_at self.last_used_at = last_used_at 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 @@ -265,18 +248,18 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) expires_at (datetime, none_type): When does this token expire? If Null, the token never expires.. [optional] # noqa: E501 + token_ttl (int, none_type): Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never expire. Omitted only by older servers that do not yet expose this field.. [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__, ), @@ -293,17 +276,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/api_token_create_response.py b/generated/groundlight_openapi_client/model/api_token_create_response.py index 17acd71c2..8804042bd 100644 --- a/generated/groundlight_openapi_client/model/api_token_create_response.py +++ b/generated/groundlight_openapi_client/model/api_token_create_response.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 ApiTokenCreateResponse(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,11 +55,12 @@ class ApiTokenCreateResponse(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("name",): { - "max_length": 64, + ('name',): { + 'max_length': 64, }, } @@ -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,60 +85,50 @@ def openapi_types(): and the value is attribute type. """ return { - "name": (str,), # noqa: E501 - "raw_key_snippet": (str,), # noqa: E501 - "created_at": (datetime,), # noqa: E501 - "last_used_at": ( - datetime, - none_type, - ), # noqa: E501 - "raw_key": (str,), # noqa: E501 - "expires_at": ( - datetime, - none_type, - ), # noqa: E501 - "token_ttl": ( - int, - none_type, - ), # noqa: E501 + 'name': (str,), # noqa: E501 + 'raw_key_snippet': (str,), # noqa: E501 + 'created_at': (datetime,), # noqa: E501 + 'last_used_at': (datetime, none_type,), # noqa: E501 + 'raw_key': (str,), # noqa: E501 + 'expires_at': (datetime, none_type,), # noqa: E501 + 'token_ttl': (int, none_type,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "name": "name", # noqa: E501 - "raw_key_snippet": "raw_key_snippet", # noqa: E501 - "created_at": "created_at", # noqa: E501 - "last_used_at": "last_used_at", # noqa: E501 - "raw_key": "raw_key", # noqa: E501 - "expires_at": "expires_at", # noqa: E501 - "token_ttl": "token_ttl", # noqa: E501 + 'name': 'name', # noqa: E501 + 'raw_key_snippet': 'raw_key_snippet', # noqa: E501 + 'created_at': 'created_at', # noqa: E501 + 'last_used_at': 'last_used_at', # noqa: E501 + 'raw_key': 'raw_key', # noqa: E501 + 'expires_at': 'expires_at', # noqa: E501 + 'token_ttl': 'token_ttl', # noqa: E501 } read_only_vars = { - "raw_key_snippet", # noqa: E501 - "created_at", # noqa: E501 - "last_used_at", # noqa: E501 - "raw_key", # noqa: E501 - "token_ttl", # noqa: E501 + 'raw_key_snippet', # noqa: E501 + 'created_at', # noqa: E501 + 'last_used_at', # noqa: E501 + 'raw_key', # noqa: E501 + 'token_ttl', # noqa: E501 } _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data( - cls, name, raw_key_snippet, created_at, last_used_at, raw_key, *args, **kwargs - ): # noqa: E501 + def _from_openapi_data(cls, name, raw_key_snippet, created_at, last_used_at, raw_key, *args, **kwargs): # noqa: E501 """ApiTokenCreateResponse - a model defined in OpenAPI Args: name (str): An nickname for the API token. This name must be unique for this user. raw_key_snippet (str): Since we're storing hashed keys, it can be useful to see the raw prefix snippet of the token. created_at (datetime): When was this token created? - last_used_at (datetime): The most recent time this API token was used. (Helpful for detecting suspicious activity). + last_used_at (datetime, none_type): The most recent time this API token was used for authentication. Null until first use. raw_key (str): The full API token secret. Returned only once, when the token is created. Keyword Args: @@ -180,20 +163,20 @@ def _from_openapi_data( through its discriminator because we passed in _visited_composed_classes = (Animal,) expires_at (datetime, none_type): When does this token expire? If Null, the token never expires.. [optional] # noqa: E501 + token_ttl (int, none_type): Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never expire. Omitted only by older servers that do not yet expose this field.. [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__, ), @@ -214,24 +197,22 @@ def _from_openapi_data( self.last_used_at = last_used_at self.raw_key = raw_key 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 @@ -272,18 +253,18 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) expires_at (datetime, none_type): When does this token expire? If Null, the token never expires.. [optional] # noqa: E501 + token_ttl (int, none_type): Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never expire. Omitted only by older servers that do not yet expose this field.. [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__, ), @@ -300,17 +281,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/api_token_request.py b/generated/groundlight_openapi_client/model/api_token_request.py index 702cdcaa6..75d8a612c 100644 --- a/generated/groundlight_openapi_client/model/api_token_request.py +++ b/generated/groundlight_openapi_client/model/api_token_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 ApiTokenRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,12 +55,13 @@ class ApiTokenRequest(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("name",): { - "max_length": 64, - "min_length": 1, + ('name',): { + 'max_length': 64, + '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,23 +86,22 @@ def openapi_types(): and the value is attribute type. """ return { - "name": (str,), # noqa: E501 - "expires_at": ( - datetime, - none_type, - ), # noqa: E501 + 'name': (str,), # noqa: E501 + 'expires_at': (datetime, none_type,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "name": "name", # noqa: E501 - "expires_at": "expires_at", # noqa: E501 + 'name': 'name', # noqa: E501 + 'expires_at': 'expires_at', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -155,18 +147,17 @@ def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 expires_at (datetime, none_type): When does this token expire? If Null, the token never expires.. [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,24 +174,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 @@ -244,16 +233,15 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 expires_at (datetime, none_type): When does this token expire? If Null, the token never expires.. [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 +258,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/b_box_geometry.py b/generated/groundlight_openapi_client/model/b_box_geometry.py index 2282dfd73..1ad77b5d7 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 fcac579f4..9d5913926 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 018a6f3e5..31ed8ba41 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 aa466bb88..86d08e37c 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 index ed756ae48..8a2435937 100644 --- a/generated/groundlight_openapi_client/model/bounding_box_label_enum.py +++ b/generated/groundlight_openapi_client/model/bounding_box_label_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 BoundingBoxLabelEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -50,15 +52,16 @@ 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 @@ -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/bounding_box_mode_configuration.py b/generated/groundlight_openapi_client/model/bounding_box_mode_configuration.py index bcf98f27f..1e0df7990 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 8fc4c4178..4cd548926 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 720dac0d9..9e6c48869 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 65a2861f1..48e6131f7 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 674578a68..c5326c64b 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 9c2d3be9f..7603f76df 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 85e692e5f..ebc34cdfb 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/inline_response2002.py b/generated/groundlight_openapi_client/model/customer_group.py similarity index 77% rename from generated/groundlight_openapi_client/model/inline_response2002.py rename to generated/groundlight_openapi_client/model/customer_group.py index 1fbfd51d5..6c101b4f2 100644 --- a/generated/groundlight_openapi_client/model/inline_response2002.py +++ b/generated/groundlight_openapi_client/model/customer_group.py @@ -8,6 +8,7 @@ Generated by: https://openapi-generator.tech """ + import re # noqa: F401 import sys # noqa: F401 @@ -24,12 +25,13 @@ file_type, none_type, validate_get_composed_info, - OpenApiModel, + OpenApiModel ) from groundlight_openapi_client.exceptions import ApiAttributeError -class InlineResponse2002(ModelNormal): + +class CustomerGroup(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,25 +82,33 @@ def openapi_types(): and the value is attribute type. """ return { - "username": (str,), # noqa: E501 + 'id': (int,), # noqa: E501 + 'name': (str,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "username": "username", # noqa: E501 + 'id': 'id', # noqa: E501 + 'name': 'name', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 - """InlineResponse2002 - a model defined in OpenAPI + def _from_openapi_data(cls, id, name, *args, **kwargs): # noqa: E501 + """CustomerGroup - a model defined in OpenAPI + + Args: + id (int): Numeric id of the customer group. + name (str): Name of the customer group. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -139,21 +141,19 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - 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__, ), @@ -168,30 +168,34 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + 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 - def __init__(self, *args, **kwargs): # noqa: E501 - """InlineResponse2002 - a model defined in OpenAPI + def __init__(self, id, name, *args, **kwargs): # noqa: E501 + """CustomerGroup - a model defined in OpenAPI + + Args: + id (int): Numeric id of the customer group. + name (str): Name of the customer group. Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -224,19 +228,17 @@ def __init__(self, *args, **kwargs): # noqa: E501 Animal class but this time we won't travel through its discriminator because we passed in _visited_composed_classes = (Animal,) - 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__, ), @@ -251,18 +253,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + 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) 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 2cde79915..cb1f2bcae 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 8d6997ae1..1831f5d85 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,42 +67,43 @@ 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, }, - ("edge_pipeline_config",): { - "max_length": 100, + ('edge_pipeline_config',): { + 'max_length': 100, }, - ("metadata",): { - "max_length": 1362, - "min_length": 1, + ('metadata',): { + 'max_length': 1362, + 'min_length': 1, }, - ("priming_group_id",): { - "max_length": 44, - "min_length": 1, + ('priming_group_id',): { + 'max_length': 44, + 'min_length': 1, }, } @@ -113,17 +114,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 @@ -139,67 +130,40 @@ 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 - "edge_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 - "priming_group_id": ( - 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 + 'edge_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 + 'priming_group_id': (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 - "edge_pipeline_config": "edge_pipeline_config", # noqa: E501 - "metadata": "metadata", # noqa: E501 - "mode": "mode", # noqa: E501 - "mode_configuration": "mode_configuration", # noqa: E501 - "priming_group_id": "priming_group_id", # 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 + 'edge_pipeline_config': 'edge_pipeline_config', # noqa: E501 + 'metadata': 'metadata', # noqa: E501 + 'mode': 'mode', # noqa: E501 + 'mode_configuration': 'mode_configuration', # noqa: E501 + 'priming_group_id': 'priming_group_id', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -254,18 +218,17 @@ def _from_openapi_data(cls, name, query, *args, **kwargs): # noqa: E501 priming_group_id (str, none_type): ID of an existing PrimingGroup to associate with this detector (optional).. [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__, ), @@ -283,24 +246,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 @@ -353,16 +314,15 @@ def __init__(self, name, query, *args, **kwargs): # noqa: E501 priming_group_id (str, none_type): ID of an existing PrimingGroup to associate with this detector (optional).. [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__, ), @@ -380,17 +340,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 5620b0c94..7eaa28f73 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 3302860fe..f28697d38 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_mode_enum.py b/generated/groundlight_openapi_client/model/detector_mode_enum.py index 98dc4f0bd..4907f8c3c 100644 --- a/generated/groundlight_openapi_client/model/detector_mode_enum.py +++ b/generated/groundlight_openapi_client/model/detector_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 DetectorModeEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -50,16 +52,17 @@ class DetectorModeEnum(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/detector_type_enum.py b/generated/groundlight_openapi_client/model/detector_type_enum.py index 94d446da1..49b7825ea 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 c8da646d9..2e0b107a8 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,62 +82,34 @@ 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 - "minimal_compatible": (bool,), # 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 + 'minimal_compatible': (bool,), # 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 - "minimal_compatible": "minimal_compatible", # 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 + 'minimal_compatible': 'minimal_compatible', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -193,18 +159,17 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 minimal_compatible (bool): [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__, ), @@ -220,24 +185,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 @@ -285,16 +248,15 @@ def __init__(self, *args, **kwargs): # noqa: E501 minimal_compatible (bool): [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__, ), @@ -310,17 +272,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 2b80360ea..505bba487 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 79cf01797..92df5eeba 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 424707307..41939968c 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 62e2494fd..1810e3d46 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 cdb300325..e859dec30 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 3b1ec0266..7ca38024d 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,108 +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, - none_type, - ), # 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, none_type,), # 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 = {} @@ -250,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__, ), @@ -277,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 @@ -353,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__, ), @@ -378,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_response200_summary.py b/generated/groundlight_openapi_client/model/inline_response200_summary.py index d5c30a123..61601c599 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 b2eb180b7..49f7d401b 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 810b9e2ef..cc19ad479 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 ee9b73e9e..12324f286 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 434f8ad8a..ab086120e 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/me.py b/generated/groundlight_openapi_client/model/me.py new file mode 100644 index 000000000..c8c6cde8c --- /dev/null +++ b/generated/groundlight_openapi_client/model/me.py @@ -0,0 +1,286 @@ +""" + 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 + + +def lazy_import(): + from groundlight_openapi_client.model.customer_group import CustomerGroup + globals()['CustomerGroup'] = CustomerGroup + + +class Me(ModelNormal): + """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. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + 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 = { + } + + validations = { + } + + @cached_property + 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 + """ + lazy_import() + return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 + + _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. + """ + lazy_import() + return { + 'id': (int,), # noqa: E501 + 'email': (str,), # noqa: E501 + 'username': (str,), # noqa: E501 + 'groups': ([CustomerGroup],), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + + attribute_map = { + 'id': 'id', # noqa: E501 + 'email': 'email', # noqa: E501 + 'username': 'username', # noqa: E501 + 'groups': 'groups', # noqa: E501 + } + + read_only_vars = { + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, email, username, groups, *args, **kwargs): # noqa: E501 + """Me - a model defined in OpenAPI + + Args: + id (int): Numeric id of the authenticated user. + email (str): Email address of the authenticated user. + username (str): Username of the authenticated user. + groups ([CustomerGroup]): Customer groups the authenticated user belongs to. + + Keyword Args: + _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,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_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." % ( + 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.id = id + self.email = email + self.username = username + self.groups = groups + 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: + # 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', + ]) + + @convert_js_args_to_python_args + def __init__(self, id, email, username, groups, *args, **kwargs): # noqa: E501 + """Me - a model defined in OpenAPI + + Args: + id (int): Numeric id of the authenticated user. + email (str): Email address of the authenticated user. + username (str): Username of the authenticated user. + groups ([CustomerGroup]): Customer groups the authenticated user belongs to. + + Keyword Args: + _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,) + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_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." % ( + 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.id = id + self.email = email + self.username = username + self.groups = groups + 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: + # 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.") diff --git a/generated/groundlight_openapi_client/model/ml_pipeline.py b/generated/groundlight_openapi_client/model/ml_pipeline.py index 621a87ba6..15445e5c4 100644 --- a/generated/groundlight_openapi_client/model/ml_pipeline.py +++ b/generated/groundlight_openapi_client/model/ml_pipeline.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 MLPipeline(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,9 +55,11 @@ class MLPipeline(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,115 +82,74 @@ def openapi_types(): and the value is attribute type. """ return { - "id": (str,), # noqa: E501 - "pipeline_config": (str,), # noqa: E501 - "is_active_pipeline": (bool,), # noqa: E501 - "is_edge_pipeline": (bool,), # noqa: E501 - "is_unclear_pipeline": (bool,), # noqa: E501 - "is_oodd_pipeline": (bool,), # noqa: E501 - "is_enabled": (bool,), # noqa: E501 - "created_at": (datetime,), # noqa: E501 - "trained_at": ( - datetime, - none_type, - ), # noqa: E501 - "type": (str,), # noqa: E501 - "friendly_name": ( - str, - none_type, - ), # noqa: E501 - "model_binary_id": ( - str, - none_type, - ), # noqa: E501 - "training_in_progress": ( - {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, - none_type, - ), # noqa: E501 - "metrics": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - "eval_mlbinary_key": ( - str, - none_type, - ), # noqa: E501 - "eval_mlbinary_revision_number": ( - int, - none_type, - ), # noqa: E501 - "eval_mlbinary_friendly_name": ( - str, - none_type, - ), # noqa: E501 + 'id': (str,), # noqa: E501 + 'pipeline_config': (str,), # noqa: E501 + 'is_active_pipeline': (bool,), # noqa: E501 + 'is_edge_pipeline': (bool,), # noqa: E501 + 'is_unclear_pipeline': (bool,), # noqa: E501 + 'is_oodd_pipeline': (bool,), # noqa: E501 + 'is_enabled': (bool,), # noqa: E501 + 'created_at': (datetime,), # noqa: E501 + 'trained_at': (datetime, none_type,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'friendly_name': (str, none_type,), # noqa: E501 + 'model_binary_id': (str, none_type,), # noqa: E501 + 'training_in_progress': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'metrics': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + 'eval_mlbinary_key': (str, none_type,), # noqa: E501 + 'eval_mlbinary_revision_number': (int, none_type,), # noqa: E501 + 'eval_mlbinary_friendly_name': (str, none_type,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "id": "id", # noqa: E501 - "pipeline_config": "pipeline_config", # noqa: E501 - "is_active_pipeline": "is_active_pipeline", # noqa: E501 - "is_edge_pipeline": "is_edge_pipeline", # noqa: E501 - "is_unclear_pipeline": "is_unclear_pipeline", # noqa: E501 - "is_oodd_pipeline": "is_oodd_pipeline", # noqa: E501 - "is_enabled": "is_enabled", # noqa: E501 - "created_at": "created_at", # noqa: E501 - "trained_at": "trained_at", # noqa: E501 - "type": "type", # noqa: E501 - "friendly_name": "friendly_name", # noqa: E501 - "model_binary_id": "model_binary_id", # noqa: E501 - "training_in_progress": "training_in_progress", # noqa: E501 - "metrics": "metrics", # noqa: E501 - "eval_mlbinary_key": "eval_mlbinary_key", # noqa: E501 - "eval_mlbinary_revision_number": "eval_mlbinary_revision_number", # noqa: E501 - "eval_mlbinary_friendly_name": "eval_mlbinary_friendly_name", # noqa: E501 + 'id': 'id', # noqa: E501 + 'pipeline_config': 'pipeline_config', # noqa: E501 + 'is_active_pipeline': 'is_active_pipeline', # noqa: E501 + 'is_edge_pipeline': 'is_edge_pipeline', # noqa: E501 + 'is_unclear_pipeline': 'is_unclear_pipeline', # noqa: E501 + 'is_oodd_pipeline': 'is_oodd_pipeline', # noqa: E501 + 'is_enabled': 'is_enabled', # noqa: E501 + 'created_at': 'created_at', # noqa: E501 + 'trained_at': 'trained_at', # noqa: E501 + 'type': 'type', # noqa: E501 + 'friendly_name': 'friendly_name', # noqa: E501 + 'model_binary_id': 'model_binary_id', # noqa: E501 + 'training_in_progress': 'training_in_progress', # noqa: E501 + 'metrics': 'metrics', # noqa: E501 + 'eval_mlbinary_key': 'eval_mlbinary_key', # noqa: E501 + 'eval_mlbinary_revision_number': 'eval_mlbinary_revision_number', # noqa: E501 + 'eval_mlbinary_friendly_name': 'eval_mlbinary_friendly_name', # noqa: E501 } read_only_vars = { - "id", # noqa: E501 - "pipeline_config", # noqa: E501 - "is_active_pipeline", # noqa: E501 - "is_edge_pipeline", # noqa: E501 - "is_unclear_pipeline", # noqa: E501 - "is_oodd_pipeline", # noqa: E501 - "is_enabled", # noqa: E501 - "created_at", # noqa: E501 - "trained_at", # noqa: E501 - "type", # noqa: E501 - "friendly_name", # noqa: E501 - "training_in_progress", # noqa: E501 - "metrics", # noqa: E501 - "eval_mlbinary_key", # noqa: E501 - "eval_mlbinary_revision_number", # noqa: E501 - "eval_mlbinary_friendly_name", # noqa: E501 + 'id', # noqa: E501 + 'pipeline_config', # noqa: E501 + 'is_active_pipeline', # noqa: E501 + 'is_edge_pipeline', # noqa: E501 + 'is_unclear_pipeline', # noqa: E501 + 'is_oodd_pipeline', # noqa: E501 + 'is_enabled', # noqa: E501 + 'created_at', # noqa: E501 + 'trained_at', # noqa: E501 + 'type', # noqa: E501 + 'friendly_name', # noqa: E501 + 'training_in_progress', # noqa: E501 + 'metrics', # noqa: E501 + 'eval_mlbinary_key', # noqa: E501 + 'eval_mlbinary_revision_number', # noqa: E501 + 'eval_mlbinary_friendly_name', # noqa: E501 } _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data( - cls, - id, - pipeline_config, - is_active_pipeline, - is_edge_pipeline, - is_unclear_pipeline, - is_oodd_pipeline, - is_enabled, - created_at, - trained_at, - type, - friendly_name, - model_binary_id, - training_in_progress, - metrics, - eval_mlbinary_key, - eval_mlbinary_revision_number, - eval_mlbinary_friendly_name, - *args, - **kwargs, - ): # noqa: E501 + def _from_openapi_data(cls, id, pipeline_config, is_active_pipeline, is_edge_pipeline, is_unclear_pipeline, is_oodd_pipeline, is_enabled, created_at, trained_at, type, friendly_name, model_binary_id, training_in_progress, metrics, eval_mlbinary_key, eval_mlbinary_revision_number, eval_mlbinary_friendly_name, *args, **kwargs): # noqa: E501 """MLPipeline - a model defined in OpenAPI Args: @@ -251,18 +204,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__, ), @@ -295,24 +247,22 @@ def _from_openapi_data( self.eval_mlbinary_revision_number = eval_mlbinary_revision_number self.eval_mlbinary_friendly_name = eval_mlbinary_friendly_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 @@ -353,16 +303,15 @@ def __init__(self, model_binary_id, *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__, ), @@ -379,17 +328,13 @@ def __init__(self, model_binary_id, *args, **kwargs): # noqa: E501 self.model_binary_id = model_binary_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 b35a38339..5b1b25946 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 f08ee27c7..1755866c8 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 bfc778c5e..1620d757c 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 64f139a7c..28479f35b 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 95889010c..670637091 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/null_enum.py b/generated/groundlight_openapi_client/model/null_enum.py index c7e7cfab0..3781403b7 100644 --- a/generated/groundlight_openapi_client/model/null_enum.py +++ b/generated/groundlight_openapi_client/model/null_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 NullEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -50,12 +52,13 @@ class NullEnum(ModelSimple): """ allowed_values = { - ("value",): { - "NULL": "null", + ('value',): { + 'NULL': "null", }, } - 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,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) @@ -151,15 +155,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__, ), @@ -176,8 +179,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__, ), @@ -229,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) @@ -245,15 +247,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__, ), @@ -270,8 +271,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/paginated_api_token_list.py b/generated/groundlight_openapi_client/model/paginated_api_token_list.py index 57f352dc9..b26a7a862 100644 --- a/generated/groundlight_openapi_client/model/paginated_api_token_list.py +++ b/generated/groundlight_openapi_client/model/paginated_api_token_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.api_token import ApiToken - - globals()["ApiToken"] = ApiToken + globals()['ApiToken'] = ApiToken class PaginatedApiTokenList(ModelNormal): @@ -59,9 +59,11 @@ class PaginatedApiTokenList(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": ([ApiToken],), # noqa: E501 - "next": ( - str, - none_type, - ), # noqa: E501 - "previous": ( - str, - none_type, - ), # noqa: E501 + 'count': (int,), # noqa: E501 + 'results': ([ApiToken],), # 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_detector_list.py b/generated/groundlight_openapi_client/model/paginated_detector_list.py index 5972205ef..391aad231 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 13dccab78..d8c7cc17a 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_ml_pipeline_list.py b/generated/groundlight_openapi_client/model/paginated_ml_pipeline_list.py index 8bdcb5413..65c417b0f 100644 --- a/generated/groundlight_openapi_client/model/paginated_ml_pipeline_list.py +++ b/generated/groundlight_openapi_client/model/paginated_ml_pipeline_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.ml_pipeline import MLPipeline - - globals()["MLPipeline"] = MLPipeline + globals()['MLPipeline'] = MLPipeline class PaginatedMLPipelineList(ModelNormal): @@ -59,9 +59,11 @@ class PaginatedMLPipelineList(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": ([MLPipeline],), # noqa: E501 - "next": ( - str, - none_type, - ), # noqa: E501 - "previous": ( - str, - none_type, - ), # noqa: E501 + 'count': (int,), # noqa: E501 + 'results': ([MLPipeline],), # 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_priming_group_list.py b/generated/groundlight_openapi_client/model/paginated_priming_group_list.py index 9fccad84a..3f93b9125 100644 --- a/generated/groundlight_openapi_client/model/paginated_priming_group_list.py +++ b/generated/groundlight_openapi_client/model/paginated_priming_group_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.priming_group import PrimingGroup - - globals()["PrimingGroup"] = PrimingGroup + globals()['PrimingGroup'] = PrimingGroup class PaginatedPrimingGroupList(ModelNormal): @@ -59,9 +59,11 @@ class PaginatedPrimingGroupList(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": ([PrimingGroup],), # noqa: E501 - "next": ( - str, - none_type, - ), # noqa: E501 - "previous": ( - str, - none_type, - ), # noqa: E501 + 'count': (int,), # noqa: E501 + 'results': ([PrimingGroup],), # 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 6d007e1d1..7102f4eb9 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 7e7a58131..06e8f5a7d 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 a721bb4c8..d3037a5a8 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 3a0f12a25..343ac2ed8 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/priming_group.py b/generated/groundlight_openapi_client/model/priming_group.py index 8f762e6da..de2404631 100644 --- a/generated/groundlight_openapi_client/model/priming_group.py +++ b/generated/groundlight_openapi_client/model/priming_group.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_mode_enum import DetectorModeEnum from groundlight_openapi_client.model.null_enum import NullEnum - - globals()["BlankEnum"] = BlankEnum - globals()["DetectorModeEnum"] = DetectorModeEnum - globals()["NullEnum"] = NullEnum + globals()['BlankEnum'] = BlankEnum + globals()['DetectorModeEnum'] = DetectorModeEnum + globals()['NullEnum'] = NullEnum class PrimingGroup(ModelNormal): @@ -63,17 +63,18 @@ class PrimingGroup(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("name",): { - "max_length": 100, + ('name',): { + 'max_length': 100, }, - ("canonical_query",): { - "max_length": 300, + ('canonical_query',): { + 'max_length': 300, }, - ("active_pipeline_config",): { - "max_length": 8192, + ('active_pipeline_config',): { + 'max_length': 8192, }, } @@ -84,17 +85,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,71 +101,41 @@ def openapi_types(): """ lazy_import() return { - "id": (str,), # noqa: E501 - "name": (str,), # noqa: E501 - "num_classes": ( - int, - none_type, - ), # noqa: E501 - "is_global": (bool,), # noqa: E501 - "created_at": (datetime,), # noqa: E501 - "detector_mode": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 - "canonical_query": ( - str, - none_type, - ), # noqa: E501 - "active_pipeline_config": ( - str, - none_type, - ), # noqa: E501 - "priming_group_specific_shadow_pipeline_configs": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 - "disable_shadow_pipelines": (bool,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'num_classes': (int, none_type,), # noqa: E501 + 'is_global': (bool,), # noqa: E501 + 'created_at': (datetime,), # noqa: E501 + 'detector_mode': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'canonical_query': (str, none_type,), # noqa: E501 + 'active_pipeline_config': (str, none_type,), # noqa: E501 + 'priming_group_specific_shadow_pipeline_configs': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'disable_shadow_pipelines': (bool,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "id": "id", # noqa: E501 - "name": "name", # noqa: E501 - "num_classes": "num_classes", # noqa: E501 - "is_global": "is_global", # noqa: E501 - "created_at": "created_at", # noqa: E501 - "detector_mode": "detector_mode", # noqa: E501 - "canonical_query": "canonical_query", # noqa: E501 - "active_pipeline_config": "active_pipeline_config", # noqa: E501 - "priming_group_specific_shadow_pipeline_configs": ( - "priming_group_specific_shadow_pipeline_configs" - ), # noqa: E501 - "disable_shadow_pipelines": "disable_shadow_pipelines", # noqa: E501 + 'id': 'id', # noqa: E501 + 'name': 'name', # noqa: E501 + 'num_classes': 'num_classes', # noqa: E501 + 'is_global': 'is_global', # noqa: E501 + 'created_at': 'created_at', # noqa: E501 + 'detector_mode': 'detector_mode', # noqa: E501 + 'canonical_query': 'canonical_query', # noqa: E501 + 'active_pipeline_config': 'active_pipeline_config', # noqa: E501 + 'priming_group_specific_shadow_pipeline_configs': 'priming_group_specific_shadow_pipeline_configs', # noqa: E501 + 'disable_shadow_pipelines': 'disable_shadow_pipelines', # noqa: E501 } read_only_vars = { - "id", # noqa: E501 - "num_classes", # noqa: E501 - "is_global", # noqa: E501 - "created_at", # noqa: E501 + 'id', # noqa: E501 + 'num_classes', # noqa: E501 + 'is_global', # noqa: E501 + 'created_at', # noqa: E501 } _composed_schemas = {} @@ -229,18 +190,17 @@ def _from_openapi_data(cls, id, name, num_classes, is_global, created_at, *args, disable_shadow_pipelines (bool): If True, new detectors added to this priming group will not receive the mode-specific default shadow pipelines from INITIAL_SHADOW_PIPELINE_CONFIG_SET. Priming-group-specific shadow configs still apply. Use this to guarantee the primed active MLBinary is never switched off by a shadow pipeline being promoted.. [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__, ), @@ -261,24 +221,22 @@ def _from_openapi_data(cls, id, name, num_classes, is_global, created_at, *args, self.is_global = is_global self.created_at = created_at 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 @@ -324,16 +282,15 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 disable_shadow_pipelines (bool): If True, new detectors added to this priming group will not receive the mode-specific default shadow pipelines from INITIAL_SHADOW_PIPELINE_CONFIG_SET. Priming-group-specific shadow configs still apply. Use this to guarantee the primed active MLBinary is never switched off by a shadow pipeline being promoted.. [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 +307,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/priming_group_creation_input_request.py b/generated/groundlight_openapi_client/model/priming_group_creation_input_request.py index 3eb09a40a..33c07166a 100644 --- a/generated/groundlight_openapi_client/model/priming_group_creation_input_request.py +++ b/generated/groundlight_openapi_client/model/priming_group_creation_input_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.detector_mode_enum import DetectorModeEnum - - globals()["DetectorModeEnum"] = DetectorModeEnum + globals()['DetectorModeEnum'] = DetectorModeEnum class PrimingGroupCreationInputRequest(ModelNormal): @@ -59,19 +59,20 @@ class PrimingGroupCreationInputRequest(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("name",): { - "max_length": 100, - "min_length": 1, + ('name',): { + 'max_length': 100, + 'min_length': 1, }, - ("source_ml_pipeline_id",): { - "max_length": 44, - "min_length": 1, + ('source_ml_pipeline_id',): { + 'max_length': 44, + 'min_length': 1, }, - ("canonical_query",): { - "max_length": 300, + ('canonical_query',): { + 'max_length': 300, }, } @@ -82,17 +83,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 @@ -108,39 +99,28 @@ def openapi_types(): """ lazy_import() return { - "name": (str,), # noqa: E501 - "source_ml_pipeline_id": (str,), # noqa: E501 - "detector_mode": ( - bool, - date, - datetime, - dict, - float, - int, - list, - str, - none_type, - ), # noqa: E501 - "canonical_query": ( - str, - none_type, - ), # noqa: E501 - "disable_shadow_pipelines": (bool,), # noqa: E501 + 'name': (str,), # noqa: E501 + 'source_ml_pipeline_id': (str,), # noqa: E501 + 'detector_mode': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 + 'canonical_query': (str, none_type,), # noqa: E501 + 'disable_shadow_pipelines': (bool,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "name": "name", # noqa: E501 - "source_ml_pipeline_id": "source_ml_pipeline_id", # noqa: E501 - "detector_mode": "detector_mode", # noqa: E501 - "canonical_query": "canonical_query", # noqa: E501 - "disable_shadow_pipelines": "disable_shadow_pipelines", # noqa: E501 + 'name': 'name', # noqa: E501 + 'source_ml_pipeline_id': 'source_ml_pipeline_id', # noqa: E501 + 'detector_mode': 'detector_mode', # noqa: E501 + 'canonical_query': 'canonical_query', # noqa: E501 + 'disable_shadow_pipelines': 'disable_shadow_pipelines', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -189,18 +169,17 @@ def _from_openapi_data(cls, name, source_ml_pipeline_id, detector_mode, *args, * disable_shadow_pipelines (bool): If true, new detectors added to this priming group will not receive the default shadow pipelines. This guarantees the primed active model is never switched off.. [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__, ), @@ -219,24 +198,22 @@ def _from_openapi_data(cls, name, source_ml_pipeline_id, detector_mode, *args, * self.source_ml_pipeline_id = source_ml_pipeline_id self.detector_mode = detector_mode 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 @@ -283,16 +260,15 @@ def __init__(self, name, source_ml_pipeline_id, detector_mode, *args, **kwargs): disable_shadow_pipelines (bool): If true, new detectors added to this priming group will not receive the default shadow pipelines. This guarantees the primed active model is never switched off.. [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__, ), @@ -311,17 +287,13 @@ def __init__(self, name, source_ml_pipeline_id, detector_mode, *args, **kwargs): self.source_ml_pipeline_id = source_ml_pipeline_id self.detector_mode = detector_mode 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 c4b954fde..a2b7a7c68 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 74c4fc660..368b00dea 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 07fb54e22..14918a8f9 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 7f1be14aa..66991d0c4 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 8fdf8fe1a..0bf2e262d 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 f5586bb6e..672227fc9 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 b9c247c44..44d234b9a 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 e8e5a047d..ca4db25f8 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 b41c2871b..d6a1f357f 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 ee4c4e733..5a6990f0d 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 0e7695678..97b871832 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 789dd77c3..3b2acb152 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/verdict_enum.py b/generated/groundlight_openapi_client/model/verdict_enum.py index e41359b81..7b2ae0eb2 100644 --- a/generated/groundlight_openapi_client/model/verdict_enum.py +++ b/generated/groundlight_openapi_client/model/verdict_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 VerdictEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -50,14 +52,15 @@ class VerdictEnum(ModelSimple): """ allowed_values = { - ("value",): { - "YES": "YES", - "NO": "NO", - "UNSURE": "UNSURE", + ('value',): { + 'YES': "YES", + 'NO': "NO", + 'UNSURE': "UNSURE", }, } - 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/vlm_verification.py b/generated/groundlight_openapi_client/model/vlm_verification.py index b28a2d7fc..646091e0f 100644 --- a/generated/groundlight_openapi_client/model/vlm_verification.py +++ b/generated/groundlight_openapi_client/model/vlm_verification.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.vlm_verification_cost import VlmVerificationCost from groundlight_openapi_client.model.vlm_verification_result import VlmVerificationResult - - globals()["VlmVerificationCost"] = VlmVerificationCost - globals()["VlmVerificationResult"] = VlmVerificationResult + globals()['VlmVerificationCost'] = VlmVerificationCost + globals()['VlmVerificationResult'] = VlmVerificationResult class VlmVerification(ModelNormal): @@ -61,9 +61,11 @@ class VlmVerification(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } - validations = {} + validations = { + } @cached_property def additional_properties_type(): @@ -72,17 +74,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,33 +90,34 @@ def openapi_types(): """ lazy_import() return { - "id": (str,), # noqa: E501 - "type": (str,), # noqa: E501 - "created_at": (datetime,), # noqa: E501 - "query": (str,), # noqa: E501 - "model_id": (str,), # noqa: E501 - "result": (VlmVerificationResult,), # noqa: E501 - "cost": (VlmVerificationCost,), # noqa: E501 + 'id': (str,), # noqa: E501 + 'type': (str,), # noqa: E501 + 'created_at': (datetime,), # noqa: E501 + 'query': (str,), # noqa: E501 + 'model_id': (str,), # noqa: E501 + 'result': (VlmVerificationResult,), # noqa: E501 + 'cost': (VlmVerificationCost,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "id": "id", # noqa: E501 - "type": "type", # noqa: E501 - "created_at": "created_at", # noqa: E501 - "query": "query", # noqa: E501 - "model_id": "model_id", # noqa: E501 - "result": "result", # noqa: E501 - "cost": "cost", # noqa: E501 + 'id': 'id', # noqa: E501 + 'type': 'type', # noqa: E501 + 'created_at': 'created_at', # noqa: E501 + 'query': 'query', # noqa: E501 + 'model_id': 'model_id', # noqa: E501 + 'result': 'result', # noqa: E501 + 'cost': 'cost', # noqa: E501 } read_only_vars = { - "id", # noqa: E501 - "type", # noqa: E501 - "created_at", # noqa: E501 + 'id', # noqa: E501 + 'type', # noqa: E501 + 'created_at', # noqa: E501 } _composed_schemas = {} @@ -176,18 +169,17 @@ def _from_openapi_data(cls, id, type, created_at, query, model_id, result, cost, _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__, ), @@ -210,24 +202,22 @@ def _from_openapi_data(cls, id, type, created_at, query, model_id, result, cost, self.result = result self.cost = cost 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 @@ -272,16 +262,15 @@ def __init__(self, query, model_id, result, cost, *args, **kwargs): # noqa: E50 _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 +290,13 @@ def __init__(self, query, model_id, result, cost, *args, **kwargs): # noqa: E50 self.result = result self.cost = cost 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/vlm_verification_cost.py b/generated/groundlight_openapi_client/model/vlm_verification_cost.py index 0acc190a3..315236a38 100644 --- a/generated/groundlight_openapi_client/model/vlm_verification_cost.py +++ b/generated/groundlight_openapi_client/model/vlm_verification_cost.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 VlmVerificationCost(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -53,9 +55,11 @@ class VlmVerificationCost(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 { - "input_tokens": ( - int, - none_type, - ), # noqa: E501 - "output_tokens": ( - int, - none_type, - ), # noqa: E501 - "total_cost_usd": ( - float, - none_type, - ), # noqa: E501 + 'input_tokens': (int, none_type,), # noqa: E501 + 'output_tokens': (int, none_type,), # noqa: E501 + 'total_cost_usd': (float, none_type,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "input_tokens": "input_tokens", # noqa: E501 - "output_tokens": "output_tokens", # noqa: E501 - "total_cost_usd": "total_cost_usd", # noqa: E501 + 'input_tokens': 'input_tokens', # noqa: E501 + 'output_tokens': 'output_tokens', # noqa: E501 + 'total_cost_usd': 'total_cost_usd', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -159,18 +146,17 @@ def _from_openapi_data(cls, input_tokens, output_tokens, total_cost_usd, *args, _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,24 +175,22 @@ def _from_openapi_data(cls, input_tokens, output_tokens, total_cost_usd, *args, self.output_tokens = output_tokens self.total_cost_usd = total_cost_usd 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 +235,15 @@ def __init__(self, input_tokens, output_tokens, total_cost_usd, *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', ()) 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,17 +262,13 @@ def __init__(self, input_tokens, output_tokens, total_cost_usd, *args, **kwargs) self.output_tokens = output_tokens self.total_cost_usd = total_cost_usd 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/vlm_verification_result.py b/generated/groundlight_openapi_client/model/vlm_verification_result.py index acec3aaca..c88fb03f9 100644 --- a/generated/groundlight_openapi_client/model/vlm_verification_result.py +++ b/generated/groundlight_openapi_client/model/vlm_verification_result.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.verdict_enum import VerdictEnum - - globals()["VerdictEnum"] = VerdictEnum + globals()['VerdictEnum'] = VerdictEnum class VlmVerificationResult(ModelNormal): @@ -59,12 +59,13 @@ class VlmVerificationResult(ModelNormal): as additional properties values. """ - allowed_values = {} + allowed_values = { + } validations = { - ("confidence",): { - "inclusive_maximum": 1.0, - "inclusive_minimum": 0.0, + ('confidence',): { + 'inclusive_maximum': 1.0, + 'inclusive_minimum': 0.0, }, } @@ -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,22 +92,24 @@ def openapi_types(): """ lazy_import() return { - "verdict": (VerdictEnum,), # noqa: E501 - "confidence": (float,), # noqa: E501 - "reasoning": (str,), # noqa: E501 + 'verdict': (VerdictEnum,), # noqa: E501 + 'confidence': (float,), # noqa: E501 + 'reasoning': (str,), # noqa: E501 } @cached_property def discriminator(): return None + attribute_map = { - "verdict": "verdict", # noqa: E501 - "confidence": "confidence", # noqa: E501 - "reasoning": "reasoning", # noqa: E501 + 'verdict': 'verdict', # noqa: E501 + 'confidence': 'confidence', # noqa: E501 + 'reasoning': 'reasoning', # noqa: E501 } - read_only_vars = {} + read_only_vars = { + } _composed_schemas = {} @@ -163,18 +156,17 @@ def _from_openapi_data(cls, verdict, confidence, reasoning, *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__, ), @@ -193,24 +185,22 @@ def _from_openapi_data(cls, verdict, confidence, reasoning, *args, **kwargs): # self.confidence = confidence self.reasoning = reasoning 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 +245,15 @@ def __init__(self, verdict, confidence, reasoning, *args, **kwargs): # noqa: E5 _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__, ), @@ -283,17 +272,13 @@ def __init__(self, verdict, confidence, reasoning, *args, **kwargs): # noqa: E5 self.confidence = confidence self.reasoning = reasoning 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.py b/generated/groundlight_openapi_client/model/webhook_action.py index 33f70f3c9..b230804e5 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 cd98a99b5..39ba2c854 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 cf7bd6d4e..a1c7d7a89 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 fcc8fd762..9f80dad51 100644 --- a/generated/groundlight_openapi_client/models/__init__.py +++ b/generated/groundlight_openapi_client/models/__init__.py @@ -29,6 +29,7 @@ from groundlight_openapi_client.model.condition_request import ConditionRequest from groundlight_openapi_client.model.count_mode_configuration import CountModeConfiguration from groundlight_openapi_client.model.counting_result import CountingResult +from groundlight_openapi_client.model.customer_group import CustomerGroup from groundlight_openapi_client.model.detector import Detector from groundlight_openapi_client.model.detector_creation_input_request import DetectorCreationInputRequest from groundlight_openapi_client.model.detector_group import DetectorGroup @@ -42,13 +43,13 @@ from groundlight_openapi_client.model.inline_response200 import InlineResponse200 from groundlight_openapi_client.model.inline_response2001 import InlineResponse2001 from groundlight_openapi_client.model.inline_response2001_evaluation_results import InlineResponse2001EvaluationResults -from groundlight_openapi_client.model.inline_response2002 import InlineResponse2002 from groundlight_openapi_client.model.inline_response200_summary import InlineResponse200Summary from groundlight_openapi_client.model.inline_response200_summary_class_counts import InlineResponse200SummaryClassCounts from groundlight_openapi_client.model.label import Label from groundlight_openapi_client.model.label_value import LabelValue from groundlight_openapi_client.model.label_value_request import LabelValueRequest from groundlight_openapi_client.model.ml_pipeline import MLPipeline +from groundlight_openapi_client.model.me import Me 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.multi_classification_result import MultiClassificationResult diff --git a/generated/groundlight_openapi_client/rest.py b/generated/groundlight_openapi_client/rest.py index 16d8ca86f..16efe8df0 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/model.py b/generated/model.py index 4659a06ea..e089fe106 100644 --- a/generated/model.py +++ b/generated/model.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: public-api.yaml -# timestamp: 2026-07-10T01:01:06+00:00 +# timestamp: 2026-07-31T19:57:40+00:00 from __future__ import annotations @@ -37,15 +37,17 @@ class ApiToken(BaseModel): ) created_at: datetime = Field(..., description="When was this token created?") last_used_at: Optional[datetime] = Field( - ..., - description="The most recent time this API token was used. (Helpful for detecting suspicious activity). Null if the token has never been used.", + ..., description="The most recent time this API token was used for authentication. Null until first use." ) expires_at: Optional[datetime] = Field( None, description="When does this token expire? If Null, the token never expires." ) token_ttl: Optional[int] = Field( None, - description="Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never expire (no rotation).", + description=( + "Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never" + " expire. Omitted only by older servers that do not yet expose this field." + ), ) @@ -63,15 +65,17 @@ class ApiTokenCreateResponse(BaseModel): ) created_at: datetime = Field(..., description="When was this token created?") last_used_at: Optional[datetime] = Field( - ..., - description="The most recent time this API token was used. (Helpful for detecting suspicious activity). Null if the token has never been used.", + ..., description="The most recent time this API token was used for authentication. Null until first use." ) expires_at: Optional[datetime] = Field( None, description="When does this token expire? If Null, the token never expires." ) token_ttl: Optional[int] = Field( None, - description="Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never expire (no rotation).", + description=( + "Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never" + " expire. Omitted only by older servers that do not yet expose this field." + ), ) raw_key: str = Field(..., description="The full API token secret. Returned only once, when the token is created.") @@ -123,6 +127,15 @@ class ConditionRequest(BaseModel): parameters: Dict[str, Any] +class CustomerGroup(BaseModel): + """ + A Groundlight customer group (tenant) the authenticated user belongs to. + """ + + id: int = Field(..., description="Numeric id of the customer group.") + name: str = Field(..., description="Name of the customer group.") + + class DetectorGroup(BaseModel): id: str name: constr(max_length=100) @@ -211,6 +224,17 @@ class MLPipeline(BaseModel): ) +class Me(BaseModel): + """ + Authenticated user identity from GET /v1/me (id, email, username, groups). + """ + + id: int = Field(..., description="Numeric id of the authenticated user.") + email: str = Field(..., description="Email address of the authenticated user.") + username: str = Field(..., description="Username of the authenticated user.") + groups: List[CustomerGroup] = Field(..., description="Customer groups the authenticated user belongs to.") + + class ModeEnum(str, Enum): BINARY = "BINARY" COUNT = "COUNT" @@ -398,6 +422,30 @@ class StatusEnum(str, Enum): OFF = "OFF" +class VerdictEnum(str, Enum): + """ + * `YES` - YES + * `NO` - NO + * `UNSURE` - UNSURE + """ + + YES = "YES" + NO = "NO" + UNSURE = "UNSURE" + + +class VlmVerificationCost(BaseModel): + input_tokens: Optional[int] = Field(...) + output_tokens: Optional[int] = Field(...) + total_cost_usd: Optional[float] = Field(...) + + +class VlmVerificationResult(BaseModel): + verdict: VerdictEnum + confidence: confloat(ge=0.0, le=1.0) + reasoning: str + + class WebhookAction(BaseModel): url: AnyUrl include_image: Optional[bool] = None @@ -569,30 +617,6 @@ class Label(str, Enum): UNCLEAR = "UNCLEAR" -class VerdictEnum(str, Enum): - """ - * `YES` - YES - * `NO` - NO - * `UNSURE` - UNSURE - """ - - YES = "YES" - NO = "NO" - UNSURE = "UNSURE" - - -class VlmVerificationCost(BaseModel): - input_tokens: Optional[int] = Field(...) - output_tokens: Optional[int] = Field(...) - total_cost_usd: Optional[float] = Field(...) - - -class VlmVerificationResult(BaseModel): - verdict: VerdictEnum - confidence: confloat(ge=0.0, le=1.0) - reasoning: str - - class AllNotes(BaseModel): """ Serializes all notes for a given detector, grouped by type as listed in UserProfile.NoteCategoryChoices diff --git a/generated/setup.py b/generated/setup.py index 9c4bb5721..4366b8795 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_inline_response2002.py b/generated/test/test_customer_group.py similarity index 64% rename from generated/test/test_inline_response2002.py rename to generated/test/test_customer_group.py index 84922f0f7..6dbbb664e 100644 --- a/generated/test/test_inline_response2002.py +++ b/generated/test/test_customer_group.py @@ -8,15 +8,16 @@ Generated by: https://openapi-generator.tech """ + import sys import unittest import groundlight_openapi_client -from groundlight_openapi_client.model.inline_response2002 import InlineResponse2002 +from groundlight_openapi_client.model.customer_group import CustomerGroup -class TestInlineResponse2002(unittest.TestCase): - """InlineResponse2002 unit test stubs""" +class TestCustomerGroup(unittest.TestCase): + """CustomerGroup unit test stubs""" def setUp(self): pass @@ -24,12 +25,12 @@ def setUp(self): def tearDown(self): pass - def testInlineResponse2002(self): - """Test InlineResponse2002""" + def testCustomerGroup(self): + """Test CustomerGroup""" # FIXME: construct object with mandatory attributes with example values - # model = InlineResponse2002() # noqa: E501 + # model = CustomerGroup() # noqa: E501 pass -if __name__ == "__main__": +if __name__ == '__main__': unittest.main() diff --git a/generated/test/test_me.py b/generated/test/test_me.py new file mode 100644 index 000000000..6f5d00180 --- /dev/null +++ b/generated/test/test_me.py @@ -0,0 +1,38 @@ +""" + 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.group import Group +globals()['Group'] = Group +from groundlight_openapi_client.model.me import Me + + +class TestMe(unittest.TestCase): + """Me unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testMe(self): + """Test Me""" + # FIXME: construct object with mandatory attributes with example values + # model = Me() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/spec/public-api.yaml b/spec/public-api.yaml index 9e6a17a2c..0112339b6 100644 --- a/spec/public-api.yaml +++ b/spec/public-api.yaml @@ -865,7 +865,8 @@ paths: /v1/me: get: operationId: Who am I - description: Retrieve the current user. + description: Retrieve the authenticated user's id, email, username, and customer + groups. tags: - user security: @@ -875,11 +876,7 @@ paths: content: application/json: schema: - type: object - properties: - username: - type: string - description: The user's username + $ref: '#/components/schemas/Me' description: '' /v1/month-to-date-account-info: get: @@ -1065,12 +1062,24 @@ paths: Submit one or more images for VLM-based alert verification. - Send as `multipart/form-data`: one to eight `media` image parts, a `query` - field, and an optional `model_id` field. Video is not yet supported. For example: + Send everything as `multipart/form-data`: one to eight `media` parts, plus a + `query` field and an optional `model_id` field. + + The `query` describes what each image is and what to look for — the server makes + no assumptions about the images' meaning. Images are presented to the model + labeled `Image 1`, `Image 2`, ... in upload order, so the query can reference + them (e.g. "Image 1 is the full frame; image 2 is the cropped ROI ..."). + + (Video parts are planned but not yet supported and are rejected.) + + Requires `ENABLE_BEDROCK_VLM_ACCESS` (enabled for Standard_Internal and SciDuck accounts) and accepted terms of service. + ```bash - $ curl https://api.groundlight.ai/device-api/v1/vlm-verifications \ - -F "media=@image.jpg;type=image/jpeg" \ - -F "query=Is there a fire?" + curl https://api.groundlight.ai/device-api/v1/vlm-verifications \ + -F "media=@full_frame.jpg;type=image/jpeg" \ + -F "media=@roi.jpg;type=image/jpeg" \ + -F "query=Image 1 is the full camera frame; image 2 is the cropped region a detector flagged. Is there really a fire?" \ + -F "model_id=gpt-5.4" ``` tags: - vlm-verifications @@ -1183,10 +1192,10 @@ components: last_used_at: type: string format: date-time - nullable: true readOnly: true - description: The most recent time this API token was used. (Helpful for - detecting suspicious activity). Null if the token has never been used. + nullable: true + description: The most recent time this API token was used for authentication. + Null until first use. expires_at: type: string format: date-time @@ -1197,7 +1206,8 @@ components: nullable: true readOnly: true description: Identity token lifetime policy in whole seconds. Null means - tokens minted under this identity never expire (no rotation). + tokens minted under this identity never expire. Omitted only by older + servers that do not yet expose this field. required: - created_at - last_used_at @@ -1227,10 +1237,10 @@ components: last_used_at: type: string format: date-time - nullable: true readOnly: true - description: The most recent time this API token was used. (Helpful for - detecting suspicious activity). Null if the token has never been used. + nullable: true + description: The most recent time this API token was used for authentication. + Null until first use. expires_at: type: string format: date-time @@ -1241,7 +1251,8 @@ components: nullable: true readOnly: true description: Identity token lifetime policy in whole seconds. Null means - tokens minted under this identity never expire (no rotation). + tokens minted under this identity never expire. Omitted only by older + servers that do not yet expose this field. raw_key: type: string readOnly: true @@ -1346,6 +1357,20 @@ components: required: - parameters - verb + CustomerGroup: + type: object + description: A Groundlight customer group (tenant) the authenticated user belongs + to. + properties: + id: + type: integer + description: Numeric id of the customer group. + name: + type: string + description: Name of the customer group. + required: + - id + - name Detector: type: object description: |- @@ -1828,6 +1853,30 @@ components: - training_in_progress - type x-internal: true + Me: + type: object + description: Authenticated user identity from GET /v1/me (id, email, username, + groups). + properties: + id: + type: integer + description: Numeric id of the authenticated user. + email: + type: string + description: Email address of the authenticated user. + username: + type: string + description: Username of the authenticated user. + groups: + type: array + items: + $ref: '#/components/schemas/CustomerGroup' + description: Customer groups the authenticated user belongs to. + required: + - email + - groups + - id + - username ModeEnum: type: string enum: @@ -2331,6 +2380,79 @@ components: description: |- * `ON` - ON * `OFF` - OFF + VerdictEnum: + enum: + - 'YES' + - 'NO' + - UNSURE + type: string + description: |- + * `YES` - YES + * `NO` - NO + * `UNSURE` - UNSURE + VlmVerification: + type: object + description: Response shape for POST /v1/vlm-verifications. + properties: + id: + type: string + readOnly: true + type: + type: string + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + query: + type: string + model_id: + type: string + result: + $ref: '#/components/schemas/VlmVerificationResult' + cost: + $ref: '#/components/schemas/VlmVerificationCost' + required: + - cost + - created_at + - id + - model_id + - query + - result + - type + VlmVerificationCost: + type: object + properties: + input_tokens: + type: integer + nullable: true + output_tokens: + type: integer + nullable: true + total_cost_usd: + type: number + format: double + nullable: true + required: + - input_tokens + - output_tokens + - total_cost_usd + VlmVerificationResult: + type: object + properties: + verdict: + $ref: '#/components/schemas/VerdictEnum' + confidence: + type: number + format: double + maximum: 1.0 + minimum: 0.0 + reasoning: + type: string + required: + - confidence + - reasoning + - verdict WebhookAction: type: object properties: @@ -2615,79 +2737,6 @@ components: - 'YES' - 'NO' - UNCLEAR - VerdictEnum: - enum: - - 'YES' - - 'NO' - - UNSURE - type: string - description: |- - * `YES` - YES - * `NO` - NO - * `UNSURE` - UNSURE - VlmVerification: - type: object - description: Response shape for POST /v1/vlm-verifications. - properties: - id: - type: string - readOnly: true - type: - type: string - readOnly: true - created_at: - type: string - format: date-time - readOnly: true - query: - type: string - model_id: - type: string - result: - $ref: '#/components/schemas/VlmVerificationResult' - cost: - $ref: '#/components/schemas/VlmVerificationCost' - required: - - cost - - created_at - - id - - model_id - - query - - result - - type - VlmVerificationCost: - type: object - properties: - input_tokens: - type: integer - nullable: true - output_tokens: - type: integer - nullable: true - total_cost_usd: - type: number - format: double - nullable: true - required: - - input_tokens - - output_tokens - - total_cost_usd - VlmVerificationResult: - type: object - properties: - verdict: - $ref: '#/components/schemas/VerdictEnum' - confidence: - type: number - format: double - maximum: 1.0 - minimum: 0.0 - reasoning: - type: string - required: - - confidence - - reasoning - - verdict securitySchemes: ApiToken: name: x-api-token diff --git a/src/groundlight/__init__.py b/src/groundlight/__init__.py index e94e5a383..805fdd335 100644 --- a/src/groundlight/__init__.py +++ b/src/groundlight/__init__.py @@ -10,7 +10,6 @@ from .client import GroundlightClientError, ApiTokenError, EdgeNotAvailableError, NotFoundError from .experimental_api import ExperimentalApi from .binary_labels import Label -from .identity import Me from .version import get_version __version__ = get_version() diff --git a/src/groundlight/client.py b/src/groundlight/client.py index 19371cb65..78f0d56c1 100644 --- a/src/groundlight/client.py +++ b/src/groundlight/client.py @@ -33,6 +33,7 @@ Detector, DetectorGroup, ImageQuery, + Me, ModeEnum, PaginatedDetectorList, PaginatedImageQueryList, @@ -43,7 +44,6 @@ from groundlight.binary_labels import Label, convert_internal_label_to_display from groundlight.config import API_TOKEN_MISSING_HELP_MESSAGE, API_TOKEN_VARIABLE_NAME, DISABLE_TLS_VARIABLE_NAME from groundlight.encodings import url_encode_dict -from groundlight.identity import Me from groundlight.images import ByteStreamWrapper, parse_supported_image_types, shrink_image_if_needed from groundlight.internalapi import ( GroundlightApiClient, diff --git a/src/groundlight/identity.py b/src/groundlight/identity.py deleted file mode 100644 index 11395848e..000000000 --- a/src/groundlight/identity.py +++ /dev/null @@ -1,28 +0,0 @@ -"""Models for the authenticated caller returned by Groundlight.me().""" - -from typing import List - -from pydantic import BaseModel, ConfigDict, Field - - -class Group(BaseModel): # pylint: disable=too-few-public-methods - """A Groundlight customer group (tenant) the authenticated user belongs to.""" - - model_config = ConfigDict(extra="ignore") - - id: int = Field(..., description="Numeric id of the customer group.") - name: str = Field(..., description="Name of the customer group.") - - -class Me(BaseModel): # pylint: disable=too-few-public-methods - """Identity information for the authenticated API token from GET /v1/me.""" - - model_config = ConfigDict(extra="ignore") - - id: int = Field(..., description="Numeric id of the authenticated user.") - email: str = Field(..., description="Email address of the authenticated user.") - username: str = Field(..., description="Username of the authenticated user.") - groups: List[Group] = Field( - ..., - description="Customer groups the authenticated user belongs to.", - ) diff --git a/test/unit/test_user.py b/test/unit/test_user.py index 9f7f7e6a5..ffa312e9d 100644 --- a/test/unit/test_user.py +++ b/test/unit/test_user.py @@ -1,5 +1,4 @@ -from groundlight import Groundlight, Me -from groundlight.identity import Group +from groundlight import CustomerGroup, Groundlight, Me def test_whoami(gl: Groundlight): @@ -17,6 +16,6 @@ def test_me(gl: Groundlight): assert me.username assert isinstance(me.groups, list) assert len(me.groups) >= 1 - assert all(isinstance(group, Group) for group in me.groups) + assert all(isinstance(group, CustomerGroup) for group in me.groups) assert all(group.id and group.name for group in me.groups) assert gl.whoami() == me.email From 1de0f5fcb0b2304421cd567e42ec2259d1e93e20 Mon Sep 17 00:00:00 2001 From: Tim Huff Date: Fri, 31 Jul 2026 12:58:46 -0700 Subject: [PATCH 5/9] Fix generated Me test stub to import CustomerGroup Co-authored-by: Cursor --- generated/test/test_me.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generated/test/test_me.py b/generated/test/test_me.py index 6f5d00180..0248197d7 100644 --- a/generated/test/test_me.py +++ b/generated/test/test_me.py @@ -13,8 +13,8 @@ import unittest import groundlight_openapi_client -from groundlight_openapi_client.model.group import Group -globals()['Group'] = Group +from groundlight_openapi_client.model.customer_group import CustomerGroup +globals()['CustomerGroup'] = CustomerGroup from groundlight_openapi_client.model.me import Me From cd2737f3469e5193a23fe55e1735f89b40cd0ff3 Mon Sep 17 00:00:00 2001 From: Tim Huff Date: Fri, 31 Jul 2026 13:04:38 -0700 Subject: [PATCH 6/9] Fix mypy imports for Me and CustomerGroup in user tests Import generated models from model, matching other unit tests. Co-authored-by: Cursor --- test/unit/test_user.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/unit/test_user.py b/test/unit/test_user.py index ffa312e9d..d9d396313 100644 --- a/test/unit/test_user.py +++ b/test/unit/test_user.py @@ -1,4 +1,5 @@ -from groundlight import CustomerGroup, Groundlight, Me +from groundlight import Groundlight +from model import CustomerGroup, Me def test_whoami(gl: Groundlight): From d826f6a8c6fe6b9e34f4a075bf16a8d1bc479f68 Mon Sep 17 00:00:00 2001 From: Tim Huff Date: Fri, 31 Jul 2026 13:09:41 -0700 Subject: [PATCH 7/9] Shrink OpenAPI sync to Me/CustomerGroup only Revert accidental full-client regenerate noise and keep only the /v1/me schema and generated Me/CustomerGroup wiring. Co-authored-by: Cursor --- generated/.openapi-generator/FILES | 2 +- generated/README.md | 4 +- generated/docs/ApiToken.md | 4 +- generated/docs/ApiTokenCreateResponse.md | 4 +- generated/docs/VlmVerificationsApi.md | 2 +- .../api/actions_api.py | 564 ++++------- .../api/api_tokens_api.py | 420 +++------ .../api/detector_groups_api.py | 200 ++-- .../api/detector_reset_api.py | 105 +-- .../api/detectors_api.py | 884 ++++++------------ .../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/priming_groups_api.py | 438 +++------ .../api/user_api.py | 94 +- .../api/vlm_verifications_api.py | 144 ++- .../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/api_token.py | 133 +-- .../model/api_token_create_response.py | 143 +-- .../model/api_token_request.py | 104 ++- .../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 | 220 +++-- .../model/detector_group.py | 98 +- .../model/detector_group_request.py | 97 +- .../model/detector_mode_enum.py | 74 +- .../model/detector_type_enum.py | 66 +- .../model/edge_model_info.py | 152 +-- .../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 | 220 +++-- .../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/ml_pipeline.py | 231 +++-- .../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/null_enum.py | 66 +- .../model/paginated_api_token_list.py | 114 ++- .../model/paginated_detector_list.py | 114 ++- .../model/paginated_image_query_list.py | 114 ++- .../model/paginated_ml_pipeline_list.py | 114 ++- .../model/paginated_priming_group_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/priming_group.py | 181 ++-- .../priming_group_creation_input_request.py | 138 +-- .../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/verdict_enum.py | 70 +- .../model/vlm_verification.py | 125 +-- .../model/vlm_verification_cost.py | 111 ++- .../model/vlm_verification_result.py | 107 ++- .../model/webhook_action.py | 133 ++- .../model/webhook_action_request.py | 135 +-- .../groundlight_openapi_client/model_utils.py | 690 ++++++-------- .../models/__init__.py | 2 +- generated/groundlight_openapi_client/rest.py | 312 ++++--- generated/model.py | 102 +- generated/setup.py | 7 +- spec/public-api.yaml | 186 ++-- 102 files changed, 7233 insertions(+), 7257 deletions(-) diff --git a/generated/.openapi-generator/FILES b/generated/.openapi-generator/FILES index 2a41638ef..c90ff4043 100644 --- a/generated/.openapi-generator/FILES +++ b/generated/.openapi-generator/FILES @@ -18,11 +18,11 @@ docs/BoundingBoxLabelEnum.md docs/BoundingBoxModeConfiguration.md docs/BoundingBoxResult.md docs/ChannelEnum.md +docs/CustomerGroup.md docs/Condition.md docs/ConditionRequest.md docs/CountModeConfiguration.md docs/CountingResult.md -docs/CustomerGroup.md docs/Detector.md docs/DetectorCreationInputRequest.md docs/DetectorGroup.md diff --git a/generated/README.md b/generated/README.md index 15edcbe41..c176162e4 100644 --- a/generated/README.md +++ b/generated/README.md @@ -175,7 +175,6 @@ Class | Method | HTTP request | Description - [ConditionRequest](docs/ConditionRequest.md) - [CountModeConfiguration](docs/CountModeConfiguration.md) - [CountingResult](docs/CountingResult.md) - - [CustomerGroup](docs/CustomerGroup.md) - [Detector](docs/Detector.md) - [DetectorCreationInputRequest](docs/DetectorCreationInputRequest.md) - [DetectorGroup](docs/DetectorGroup.md) @@ -189,13 +188,14 @@ Class | Method | HTTP request | Description - [InlineResponse200](docs/InlineResponse200.md) - [InlineResponse2001](docs/InlineResponse2001.md) - [InlineResponse2001EvaluationResults](docs/InlineResponse2001EvaluationResults.md) + - [CustomerGroup](docs/CustomerGroup.md) + - [Me](docs/Me.md) - [InlineResponse200Summary](docs/InlineResponse200Summary.md) - [InlineResponse200SummaryClassCounts](docs/InlineResponse200SummaryClassCounts.md) - [Label](docs/Label.md) - [LabelValue](docs/LabelValue.md) - [LabelValueRequest](docs/LabelValueRequest.md) - [MLPipeline](docs/MLPipeline.md) - - [Me](docs/Me.md) - [ModeEnum](docs/ModeEnum.md) - [MultiClassModeConfiguration](docs/MultiClassModeConfiguration.md) - [MultiClassificationResult](docs/MultiClassificationResult.md) diff --git a/generated/docs/ApiToken.md b/generated/docs/ApiToken.md index 1abfdb2fc..df7b6b15d 100644 --- a/generated/docs/ApiToken.md +++ b/generated/docs/ApiToken.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes **name** | **str** | An nickname for the API token. This name must be unique for this user. | **raw_key_snippet** | **str** | Since we're storing hashed keys, it can be useful to see the raw prefix snippet of the token. | [readonly] **created_at** | **datetime** | When was this token created? | [readonly] -**last_used_at** | **datetime, none_type** | The most recent time this API token was used for authentication. Null until first use. | [readonly] +**last_used_at** | **datetime, none_type** | The most recent time this API token was used. (Helpful for detecting suspicious activity). Null if the token has never been used. | [readonly] **expires_at** | **datetime, none_type** | When does this token expire? If Null, the token never expires. | [optional] -**token_ttl** | **int, none_type** | Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never expire. Omitted only by older servers that do not yet expose this field. | [optional] [readonly] +**token_ttl** | **int, none_type** | Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never expire (no rotation). | [optional] [readonly] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[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/docs/ApiTokenCreateResponse.md b/generated/docs/ApiTokenCreateResponse.md index ddb65a7fb..c01ee2673 100644 --- a/generated/docs/ApiTokenCreateResponse.md +++ b/generated/docs/ApiTokenCreateResponse.md @@ -8,10 +8,10 @@ Name | Type | Description | Notes **name** | **str** | An nickname for the API token. This name must be unique for this user. | **raw_key_snippet** | **str** | Since we're storing hashed keys, it can be useful to see the raw prefix snippet of the token. | [readonly] **created_at** | **datetime** | When was this token created? | [readonly] -**last_used_at** | **datetime, none_type** | The most recent time this API token was used for authentication. Null until first use. | [readonly] +**last_used_at** | **datetime, none_type** | The most recent time this API token was used. (Helpful for detecting suspicious activity). Null if the token has never been used. | [readonly] **raw_key** | **str** | The full API token secret. Returned only once, when the token is created. | [readonly] **expires_at** | **datetime, none_type** | When does this token expire? If Null, the token never expires. | [optional] -**token_ttl** | **int, none_type** | Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never expire. Omitted only by older servers that do not yet expose this field. | [optional] [readonly] +**token_ttl** | **int, none_type** | Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never expire (no rotation). | [optional] [readonly] **any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[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/docs/VlmVerificationsApi.md b/generated/docs/VlmVerificationsApi.md index 6e35dc5fd..d232225bb 100644 --- a/generated/docs/VlmVerificationsApi.md +++ b/generated/docs/VlmVerificationsApi.md @@ -12,7 +12,7 @@ Method | HTTP request | Description - Submit one or more images for VLM-based alert verification. Send everything as `multipart/form-data`: one to eight `media` parts, plus a `query` field and an optional `model_id` field. The `query` describes what each image is and what to look for — the server makes no assumptions about the images' meaning. Images are presented to the model labeled `Image 1`, `Image 2`, ... in upload order, so the query can reference them (e.g. \"Image 1 is the full frame; image 2 is the cropped ROI ...\"). (Video parts are planned but not yet supported and are rejected.) Requires `ENABLE_BEDROCK_VLM_ACCESS` (enabled for Standard_Internal and SciDuck accounts) and accepted terms of service. ```bash curl https://api.groundlight.ai/device-api/v1/vlm-verifications \\ -F \"media=@full_frame.jpg;type=image/jpeg\" \\ -F \"media=@roi.jpg;type=image/jpeg\" \\ -F \"query=Image 1 is the full camera frame; image 2 is the cropped region a detector flagged. Is there really a fire?\" \\ -F \"model_id=gpt-5.4\" ``` + Submit one or more images for VLM-based alert verification. Send as `multipart/form-data`: one to eight `media` image parts, a `query` field, and an optional `model_id` field. Video is not yet supported. For example: ```bash $ curl https://api.groundlight.ai/device-api/v1/vlm-verifications \\ -F \"media=@image.jpg;type=image/jpeg\" \\ -F \"query=Is there a fire?\" ``` ### Example diff --git a/generated/groundlight_openapi_client/api/actions_api.py b/generated/groundlight_openapi_client/api/actions_api.py index 69adca06a..b4d3ebd2e 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/api_tokens_api.py b/generated/groundlight_openapi_client/api/api_tokens_api.py index f6f1e0821..38720ce26 100644 --- a/generated/groundlight_openapi_client/api/api_tokens_api.py +++ b/generated/groundlight_openapi_client/api/api_tokens_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.api_token import ApiToken from groundlight_openapi_client.model.api_token_create_response import ApiTokenCreateResponse @@ -41,218 +40,166 @@ def __init__(self, api_client=None): self.api_client = api_client self.create_api_token_endpoint = _Endpoint( settings={ - 'response_type': (ApiTokenCreateResponse,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/api-tokens', - 'operation_id': 'create_api_token', - 'http_method': 'POST', - 'servers': None, + "response_type": (ApiTokenCreateResponse,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/api-tokens", + "operation_id": "create_api_token", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'api_token_request', - ], - 'required': [ - 'api_token_request', - ], - 'nullable': [ + "all": [ + "api_token_request", ], - 'enum': [ + "required": [ + "api_token_request", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'api_token_request': - (ApiTokenRequest,), - }, - 'attribute_map': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "api_token_request": (ApiTokenRequest,), }, - 'location_map': { - 'api_token_request': 'body', + "attribute_map": {}, + "location_map": { + "api_token_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_api_token_endpoint = _Endpoint( settings={ - 'response_type': None, - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/api-tokens/{name}', - 'operation_id': 'delete_api_token', - 'http_method': 'DELETE', - 'servers': None, + "response_type": None, + "auth": ["ApiToken"], + "endpoint_path": "/v1/api-tokens/{name}", + "operation_id": "delete_api_token", + "http_method": "DELETE", + "servers": None, }, params_map={ - 'all': [ - 'name', - ], - 'required': [ - 'name', - ], - 'nullable': [ + "all": [ + "name", ], - 'enum': [ + "required": [ + "name", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "name": (str,), }, - 'allowed_values': { + "attribute_map": { + "name": "name", }, - 'openapi_types': { - 'name': - (str,), + "location_map": { + "name": "path", }, - 'attribute_map': { - 'name': 'name', - }, - 'location_map': { - 'name': '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_api_token_by_snippet_endpoint = _Endpoint( settings={ - 'response_type': (ApiToken,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/api-tokens/by-snippet/{snippet}', - 'operation_id': 'get_api_token_by_snippet', - 'http_method': 'GET', - 'servers': None, + "response_type": (ApiToken,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/api-tokens/by-snippet/{snippet}", + "operation_id": "get_api_token_by_snippet", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'snippet', + "all": [ + "snippet", ], - 'required': [ - 'snippet', + "required": [ + "snippet", ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'snippet': - (str,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "snippet": (str,), }, - 'attribute_map': { - 'snippet': 'snippet', + "attribute_map": { + "snippet": "snippet", }, - 'location_map': { - 'snippet': 'path', + "location_map": { + "snippet": "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_api_tokens_endpoint = _Endpoint( settings={ - 'response_type': (PaginatedApiTokenList,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/api-tokens', - 'operation_id': 'list_api_tokens', - 'http_method': 'GET', - 'servers': None, + "response_type": (PaginatedApiTokenList,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/api-tokens", + "operation_id": "list_api_tokens", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'page', - 'page_size', - ], - 'required': [], - 'nullable': [ + "all": [ + "page", + "page_size", ], - 'enum': [ - ], - 'validation': [ - ] + "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, ) - def create_api_token( - self, - api_token_request, - **kwargs - ): + def create_api_token(self, api_token_request, **kwargs): """create_api_token # noqa: E501 Create a new API token, returning the raw_key exactly once in the response. # noqa: E501 @@ -298,39 +245,19 @@ def create_api_token( 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['api_token_request'] = \ - api_token_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["api_token_request"] = api_token_request return self.create_api_token_endpoint.call_with_http_info(**kwargs) - def delete_api_token( - self, - name, - **kwargs - ): + def delete_api_token(self, name, **kwargs): """delete_api_token # noqa: E501 Delete (revoke) an API token by name. The token must belong to the authenticated user. # noqa: E501 @@ -376,39 +303,19 @@ def delete_api_token( 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['name'] = \ - name + 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["name"] = name return self.delete_api_token_endpoint.call_with_http_info(**kwargs) - def get_api_token_by_snippet( - self, - snippet, - **kwargs - ): + def get_api_token_by_snippet(self, snippet, **kwargs): """get_api_token_by_snippet # noqa: E501 Retrieve a single API token by its raw_key_snippet. Returns metadata only; the raw key is never retrievable after creation. # noqa: E501 @@ -454,38 +361,19 @@ def get_api_token_by_snippet( 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['snippet'] = \ - snippet + 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["snippet"] = snippet return self.get_api_token_by_snippet_endpoint.call_with_http_info(**kwargs) - def list_api_tokens( - self, - **kwargs - ): + def list_api_tokens(self, **kwargs): """list_api_tokens # noqa: E501 List all API tokens for the authenticated user. Returns metadata only; raw keys are never retrievable after creation. # noqa: E501 @@ -531,29 +419,13 @@ def list_api_tokens( 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_api_tokens_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 4088d2ba4..83a2cb4fd 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 1337ff20e..c50532f8f 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 623682c9e..c80c89080 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 @@ -44,448 +43,342 @@ 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', - ], - 'nullable': [ + "all": [ + "detector_creation_input_request", ], - 'enum': [ + "required": [ + "detector_creation_input_request", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'detector_creation_input_request': - (DetectorCreationInputRequest,), - }, - 'attribute_map': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "detector_creation_input_request": (DetectorCreationInputRequest,), }, - 'location_map': { - 'detector_creation_input_request': 'body', + "attribute_map": {}, + "location_map": { + "detector_creation_input_request": "body", }, - 'collection_format_map': { - } + "collection_format_map": {}, }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'application/json' - ] - }, - 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', + "all": [ + "id", ], - 'required': [ - 'id', + "required": [ + "id", ], - 'nullable': [ - ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - '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', + "all": [ + "id", ], - 'nullable': [ + "required": [ + "id", ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "id": (str,), }, - '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': [ - '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', + "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, ) self.list_detector_pipelines_endpoint = _Endpoint( settings={ - 'response_type': (PaginatedMLPipelineList,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/detectors/{detector_id}/pipelines', - 'operation_id': 'list_detector_pipelines', - 'http_method': 'GET', - 'servers': None, + "response_type": (PaginatedMLPipelineList,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/detectors/{detector_id}/pipelines", + "operation_id": "list_detector_pipelines", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'detector_id', - 'ordering', - 'page', - 'page_size', - 'search', - ], - 'required': [ - 'detector_id', + "all": [ + "detector_id", + "ordering", + "page", + "page_size", + "search", ], - 'nullable': [ + "required": [ + "detector_id", ], - 'enum': [ - ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'detector_id': - (str,), - 'ordering': - (str,), - 'page': - (int,), - 'page_size': - (int,), - 'search': - (str,), - }, - 'attribute_map': { - 'detector_id': 'detector_id', - 'ordering': 'ordering', - 'page': 'page', - 'page_size': 'page_size', - 'search': 'search', - }, - 'location_map': { - 'detector_id': 'path', - 'ordering': 'query', - 'page': 'query', - 'page_size': 'query', - 'search': 'query', - }, - 'collection_format_map': { - } + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "detector_id": (str,), + "ordering": (str,), + "page": (int,), + "page_size": (int,), + "search": (str,), + }, + "attribute_map": { + "detector_id": "detector_id", + "ordering": "ordering", + "page": "page", + "page_size": "page_size", + "search": "search", + }, + "location_map": { + "detector_id": "path", + "ordering": "query", + "page": "query", + "page_size": "query", + "search": "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_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': [ + "all": [ + "page", + "page_size", ], - 'enum': [ - ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "page": (int,), + "page_size": (int,), }, - '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': [ - ], - '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 @@ -531,39 +424,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 @@ -609,39 +482,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 @@ -687,39 +540,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 @@ -765,39 +598,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 @@ -843,39 +656,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_detector_pipelines( - self, - detector_id, - **kwargs - ): + def list_detector_pipelines(self, detector_id, **kwargs): """list_detector_pipelines # noqa: E501 List all MLPipelines for a detector. # noqa: E501 @@ -925,38 +718,19 @@ def list_detector_pipelines( 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_pipelines_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 @@ -1002,37 +776,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 @@ -1079,31 +834,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 09229eb00..a0b3187d2 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 8c601a076..03ad2600e 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 3a9f141d2..fd948a9f5 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 1df2695e9..ed4670350 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 d5a842d13..f1af2cb52 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/priming_groups_api.py b/generated/groundlight_openapi_client/api/priming_groups_api.py index 99fdee56d..ca17a4c75 100644 --- a/generated/groundlight_openapi_client/api/priming_groups_api.py +++ b/generated/groundlight_openapi_client/api/priming_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.paginated_priming_group_list import PaginatedPrimingGroupList from groundlight_openapi_client.model.priming_group import PrimingGroup @@ -40,228 +39,174 @@ def __init__(self, api_client=None): self.api_client = api_client self.create_priming_group_endpoint = _Endpoint( settings={ - 'response_type': (PrimingGroup,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/priming-groups', - 'operation_id': 'create_priming_group', - 'http_method': 'POST', - 'servers': None, + "response_type": (PrimingGroup,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/priming-groups", + "operation_id": "create_priming_group", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'priming_group_creation_input_request', - ], - 'required': [ - 'priming_group_creation_input_request', - ], - 'nullable': [ + "all": [ + "priming_group_creation_input_request", ], - 'enum': [ + "required": [ + "priming_group_creation_input_request", ], - 'validation': [ - ] + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'priming_group_creation_input_request': - (PrimingGroupCreationInputRequest,), - }, - 'attribute_map': { + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "priming_group_creation_input_request": (PrimingGroupCreationInputRequest,), }, - 'location_map': { - 'priming_group_creation_input_request': 'body', + "attribute_map": {}, + "location_map": { + "priming_group_creation_input_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_priming_group_endpoint = _Endpoint( settings={ - 'response_type': None, - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/priming-groups/{id}', - 'operation_id': 'delete_priming_group', - 'http_method': 'DELETE', - 'servers': None, + "response_type": None, + "auth": ["ApiToken"], + "endpoint_path": "/v1/priming-groups/{id}", + "operation_id": "delete_priming_group", + "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, ) self.get_priming_group_endpoint = _Endpoint( settings={ - 'response_type': (PrimingGroup,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/priming-groups/{id}', - 'operation_id': 'get_priming_group', - 'http_method': 'GET', - 'servers': None, + "response_type": (PrimingGroup,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/priming-groups/{id}", + "operation_id": "get_priming_group", + "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': - (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': [ - 'application/json' - ], - 'content_type': [], + "accept": ["application/json"], + "content_type": [], }, - api_client=api_client + api_client=api_client, ) self.list_priming_groups_endpoint = _Endpoint( settings={ - 'response_type': (PaginatedPrimingGroupList,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/priming-groups', - 'operation_id': 'list_priming_groups', - 'http_method': 'GET', - 'servers': None, + "response_type": (PaginatedPrimingGroupList,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/priming-groups", + "operation_id": "list_priming_groups", + "http_method": "GET", + "servers": None, }, params_map={ - 'all': [ - 'ordering', - 'page', - 'page_size', - 'search', - ], - 'required': [], - 'nullable': [ + "all": [ + "ordering", + "page", + "page_size", + "search", ], - 'enum': [ - ], - 'validation': [ - ] + "required": [], + "nullable": [], + "enum": [], + "validation": [], }, root_map={ - 'validations': { - }, - 'allowed_values': { - }, - 'openapi_types': { - 'ordering': - (str,), - 'page': - (int,), - 'page_size': - (int,), - 'search': - (str,), + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "ordering": (str,), + "page": (int,), + "page_size": (int,), + "search": (str,), }, - 'attribute_map': { - 'ordering': 'ordering', - 'page': 'page', - 'page_size': 'page_size', - 'search': 'search', + "attribute_map": { + "ordering": "ordering", + "page": "page", + "page_size": "page_size", + "search": "search", }, - 'location_map': { - 'ordering': 'query', - 'page': 'query', - 'page_size': 'query', - 'search': 'query', + "location_map": { + "ordering": "query", + "page": "query", + "page_size": "query", + "search": "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_priming_group( - self, - priming_group_creation_input_request, - **kwargs - ): + def create_priming_group(self, priming_group_creation_input_request, **kwargs): """create_priming_group # noqa: E501 Create a new priming group seeded from an existing trained MLPipeline. The cached_vizlogic_key from the source pipeline is copied as the base binary. No FK to the source pipeline is stored, so deleting the source detector does not affect this priming group. # noqa: E501 @@ -307,39 +252,19 @@ def create_priming_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['priming_group_creation_input_request'] = \ - priming_group_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["priming_group_creation_input_request"] = priming_group_creation_input_request return self.create_priming_group_endpoint.call_with_http_info(**kwargs) - def delete_priming_group( - self, - id, - **kwargs - ): + def delete_priming_group(self, id, **kwargs): """delete_priming_group # noqa: E501 Delete a priming group. Only the owning user's account may delete it. # noqa: E501 @@ -385,39 +310,19 @@ def delete_priming_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['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_priming_group_endpoint.call_with_http_info(**kwargs) - def get_priming_group( - self, - id, - **kwargs - ): + def get_priming_group(self, id, **kwargs): """get_priming_group # noqa: E501 Retrieve a priming group by its ID. # noqa: E501 @@ -463,38 +368,19 @@ def get_priming_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['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_priming_group_endpoint.call_with_http_info(**kwargs) - def list_priming_groups( - self, - **kwargs - ): + def list_priming_groups(self, **kwargs): """list_priming_groups # noqa: E501 List all priming groups either owned by the authenticated user, or with is_global=True. # noqa: E501 @@ -542,29 +428,13 @@ def list_priming_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.list_priming_groups_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 5fcf4e14f..ec1e6c9c4 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.me import Me @@ -38,53 +37,30 @@ def __init__(self, api_client=None): self.api_client = api_client self.who_am_i_endpoint = _Endpoint( settings={ - 'response_type': (Me,), - '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": (Me,), + "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 authenticated user's id, email, username, and customer groups. # 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/vlm_verifications_api.py b/generated/groundlight_openapi_client/api/vlm_verifications_api.py index d9badbf75..721ae2c7c 100644 --- a/generated/groundlight_openapi_client/api/vlm_verifications_api.py +++ b/generated/groundlight_openapi_client/api/vlm_verifications_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.vlm_verification import VlmVerification @@ -38,85 +37,64 @@ def __init__(self, api_client=None): self.api_client = api_client self.submit_vlm_verification_endpoint = _Endpoint( settings={ - 'response_type': (VlmVerification,), - 'auth': [ - 'ApiToken' - ], - 'endpoint_path': '/v1/vlm-verifications', - 'operation_id': 'submit_vlm_verification', - 'http_method': 'POST', - 'servers': None, + "response_type": (VlmVerification,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/vlm-verifications", + "operation_id": "submit_vlm_verification", + "http_method": "POST", + "servers": None, }, params_map={ - 'all': [ - 'media', - 'query', - 'model_id', + "all": [ + "media", + "query", + "model_id", ], - 'required': [ - 'media', - 'query', + "required": [ + "media", + "query", ], - 'nullable': [ + "nullable": [], + "enum": [], + "validation": [ + "media", ], - 'enum': [ - ], - 'validation': [ - 'media', - ] }, root_map={ - 'validations': { - ('media',): { - - 'max_items': 8, - 'min_items': 1, + "validations": { + ("media",): { + "max_items": 8, + "min_items": 1, }, }, - 'allowed_values': { + "allowed_values": {}, + "openapi_types": { + "media": ([file_type],), + "query": (str,), + "model_id": (str,), }, - 'openapi_types': { - 'media': - ([file_type],), - 'query': - (str,), - 'model_id': - (str,), + "attribute_map": { + "media": "media", + "query": "query", + "model_id": "model_id", }, - 'attribute_map': { - 'media': 'media', - 'query': 'query', - 'model_id': 'model_id', + "location_map": { + "media": "form", + "query": "form", + "model_id": "form", }, - 'location_map': { - 'media': 'form', - 'query': 'form', - 'model_id': 'form', + "collection_format_map": { + "media": "csv", }, - 'collection_format_map': { - 'media': 'csv', - } }, - headers_map={ - 'accept': [ - 'application/json' - ], - 'content_type': [ - 'multipart/form-data' - ] - }, - api_client=api_client + headers_map={"accept": ["application/json"], "content_type": ["multipart/form-data"]}, + api_client=api_client, ) - def submit_vlm_verification( - self, - media, - query, - **kwargs - ): + def submit_vlm_verification(self, media, query, **kwargs): """submit_vlm_verification # noqa: E501 - Submit one or more images for VLM-based alert verification. Send everything as `multipart/form-data`: one to eight `media` parts, plus a `query` field and an optional `model_id` field. The `query` describes what each image is and what to look for — the server makes no assumptions about the images' meaning. Images are presented to the model labeled `Image 1`, `Image 2`, ... in upload order, so the query can reference them (e.g. \"Image 1 is the full frame; image 2 is the cropped ROI ...\"). (Video parts are planned but not yet supported and are rejected.) Requires `ENABLE_BEDROCK_VLM_ACCESS` (enabled for Standard_Internal and SciDuck accounts) and accepted terms of service. ```bash curl https://api.groundlight.ai/device-api/v1/vlm-verifications \\ -F \"media=@full_frame.jpg;type=image/jpeg\" \\ -F \"media=@roi.jpg;type=image/jpeg\" \\ -F \"query=Image 1 is the full camera frame; image 2 is the cropped region a detector flagged. Is there really a fire?\" \\ -F \"model_id=gpt-5.4\" ``` # noqa: E501 + Submit one or more images for VLM-based alert verification. Send as `multipart/form-data`: one to eight `media` image parts, a `query` field, and an optional `model_id` field. Video is not yet supported. For example: ```bash $ curl https://api.groundlight.ai/device-api/v1/vlm-verifications \\ -F \"media=@image.jpg;type=image/jpeg\" \\ -F \"query=Is there a fire?\" ``` # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -161,33 +139,15 @@ def submit_vlm_verification( 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['media'] = \ - media - kwargs['query'] = \ - query + 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["media"] = media + kwargs["query"] = query return self.submit_vlm_verification_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 e18e15faa..da2e348ab 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 5c14b1716..ec3642609 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 ac1146ca3..654b832fc 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 5cb07d28d..393dbba83 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 ff8a5a916..98dd18e3b 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 516ab4d9c..8308d44b3 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 604f75ae5..a38fae043 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 2e3cb921f..89da5af16 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 5b9a80a46..1e1f6b8f8 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/api_token.py b/generated/groundlight_openapi_client/model/api_token.py index fcef95261..e967be455 100644 --- a/generated/groundlight_openapi_client/model/api_token.py +++ b/generated/groundlight_openapi_client/model/api_token.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 ApiToken(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,12 +53,11 @@ class ApiToken(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} validations = { - ('name',): { - 'max_length': 64, + ("name",): { + "max_length": 64, }, } @@ -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,33 +92,41 @@ def openapi_types(): and the value is attribute type. """ return { - 'name': (str,), # noqa: E501 - 'raw_key_snippet': (str,), # noqa: E501 - 'created_at': (datetime,), # noqa: E501 - 'last_used_at': (datetime, none_type,), # noqa: E501 - 'expires_at': (datetime, none_type,), # noqa: E501 - 'token_ttl': (int, none_type,), # noqa: E501 + "name": (str,), # noqa: E501 + "raw_key_snippet": (str,), # noqa: E501 + "created_at": (datetime,), # noqa: E501 + "last_used_at": ( + datetime, + none_type, + ), # noqa: E501 + "expires_at": ( + datetime, + none_type, + ), # noqa: E501 + "token_ttl": ( + int, + none_type, + ), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'name': 'name', # noqa: E501 - 'raw_key_snippet': 'raw_key_snippet', # noqa: E501 - 'created_at': 'created_at', # noqa: E501 - 'last_used_at': 'last_used_at', # noqa: E501 - 'expires_at': 'expires_at', # noqa: E501 - 'token_ttl': 'token_ttl', # noqa: E501 + "name": "name", # noqa: E501 + "raw_key_snippet": "raw_key_snippet", # noqa: E501 + "created_at": "created_at", # noqa: E501 + "last_used_at": "last_used_at", # noqa: E501 + "expires_at": "expires_at", # noqa: E501 + "token_ttl": "token_ttl", # noqa: E501 } read_only_vars = { - 'raw_key_snippet', # noqa: E501 - 'created_at', # noqa: E501 - 'last_used_at', # noqa: E501 - 'token_ttl', # noqa: E501 + "raw_key_snippet", # noqa: E501 + "created_at", # noqa: E501 + "last_used_at", # noqa: E501 + "token_ttl", # noqa: E501 } _composed_schemas = {} @@ -125,7 +140,7 @@ def _from_openapi_data(cls, name, raw_key_snippet, created_at, last_used_at, *ar name (str): An nickname for the API token. This name must be unique for this user. raw_key_snippet (str): Since we're storing hashed keys, it can be useful to see the raw prefix snippet of the token. created_at (datetime): When was this token created? - last_used_at (datetime, none_type): The most recent time this API token was used for authentication. Null until first use. + last_used_at (datetime): The most recent time this API token was used. (Helpful for detecting suspicious activity). Keyword Args: _check_type (bool): if True, values for parameters in openapi_types @@ -159,20 +174,20 @@ def _from_openapi_data(cls, name, raw_key_snippet, created_at, last_used_at, *ar through its discriminator because we passed in _visited_composed_classes = (Animal,) expires_at (datetime, none_type): When does this token expire? If Null, the token never expires.. [optional] # noqa: E501 - token_ttl (int, none_type): Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never expire. Omitted only by older servers that do not yet expose this field.. [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 +207,24 @@ def _from_openapi_data(cls, name, raw_key_snippet, created_at, last_used_at, *ar self.created_at = created_at self.last_used_at = last_used_at 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,18 +265,18 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) expires_at (datetime, none_type): When does this token expire? If Null, the token never expires.. [optional] # noqa: E501 - token_ttl (int, none_type): Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never expire. Omitted only by older servers that do not yet expose this field.. [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__, ), @@ -276,13 +293,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/api_token_create_response.py b/generated/groundlight_openapi_client/model/api_token_create_response.py index 8804042bd..17acd71c2 100644 --- a/generated/groundlight_openapi_client/model/api_token_create_response.py +++ b/generated/groundlight_openapi_client/model/api_token_create_response.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 ApiTokenCreateResponse(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,12 +53,11 @@ class ApiTokenCreateResponse(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} validations = { - ('name',): { - 'max_length': 64, + ("name",): { + "max_length": 64, }, } @@ -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,50 +92,60 @@ def openapi_types(): and the value is attribute type. """ return { - 'name': (str,), # noqa: E501 - 'raw_key_snippet': (str,), # noqa: E501 - 'created_at': (datetime,), # noqa: E501 - 'last_used_at': (datetime, none_type,), # noqa: E501 - 'raw_key': (str,), # noqa: E501 - 'expires_at': (datetime, none_type,), # noqa: E501 - 'token_ttl': (int, none_type,), # noqa: E501 + "name": (str,), # noqa: E501 + "raw_key_snippet": (str,), # noqa: E501 + "created_at": (datetime,), # noqa: E501 + "last_used_at": ( + datetime, + none_type, + ), # noqa: E501 + "raw_key": (str,), # noqa: E501 + "expires_at": ( + datetime, + none_type, + ), # noqa: E501 + "token_ttl": ( + int, + none_type, + ), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'name': 'name', # noqa: E501 - 'raw_key_snippet': 'raw_key_snippet', # noqa: E501 - 'created_at': 'created_at', # noqa: E501 - 'last_used_at': 'last_used_at', # noqa: E501 - 'raw_key': 'raw_key', # noqa: E501 - 'expires_at': 'expires_at', # noqa: E501 - 'token_ttl': 'token_ttl', # noqa: E501 + "name": "name", # noqa: E501 + "raw_key_snippet": "raw_key_snippet", # noqa: E501 + "created_at": "created_at", # noqa: E501 + "last_used_at": "last_used_at", # noqa: E501 + "raw_key": "raw_key", # noqa: E501 + "expires_at": "expires_at", # noqa: E501 + "token_ttl": "token_ttl", # noqa: E501 } read_only_vars = { - 'raw_key_snippet', # noqa: E501 - 'created_at', # noqa: E501 - 'last_used_at', # noqa: E501 - 'raw_key', # noqa: E501 - 'token_ttl', # noqa: E501 + "raw_key_snippet", # noqa: E501 + "created_at", # noqa: E501 + "last_used_at", # noqa: E501 + "raw_key", # noqa: E501 + "token_ttl", # noqa: E501 } _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, name, raw_key_snippet, created_at, last_used_at, raw_key, *args, **kwargs): # noqa: E501 + def _from_openapi_data( + cls, name, raw_key_snippet, created_at, last_used_at, raw_key, *args, **kwargs + ): # noqa: E501 """ApiTokenCreateResponse - a model defined in OpenAPI Args: name (str): An nickname for the API token. This name must be unique for this user. raw_key_snippet (str): Since we're storing hashed keys, it can be useful to see the raw prefix snippet of the token. created_at (datetime): When was this token created? - last_used_at (datetime, none_type): The most recent time this API token was used for authentication. Null until first use. + last_used_at (datetime): The most recent time this API token was used. (Helpful for detecting suspicious activity). raw_key (str): The full API token secret. Returned only once, when the token is created. Keyword Args: @@ -163,20 +180,20 @@ def _from_openapi_data(cls, name, raw_key_snippet, created_at, last_used_at, raw through its discriminator because we passed in _visited_composed_classes = (Animal,) expires_at (datetime, none_type): When does this token expire? If Null, the token never expires.. [optional] # noqa: E501 - token_ttl (int, none_type): Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never expire. Omitted only by older servers that do not yet expose this field.. [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,22 +214,24 @@ def _from_openapi_data(cls, name, raw_key_snippet, created_at, last_used_at, raw self.last_used_at = last_used_at self.raw_key = raw_key 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,18 +272,18 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) expires_at (datetime, none_type): When does this token expire? If Null, the token never expires.. [optional] # noqa: E501 - token_ttl (int, none_type): Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never expire. Omitted only by older servers that do not yet expose this field.. [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__, ), @@ -281,13 +300,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/api_token_request.py b/generated/groundlight_openapi_client/model/api_token_request.py index 75d8a612c..702cdcaa6 100644 --- a/generated/groundlight_openapi_client/model/api_token_request.py +++ b/generated/groundlight_openapi_client/model/api_token_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 ApiTokenRequest(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,13 +53,12 @@ class ApiTokenRequest(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} validations = { - ('name',): { - 'max_length': 64, - 'min_length': 1, + ("name",): { + "max_length": 64, + "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,22 +93,23 @@ def openapi_types(): and the value is attribute type. """ return { - 'name': (str,), # noqa: E501 - 'expires_at': (datetime, none_type,), # noqa: E501 + "name": (str,), # noqa: E501 + "expires_at": ( + datetime, + none_type, + ), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'name': 'name', # noqa: E501 - 'expires_at': 'expires_at', # noqa: E501 + "name": "name", # noqa: E501 + "expires_at": "expires_at", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -147,17 +155,18 @@ def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 expires_at (datetime, none_type): When does this token expire? If Null, the token never expires.. [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 +183,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 @@ -233,15 +244,16 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 expires_at (datetime, none_type): When does this token expire? If Null, the token never expires.. [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 +270,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/b_box_geometry.py b/generated/groundlight_openapi_client/model/b_box_geometry.py index 1ad77b5d7..2282dfd73 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 9d5913926..fcac579f4 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 31ed8ba41..018a6f3e5 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 86d08e37c..aa466bb88 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 8a2435937..ed756ae48 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 1e0df7990..bcf98f27f 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 4cd548926..8fc4c4178 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 9e6c48869..720dac0d9 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 48e6131f7..65a2861f1 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 c5326c64b..674578a68 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 7603f76df..9c2d3be9f 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 ebc34cdfb..85e692e5f 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 cb1f2bcae..2cde79915 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 1831f5d85..8d6997ae1 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,43 +67,42 @@ 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, }, - ('edge_pipeline_config',): { - 'max_length': 100, + ("edge_pipeline_config",): { + "max_length": 100, }, - ('metadata',): { - 'max_length': 1362, - 'min_length': 1, + ("metadata",): { + "max_length": 1362, + "min_length": 1, }, - ('priming_group_id',): { - 'max_length': 44, - 'min_length': 1, + ("priming_group_id",): { + "max_length": 44, + "min_length": 1, }, } @@ -114,7 +113,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 @@ -130,40 +139,67 @@ 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 - 'edge_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 - 'priming_group_id': (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 + "edge_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 + "priming_group_id": ( + 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 - 'edge_pipeline_config': 'edge_pipeline_config', # noqa: E501 - 'metadata': 'metadata', # noqa: E501 - 'mode': 'mode', # noqa: E501 - 'mode_configuration': 'mode_configuration', # noqa: E501 - 'priming_group_id': 'priming_group_id', # 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 + "edge_pipeline_config": "edge_pipeline_config", # noqa: E501 + "metadata": "metadata", # noqa: E501 + "mode": "mode", # noqa: E501 + "mode_configuration": "mode_configuration", # noqa: E501 + "priming_group_id": "priming_group_id", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -218,17 +254,18 @@ def _from_openapi_data(cls, name, query, *args, **kwargs): # noqa: E501 priming_group_id (str, none_type): ID of an existing PrimingGroup to associate with this detector (optional).. [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__, ), @@ -246,22 +283,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 @@ -314,15 +353,16 @@ def __init__(self, name, query, *args, **kwargs): # noqa: E501 priming_group_id (str, none_type): ID of an existing PrimingGroup to associate with this detector (optional).. [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__, ), @@ -340,13 +380,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 7eaa28f73..5620b0c94 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 f28697d38..3302860fe 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_mode_enum.py b/generated/groundlight_openapi_client/model/detector_mode_enum.py index 4907f8c3c..98dc4f0bd 100644 --- a/generated/groundlight_openapi_client/model/detector_mode_enum.py +++ b/generated/groundlight_openapi_client/model/detector_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 DetectorModeEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -52,17 +50,16 @@ class DetectorModeEnum(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/detector_type_enum.py b/generated/groundlight_openapi_client/model/detector_type_enum.py index 49b7825ea..94d446da1 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 2e0b107a8..c8da646d9 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,34 +88,62 @@ 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 - 'minimal_compatible': (bool,), # 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 + "minimal_compatible": (bool,), # 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 - 'minimal_compatible': 'minimal_compatible', # 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 + "minimal_compatible": "minimal_compatible", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -159,17 +193,18 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 minimal_compatible (bool): [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__, ), @@ -185,22 +220,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 @@ -248,15 +285,16 @@ def __init__(self, *args, **kwargs): # noqa: E501 minimal_compatible (bool): [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__, ), @@ -272,13 +310,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 505bba487..2b80360ea 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 92df5eeba..79cf01797 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 41939968c..424707307 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 1810e3d46..62e2494fd 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 e859dec30..cdb300325 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 7ca38024d..3b1ec0266 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,108 @@ 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, none_type,), # 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, + none_type, + ), # 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 +250,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 +277,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 +353,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 +378,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 61601c599..d5c30a123 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 49f7d401b..b2eb180b7 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 cc19ad479..810b9e2ef 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 12324f286..ee9b73e9e 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 ab086120e..434f8ad8a 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/ml_pipeline.py b/generated/groundlight_openapi_client/model/ml_pipeline.py index 15445e5c4..621a87ba6 100644 --- a/generated/groundlight_openapi_client/model/ml_pipeline.py +++ b/generated/groundlight_openapi_client/model/ml_pipeline.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 MLPipeline(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,11 +53,9 @@ class MLPipeline(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,74 +88,115 @@ def openapi_types(): and the value is attribute type. """ return { - 'id': (str,), # noqa: E501 - 'pipeline_config': (str,), # noqa: E501 - 'is_active_pipeline': (bool,), # noqa: E501 - 'is_edge_pipeline': (bool,), # noqa: E501 - 'is_unclear_pipeline': (bool,), # noqa: E501 - 'is_oodd_pipeline': (bool,), # noqa: E501 - 'is_enabled': (bool,), # noqa: E501 - 'created_at': (datetime,), # noqa: E501 - 'trained_at': (datetime, none_type,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'friendly_name': (str, none_type,), # noqa: E501 - 'model_binary_id': (str, none_type,), # noqa: E501 - 'training_in_progress': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 - 'metrics': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - 'eval_mlbinary_key': (str, none_type,), # noqa: E501 - 'eval_mlbinary_revision_number': (int, none_type,), # noqa: E501 - 'eval_mlbinary_friendly_name': (str, none_type,), # noqa: E501 + "id": (str,), # noqa: E501 + "pipeline_config": (str,), # noqa: E501 + "is_active_pipeline": (bool,), # noqa: E501 + "is_edge_pipeline": (bool,), # noqa: E501 + "is_unclear_pipeline": (bool,), # noqa: E501 + "is_oodd_pipeline": (bool,), # noqa: E501 + "is_enabled": (bool,), # noqa: E501 + "created_at": (datetime,), # noqa: E501 + "trained_at": ( + datetime, + none_type, + ), # noqa: E501 + "type": (str,), # noqa: E501 + "friendly_name": ( + str, + none_type, + ), # noqa: E501 + "model_binary_id": ( + str, + none_type, + ), # noqa: E501 + "training_in_progress": ( + {str: (bool, date, datetime, dict, float, int, list, str, none_type)}, + none_type, + ), # noqa: E501 + "metrics": ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + "eval_mlbinary_key": ( + str, + none_type, + ), # noqa: E501 + "eval_mlbinary_revision_number": ( + int, + none_type, + ), # noqa: E501 + "eval_mlbinary_friendly_name": ( + str, + none_type, + ), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'id': 'id', # noqa: E501 - 'pipeline_config': 'pipeline_config', # noqa: E501 - 'is_active_pipeline': 'is_active_pipeline', # noqa: E501 - 'is_edge_pipeline': 'is_edge_pipeline', # noqa: E501 - 'is_unclear_pipeline': 'is_unclear_pipeline', # noqa: E501 - 'is_oodd_pipeline': 'is_oodd_pipeline', # noqa: E501 - 'is_enabled': 'is_enabled', # noqa: E501 - 'created_at': 'created_at', # noqa: E501 - 'trained_at': 'trained_at', # noqa: E501 - 'type': 'type', # noqa: E501 - 'friendly_name': 'friendly_name', # noqa: E501 - 'model_binary_id': 'model_binary_id', # noqa: E501 - 'training_in_progress': 'training_in_progress', # noqa: E501 - 'metrics': 'metrics', # noqa: E501 - 'eval_mlbinary_key': 'eval_mlbinary_key', # noqa: E501 - 'eval_mlbinary_revision_number': 'eval_mlbinary_revision_number', # noqa: E501 - 'eval_mlbinary_friendly_name': 'eval_mlbinary_friendly_name', # noqa: E501 + "id": "id", # noqa: E501 + "pipeline_config": "pipeline_config", # noqa: E501 + "is_active_pipeline": "is_active_pipeline", # noqa: E501 + "is_edge_pipeline": "is_edge_pipeline", # noqa: E501 + "is_unclear_pipeline": "is_unclear_pipeline", # noqa: E501 + "is_oodd_pipeline": "is_oodd_pipeline", # noqa: E501 + "is_enabled": "is_enabled", # noqa: E501 + "created_at": "created_at", # noqa: E501 + "trained_at": "trained_at", # noqa: E501 + "type": "type", # noqa: E501 + "friendly_name": "friendly_name", # noqa: E501 + "model_binary_id": "model_binary_id", # noqa: E501 + "training_in_progress": "training_in_progress", # noqa: E501 + "metrics": "metrics", # noqa: E501 + "eval_mlbinary_key": "eval_mlbinary_key", # noqa: E501 + "eval_mlbinary_revision_number": "eval_mlbinary_revision_number", # noqa: E501 + "eval_mlbinary_friendly_name": "eval_mlbinary_friendly_name", # noqa: E501 } read_only_vars = { - 'id', # noqa: E501 - 'pipeline_config', # noqa: E501 - 'is_active_pipeline', # noqa: E501 - 'is_edge_pipeline', # noqa: E501 - 'is_unclear_pipeline', # noqa: E501 - 'is_oodd_pipeline', # noqa: E501 - 'is_enabled', # noqa: E501 - 'created_at', # noqa: E501 - 'trained_at', # noqa: E501 - 'type', # noqa: E501 - 'friendly_name', # noqa: E501 - 'training_in_progress', # noqa: E501 - 'metrics', # noqa: E501 - 'eval_mlbinary_key', # noqa: E501 - 'eval_mlbinary_revision_number', # noqa: E501 - 'eval_mlbinary_friendly_name', # noqa: E501 + "id", # noqa: E501 + "pipeline_config", # noqa: E501 + "is_active_pipeline", # noqa: E501 + "is_edge_pipeline", # noqa: E501 + "is_unclear_pipeline", # noqa: E501 + "is_oodd_pipeline", # noqa: E501 + "is_enabled", # noqa: E501 + "created_at", # noqa: E501 + "trained_at", # noqa: E501 + "type", # noqa: E501 + "friendly_name", # noqa: E501 + "training_in_progress", # noqa: E501 + "metrics", # noqa: E501 + "eval_mlbinary_key", # noqa: E501 + "eval_mlbinary_revision_number", # noqa: E501 + "eval_mlbinary_friendly_name", # noqa: E501 } _composed_schemas = {} @classmethod @convert_js_args_to_python_args - def _from_openapi_data(cls, id, pipeline_config, is_active_pipeline, is_edge_pipeline, is_unclear_pipeline, is_oodd_pipeline, is_enabled, created_at, trained_at, type, friendly_name, model_binary_id, training_in_progress, metrics, eval_mlbinary_key, eval_mlbinary_revision_number, eval_mlbinary_friendly_name, *args, **kwargs): # noqa: E501 + def _from_openapi_data( + cls, + id, + pipeline_config, + is_active_pipeline, + is_edge_pipeline, + is_unclear_pipeline, + is_oodd_pipeline, + is_enabled, + created_at, + trained_at, + type, + friendly_name, + model_binary_id, + training_in_progress, + metrics, + eval_mlbinary_key, + eval_mlbinary_revision_number, + eval_mlbinary_friendly_name, + *args, + **kwargs, + ): # noqa: E501 """MLPipeline - a model defined in OpenAPI Args: @@ -204,17 +251,18 @@ def _from_openapi_data(cls, id, pipeline_config, is_active_pipeline, is_edge_pip _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__, ), @@ -247,22 +295,24 @@ def _from_openapi_data(cls, id, pipeline_config, is_active_pipeline, is_edge_pip self.eval_mlbinary_revision_number = eval_mlbinary_revision_number self.eval_mlbinary_friendly_name = eval_mlbinary_friendly_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 @@ -303,15 +353,16 @@ def __init__(self, model_binary_id, *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__, ), @@ -328,13 +379,17 @@ def __init__(self, model_binary_id, *args, **kwargs): # noqa: E501 self.model_binary_id = model_binary_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 5b1b25946..b35a38339 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 1755866c8..f08ee27c7 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 1620d757c..bfc778c5e 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 28479f35b..64f139a7c 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 670637091..95889010c 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/null_enum.py b/generated/groundlight_openapi_client/model/null_enum.py index 3781403b7..c7e7cfab0 100644 --- a/generated/groundlight_openapi_client/model/null_enum.py +++ b/generated/groundlight_openapi_client/model/null_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 NullEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -52,13 +50,12 @@ class NullEnum(ModelSimple): """ allowed_values = { - ('value',): { - 'NULL': "null", + ("value",): { + "NULL": "null", }, } - 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,10 +137,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,14 +151,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__, ), @@ -179,7 +176,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__, ), @@ -231,12 +229,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,14 +245,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__, ), @@ -271,7 +270,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/paginated_api_token_list.py b/generated/groundlight_openapi_client/model/paginated_api_token_list.py index b26a7a862..57f352dc9 100644 --- a/generated/groundlight_openapi_client/model/paginated_api_token_list.py +++ b/generated/groundlight_openapi_client/model/paginated_api_token_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.api_token import ApiToken - globals()['ApiToken'] = ApiToken + + globals()["ApiToken"] = ApiToken class PaginatedApiTokenList(ModelNormal): @@ -59,11 +59,9 @@ class PaginatedApiTokenList(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': ([ApiToken],), # noqa: E501 - 'next': (str, none_type,), # noqa: E501 - 'previous': (str, none_type,), # noqa: E501 + "count": (int,), # noqa: E501 + "results": ([ApiToken],), # 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_detector_list.py b/generated/groundlight_openapi_client/model/paginated_detector_list.py index 391aad231..5972205ef 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 d8c7cc17a..13dccab78 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_ml_pipeline_list.py b/generated/groundlight_openapi_client/model/paginated_ml_pipeline_list.py index 65c417b0f..8bdcb5413 100644 --- a/generated/groundlight_openapi_client/model/paginated_ml_pipeline_list.py +++ b/generated/groundlight_openapi_client/model/paginated_ml_pipeline_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.ml_pipeline import MLPipeline - globals()['MLPipeline'] = MLPipeline + + globals()["MLPipeline"] = MLPipeline class PaginatedMLPipelineList(ModelNormal): @@ -59,11 +59,9 @@ class PaginatedMLPipelineList(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': ([MLPipeline],), # noqa: E501 - 'next': (str, none_type,), # noqa: E501 - 'previous': (str, none_type,), # noqa: E501 + "count": (int,), # noqa: E501 + "results": ([MLPipeline],), # 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_priming_group_list.py b/generated/groundlight_openapi_client/model/paginated_priming_group_list.py index 3f93b9125..9fccad84a 100644 --- a/generated/groundlight_openapi_client/model/paginated_priming_group_list.py +++ b/generated/groundlight_openapi_client/model/paginated_priming_group_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.priming_group import PrimingGroup - globals()['PrimingGroup'] = PrimingGroup + + globals()["PrimingGroup"] = PrimingGroup class PaginatedPrimingGroupList(ModelNormal): @@ -59,11 +59,9 @@ class PaginatedPrimingGroupList(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': ([PrimingGroup],), # noqa: E501 - 'next': (str, none_type,), # noqa: E501 - 'previous': (str, none_type,), # noqa: E501 + "count": (int,), # noqa: E501 + "results": ([PrimingGroup],), # 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 7102f4eb9..6d007e1d1 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 06e8f5a7d..7e7a58131 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 d3037a5a8..a721bb4c8 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 343ac2ed8..3a0f12a25 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/priming_group.py b/generated/groundlight_openapi_client/model/priming_group.py index de2404631..8f762e6da 100644 --- a/generated/groundlight_openapi_client/model/priming_group.py +++ b/generated/groundlight_openapi_client/model/priming_group.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_mode_enum import DetectorModeEnum from groundlight_openapi_client.model.null_enum import NullEnum - globals()['BlankEnum'] = BlankEnum - globals()['DetectorModeEnum'] = DetectorModeEnum - globals()['NullEnum'] = NullEnum + + globals()["BlankEnum"] = BlankEnum + globals()["DetectorModeEnum"] = DetectorModeEnum + globals()["NullEnum"] = NullEnum class PrimingGroup(ModelNormal): @@ -63,18 +63,17 @@ class PrimingGroup(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} validations = { - ('name',): { - 'max_length': 100, + ("name",): { + "max_length": 100, }, - ('canonical_query',): { - 'max_length': 300, + ("canonical_query",): { + "max_length": 300, }, - ('active_pipeline_config',): { - 'max_length': 8192, + ("active_pipeline_config",): { + "max_length": 8192, }, } @@ -85,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 @@ -101,41 +110,71 @@ def openapi_types(): """ lazy_import() return { - 'id': (str,), # noqa: E501 - 'name': (str,), # noqa: E501 - 'num_classes': (int, none_type,), # noqa: E501 - 'is_global': (bool,), # noqa: E501 - 'created_at': (datetime,), # noqa: E501 - 'detector_mode': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'canonical_query': (str, none_type,), # noqa: E501 - 'active_pipeline_config': (str, none_type,), # noqa: E501 - 'priming_group_specific_shadow_pipeline_configs': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'disable_shadow_pipelines': (bool,), # noqa: E501 + "id": (str,), # noqa: E501 + "name": (str,), # noqa: E501 + "num_classes": ( + int, + none_type, + ), # noqa: E501 + "is_global": (bool,), # noqa: E501 + "created_at": (datetime,), # noqa: E501 + "detector_mode": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "canonical_query": ( + str, + none_type, + ), # noqa: E501 + "active_pipeline_config": ( + str, + none_type, + ), # noqa: E501 + "priming_group_specific_shadow_pipeline_configs": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "disable_shadow_pipelines": (bool,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'id': 'id', # noqa: E501 - 'name': 'name', # noqa: E501 - 'num_classes': 'num_classes', # noqa: E501 - 'is_global': 'is_global', # noqa: E501 - 'created_at': 'created_at', # noqa: E501 - 'detector_mode': 'detector_mode', # noqa: E501 - 'canonical_query': 'canonical_query', # noqa: E501 - 'active_pipeline_config': 'active_pipeline_config', # noqa: E501 - 'priming_group_specific_shadow_pipeline_configs': 'priming_group_specific_shadow_pipeline_configs', # noqa: E501 - 'disable_shadow_pipelines': 'disable_shadow_pipelines', # noqa: E501 + "id": "id", # noqa: E501 + "name": "name", # noqa: E501 + "num_classes": "num_classes", # noqa: E501 + "is_global": "is_global", # noqa: E501 + "created_at": "created_at", # noqa: E501 + "detector_mode": "detector_mode", # noqa: E501 + "canonical_query": "canonical_query", # noqa: E501 + "active_pipeline_config": "active_pipeline_config", # noqa: E501 + "priming_group_specific_shadow_pipeline_configs": ( + "priming_group_specific_shadow_pipeline_configs" + ), # noqa: E501 + "disable_shadow_pipelines": "disable_shadow_pipelines", # noqa: E501 } read_only_vars = { - 'id', # noqa: E501 - 'num_classes', # noqa: E501 - 'is_global', # noqa: E501 - 'created_at', # noqa: E501 + "id", # noqa: E501 + "num_classes", # noqa: E501 + "is_global", # noqa: E501 + "created_at", # noqa: E501 } _composed_schemas = {} @@ -190,17 +229,18 @@ def _from_openapi_data(cls, id, name, num_classes, is_global, created_at, *args, disable_shadow_pipelines (bool): If True, new detectors added to this priming group will not receive the mode-specific default shadow pipelines from INITIAL_SHADOW_PIPELINE_CONFIG_SET. Priming-group-specific shadow configs still apply. Use this to guarantee the primed active MLBinary is never switched off by a shadow pipeline being promoted.. [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__, ), @@ -221,22 +261,24 @@ def _from_openapi_data(cls, id, name, num_classes, is_global, created_at, *args, self.is_global = is_global self.created_at = created_at 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 @@ -282,15 +324,16 @@ def __init__(self, name, *args, **kwargs): # noqa: E501 disable_shadow_pipelines (bool): If True, new detectors added to this priming group will not receive the mode-specific default shadow pipelines from INITIAL_SHADOW_PIPELINE_CONFIG_SET. Priming-group-specific shadow configs still apply. Use this to guarantee the primed active MLBinary is never switched off by a shadow pipeline being promoted.. [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,13 +350,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/priming_group_creation_input_request.py b/generated/groundlight_openapi_client/model/priming_group_creation_input_request.py index 33c07166a..3eb09a40a 100644 --- a/generated/groundlight_openapi_client/model/priming_group_creation_input_request.py +++ b/generated/groundlight_openapi_client/model/priming_group_creation_input_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.detector_mode_enum import DetectorModeEnum - globals()['DetectorModeEnum'] = DetectorModeEnum + + globals()["DetectorModeEnum"] = DetectorModeEnum class PrimingGroupCreationInputRequest(ModelNormal): @@ -59,20 +59,19 @@ class PrimingGroupCreationInputRequest(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} validations = { - ('name',): { - 'max_length': 100, - 'min_length': 1, + ("name",): { + "max_length": 100, + "min_length": 1, }, - ('source_ml_pipeline_id',): { - 'max_length': 44, - 'min_length': 1, + ("source_ml_pipeline_id",): { + "max_length": 44, + "min_length": 1, }, - ('canonical_query',): { - 'max_length': 300, + ("canonical_query",): { + "max_length": 300, }, } @@ -83,7 +82,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 @@ -99,28 +108,39 @@ def openapi_types(): """ lazy_import() return { - 'name': (str,), # noqa: E501 - 'source_ml_pipeline_id': (str,), # noqa: E501 - 'detector_mode': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501 - 'canonical_query': (str, none_type,), # noqa: E501 - 'disable_shadow_pipelines': (bool,), # noqa: E501 + "name": (str,), # noqa: E501 + "source_ml_pipeline_id": (str,), # noqa: E501 + "detector_mode": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "canonical_query": ( + str, + none_type, + ), # noqa: E501 + "disable_shadow_pipelines": (bool,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'name': 'name', # noqa: E501 - 'source_ml_pipeline_id': 'source_ml_pipeline_id', # noqa: E501 - 'detector_mode': 'detector_mode', # noqa: E501 - 'canonical_query': 'canonical_query', # noqa: E501 - 'disable_shadow_pipelines': 'disable_shadow_pipelines', # noqa: E501 + "name": "name", # noqa: E501 + "source_ml_pipeline_id": "source_ml_pipeline_id", # noqa: E501 + "detector_mode": "detector_mode", # noqa: E501 + "canonical_query": "canonical_query", # noqa: E501 + "disable_shadow_pipelines": "disable_shadow_pipelines", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -169,17 +189,18 @@ def _from_openapi_data(cls, name, source_ml_pipeline_id, detector_mode, *args, * disable_shadow_pipelines (bool): If true, new detectors added to this priming group will not receive the default shadow pipelines. This guarantees the primed active model is never switched off.. [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__, ), @@ -198,22 +219,24 @@ def _from_openapi_data(cls, name, source_ml_pipeline_id, detector_mode, *args, * self.source_ml_pipeline_id = source_ml_pipeline_id self.detector_mode = detector_mode 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,15 +283,16 @@ def __init__(self, name, source_ml_pipeline_id, detector_mode, *args, **kwargs): disable_shadow_pipelines (bool): If true, new detectors added to this priming group will not receive the default shadow pipelines. This guarantees the primed active model is never switched off.. [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__, ), @@ -287,13 +311,17 @@ def __init__(self, name, source_ml_pipeline_id, detector_mode, *args, **kwargs): self.source_ml_pipeline_id = source_ml_pipeline_id self.detector_mode = detector_mode 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 a2b7a7c68..c4b954fde 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 368b00dea..74c4fc660 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 14918a8f9..07fb54e22 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 66991d0c4..7f1be14aa 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 0bf2e262d..8fdf8fe1a 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 672227fc9..f5586bb6e 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 44d234b9a..b9c247c44 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 ca4db25f8..e8e5a047d 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 d6a1f357f..b41c2871b 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 5a6990f0d..ee4c4e733 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 97b871832..0e7695678 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 3b2acb152..789dd77c3 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/verdict_enum.py b/generated/groundlight_openapi_client/model/verdict_enum.py index 7b2ae0eb2..e41359b81 100644 --- a/generated/groundlight_openapi_client/model/verdict_enum.py +++ b/generated/groundlight_openapi_client/model/verdict_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 VerdictEnum(ModelSimple): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -52,15 +50,14 @@ class VerdictEnum(ModelSimple): """ allowed_values = { - ('value',): { - 'YES': "YES", - 'NO': "NO", - 'UNSURE': "UNSURE", + ("value",): { + "YES": "YES", + "NO": "NO", + "UNSURE": "UNSURE", }, } - 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/vlm_verification.py b/generated/groundlight_openapi_client/model/vlm_verification.py index 646091e0f..b28a2d7fc 100644 --- a/generated/groundlight_openapi_client/model/vlm_verification.py +++ b/generated/groundlight_openapi_client/model/vlm_verification.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.vlm_verification_cost import VlmVerificationCost from groundlight_openapi_client.model.vlm_verification_result import VlmVerificationResult - globals()['VlmVerificationCost'] = VlmVerificationCost - globals()['VlmVerificationResult'] = VlmVerificationResult + + globals()["VlmVerificationCost"] = VlmVerificationCost + globals()["VlmVerificationResult"] = VlmVerificationResult class VlmVerification(ModelNormal): @@ -61,11 +61,9 @@ class VlmVerification(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} - validations = { - } + validations = {} @cached_property def additional_properties_type(): @@ -74,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 @@ -90,34 +98,33 @@ def openapi_types(): """ lazy_import() return { - 'id': (str,), # noqa: E501 - 'type': (str,), # noqa: E501 - 'created_at': (datetime,), # noqa: E501 - 'query': (str,), # noqa: E501 - 'model_id': (str,), # noqa: E501 - 'result': (VlmVerificationResult,), # noqa: E501 - 'cost': (VlmVerificationCost,), # noqa: E501 + "id": (str,), # noqa: E501 + "type": (str,), # noqa: E501 + "created_at": (datetime,), # noqa: E501 + "query": (str,), # noqa: E501 + "model_id": (str,), # noqa: E501 + "result": (VlmVerificationResult,), # noqa: E501 + "cost": (VlmVerificationCost,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'id': 'id', # noqa: E501 - 'type': 'type', # noqa: E501 - 'created_at': 'created_at', # noqa: E501 - 'query': 'query', # noqa: E501 - 'model_id': 'model_id', # noqa: E501 - 'result': 'result', # noqa: E501 - 'cost': 'cost', # noqa: E501 + "id": "id", # noqa: E501 + "type": "type", # noqa: E501 + "created_at": "created_at", # noqa: E501 + "query": "query", # noqa: E501 + "model_id": "model_id", # noqa: E501 + "result": "result", # noqa: E501 + "cost": "cost", # noqa: E501 } read_only_vars = { - 'id', # noqa: E501 - 'type', # noqa: E501 - 'created_at', # noqa: E501 + "id", # noqa: E501 + "type", # noqa: E501 + "created_at", # noqa: E501 } _composed_schemas = {} @@ -169,17 +176,18 @@ def _from_openapi_data(cls, id, type, created_at, query, model_id, result, cost, _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__, ), @@ -202,22 +210,24 @@ def _from_openapi_data(cls, id, type, created_at, query, model_id, result, cost, self.result = result self.cost = cost 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 @@ -262,15 +272,16 @@ def __init__(self, query, model_id, result, cost, *args, **kwargs): # noqa: E50 _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__, ), @@ -290,13 +301,17 @@ def __init__(self, query, model_id, result, cost, *args, **kwargs): # noqa: E50 self.result = result self.cost = cost 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/vlm_verification_cost.py b/generated/groundlight_openapi_client/model/vlm_verification_cost.py index 315236a38..0acc190a3 100644 --- a/generated/groundlight_openapi_client/model/vlm_verification_cost.py +++ b/generated/groundlight_openapi_client/model/vlm_verification_cost.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 VlmVerificationCost(ModelNormal): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -55,11 +53,9 @@ class VlmVerificationCost(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 { - 'input_tokens': (int, none_type,), # noqa: E501 - 'output_tokens': (int, none_type,), # noqa: E501 - 'total_cost_usd': (float, none_type,), # noqa: E501 + "input_tokens": ( + int, + none_type, + ), # noqa: E501 + "output_tokens": ( + int, + none_type, + ), # noqa: E501 + "total_cost_usd": ( + float, + none_type, + ), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'input_tokens': 'input_tokens', # noqa: E501 - 'output_tokens': 'output_tokens', # noqa: E501 - 'total_cost_usd': 'total_cost_usd', # noqa: E501 + "input_tokens": "input_tokens", # noqa: E501 + "output_tokens": "output_tokens", # noqa: E501 + "total_cost_usd": "total_cost_usd", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -146,17 +159,18 @@ def _from_openapi_data(cls, input_tokens, output_tokens, total_cost_usd, *args, _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 +189,24 @@ def _from_openapi_data(cls, input_tokens, output_tokens, total_cost_usd, *args, self.output_tokens = output_tokens self.total_cost_usd = total_cost_usd 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,15 +251,16 @@ def __init__(self, input_tokens, output_tokens, total_cost_usd, *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", ()) 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 +279,17 @@ def __init__(self, input_tokens, output_tokens, total_cost_usd, *args, **kwargs) self.output_tokens = output_tokens self.total_cost_usd = total_cost_usd 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/vlm_verification_result.py b/generated/groundlight_openapi_client/model/vlm_verification_result.py index c88fb03f9..acec3aaca 100644 --- a/generated/groundlight_openapi_client/model/vlm_verification_result.py +++ b/generated/groundlight_openapi_client/model/vlm_verification_result.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.verdict_enum import VerdictEnum - globals()['VerdictEnum'] = VerdictEnum + + globals()["VerdictEnum"] = VerdictEnum class VlmVerificationResult(ModelNormal): @@ -59,13 +59,12 @@ class VlmVerificationResult(ModelNormal): as additional properties values. """ - allowed_values = { - } + allowed_values = {} validations = { - ('confidence',): { - 'inclusive_maximum': 1.0, - 'inclusive_minimum': 0.0, + ("confidence",): { + "inclusive_maximum": 1.0, + "inclusive_minimum": 0.0, }, } @@ -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,24 +101,22 @@ def openapi_types(): """ lazy_import() return { - 'verdict': (VerdictEnum,), # noqa: E501 - 'confidence': (float,), # noqa: E501 - 'reasoning': (str,), # noqa: E501 + "verdict": (VerdictEnum,), # noqa: E501 + "confidence": (float,), # noqa: E501 + "reasoning": (str,), # noqa: E501 } @cached_property def discriminator(): return None - attribute_map = { - 'verdict': 'verdict', # noqa: E501 - 'confidence': 'confidence', # noqa: E501 - 'reasoning': 'reasoning', # noqa: E501 + "verdict": "verdict", # noqa: E501 + "confidence": "confidence", # noqa: E501 + "reasoning": "reasoning", # noqa: E501 } - read_only_vars = { - } + read_only_vars = {} _composed_schemas = {} @@ -156,17 +163,18 @@ def _from_openapi_data(cls, verdict, confidence, reasoning, *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__, ), @@ -185,22 +193,24 @@ def _from_openapi_data(cls, verdict, confidence, reasoning, *args, **kwargs): # self.confidence = confidence self.reasoning = reasoning 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,15 +255,16 @@ def __init__(self, verdict, confidence, reasoning, *args, **kwargs): # noqa: E5 _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,13 +283,17 @@ def __init__(self, verdict, confidence, reasoning, *args, **kwargs): # noqa: E5 self.confidence = confidence self.reasoning = reasoning 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.py b/generated/groundlight_openapi_client/model/webhook_action.py index b230804e5..33f70f3c9 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 39ba2c854..cd98a99b5 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 a1c7d7a89..cf7bd6d4e 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/models/__init__.py b/generated/groundlight_openapi_client/models/__init__.py index 9f80dad51..60d2d38fd 100644 --- a/generated/groundlight_openapi_client/models/__init__.py +++ b/generated/groundlight_openapi_client/models/__init__.py @@ -48,8 +48,8 @@ from groundlight_openapi_client.model.label import Label from groundlight_openapi_client.model.label_value import LabelValue from groundlight_openapi_client.model.label_value_request import LabelValueRequest -from groundlight_openapi_client.model.ml_pipeline import MLPipeline from groundlight_openapi_client.model.me import Me +from groundlight_openapi_client.model.ml_pipeline import MLPipeline 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.multi_classification_result import MultiClassificationResult diff --git a/generated/groundlight_openapi_client/rest.py b/generated/groundlight_openapi_client/rest.py index 16efe8df0..16d8ca86f 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 e089fe106..c9738ce0e 100644 --- a/generated/model.py +++ b/generated/model.py @@ -1,6 +1,6 @@ # generated by datamodel-codegen: # filename: public-api.yaml -# timestamp: 2026-07-31T19:57:40+00:00 +# timestamp: 2026-07-10T01:01:06+00:00 from __future__ import annotations @@ -37,17 +37,15 @@ class ApiToken(BaseModel): ) created_at: datetime = Field(..., description="When was this token created?") last_used_at: Optional[datetime] = Field( - ..., description="The most recent time this API token was used for authentication. Null until first use." + ..., + description="The most recent time this API token was used. (Helpful for detecting suspicious activity). Null if the token has never been used.", ) expires_at: Optional[datetime] = Field( None, description="When does this token expire? If Null, the token never expires." ) token_ttl: Optional[int] = Field( None, - description=( - "Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never" - " expire. Omitted only by older servers that do not yet expose this field." - ), + description="Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never expire (no rotation).", ) @@ -65,17 +63,15 @@ class ApiTokenCreateResponse(BaseModel): ) created_at: datetime = Field(..., description="When was this token created?") last_used_at: Optional[datetime] = Field( - ..., description="The most recent time this API token was used for authentication. Null until first use." + ..., + description="The most recent time this API token was used. (Helpful for detecting suspicious activity). Null if the token has never been used.", ) expires_at: Optional[datetime] = Field( None, description="When does this token expire? If Null, the token never expires." ) token_ttl: Optional[int] = Field( None, - description=( - "Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never" - " expire. Omitted only by older servers that do not yet expose this field." - ), + description="Identity token lifetime policy in whole seconds. Null means tokens minted under this identity never expire (no rotation).", ) raw_key: str = Field(..., description="The full API token secret. Returned only once, when the token is created.") @@ -127,6 +123,15 @@ class ConditionRequest(BaseModel): parameters: Dict[str, Any] +class DetectorGroup(BaseModel): + id: str + name: constr(max_length=100) + + +class DetectorGroupRequest(BaseModel): + name: constr(min_length=1, max_length=100) + + class CustomerGroup(BaseModel): """ A Groundlight customer group (tenant) the authenticated user belongs to. @@ -135,15 +140,15 @@ class CustomerGroup(BaseModel): id: int = Field(..., description="Numeric id of the customer group.") name: str = Field(..., description="Name of the customer group.") +class Me(BaseModel): + """ + Authenticated user identity from GET /v1/me (id, email, username, groups). + """ -class DetectorGroup(BaseModel): - id: str - name: constr(max_length=100) - - -class DetectorGroupRequest(BaseModel): - name: constr(min_length=1, max_length=100) - + id: int = Field(..., description="Numeric id of the authenticated user.") + email: str = Field(..., description="Email address of the authenticated user.") + username: str = Field(..., description="Username of the authenticated user.") + groups: List[CustomerGroup] = Field(..., description="Customer groups the authenticated user belongs to.") class DetectorModeEnum(str, Enum): """ @@ -224,17 +229,6 @@ class MLPipeline(BaseModel): ) -class Me(BaseModel): - """ - Authenticated user identity from GET /v1/me (id, email, username, groups). - """ - - id: int = Field(..., description="Numeric id of the authenticated user.") - email: str = Field(..., description="Email address of the authenticated user.") - username: str = Field(..., description="Username of the authenticated user.") - groups: List[CustomerGroup] = Field(..., description="Customer groups the authenticated user belongs to.") - - class ModeEnum(str, Enum): BINARY = "BINARY" COUNT = "COUNT" @@ -422,30 +416,6 @@ class StatusEnum(str, Enum): OFF = "OFF" -class VerdictEnum(str, Enum): - """ - * `YES` - YES - * `NO` - NO - * `UNSURE` - UNSURE - """ - - YES = "YES" - NO = "NO" - UNSURE = "UNSURE" - - -class VlmVerificationCost(BaseModel): - input_tokens: Optional[int] = Field(...) - output_tokens: Optional[int] = Field(...) - total_cost_usd: Optional[float] = Field(...) - - -class VlmVerificationResult(BaseModel): - verdict: VerdictEnum - confidence: confloat(ge=0.0, le=1.0) - reasoning: str - - class WebhookAction(BaseModel): url: AnyUrl include_image: Optional[bool] = None @@ -617,6 +587,30 @@ class Label(str, Enum): UNCLEAR = "UNCLEAR" +class VerdictEnum(str, Enum): + """ + * `YES` - YES + * `NO` - NO + * `UNSURE` - UNSURE + """ + + YES = "YES" + NO = "NO" + UNSURE = "UNSURE" + + +class VlmVerificationCost(BaseModel): + input_tokens: Optional[int] = Field(...) + output_tokens: Optional[int] = Field(...) + total_cost_usd: Optional[float] = Field(...) + + +class VlmVerificationResult(BaseModel): + verdict: VerdictEnum + confidence: confloat(ge=0.0, le=1.0) + reasoning: str + + class AllNotes(BaseModel): """ Serializes all notes for a given detector, grouped by type as listed in UserProfile.NoteCategoryChoices diff --git a/generated/setup.py b/generated/setup.py index 4366b8795..9c4bb5721 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/spec/public-api.yaml b/spec/public-api.yaml index 0112339b6..6b4bc9470 100644 --- a/spec/public-api.yaml +++ b/spec/public-api.yaml @@ -1062,24 +1062,12 @@ paths: Submit one or more images for VLM-based alert verification. - Send everything as `multipart/form-data`: one to eight `media` parts, plus a - `query` field and an optional `model_id` field. - - The `query` describes what each image is and what to look for — the server makes - no assumptions about the images' meaning. Images are presented to the model - labeled `Image 1`, `Image 2`, ... in upload order, so the query can reference - them (e.g. "Image 1 is the full frame; image 2 is the cropped ROI ..."). - - (Video parts are planned but not yet supported and are rejected.) - - Requires `ENABLE_BEDROCK_VLM_ACCESS` (enabled for Standard_Internal and SciDuck accounts) and accepted terms of service. - + Send as `multipart/form-data`: one to eight `media` image parts, a `query` + field, and an optional `model_id` field. Video is not yet supported. For example: ```bash - curl https://api.groundlight.ai/device-api/v1/vlm-verifications \ - -F "media=@full_frame.jpg;type=image/jpeg" \ - -F "media=@roi.jpg;type=image/jpeg" \ - -F "query=Image 1 is the full camera frame; image 2 is the cropped region a detector flagged. Is there really a fire?" \ - -F "model_id=gpt-5.4" + $ curl https://api.groundlight.ai/device-api/v1/vlm-verifications \ + -F "media=@image.jpg;type=image/jpeg" \ + -F "query=Is there a fire?" ``` tags: - vlm-verifications @@ -1192,10 +1180,10 @@ components: last_used_at: type: string format: date-time - readOnly: true nullable: true - description: The most recent time this API token was used for authentication. - Null until first use. + readOnly: true + description: The most recent time this API token was used. (Helpful for + detecting suspicious activity). Null if the token has never been used. expires_at: type: string format: date-time @@ -1206,8 +1194,7 @@ components: nullable: true readOnly: true description: Identity token lifetime policy in whole seconds. Null means - tokens minted under this identity never expire. Omitted only by older - servers that do not yet expose this field. + tokens minted under this identity never expire (no rotation). required: - created_at - last_used_at @@ -1237,10 +1224,10 @@ components: last_used_at: type: string format: date-time - readOnly: true nullable: true - description: The most recent time this API token was used for authentication. - Null until first use. + readOnly: true + description: The most recent time this API token was used. (Helpful for + detecting suspicious activity). Null if the token has never been used. expires_at: type: string format: date-time @@ -1251,8 +1238,7 @@ components: nullable: true readOnly: true description: Identity token lifetime policy in whole seconds. Null means - tokens minted under this identity never expire. Omitted only by older - servers that do not yet expose this field. + tokens minted under this identity never expire (no rotation). raw_key: type: string readOnly: true @@ -2380,79 +2366,6 @@ components: description: |- * `ON` - ON * `OFF` - OFF - VerdictEnum: - enum: - - 'YES' - - 'NO' - - UNSURE - type: string - description: |- - * `YES` - YES - * `NO` - NO - * `UNSURE` - UNSURE - VlmVerification: - type: object - description: Response shape for POST /v1/vlm-verifications. - properties: - id: - type: string - readOnly: true - type: - type: string - readOnly: true - created_at: - type: string - format: date-time - readOnly: true - query: - type: string - model_id: - type: string - result: - $ref: '#/components/schemas/VlmVerificationResult' - cost: - $ref: '#/components/schemas/VlmVerificationCost' - required: - - cost - - created_at - - id - - model_id - - query - - result - - type - VlmVerificationCost: - type: object - properties: - input_tokens: - type: integer - nullable: true - output_tokens: - type: integer - nullable: true - total_cost_usd: - type: number - format: double - nullable: true - required: - - input_tokens - - output_tokens - - total_cost_usd - VlmVerificationResult: - type: object - properties: - verdict: - $ref: '#/components/schemas/VerdictEnum' - confidence: - type: number - format: double - maximum: 1.0 - minimum: 0.0 - reasoning: - type: string - required: - - confidence - - reasoning - - verdict WebhookAction: type: object properties: @@ -2737,6 +2650,79 @@ components: - 'YES' - 'NO' - UNCLEAR + VerdictEnum: + enum: + - 'YES' + - 'NO' + - UNSURE + type: string + description: |- + * `YES` - YES + * `NO` - NO + * `UNSURE` - UNSURE + VlmVerification: + type: object + description: Response shape for POST /v1/vlm-verifications. + properties: + id: + type: string + readOnly: true + type: + type: string + readOnly: true + created_at: + type: string + format: date-time + readOnly: true + query: + type: string + model_id: + type: string + result: + $ref: '#/components/schemas/VlmVerificationResult' + cost: + $ref: '#/components/schemas/VlmVerificationCost' + required: + - cost + - created_at + - id + - model_id + - query + - result + - type + VlmVerificationCost: + type: object + properties: + input_tokens: + type: integer + nullable: true + output_tokens: + type: integer + nullable: true + total_cost_usd: + type: number + format: double + nullable: true + required: + - input_tokens + - output_tokens + - total_cost_usd + VlmVerificationResult: + type: object + properties: + verdict: + $ref: '#/components/schemas/VerdictEnum' + confidence: + type: number + format: double + maximum: 1.0 + minimum: 0.0 + reasoning: + type: string + required: + - confidence + - reasoning + - verdict securitySchemes: ApiToken: name: x-api-token From e8eca88c237fa2cf0c2164fcf3b36091470888d0 Mon Sep 17 00:00:00 2001 From: Tim Huff Date: Fri, 31 Jul 2026 13:17:26 -0700 Subject: [PATCH 8/9] Fix blank lines around generated Me models Co-authored-by: Cursor --- generated/model.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/generated/model.py b/generated/model.py index c9738ce0e..3ed2bc687 100644 --- a/generated/model.py +++ b/generated/model.py @@ -140,6 +140,7 @@ class CustomerGroup(BaseModel): id: int = Field(..., description="Numeric id of the customer group.") name: str = Field(..., description="Name of the customer group.") + class Me(BaseModel): """ Authenticated user identity from GET /v1/me (id, email, username, groups). @@ -150,6 +151,7 @@ class Me(BaseModel): username: str = Field(..., description="Username of the authenticated user.") groups: List[CustomerGroup] = Field(..., description="Customer groups the authenticated user belongs to.") + class DetectorModeEnum(str, Enum): """ * `BINARY` - BINARY From a7598e01cf8b0edb546e585d579532235d5fde52 Mon Sep 17 00:00:00 2001 From: Tim Huff Date: Fri, 31 Jul 2026 13:22:37 -0700 Subject: [PATCH 9/9] Tighten Groundlight.me() docstring wording Co-authored-by: Cursor --- src/groundlight/client.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/groundlight/client.py b/src/groundlight/client.py index 78f0d56c1..33a3d0ce2 100644 --- a/src/groundlight/client.py +++ b/src/groundlight/client.py @@ -283,10 +283,7 @@ def _fixup_image_query(iq: ImageQuery) -> ImageQuery: def me(self) -> Me: """ - Return identity information for the current API token. - - Calls GET /v1/me and returns the authenticated user's id, email, username, and - customer groups. Extra fields from the server response are ignored. + Return user identity information for the current API token. **Example usage**::