From e3a10bcf55ec60f62ec8d7a4c84a9a8ce994addb Mon Sep 17 00:00:00 2001 From: Francine Wright Date: Thu, 10 Sep 2026 22:52:24 +0000 Subject: [PATCH] Sync public API spec with zuuul main and regenerate The SDK's spec/public-api.yaml had drifted several commits behind zuuul's reef/public/static/public-api.yaml. Recent SDK PRs hand-added just the schemas they needed rather than re-copying the spec, so the file was never a clean copy of any upstream revision and the gap accumulated silently. This syncs spec/public-api.yaml to an exact copy of zuuul main and regenerates. No functional SDK changes beyond what the spec dictates. Picked up from zuuul: - #6729 drop expires_at from token create: ApiTokenRequest is now ApiTokenCreationInputRequest, without the expires_at field - #6399 durable ONNX pipeline builds: /v1/edge/gll-pipeline and /v1/edge/model-info, plus GLLPipelineInfo and GLLModelInfo. Also renames StatusEnum to DetectorStatusEnum and adds StaleFromStatusEnum - #6400 durable TensorRT engine builds: /v1/edge/gll-engine, plus GLLEngineInfo, GLLEngineInfoRequest and Status638Enum - #6768 priming-group id description on detector creation - doc-only text from #6519, #6590 and #6652 that earlier partial syncs had missed The two renames touch hand-written code, so client.py and token_manager.py are updated to match. Both are pure renames: DetectorStatusEnum carries the same ON/OFF values as StatusEnum, and the token create call site already omitted expires_at deliberately, so dropping the field changes nothing. Me and Group models are also newly committed under generated/. They were already in the spec as of #468 but the regenerated client was never checked in alongside it. Co-Authored-By: Claude Opus 5 --- generated/.openapi-generator/FILES | 36 +- generated/README.md | 18 +- generated/docs/ApiToken.md | 4 +- generated/docs/ApiTokenCreateResponse.md | 4 +- .../docs/ApiTokenCreationInputRequest.md | 13 + generated/docs/ApiTokensApi.md | 13 +- .../docs/DetectorCreationInputRequest.md | 2 +- generated/docs/DetectorStatusEnum.md | 12 + generated/docs/EdgeApi.md | 419 ++++++++++++ generated/docs/GLLEngineInfo.md | 34 + generated/docs/GLLEngineInfoRequest.md | 34 + generated/docs/GLLModelInfo.md | 16 + generated/docs/GLLPipelineInfo.md | 28 + generated/docs/Group.md | 14 + generated/docs/Me.md | 16 + generated/docs/StaleFromStatusEnum.md | 12 + generated/docs/Status638Enum.md | 12 + generated/docs/UserApi.md | 8 +- generated/docs/VlmVerificationsApi.md | 2 +- .../api/api_tokens_api.py | 18 +- .../api/edge_api.py | 500 ++++++++++++++ .../api/user_api.py | 8 +- .../api/vlm_verifications_api.py | 2 +- .../model/api_token.py | 4 +- .../model/api_token_create_response.py | 4 +- .../model/api_token_creation_input_request.py | 279 ++++++++ .../model/detector.py | 4 +- .../model/detector_creation_input_request.py | 4 +- .../model/detector_status_enum.py | 283 ++++++++ .../model/gll_engine_info.py | 452 +++++++++++++ .../model/gll_engine_info_request.py | 492 ++++++++++++++ .../model/gll_model_info.py | 294 ++++++++ .../model/gll_pipeline_info.py | 409 +++++++++++ .../groundlight_openapi_client/model/group.py | 283 ++++++++ .../groundlight_openapi_client/model/me.py | 310 +++++++++ .../model/patched_detector_request.py | 4 +- .../model/stale_from_status_enum.py | 283 ++++++++ .../model/status638_enum.py | 287 ++++++++ .../models/__init__.py | 13 +- generated/model.py | 307 ++++++--- .../test_api_token_creation_input_request.py | 35 + generated/test/test_detector_status_enum.py | 35 + generated/test/test_gll_engine_info.py | 40 ++ .../test/test_gll_engine_info_request.py | 40 ++ generated/test/test_gll_model_info.py | 35 + generated/test/test_gll_pipeline_info.py | 40 ++ generated/test/test_group.py | 35 + generated/test/test_me.py | 38 ++ generated/test/test_stale_from_status_enum.py | 35 + generated/test/test_status638_enum.py | 35 + spec/public-api.yaml | 636 +++++++++++++++--- src/groundlight/client.py | 6 +- src/groundlight/token_manager.py | 4 +- 53 files changed, 5704 insertions(+), 247 deletions(-) create mode 100644 generated/docs/ApiTokenCreationInputRequest.md create mode 100644 generated/docs/DetectorStatusEnum.md create mode 100644 generated/docs/GLLEngineInfo.md create mode 100644 generated/docs/GLLEngineInfoRequest.md create mode 100644 generated/docs/GLLModelInfo.md create mode 100644 generated/docs/GLLPipelineInfo.md create mode 100644 generated/docs/Group.md create mode 100644 generated/docs/Me.md create mode 100644 generated/docs/StaleFromStatusEnum.md create mode 100644 generated/docs/Status638Enum.md create mode 100644 generated/groundlight_openapi_client/model/api_token_creation_input_request.py create mode 100644 generated/groundlight_openapi_client/model/detector_status_enum.py create mode 100644 generated/groundlight_openapi_client/model/gll_engine_info.py create mode 100644 generated/groundlight_openapi_client/model/gll_engine_info_request.py create mode 100644 generated/groundlight_openapi_client/model/gll_model_info.py create mode 100644 generated/groundlight_openapi_client/model/gll_pipeline_info.py create mode 100644 generated/groundlight_openapi_client/model/group.py create mode 100644 generated/groundlight_openapi_client/model/me.py create mode 100644 generated/groundlight_openapi_client/model/stale_from_status_enum.py create mode 100644 generated/groundlight_openapi_client/model/status638_enum.py create mode 100644 generated/test/test_api_token_creation_input_request.py create mode 100644 generated/test/test_detector_status_enum.py create mode 100644 generated/test/test_gll_engine_info.py create mode 100644 generated/test/test_gll_engine_info_request.py create mode 100644 generated/test/test_gll_model_info.py create mode 100644 generated/test/test_gll_pipeline_info.py create mode 100644 generated/test/test_group.py create mode 100644 generated/test/test_me.py create mode 100644 generated/test/test_stale_from_status_enum.py create mode 100644 generated/test/test_status638_enum.py diff --git a/generated/.openapi-generator/FILES b/generated/.openapi-generator/FILES index 928613a0d..6d95a4225 100644 --- a/generated/.openapi-generator/FILES +++ b/generated/.openapi-generator/FILES @@ -8,7 +8,7 @@ docs/AllNotes.md docs/AnnotationsRequestedEnum.md docs/ApiToken.md docs/ApiTokenCreateResponse.md -docs/ApiTokenRequest.md +docs/ApiTokenCreationInputRequest.md docs/ApiTokensApi.md docs/BBoxGeometry.md docs/BBoxGeometryRequest.md @@ -29,18 +29,23 @@ docs/DetectorGroupRequest.md docs/DetectorGroupsApi.md docs/DetectorModeEnum.md docs/DetectorResetApi.md +docs/DetectorStatusEnum.md docs/DetectorTypeEnum.md docs/DetectorsApi.md docs/EdgeApi.md docs/EdgeModelInfo.md docs/EscalationTypeEnum.md +docs/GLLEngineInfo.md +docs/GLLEngineInfoRequest.md +docs/GLLModelInfo.md +docs/GLLPipelineInfo.md +docs/Group.md docs/ImageQueriesApi.md docs/ImageQuery.md 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 +53,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 @@ -76,7 +82,8 @@ docs/RuleRequest.md docs/SnoozeTimeUnitEnum.md docs/Source.md docs/SourceEnum.md -docs/StatusEnum.md +docs/StaleFromStatusEnum.md +docs/Status638Enum.md docs/TextModeConfiguration.md docs/TextRecognitionResult.md docs/UserApi.md @@ -116,7 +123,7 @@ groundlight_openapi_client/model/all_notes.py groundlight_openapi_client/model/annotations_requested_enum.py groundlight_openapi_client/model/api_token.py groundlight_openapi_client/model/api_token_create_response.py -groundlight_openapi_client/model/api_token_request.py +groundlight_openapi_client/model/api_token_creation_input_request.py groundlight_openapi_client/model/b_box_geometry.py groundlight_openapi_client/model/b_box_geometry_request.py groundlight_openapi_client/model/binary_classification_result.py @@ -134,20 +141,26 @@ groundlight_openapi_client/model/detector_creation_input_request.py groundlight_openapi_client/model/detector_group.py groundlight_openapi_client/model/detector_group_request.py groundlight_openapi_client/model/detector_mode_enum.py +groundlight_openapi_client/model/detector_status_enum.py groundlight_openapi_client/model/detector_type_enum.py groundlight_openapi_client/model/edge_model_info.py groundlight_openapi_client/model/escalation_type_enum.py +groundlight_openapi_client/model/gll_engine_info.py +groundlight_openapi_client/model/gll_engine_info_request.py +groundlight_openapi_client/model/gll_model_info.py +groundlight_openapi_client/model/gll_pipeline_info.py +groundlight_openapi_client/model/group.py groundlight_openapi_client/model/image_query.py 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 @@ -174,7 +187,8 @@ groundlight_openapi_client/model/rule_request.py groundlight_openapi_client/model/snooze_time_unit_enum.py groundlight_openapi_client/model/source.py groundlight_openapi_client/model/source_enum.py -groundlight_openapi_client/model/status_enum.py +groundlight_openapi_client/model/stale_from_status_enum.py +groundlight_openapi_client/model/status638_enum.py groundlight_openapi_client/model/text_mode_configuration.py groundlight_openapi_client/model/text_recognition_result.py groundlight_openapi_client/model/verb_enum.py @@ -192,4 +206,14 @@ setup.cfg setup.py test-requirements.txt test/__init__.py +test/test_api_token_creation_input_request.py +test/test_detector_status_enum.py +test/test_gll_engine_info.py +test/test_gll_engine_info_request.py +test/test_gll_model_info.py +test/test_gll_pipeline_info.py +test/test_group.py +test/test_me.py +test/test_stale_from_status_enum.py +test/test_status638_enum.py tox.ini diff --git a/generated/README.md b/generated/README.md index fb70bd290..5ddf92f26 100644 --- a/generated/README.md +++ b/generated/README.md @@ -136,7 +136,12 @@ Class | Method | HTTP request | Description *DetectorsApi* | [**list_detectors**](docs/DetectorsApi.md#list_detectors) | **GET** /v1/detectors | *DetectorsApi* | [**update_detector**](docs/DetectorsApi.md#update_detector) | **PATCH** /v1/detectors/{id} | *EdgeApi* | [**edge_report_metrics_create**](docs/EdgeApi.md#edge_report_metrics_create) | **POST** /v1/edge/report-metrics | +*EdgeApi* | [**get_gll_model_info**](docs/EdgeApi.md#get_gll_model_info) | **GET** /v1/edge/model-info/{detector_id}/ | +*EdgeApi* | [**get_gll_pipeline**](docs/EdgeApi.md#get_gll_pipeline) | **GET** /v1/edge/gll-pipeline/{detector_id}/ | +*EdgeApi* | [**get_gll_tensor_rt_engine_build**](docs/EdgeApi.md#get_gll_tensor_rt_engine_build) | **GET** /v1/edge/gll-engine/{detector_id}/ | *EdgeApi* | [**get_model_urls**](docs/EdgeApi.md#get_model_urls) | **GET** /v1/edge/fetch-model-urls/{detector_id}/ | +*EdgeApi* | [**initiate_gll_pipeline_build**](docs/EdgeApi.md#initiate_gll_pipeline_build) | **POST** /v1/edge/gll-pipeline/{detector_id}/ | +*EdgeApi* | [**initiate_gll_tensor_rt_engine_build**](docs/EdgeApi.md#initiate_gll_tensor_rt_engine_build) | **POST** /v1/edge/gll-engine/{detector_id}/ | *ImageQueriesApi* | [**get_image**](docs/ImageQueriesApi.md#get_image) | **GET** /v1/image-queries/{id}/image | *ImageQueriesApi* | [**get_image_query**](docs/ImageQueriesApi.md#get_image_query) | **GET** /v1/image-queries/{id} | *ImageQueriesApi* | [**list_image_queries**](docs/ImageQueriesApi.md#list_image_queries) | **GET** /v1/image-queries | @@ -162,7 +167,7 @@ Class | Method | HTTP request | Description - [AnnotationsRequestedEnum](docs/AnnotationsRequestedEnum.md) - [ApiToken](docs/ApiToken.md) - [ApiTokenCreateResponse](docs/ApiTokenCreateResponse.md) - - [ApiTokenRequest](docs/ApiTokenRequest.md) + - [ApiTokenCreationInputRequest](docs/ApiTokenCreationInputRequest.md) - [BBoxGeometry](docs/BBoxGeometry.md) - [BBoxGeometryRequest](docs/BBoxGeometryRequest.md) - [BinaryClassificationResult](docs/BinaryClassificationResult.md) @@ -180,21 +185,27 @@ Class | Method | HTTP request | Description - [DetectorGroup](docs/DetectorGroup.md) - [DetectorGroupRequest](docs/DetectorGroupRequest.md) - [DetectorModeEnum](docs/DetectorModeEnum.md) + - [DetectorStatusEnum](docs/DetectorStatusEnum.md) - [DetectorTypeEnum](docs/DetectorTypeEnum.md) - [EdgeModelInfo](docs/EdgeModelInfo.md) - [EscalationTypeEnum](docs/EscalationTypeEnum.md) + - [GLLEngineInfo](docs/GLLEngineInfo.md) + - [GLLEngineInfoRequest](docs/GLLEngineInfoRequest.md) + - [GLLModelInfo](docs/GLLModelInfo.md) + - [GLLPipelineInfo](docs/GLLPipelineInfo.md) + - [Group](docs/Group.md) - [ImageQuery](docs/ImageQuery.md) - [ImageQueryTypeEnum](docs/ImageQueryTypeEnum.md) - [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) @@ -220,7 +231,8 @@ Class | Method | HTTP request | Description - [SnoozeTimeUnitEnum](docs/SnoozeTimeUnitEnum.md) - [Source](docs/Source.md) - [SourceEnum](docs/SourceEnum.md) - - [StatusEnum](docs/StatusEnum.md) + - [StaleFromStatusEnum](docs/StaleFromStatusEnum.md) + - [Status638Enum](docs/Status638Enum.md) - [TextModeConfiguration](docs/TextModeConfiguration.md) - [TextRecognitionResult](docs/TextRecognitionResult.md) - [VerbEnum](docs/VerbEnum.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/ApiTokenCreationInputRequest.md b/generated/docs/ApiTokenCreationInputRequest.md new file mode 100644 index 000000000..6e43ac726 --- /dev/null +++ b/generated/docs/ApiTokenCreationInputRequest.md @@ -0,0 +1,13 @@ +# ApiTokenCreationInputRequest + +Public create-token body (name only). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | An nickname for the API token. This name must be unique for this user. | +**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/ApiTokensApi.md b/generated/docs/ApiTokensApi.md index cfab063f9..3a49e6fb5 100644 --- a/generated/docs/ApiTokensApi.md +++ b/generated/docs/ApiTokensApi.md @@ -11,7 +11,7 @@ Method | HTTP request | Description # **create_api_token** -> ApiTokenCreateResponse create_api_token(api_token_request) +> ApiTokenCreateResponse create_api_token(api_token_creation_input_request) @@ -25,8 +25,8 @@ Create a new API token, returning the raw_key exactly once in the response. import time import groundlight_openapi_client from groundlight_openapi_client.api import api_tokens_api -from groundlight_openapi_client.model.api_token_request import ApiTokenRequest from groundlight_openapi_client.model.api_token_create_response import ApiTokenCreateResponse +from groundlight_openapi_client.model.api_token_creation_input_request import ApiTokenCreationInputRequest 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. @@ -49,14 +49,13 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY' with groundlight_openapi_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = api_tokens_api.ApiTokensApi(api_client) - api_token_request = ApiTokenRequest( + api_token_creation_input_request = ApiTokenCreationInputRequest( name="name_example", - expires_at=dateutil_parser('1970-01-01T00:00:00.00Z'), - ) # ApiTokenRequest | + ) # ApiTokenCreationInputRequest | # example passing only required values which don't have defaults set try: - api_response = api_instance.create_api_token(api_token_request) + api_response = api_instance.create_api_token(api_token_creation_input_request) pprint(api_response) except groundlight_openapi_client.ApiException as e: print("Exception when calling ApiTokensApi->create_api_token: %s\n" % e) @@ -67,7 +66,7 @@ with groundlight_openapi_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **api_token_request** | [**ApiTokenRequest**](ApiTokenRequest.md)| | + **api_token_creation_input_request** | [**ApiTokenCreationInputRequest**](ApiTokenCreationInputRequest.md)| | ### Return type diff --git a/generated/docs/DetectorCreationInputRequest.md b/generated/docs/DetectorCreationInputRequest.md index d435afc81..175ac306f 100644 --- a/generated/docs/DetectorCreationInputRequest.md +++ b/generated/docs/DetectorCreationInputRequest.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **metadata** | **str** | Base64-encoded metadata for the detector. This should be a JSON object with string keys. The size after encoding should not exceed 1362 bytes, corresponding to 1KiB before encoding. | [optional] **mode** | **bool, date, datetime, dict, float, int, list, str, none_type** | Mode in which this detector will work. * `BINARY` - BINARY * `COUNT` - COUNT * `MULTI_CLASS` - MULTI_CLASS * `TEXT` - TEXT * `BOUNDING_BOX` - BOUNDING_BOX | [optional] **mode_configuration** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] -**priming_group_id** | **str, none_type** | ID of an existing PrimingGroup to associate with this detector (optional). | [optional] +**priming_group_id** | **str, none_type** | ID of an existing PrimingGroup to associate with this detector (optional). Must be a priming group your account owns or a global one; any other ID is reported as not found. | [optional] **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/DetectorStatusEnum.md b/generated/docs/DetectorStatusEnum.md new file mode 100644 index 000000000..25c9be6b7 --- /dev/null +++ b/generated/docs/DetectorStatusEnum.md @@ -0,0 +1,12 @@ +# DetectorStatusEnum + +* `ON` - ON * `OFF` - OFF + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | * `ON` - ON * `OFF` - OFF | must be one of ["ON", "OFF", ] + +[[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/EdgeApi.md b/generated/docs/EdgeApi.md index 049762616..a3bd7b253 100644 --- a/generated/docs/EdgeApi.md +++ b/generated/docs/EdgeApi.md @@ -5,7 +5,12 @@ All URIs are relative to *https://api.groundlight.ai/device-api* Method | HTTP request | Description ------------- | ------------- | ------------- [**edge_report_metrics_create**](EdgeApi.md#edge_report_metrics_create) | **POST** /v1/edge/report-metrics | +[**get_gll_model_info**](EdgeApi.md#get_gll_model_info) | **GET** /v1/edge/model-info/{detector_id}/ | +[**get_gll_pipeline**](EdgeApi.md#get_gll_pipeline) | **GET** /v1/edge/gll-pipeline/{detector_id}/ | +[**get_gll_tensor_rt_engine_build**](EdgeApi.md#get_gll_tensor_rt_engine_build) | **GET** /v1/edge/gll-engine/{detector_id}/ | [**get_model_urls**](EdgeApi.md#get_model_urls) | **GET** /v1/edge/fetch-model-urls/{detector_id}/ | +[**initiate_gll_pipeline_build**](EdgeApi.md#initiate_gll_pipeline_build) | **POST** /v1/edge/gll-pipeline/{detector_id}/ | +[**initiate_gll_tensor_rt_engine_build**](EdgeApi.md#initiate_gll_tensor_rt_engine_build) | **POST** /v1/edge/gll-engine/{detector_id}/ | # **edge_report_metrics_create** @@ -79,6 +84,238 @@ void (empty response body) [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_gll_model_info** +> GLLModelInfo get_gll_model_info(detector_id) + + + +Lightweight model-info pointer for `Pipeline.has_update_available()`. Returns the current `model_binary_id`, `oodd_model_binary_id`, `mode`, and `updated_at` for a GLL-compatible detector. NO S3 calls, NO pre-signed URLs - one DB read per request, with a short client-side Cache-Control so polling clients can't hammer janzu. + +### Example + +* Api Key Authentication (ApiToken): + +```python +import time +import groundlight_openapi_client +from groundlight_openapi_client.api import edge_api +from groundlight_openapi_client.model.gll_model_info import GLLModelInfo +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. +configuration = groundlight_openapi_client.Configuration( + host = "https://api.groundlight.ai/device-api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiToken +configuration.api_key['ApiToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with groundlight_openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edge_api.EdgeApi(api_client) + detector_id = "detector_id_example" # str | + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_gll_model_info(detector_id) + pprint(api_response) + except groundlight_openapi_client.ApiException as e: + print("Exception when calling EdgeApi->get_gll_model_info: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **detector_id** | **str**| | + +### Return type + +[**GLLModelInfo**](GLLModelInfo.md) + +### Authorization + +[ApiToken](../README.md#ApiToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_gll_pipeline** +> GLLPipelineInfo get_gll_pipeline(detector_id) + + + +Look up current build state without dispatching work. + +### Example + +* Api Key Authentication (ApiToken): + +```python +import time +import groundlight_openapi_client +from groundlight_openapi_client.api import edge_api +from groundlight_openapi_client.model.gll_pipeline_info import GLLPipelineInfo +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. +configuration = groundlight_openapi_client.Configuration( + host = "https://api.groundlight.ai/device-api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiToken +configuration.api_key['ApiToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with groundlight_openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edge_api.EdgeApi(api_client) + detector_id = "detector_id_example" # str | + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_gll_pipeline(detector_id) + pprint(api_response) + except groundlight_openapi_client.ApiException as e: + print("Exception when calling EdgeApi->get_gll_pipeline: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **detector_id** | **str**| | + +### Return type + +[**GLLPipelineInfo**](GLLPipelineInfo.md) + +### Authorization + +[ApiToken](../README.md#ApiToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_gll_tensor_rt_engine_build** +> GLLEngineInfo get_gll_tensor_rt_engine_build(detector_id) + + + +Get pre-signed URL + sidecar for a TensorRT engine. Query params: cc: Compute capability (e.g., \"8.9\" for Ada/L4, \"7.5\" for Turing/T4) precision: Precision mode (default: \"fp16\") batch_size: Batch size (default: 1) trt_version: TensorRT version major.minor[.patch...] (default: server's installed TRT version) Returns: 200: Engine URL + sidecar metadata 400: Invalid params 403: Edge model download not enabled 404: Detector or matching engine not found + +### Example + +* Api Key Authentication (ApiToken): + +```python +import time +import groundlight_openapi_client +from groundlight_openapi_client.api import edge_api +from groundlight_openapi_client.model.gll_engine_info import GLLEngineInfo +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. +configuration = groundlight_openapi_client.Configuration( + host = "https://api.groundlight.ai/device-api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiToken +configuration.api_key['ApiToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with groundlight_openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edge_api.EdgeApi(api_client) + detector_id = "detector_id_example" # str | + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.get_gll_tensor_rt_engine_build(detector_id) + pprint(api_response) + except groundlight_openapi_client.ApiException as e: + print("Exception when calling EdgeApi->get_gll_tensor_rt_engine_build: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **detector_id** | **str**| | + +### Return type + +[**GLLEngineInfo**](GLLEngineInfo.md) + +### Authorization + +[ApiToken](../README.md#ApiToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | | - | +**404** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_model_urls** > EdgeModelInfo get_model_urls(detector_id) @@ -156,3 +393,185 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **initiate_gll_pipeline_build** +> GLLPipelineInfo initiate_gll_pipeline_build(detector_id) + + + +Initiate or deduplicate an ONNX export. + +### Example + +* Api Key Authentication (ApiToken): + +```python +import time +import groundlight_openapi_client +from groundlight_openapi_client.api import edge_api +from groundlight_openapi_client.model.gll_pipeline_info import GLLPipelineInfo +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. +configuration = groundlight_openapi_client.Configuration( + host = "https://api.groundlight.ai/device-api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiToken +configuration.api_key['ApiToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with groundlight_openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edge_api.EdgeApi(api_client) + detector_id = "detector_id_example" # str | + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.initiate_gll_pipeline_build(detector_id) + pprint(api_response) + except groundlight_openapi_client.ApiException as e: + print("Exception when calling EdgeApi->initiate_gll_pipeline_build: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **detector_id** | **str**| | + +### Return type + +[**GLLPipelineInfo**](GLLPipelineInfo.md) + +### Authorization + +[ApiToken](../README.md#ApiToken) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | | - | +**202** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **initiate_gll_tensor_rt_engine_build** +> GLLEngineInfo initiate_gll_tensor_rt_engine_build(detector_id, gll_engine_info_request) + + + +Request TensorRT engine build. Query params or body: compute_capability: Compute capability (default: configured builder GPU) precision: Precision mode (default: \"fp16\") batch_size: Batch size (default: 1) trt_version: TensorRT version (default: server's installed TRT version) Returns: 200: Already built 202: Build requested 400: Invalid parameters 403: Not authorized 409: Requested TRT version doesn't match build worker + +### Example + +* Api Key Authentication (ApiToken): + +```python +import time +import groundlight_openapi_client +from groundlight_openapi_client.api import edge_api +from groundlight_openapi_client.model.gll_engine_info_request import GLLEngineInfoRequest +from groundlight_openapi_client.model.gll_engine_info import GLLEngineInfo +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. +configuration = groundlight_openapi_client.Configuration( + host = "https://api.groundlight.ai/device-api" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: ApiToken +configuration.api_key['ApiToken'] = 'YOUR_API_KEY' + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['ApiToken'] = 'Bearer' + +# Enter a context with an instance of the API client +with groundlight_openapi_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = edge_api.EdgeApi(api_client) + detector_id = "detector_id_example" # str | + gll_engine_info_request = GLLEngineInfoRequest( + build_key="build_key_example", + status=Status638Enum("not_requested"), + stale_from_status=StaleFromStatusEnum("queued"), + generation=1, + task_id="task_id_example", + attempt_count=1, + engine_url="engine_url_example", + engine_s3_key="engine_s3_key_example", + metadata=None, + metadata_s3_key="metadata_s3_key_example", + model_binary_id="model_binary_id_example", + compute_capability="compute_capability_example", + precision="precision_example", + batch_size=1, + trt_version="trt_version_example", + workspace_bytes=1, + engine_contract_version="engine_contract_version_example", + metadata_format_version="metadata_format_version_example", + error_code="error_code_example", + error_message="error_message_example", + updated_at=dateutil_parser('1970-01-01T00:00:00.00Z'), + expires_at=dateutil_parser('1970-01-01T00:00:00.00Z'), + ) # GLLEngineInfoRequest | + + # example passing only required values which don't have defaults set + try: + api_response = api_instance.initiate_gll_tensor_rt_engine_build(detector_id, gll_engine_info_request) + pprint(api_response) + except groundlight_openapi_client.ApiException as e: + print("Exception when calling EdgeApi->initiate_gll_tensor_rt_engine_build: %s\n" % e) +``` + + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **detector_id** | **str**| | + **gll_engine_info_request** | [**GLLEngineInfoRequest**](GLLEngineInfoRequest.md)| | + +### Return type + +[**GLLEngineInfo**](GLLEngineInfo.md) + +### Authorization + +[ApiToken](../README.md#ApiToken) + +### HTTP request headers + + - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data + - **Accept**: application/json + + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | | - | +**202** | | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/generated/docs/GLLEngineInfo.md b/generated/docs/GLLEngineInfo.md new file mode 100644 index 000000000..18aaf5ee1 --- /dev/null +++ b/generated/docs/GLLEngineInfo.md @@ -0,0 +1,34 @@ +# GLLEngineInfo + +Durable TensorRT build status and generation-scoped artifacts. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**build_key** | **str** | | +**status** | [**Status638Enum**](Status638Enum.md) | | +**attempt_count** | **int** | | +**model_binary_id** | **str** | | +**compute_capability** | **str** | | +**precision** | **str** | | +**batch_size** | **int** | | +**trt_version** | **str** | | +**workspace_bytes** | **int** | | +**engine_contract_version** | **str** | | +**metadata_format_version** | **str** | | +**stale_from_status** | [**StaleFromStatusEnum**](StaleFromStatusEnum.md) | | [optional] +**generation** | **int, none_type** | | [optional] +**task_id** | **str, none_type** | | [optional] +**engine_url** | **str, none_type** | | [optional] +**engine_s3_key** | **str, none_type** | | [optional] +**metadata** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] +**metadata_s3_key** | **str, none_type** | | [optional] +**error_code** | **str, none_type** | | [optional] +**error_message** | **str, none_type** | | [optional] +**updated_at** | **datetime, none_type** | | [optional] +**expires_at** | **datetime** | | [optional] +**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/GLLEngineInfoRequest.md b/generated/docs/GLLEngineInfoRequest.md new file mode 100644 index 000000000..8b4f01336 --- /dev/null +++ b/generated/docs/GLLEngineInfoRequest.md @@ -0,0 +1,34 @@ +# GLLEngineInfoRequest + +Durable TensorRT build status and generation-scoped artifacts. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**build_key** | **str** | | +**status** | [**Status638Enum**](Status638Enum.md) | | +**attempt_count** | **int** | | +**model_binary_id** | **str** | | +**compute_capability** | **str** | | +**precision** | **str** | | +**batch_size** | **int** | | +**trt_version** | **str** | | +**workspace_bytes** | **int** | | +**engine_contract_version** | **str** | | +**metadata_format_version** | **str** | | +**stale_from_status** | [**StaleFromStatusEnum**](StaleFromStatusEnum.md) | | [optional] +**generation** | **int, none_type** | | [optional] +**task_id** | **str, none_type** | | [optional] +**engine_url** | **str, none_type** | | [optional] +**engine_s3_key** | **str, none_type** | | [optional] +**metadata** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional] +**metadata_s3_key** | **str, none_type** | | [optional] +**error_code** | **str, none_type** | | [optional] +**error_message** | **str, none_type** | | [optional] +**updated_at** | **datetime, none_type** | | [optional] +**expires_at** | **datetime** | | [optional] +**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/GLLModelInfo.md b/generated/docs/GLLModelInfo.md new file mode 100644 index 000000000..63b191729 --- /dev/null +++ b/generated/docs/GLLModelInfo.md @@ -0,0 +1,16 @@ +# GLLModelInfo + +Lightweight pointer used by GLL clients to detect when the server has a newer model binary than the one they have cached locally. No S3 calls, no pre-signed URLs - one DB read. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**model_binary_id** | **str** | | +**mode** | **str** | | +**oodd_model_binary_id** | **str, none_type** | | [optional] +**updated_at** | **datetime, none_type** | | [optional] +**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/GLLPipelineInfo.md b/generated/docs/GLLPipelineInfo.md new file mode 100644 index 000000000..81ae46ddd --- /dev/null +++ b/generated/docs/GLLPipelineInfo.md @@ -0,0 +1,28 @@ +# GLLPipelineInfo + +Durable build status and, once ready, ONNX model URLs. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**build_key** | **str** | | +**status** | [**Status638Enum**](Status638Enum.md) | | +**attempt_count** | **int** | | +**model_binary_id** | **str** | | +**oodd_model_binary_id** | **str, none_type** | | +**oodd_model_url** | **str, none_type** | | +**pipeline_type** | **str** | | +**detector_mode** | **str** | | +**stale_from_status** | [**StaleFromStatusEnum**](StaleFromStatusEnum.md) | | [optional] +**generation** | **int, none_type** | | [optional] +**task_id** | **str, none_type** | | [optional] +**model_url** | **str, none_type** | | [optional] +**manifest_url** | **str, none_type** | | [optional] +**error_code** | **str, none_type** | | [optional] +**error_message** | **str, none_type** | | [optional] +**updated_at** | **datetime, none_type** | | [optional] +**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/Group.md b/generated/docs/Group.md new file mode 100644 index 000000000..4f4ec6e82 --- /dev/null +++ b/generated/docs/Group.md @@ -0,0 +1,14 @@ +# Group + +The group the authenticated user belongs to. + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [readonly] +**name** | **str** | | +**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..229e61cef --- /dev/null +++ b/generated/docs/Me.md @@ -0,0 +1,16 @@ +# Me + +Authenticated user identity from GET /v1/me (email, username, group, is_superuser). + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | Email address of the authenticated user. | +**username** | **str** | Username of the authenticated user. | +**group** | **bool, date, datetime, dict, float, int, list, str, none_type** | The group the authenticated user belongs to. | +**is_superuser** | **bool** | Whether the authenticated user has elevated (superuser) permissions. | +**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/StaleFromStatusEnum.md b/generated/docs/StaleFromStatusEnum.md new file mode 100644 index 000000000..1d04208ab --- /dev/null +++ b/generated/docs/StaleFromStatusEnum.md @@ -0,0 +1,12 @@ +# StaleFromStatusEnum + +* `queued` - queued * `running` - running + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | * `queued` - queued * `running` - running | must be one of ["queued", "running", ] + +[[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/Status638Enum.md b/generated/docs/Status638Enum.md new file mode 100644 index 000000000..a05901df4 --- /dev/null +++ b/generated/docs/Status638Enum.md @@ -0,0 +1,12 @@ +# Status638Enum + +* `not_requested` - not_requested * `queued` - queued * `running` - running * `stale` - stale * `failed` - failed * `succeeded` - succeeded + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | * `not_requested` - not_requested * `queued` - queued * `running` - running * `stale` - stale * `failed` - failed * `succeeded` - succeeded | must be one of ["not_requested", "queued", "running", "stale", "failed", "succeeded", ] + +[[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..f09f97d42 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 email, username, group, and superuser flag. ### 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/api_tokens_api.py b/generated/groundlight_openapi_client/api/api_tokens_api.py index 38720ce26..193458f53 100644 --- a/generated/groundlight_openapi_client/api/api_tokens_api.py +++ b/generated/groundlight_openapi_client/api/api_tokens_api.py @@ -23,7 +23,7 @@ ) from groundlight_openapi_client.model.api_token import ApiToken from groundlight_openapi_client.model.api_token_create_response import ApiTokenCreateResponse -from groundlight_openapi_client.model.api_token_request import ApiTokenRequest +from groundlight_openapi_client.model.api_token_creation_input_request import ApiTokenCreationInputRequest from groundlight_openapi_client.model.paginated_api_token_list import PaginatedApiTokenList @@ -49,10 +49,10 @@ def __init__(self, api_client=None): }, params_map={ "all": [ - "api_token_request", + "api_token_creation_input_request", ], "required": [ - "api_token_request", + "api_token_creation_input_request", ], "nullable": [], "enum": [], @@ -62,11 +62,11 @@ def __init__(self, api_client=None): "validations": {}, "allowed_values": {}, "openapi_types": { - "api_token_request": (ApiTokenRequest,), + "api_token_creation_input_request": (ApiTokenCreationInputRequest,), }, "attribute_map": {}, "location_map": { - "api_token_request": "body", + "api_token_creation_input_request": "body", }, "collection_format_map": {}, }, @@ -199,18 +199,18 @@ def __init__(self, api_client=None): api_client=api_client, ) - def create_api_token(self, api_token_request, **kwargs): + def create_api_token(self, api_token_creation_input_request, **kwargs): """create_api_token # noqa: E501 Create a new API token, returning the raw_key exactly once in the response. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True - >>> thread = api.create_api_token(api_token_request, async_req=True) + >>> thread = api.create_api_token(api_token_creation_input_request, async_req=True) >>> result = thread.get() Args: - api_token_request (ApiTokenRequest): + api_token_creation_input_request (ApiTokenCreationInputRequest): Keyword Args: _return_http_data_only (bool): response data without head status @@ -254,7 +254,7 @@ def create_api_token(self, api_token_request, **kwargs): 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["api_token_creation_input_request"] = api_token_creation_input_request return self.create_api_token_endpoint.call_with_http_info(**kwargs) def delete_api_token(self, name, **kwargs): diff --git a/generated/groundlight_openapi_client/api/edge_api.py b/generated/groundlight_openapi_client/api/edge_api.py index a0b3187d2..388fc78b0 100644 --- a/generated/groundlight_openapi_client/api/edge_api.py +++ b/generated/groundlight_openapi_client/api/edge_api.py @@ -22,6 +22,10 @@ validate_and_convert_types, ) from groundlight_openapi_client.model.edge_model_info import EdgeModelInfo +from groundlight_openapi_client.model.gll_engine_info import GLLEngineInfo +from groundlight_openapi_client.model.gll_engine_info_request import GLLEngineInfoRequest +from groundlight_openapi_client.model.gll_model_info import GLLModelInfo +from groundlight_openapi_client.model.gll_pipeline_info import GLLPipelineInfo class EdgeApi(object): @@ -59,6 +63,126 @@ def __init__(self, api_client=None): }, api_client=api_client, ) + self.get_gll_model_info_endpoint = _Endpoint( + settings={ + "response_type": (GLLModelInfo,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/edge/model-info/{detector_id}/", + "operation_id": "get_gll_model_info", + "http_method": "GET", + "servers": None, + }, + params_map={ + "all": [ + "detector_id", + ], + "required": [ + "detector_id", + ], + "nullable": [], + "enum": [], + "validation": [], + }, + root_map={ + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "detector_id": (str,), + }, + "attribute_map": { + "detector_id": "detector_id", + }, + "location_map": { + "detector_id": "path", + }, + "collection_format_map": {}, + }, + headers_map={ + "accept": ["application/json"], + "content_type": [], + }, + api_client=api_client, + ) + self.get_gll_pipeline_endpoint = _Endpoint( + settings={ + "response_type": (GLLPipelineInfo,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/edge/gll-pipeline/{detector_id}/", + "operation_id": "get_gll_pipeline", + "http_method": "GET", + "servers": None, + }, + params_map={ + "all": [ + "detector_id", + ], + "required": [ + "detector_id", + ], + "nullable": [], + "enum": [], + "validation": [], + }, + root_map={ + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "detector_id": (str,), + }, + "attribute_map": { + "detector_id": "detector_id", + }, + "location_map": { + "detector_id": "path", + }, + "collection_format_map": {}, + }, + headers_map={ + "accept": ["application/json"], + "content_type": [], + }, + api_client=api_client, + ) + self.get_gll_tensor_rt_engine_build_endpoint = _Endpoint( + settings={ + "response_type": (GLLEngineInfo,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/edge/gll-engine/{detector_id}/", + "operation_id": "get_gll_tensor_rt_engine_build", + "http_method": "GET", + "servers": None, + }, + params_map={ + "all": [ + "detector_id", + ], + "required": [ + "detector_id", + ], + "nullable": [], + "enum": [], + "validation": [], + }, + root_map={ + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "detector_id": (str,), + }, + "attribute_map": { + "detector_id": "detector_id", + }, + "location_map": { + "detector_id": "path", + }, + "collection_format_map": {}, + }, + headers_map={ + "accept": ["application/json"], + "content_type": [], + }, + api_client=api_client, + ) self.get_model_urls_endpoint = _Endpoint( settings={ "response_type": (EdgeModelInfo,), @@ -99,6 +223,90 @@ def __init__(self, api_client=None): }, api_client=api_client, ) + self.initiate_gll_pipeline_build_endpoint = _Endpoint( + settings={ + "response_type": (GLLPipelineInfo,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/edge/gll-pipeline/{detector_id}/", + "operation_id": "initiate_gll_pipeline_build", + "http_method": "POST", + "servers": None, + }, + params_map={ + "all": [ + "detector_id", + ], + "required": [ + "detector_id", + ], + "nullable": [], + "enum": [], + "validation": [], + }, + root_map={ + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "detector_id": (str,), + }, + "attribute_map": { + "detector_id": "detector_id", + }, + "location_map": { + "detector_id": "path", + }, + "collection_format_map": {}, + }, + headers_map={ + "accept": ["application/json"], + "content_type": [], + }, + api_client=api_client, + ) + self.initiate_gll_tensor_rt_engine_build_endpoint = _Endpoint( + settings={ + "response_type": (GLLEngineInfo,), + "auth": ["ApiToken"], + "endpoint_path": "/v1/edge/gll-engine/{detector_id}/", + "operation_id": "initiate_gll_tensor_rt_engine_build", + "http_method": "POST", + "servers": None, + }, + params_map={ + "all": [ + "detector_id", + "gll_engine_info_request", + ], + "required": [ + "detector_id", + "gll_engine_info_request", + ], + "nullable": [], + "enum": [], + "validation": [], + }, + root_map={ + "validations": {}, + "allowed_values": {}, + "openapi_types": { + "detector_id": (str,), + "gll_engine_info_request": (GLLEngineInfoRequest,), + }, + "attribute_map": { + "detector_id": "detector_id", + }, + "location_map": { + "detector_id": "path", + "gll_engine_info_request": "body", + }, + "collection_format_map": {}, + }, + headers_map={ + "accept": ["application/json"], + "content_type": ["application/json", "application/x-www-form-urlencoded", "multipart/form-data"], + }, + api_client=api_client, + ) def edge_report_metrics_create(self, **kwargs): """edge_report_metrics_create # noqa: E501 @@ -155,6 +363,180 @@ def edge_report_metrics_create(self, **kwargs): kwargs["_host_index"] = kwargs.get("_host_index") return self.edge_report_metrics_create_endpoint.call_with_http_info(**kwargs) + def get_gll_model_info(self, detector_id, **kwargs): + """get_gll_model_info # noqa: E501 + + Lightweight model-info pointer for `Pipeline.has_update_available()`. Returns the current `model_binary_id`, `oodd_model_binary_id`, `mode`, and `updated_at` for a GLL-compatible detector. NO S3 calls, NO pre-signed URLs - one DB read per request, with a short client-side Cache-Control so polling clients can't hammer janzu. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_gll_model_info(detector_id, async_req=True) + >>> result = thread.get() + + Args: + detector_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _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) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + GLLModelInfo + 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 + return self.get_gll_model_info_endpoint.call_with_http_info(**kwargs) + + def get_gll_pipeline(self, detector_id, **kwargs): + """get_gll_pipeline # noqa: E501 + + Look up current build state without dispatching work. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_gll_pipeline(detector_id, async_req=True) + >>> result = thread.get() + + Args: + detector_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _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) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + GLLPipelineInfo + 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 + return self.get_gll_pipeline_endpoint.call_with_http_info(**kwargs) + + def get_gll_tensor_rt_engine_build(self, detector_id, **kwargs): + """get_gll_tensor_rt_engine_build # noqa: E501 + + Get pre-signed URL + sidecar for a TensorRT engine. Query params: cc: Compute capability (e.g., \"8.9\" for Ada/L4, \"7.5\" for Turing/T4) precision: Precision mode (default: \"fp16\") batch_size: Batch size (default: 1) trt_version: TensorRT version major.minor[.patch...] (default: server's installed TRT version) Returns: 200: Engine URL + sidecar metadata 400: Invalid params 403: Edge model download not enabled 404: Detector or matching engine not found # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.get_gll_tensor_rt_engine_build(detector_id, async_req=True) + >>> result = thread.get() + + Args: + detector_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _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) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + GLLEngineInfo + 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 + return self.get_gll_tensor_rt_engine_build_endpoint.call_with_http_info(**kwargs) + def get_model_urls(self, detector_id, **kwargs): """get_model_urls # noqa: E501 @@ -212,3 +594,121 @@ def get_model_urls(self, detector_id, **kwargs): kwargs["_host_index"] = kwargs.get("_host_index") kwargs["detector_id"] = detector_id return self.get_model_urls_endpoint.call_with_http_info(**kwargs) + + def initiate_gll_pipeline_build(self, detector_id, **kwargs): + """initiate_gll_pipeline_build # noqa: E501 + + Initiate or deduplicate an ONNX export. # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.initiate_gll_pipeline_build(detector_id, async_req=True) + >>> result = thread.get() + + Args: + detector_id (str): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _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) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + GLLPipelineInfo + 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 + return self.initiate_gll_pipeline_build_endpoint.call_with_http_info(**kwargs) + + def initiate_gll_tensor_rt_engine_build(self, detector_id, gll_engine_info_request, **kwargs): + """initiate_gll_tensor_rt_engine_build # noqa: E501 + + Request TensorRT engine build. Query params or body: compute_capability: Compute capability (default: configured builder GPU) precision: Precision mode (default: \"fp16\") batch_size: Batch size (default: 1) trt_version: TensorRT version (default: server's installed TRT version) Returns: 200: Already built 202: Build requested 400: Invalid parameters 403: Not authorized 409: Requested TRT version doesn't match build worker # noqa: E501 + This method makes a synchronous HTTP request by default. To make an + asynchronous HTTP request, please pass async_req=True + + >>> thread = api.initiate_gll_tensor_rt_engine_build(detector_id, gll_engine_info_request, async_req=True) + >>> result = thread.get() + + Args: + detector_id (str): + gll_engine_info_request (GLLEngineInfoRequest): + + Keyword Args: + _return_http_data_only (bool): response data without head status + code and headers. Default is True. + _preload_content (bool): if False, the urllib3.HTTPResponse object + will be returned without reading/decoding response data. + Default is True. + _request_timeout (int/float/tuple): timeout setting for this request. If + one number provided, it will be total request timeout. It can also + be a pair (tuple) of (connection, read) timeouts. + Default is None. + _check_input_type (bool): specifies if type checking + should be done one the data sent to the server. + Default is True. + _check_return_type (bool): specifies if type checking + should be done one the data received from the server. + Default is True. + _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) + _content_type (str/None): force body content-type. + Default is None and content-type will be predicted by allowed + content-types and body. + _host_index (int/None): specifies the index of the server + that we want to use. + Default is read from the configuration. + async_req (bool): execute request asynchronously + + Returns: + GLLEngineInfo + 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["gll_engine_info_request"] = gll_engine_info_request + return self.initiate_gll_tensor_rt_engine_build_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..04325cb37 100644 --- a/generated/groundlight_openapi_client/api/user_api.py +++ b/generated/groundlight_openapi_client/api/user_api.py @@ -21,7 +21,7 @@ none_type, 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,7 +37,7 @@ def __init__(self, api_client=None): self.api_client = api_client self.who_am_i_endpoint = _Endpoint( settings={ - "response_type": (InlineResponse2002,), + "response_type": (Me,), "auth": ["ApiToken"], "endpoint_path": "/v1/me", "operation_id": "who_am_i", @@ -63,7 +63,7 @@ def __init__(self, api_client=None): def who_am_i(self, **kwargs): """who_am_i # noqa: E501 - Retrieve the current user. # noqa: E501 + Retrieve the authenticated user's email, username, group, and superuser flag. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True @@ -100,7 +100,7 @@ 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. """ diff --git a/generated/groundlight_openapi_client/api/vlm_verifications_api.py b/generated/groundlight_openapi_client/api/vlm_verifications_api.py index 721ae2c7c..b1e9fb9ce 100644 --- a/generated/groundlight_openapi_client/api/vlm_verifications_api.py +++ b/generated/groundlight_openapi_client/api/vlm_verifications_api.py @@ -94,7 +94,7 @@ def __init__(self, api_client=None): 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 diff --git a/generated/groundlight_openapi_client/model/api_token.py b/generated/groundlight_openapi_client/model/api_token.py index e967be455..6df73b445 100644 --- a/generated/groundlight_openapi_client/model/api_token.py +++ b/generated/groundlight_openapi_client/model/api_token.py @@ -140,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): 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,6 +174,7 @@ 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) @@ -265,6 +266,7 @@ 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) 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..5449ac0a2 100644 --- a/generated/groundlight_openapi_client/model/api_token_create_response.py +++ b/generated/groundlight_openapi_client/model/api_token_create_response.py @@ -145,7 +145,7 @@ def _from_openapi_data( 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,6 +180,7 @@ 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) @@ -272,6 +273,7 @@ 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) diff --git a/generated/groundlight_openapi_client/model/api_token_creation_input_request.py b/generated/groundlight_openapi_client/model/api_token_creation_input_request.py new file mode 100644 index 000000000..f1de3ee26 --- /dev/null +++ b/generated/groundlight_openapi_client/model/api_token_creation_input_request.py @@ -0,0 +1,279 @@ +""" + Groundlight API + + Groundlight makes it simple to understand images. You can easily create computer vision detectors just by describing what you want to know using natural language. # noqa: E501 + + The version of the OpenAPI document: 0.18.2 + Contact: support@groundlight.ai + Generated by: https://openapi-generator.tech +""" + +import re # noqa: F401 +import sys # noqa: F401 + +from groundlight_openapi_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel, +) +from groundlight_openapi_client.exceptions import ApiAttributeError + + +class ApiTokenCreationInputRequest(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 = { + ("name",): { + "max_length": 64, + "min_length": 1, + }, + } + + @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 + """ + 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. + """ + return { + "name": (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "name": "name", # noqa: E501 + } + + read_only_vars = {} + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, name, *args, **kwargs): # noqa: E501 + """ApiTokenCreationInputRequest - a model defined in OpenAPI + + Args: + name (str): An nickname for the API token. This name must be unique for this user. + + 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.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 + ): + # 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, name, *args, **kwargs): # noqa: E501 + """ApiTokenCreationInputRequest - a model defined in OpenAPI + + Args: + name (str): An nickname for the API token. This name must be unique for this user. + + 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.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 + ): + # 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." + ) diff --git a/generated/groundlight_openapi_client/model/detector.py b/generated/groundlight_openapi_client/model/detector.py index 2cde79915..b1eceeac5 100644 --- a/generated/groundlight_openapi_client/model/detector.py +++ b/generated/groundlight_openapi_client/model/detector.py @@ -31,12 +31,12 @@ def lazy_import(): from groundlight_openapi_client.model.blank_enum import BlankEnum + from groundlight_openapi_client.model.detector_status_enum import DetectorStatusEnum from groundlight_openapi_client.model.detector_type_enum import DetectorTypeEnum - from groundlight_openapi_client.model.status_enum import StatusEnum globals()["BlankEnum"] = BlankEnum + globals()["DetectorStatusEnum"] = DetectorStatusEnum globals()["DetectorTypeEnum"] = DetectorTypeEnum - globals()["StatusEnum"] = StatusEnum class Detector(ModelNormal): 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..8e1d8bbf5 100644 --- a/generated/groundlight_openapi_client/model/detector_creation_input_request.py +++ b/generated/groundlight_openapi_client/model/detector_creation_input_request.py @@ -251,7 +251,7 @@ def _from_openapi_data(cls, name, query, *args, **kwargs): # noqa: E501 metadata (str): Base64-encoded metadata for the detector. This should be a JSON object with string keys. The size after encoding should not exceed 1362 bytes, corresponding to 1KiB before encoding.. [optional] # noqa: E501 mode (bool, date, datetime, dict, float, int, list, str, none_type): Mode in which this detector will work. * `BINARY` - BINARY * `COUNT` - COUNT * `MULTI_CLASS` - MULTI_CLASS * `TEXT` - TEXT * `BOUNDING_BOX` - BOUNDING_BOX. [optional] # noqa: E501 mode_configuration (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - priming_group_id (str, none_type): ID of an existing PrimingGroup to associate with this detector (optional).. [optional] # noqa: E501 + priming_group_id (str, none_type): ID of an existing PrimingGroup to associate with this detector (optional). Must be a priming group your account owns or a global one; any other ID is reported as not found.. [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) @@ -350,7 +350,7 @@ def __init__(self, name, query, *args, **kwargs): # noqa: E501 metadata (str): Base64-encoded metadata for the detector. This should be a JSON object with string keys. The size after encoding should not exceed 1362 bytes, corresponding to 1KiB before encoding.. [optional] # noqa: E501 mode (bool, date, datetime, dict, float, int, list, str, none_type): Mode in which this detector will work. * `BINARY` - BINARY * `COUNT` - COUNT * `MULTI_CLASS` - MULTI_CLASS * `TEXT` - TEXT * `BOUNDING_BOX` - BOUNDING_BOX. [optional] # noqa: E501 mode_configuration (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 - priming_group_id (str, none_type): ID of an existing PrimingGroup to associate with this detector (optional).. [optional] # noqa: E501 + priming_group_id (str, none_type): ID of an existing PrimingGroup to associate with this detector (optional). Must be a priming group your account owns or a global one; any other ID is reported as not found.. [optional] # noqa: E501 """ _check_type = kwargs.pop("_check_type", True) diff --git a/generated/groundlight_openapi_client/model/detector_status_enum.py b/generated/groundlight_openapi_client/model/detector_status_enum.py new file mode 100644 index 000000000..d0571a6ad --- /dev/null +++ b/generated/groundlight_openapi_client/model/detector_status_enum.py @@ -0,0 +1,283 @@ +""" + Groundlight API + + Groundlight makes it simple to understand images. You can easily create computer vision detectors just by describing what you want to know using natural language. # noqa: E501 + + The version of the OpenAPI document: 0.18.2 + Contact: support@groundlight.ai + Generated by: https://openapi-generator.tech +""" + +import re # noqa: F401 +import sys # noqa: F401 + +from groundlight_openapi_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel, +) +from groundlight_openapi_client.exceptions import ApiAttributeError + + +class DetectorStatusEnum(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ("value",): { + "ON": "ON", + "OFF": "OFF", + }, + } + + validations = {} + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + "value": (str,), + } + + @cached_property + def discriminator(): + return None + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """DetectorStatusEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): * `ON` - ON * `OFF` - OFF., must be one of ["ON", "OFF", ] # noqa: E501 + + Keyword Args: + value (str): * `ON` - ON * `OFF` - OFF., must be one of ["ON", "OFF", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop("_path_to_item", ()) + + if "value" in kwargs: + value = kwargs.pop("value") + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """DetectorStatusEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): * `ON` - ON * `OFF` - OFF., must be one of ["ON", "OFF", ] # noqa: E501 + + Keyword Args: + value (str): * `ON` - ON * `OFF` - OFF., must be one of ["ON", "OFF", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop("_path_to_item", ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if "value" in kwargs: + value = kwargs.pop("value") + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/generated/groundlight_openapi_client/model/gll_engine_info.py b/generated/groundlight_openapi_client/model/gll_engine_info.py new file mode 100644 index 000000000..84462d237 --- /dev/null +++ b/generated/groundlight_openapi_client/model/gll_engine_info.py @@ -0,0 +1,452 @@ +""" + 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.stale_from_status_enum import StaleFromStatusEnum + from groundlight_openapi_client.model.status638_enum import Status638Enum + + globals()["StaleFromStatusEnum"] = StaleFromStatusEnum + globals()["Status638Enum"] = Status638Enum + + +class GLLEngineInfo(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 { + "build_key": (str,), # noqa: E501 + "status": (Status638Enum,), # noqa: E501 + "attempt_count": (int,), # noqa: E501 + "model_binary_id": (str,), # noqa: E501 + "compute_capability": (str,), # noqa: E501 + "precision": (str,), # noqa: E501 + "batch_size": (int,), # noqa: E501 + "trt_version": (str,), # noqa: E501 + "workspace_bytes": (int,), # noqa: E501 + "engine_contract_version": (str,), # noqa: E501 + "metadata_format_version": (str,), # noqa: E501 + "stale_from_status": (StaleFromStatusEnum,), # noqa: E501 + "generation": ( + int, + none_type, + ), # noqa: E501 + "task_id": ( + str, + none_type, + ), # noqa: E501 + "engine_url": ( + str, + none_type, + ), # noqa: E501 + "engine_s3_key": ( + str, + none_type, + ), # noqa: E501 + "metadata": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "metadata_s3_key": ( + str, + none_type, + ), # noqa: E501 + "error_code": ( + str, + none_type, + ), # noqa: E501 + "error_message": ( + str, + none_type, + ), # noqa: E501 + "updated_at": ( + datetime, + none_type, + ), # noqa: E501 + "expires_at": (datetime,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "build_key": "build_key", # noqa: E501 + "status": "status", # noqa: E501 + "attempt_count": "attempt_count", # noqa: E501 + "model_binary_id": "model_binary_id", # noqa: E501 + "compute_capability": "compute_capability", # noqa: E501 + "precision": "precision", # noqa: E501 + "batch_size": "batch_size", # noqa: E501 + "trt_version": "trt_version", # noqa: E501 + "workspace_bytes": "workspace_bytes", # noqa: E501 + "engine_contract_version": "engine_contract_version", # noqa: E501 + "metadata_format_version": "metadata_format_version", # noqa: E501 + "stale_from_status": "stale_from_status", # noqa: E501 + "generation": "generation", # noqa: E501 + "task_id": "task_id", # noqa: E501 + "engine_url": "engine_url", # noqa: E501 + "engine_s3_key": "engine_s3_key", # noqa: E501 + "metadata": "metadata", # noqa: E501 + "metadata_s3_key": "metadata_s3_key", # noqa: E501 + "error_code": "error_code", # noqa: E501 + "error_message": "error_message", # noqa: E501 + "updated_at": "updated_at", # noqa: E501 + "expires_at": "expires_at", # noqa: E501 + } + + read_only_vars = {} + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data( + cls, + build_key, + status, + attempt_count, + model_binary_id, + compute_capability, + precision, + batch_size, + trt_version, + workspace_bytes, + engine_contract_version, + metadata_format_version, + *args, + **kwargs, + ): # noqa: E501 + """GLLEngineInfo - a model defined in OpenAPI + + Args: + build_key (str): + status (Status638Enum): + attempt_count (int): + model_binary_id (str): + compute_capability (str): + precision (str): + batch_size (int): + trt_version (str): + workspace_bytes (int): + engine_contract_version (str): + metadata_format_version (str): + + 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,) + stale_from_status (StaleFromStatusEnum): [optional] # noqa: E501 + generation (int, none_type): [optional] # noqa: E501 + task_id (str, none_type): [optional] # noqa: E501 + engine_url (str, none_type): [optional] # noqa: E501 + engine_s3_key (str, none_type): [optional] # noqa: E501 + metadata (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 + metadata_s3_key (str, none_type): [optional] # noqa: E501 + error_code (str, none_type): [optional] # noqa: E501 + error_message (str, none_type): [optional] # noqa: E501 + updated_at (datetime, none_type): [optional] # noqa: E501 + expires_at (datetime): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_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.build_key = build_key + self.status = status + self.attempt_count = attempt_count + self.model_binary_id = model_binary_id + self.compute_capability = compute_capability + self.precision = precision + self.batch_size = batch_size + self.trt_version = trt_version + self.workspace_bytes = workspace_bytes + self.engine_contract_version = engine_contract_version + self.metadata_format_version = metadata_format_version + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is 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, + build_key, + status, + attempt_count, + model_binary_id, + compute_capability, + precision, + batch_size, + trt_version, + workspace_bytes, + engine_contract_version, + metadata_format_version, + *args, + **kwargs, + ): # noqa: E501 + """GLLEngineInfo - a model defined in OpenAPI + + Args: + build_key (str): + status (Status638Enum): + attempt_count (int): + model_binary_id (str): + compute_capability (str): + precision (str): + batch_size (int): + trt_version (str): + workspace_bytes (int): + engine_contract_version (str): + metadata_format_version (str): + + 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,) + stale_from_status (StaleFromStatusEnum): [optional] # noqa: E501 + generation (int, none_type): [optional] # noqa: E501 + task_id (str, none_type): [optional] # noqa: E501 + engine_url (str, none_type): [optional] # noqa: E501 + engine_s3_key (str, none_type): [optional] # noqa: E501 + metadata (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 + metadata_s3_key (str, none_type): [optional] # noqa: E501 + error_code (str, none_type): [optional] # noqa: E501 + error_message (str, none_type): [optional] # noqa: E501 + updated_at (datetime, none_type): [optional] # noqa: E501 + expires_at (datetime): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_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.build_key = build_key + self.status = status + self.attempt_count = attempt_count + self.model_binary_id = model_binary_id + self.compute_capability = compute_capability + self.precision = precision + self.batch_size = batch_size + self.trt_version = trt_version + self.workspace_bytes = workspace_bytes + self.engine_contract_version = engine_contract_version + self.metadata_format_version = metadata_format_version + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is 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." + ) diff --git a/generated/groundlight_openapi_client/model/gll_engine_info_request.py b/generated/groundlight_openapi_client/model/gll_engine_info_request.py new file mode 100644 index 000000000..4842934a8 --- /dev/null +++ b/generated/groundlight_openapi_client/model/gll_engine_info_request.py @@ -0,0 +1,492 @@ +""" + 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.stale_from_status_enum import StaleFromStatusEnum + from groundlight_openapi_client.model.status638_enum import Status638Enum + + globals()["StaleFromStatusEnum"] = StaleFromStatusEnum + globals()["Status638Enum"] = Status638Enum + + +class GLLEngineInfoRequest(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 = { + ("build_key",): { + "min_length": 1, + }, + ("model_binary_id",): { + "min_length": 1, + }, + ("compute_capability",): { + "min_length": 1, + }, + ("precision",): { + "min_length": 1, + }, + ("trt_version",): { + "min_length": 1, + }, + ("engine_contract_version",): { + "min_length": 1, + }, + ("metadata_format_version",): { + "min_length": 1, + }, + ("task_id",): { + "min_length": 1, + }, + ("engine_url",): { + "min_length": 1, + }, + ("engine_s3_key",): { + "min_length": 1, + }, + ("metadata_s3_key",): { + "min_length": 1, + }, + ("error_code",): { + "min_length": 1, + }, + ("error_message",): { + "min_length": 1, + }, + } + + @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 { + "build_key": (str,), # noqa: E501 + "status": (Status638Enum,), # noqa: E501 + "attempt_count": (int,), # noqa: E501 + "model_binary_id": (str,), # noqa: E501 + "compute_capability": (str,), # noqa: E501 + "precision": (str,), # noqa: E501 + "batch_size": (int,), # noqa: E501 + "trt_version": (str,), # noqa: E501 + "workspace_bytes": (int,), # noqa: E501 + "engine_contract_version": (str,), # noqa: E501 + "metadata_format_version": (str,), # noqa: E501 + "stale_from_status": (StaleFromStatusEnum,), # noqa: E501 + "generation": ( + int, + none_type, + ), # noqa: E501 + "task_id": ( + str, + none_type, + ), # noqa: E501 + "engine_url": ( + str, + none_type, + ), # noqa: E501 + "engine_s3_key": ( + str, + none_type, + ), # noqa: E501 + "metadata": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "metadata_s3_key": ( + str, + none_type, + ), # noqa: E501 + "error_code": ( + str, + none_type, + ), # noqa: E501 + "error_message": ( + str, + none_type, + ), # noqa: E501 + "updated_at": ( + datetime, + none_type, + ), # noqa: E501 + "expires_at": (datetime,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "build_key": "build_key", # noqa: E501 + "status": "status", # noqa: E501 + "attempt_count": "attempt_count", # noqa: E501 + "model_binary_id": "model_binary_id", # noqa: E501 + "compute_capability": "compute_capability", # noqa: E501 + "precision": "precision", # noqa: E501 + "batch_size": "batch_size", # noqa: E501 + "trt_version": "trt_version", # noqa: E501 + "workspace_bytes": "workspace_bytes", # noqa: E501 + "engine_contract_version": "engine_contract_version", # noqa: E501 + "metadata_format_version": "metadata_format_version", # noqa: E501 + "stale_from_status": "stale_from_status", # noqa: E501 + "generation": "generation", # noqa: E501 + "task_id": "task_id", # noqa: E501 + "engine_url": "engine_url", # noqa: E501 + "engine_s3_key": "engine_s3_key", # noqa: E501 + "metadata": "metadata", # noqa: E501 + "metadata_s3_key": "metadata_s3_key", # noqa: E501 + "error_code": "error_code", # noqa: E501 + "error_message": "error_message", # noqa: E501 + "updated_at": "updated_at", # noqa: E501 + "expires_at": "expires_at", # noqa: E501 + } + + read_only_vars = {} + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data( + cls, + build_key, + status, + attempt_count, + model_binary_id, + compute_capability, + precision, + batch_size, + trt_version, + workspace_bytes, + engine_contract_version, + metadata_format_version, + *args, + **kwargs, + ): # noqa: E501 + """GLLEngineInfoRequest - a model defined in OpenAPI + + Args: + build_key (str): + status (Status638Enum): + attempt_count (int): + model_binary_id (str): + compute_capability (str): + precision (str): + batch_size (int): + trt_version (str): + workspace_bytes (int): + engine_contract_version (str): + metadata_format_version (str): + + 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,) + stale_from_status (StaleFromStatusEnum): [optional] # noqa: E501 + generation (int, none_type): [optional] # noqa: E501 + task_id (str, none_type): [optional] # noqa: E501 + engine_url (str, none_type): [optional] # noqa: E501 + engine_s3_key (str, none_type): [optional] # noqa: E501 + metadata (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 + metadata_s3_key (str, none_type): [optional] # noqa: E501 + error_code (str, none_type): [optional] # noqa: E501 + error_message (str, none_type): [optional] # noqa: E501 + updated_at (datetime, none_type): [optional] # noqa: E501 + expires_at (datetime): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_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.build_key = build_key + self.status = status + self.attempt_count = attempt_count + self.model_binary_id = model_binary_id + self.compute_capability = compute_capability + self.precision = precision + self.batch_size = batch_size + self.trt_version = trt_version + self.workspace_bytes = workspace_bytes + self.engine_contract_version = engine_contract_version + self.metadata_format_version = metadata_format_version + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is 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, + build_key, + status, + attempt_count, + model_binary_id, + compute_capability, + precision, + batch_size, + trt_version, + workspace_bytes, + engine_contract_version, + metadata_format_version, + *args, + **kwargs, + ): # noqa: E501 + """GLLEngineInfoRequest - a model defined in OpenAPI + + Args: + build_key (str): + status (Status638Enum): + attempt_count (int): + model_binary_id (str): + compute_capability (str): + precision (str): + batch_size (int): + trt_version (str): + workspace_bytes (int): + engine_contract_version (str): + metadata_format_version (str): + + 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,) + stale_from_status (StaleFromStatusEnum): [optional] # noqa: E501 + generation (int, none_type): [optional] # noqa: E501 + task_id (str, none_type): [optional] # noqa: E501 + engine_url (str, none_type): [optional] # noqa: E501 + engine_s3_key (str, none_type): [optional] # noqa: E501 + metadata (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501 + metadata_s3_key (str, none_type): [optional] # noqa: E501 + error_code (str, none_type): [optional] # noqa: E501 + error_message (str, none_type): [optional] # noqa: E501 + updated_at (datetime, none_type): [optional] # noqa: E501 + expires_at (datetime): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_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.build_key = build_key + self.status = status + self.attempt_count = attempt_count + self.model_binary_id = model_binary_id + self.compute_capability = compute_capability + self.precision = precision + self.batch_size = batch_size + self.trt_version = trt_version + self.workspace_bytes = workspace_bytes + self.engine_contract_version = engine_contract_version + self.metadata_format_version = metadata_format_version + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is 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." + ) diff --git a/generated/groundlight_openapi_client/model/gll_model_info.py b/generated/groundlight_openapi_client/model/gll_model_info.py new file mode 100644 index 000000000..a11591d1f --- /dev/null +++ b/generated/groundlight_openapi_client/model/gll_model_info.py @@ -0,0 +1,294 @@ +""" + Groundlight API + + Groundlight makes it simple to understand images. You can easily create computer vision detectors just by describing what you want to know using natural language. # noqa: E501 + + The version of the OpenAPI document: 0.18.2 + Contact: support@groundlight.ai + Generated by: https://openapi-generator.tech +""" + +import re # noqa: F401 +import sys # noqa: F401 + +from groundlight_openapi_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel, +) +from groundlight_openapi_client.exceptions import ApiAttributeError + + +class GLLModelInfo(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 + """ + 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. + """ + return { + "model_binary_id": (str,), # noqa: E501 + "mode": (str,), # noqa: E501 + "oodd_model_binary_id": ( + str, + none_type, + ), # noqa: E501 + "updated_at": ( + datetime, + none_type, + ), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "model_binary_id": "model_binary_id", # noqa: E501 + "mode": "mode", # noqa: E501 + "oodd_model_binary_id": "oodd_model_binary_id", # noqa: E501 + "updated_at": "updated_at", # noqa: E501 + } + + read_only_vars = {} + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, model_binary_id, mode, *args, **kwargs): # noqa: E501 + """GLLModelInfo - a model defined in OpenAPI + + Args: + model_binary_id (str): + mode (str): + + 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,) + oodd_model_binary_id (str, none_type): [optional] # noqa: E501 + updated_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", ()) + + 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.model_binary_id = model_binary_id + self.mode = 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 + ): + # 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, model_binary_id, mode, *args, **kwargs): # noqa: E501 + """GLLModelInfo - a model defined in OpenAPI + + Args: + model_binary_id (str): + mode (str): + + 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,) + oodd_model_binary_id (str, none_type): [optional] # noqa: E501 + updated_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", ()) + + 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.model_binary_id = model_binary_id + self.mode = 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 + ): + # 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." + ) diff --git a/generated/groundlight_openapi_client/model/gll_pipeline_info.py b/generated/groundlight_openapi_client/model/gll_pipeline_info.py new file mode 100644 index 000000000..e5bbded24 --- /dev/null +++ b/generated/groundlight_openapi_client/model/gll_pipeline_info.py @@ -0,0 +1,409 @@ +""" + 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.stale_from_status_enum import StaleFromStatusEnum + from groundlight_openapi_client.model.status638_enum import Status638Enum + + globals()["StaleFromStatusEnum"] = StaleFromStatusEnum + globals()["Status638Enum"] = Status638Enum + + +class GLLPipelineInfo(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 { + "build_key": (str,), # noqa: E501 + "status": (Status638Enum,), # noqa: E501 + "attempt_count": (int,), # noqa: E501 + "model_binary_id": (str,), # noqa: E501 + "oodd_model_binary_id": ( + str, + none_type, + ), # noqa: E501 + "oodd_model_url": ( + str, + none_type, + ), # noqa: E501 + "pipeline_type": (str,), # noqa: E501 + "detector_mode": (str,), # noqa: E501 + "stale_from_status": (StaleFromStatusEnum,), # noqa: E501 + "generation": ( + int, + none_type, + ), # noqa: E501 + "task_id": ( + str, + none_type, + ), # noqa: E501 + "model_url": ( + str, + none_type, + ), # noqa: E501 + "manifest_url": ( + str, + none_type, + ), # noqa: E501 + "error_code": ( + str, + none_type, + ), # noqa: E501 + "error_message": ( + str, + none_type, + ), # noqa: E501 + "updated_at": ( + datetime, + none_type, + ), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "build_key": "build_key", # noqa: E501 + "status": "status", # noqa: E501 + "attempt_count": "attempt_count", # noqa: E501 + "model_binary_id": "model_binary_id", # noqa: E501 + "oodd_model_binary_id": "oodd_model_binary_id", # noqa: E501 + "oodd_model_url": "oodd_model_url", # noqa: E501 + "pipeline_type": "pipeline_type", # noqa: E501 + "detector_mode": "detector_mode", # noqa: E501 + "stale_from_status": "stale_from_status", # noqa: E501 + "generation": "generation", # noqa: E501 + "task_id": "task_id", # noqa: E501 + "model_url": "model_url", # noqa: E501 + "manifest_url": "manifest_url", # noqa: E501 + "error_code": "error_code", # noqa: E501 + "error_message": "error_message", # noqa: E501 + "updated_at": "updated_at", # noqa: E501 + } + + read_only_vars = {} + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data( + cls, + build_key, + status, + attempt_count, + model_binary_id, + oodd_model_binary_id, + oodd_model_url, + pipeline_type, + detector_mode, + *args, + **kwargs, + ): # noqa: E501 + """GLLPipelineInfo - a model defined in OpenAPI + + Args: + build_key (str): + status (Status638Enum): + attempt_count (int): + model_binary_id (str): + oodd_model_binary_id (str, none_type): + oodd_model_url (str, none_type): + pipeline_type (str): + detector_mode (str): + + 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,) + stale_from_status (StaleFromStatusEnum): [optional] # noqa: E501 + generation (int, none_type): [optional] # noqa: E501 + task_id (str, none_type): [optional] # noqa: E501 + model_url (str, none_type): [optional] # noqa: E501 + manifest_url (str, none_type): [optional] # noqa: E501 + error_code (str, none_type): [optional] # noqa: E501 + error_message (str, none_type): [optional] # noqa: E501 + updated_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", ()) + + 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.build_key = build_key + self.status = status + self.attempt_count = attempt_count + self.model_binary_id = model_binary_id + self.oodd_model_binary_id = oodd_model_binary_id + self.oodd_model_url = oodd_model_url + self.pipeline_type = pipeline_type + 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 + ): + # 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, + build_key, + status, + attempt_count, + model_binary_id, + oodd_model_binary_id, + oodd_model_url, + pipeline_type, + detector_mode, + *args, + **kwargs, + ): # noqa: E501 + """GLLPipelineInfo - a model defined in OpenAPI + + Args: + build_key (str): + status (Status638Enum): + attempt_count (int): + model_binary_id (str): + oodd_model_binary_id (str, none_type): + oodd_model_url (str, none_type): + pipeline_type (str): + detector_mode (str): + + 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,) + stale_from_status (StaleFromStatusEnum): [optional] # noqa: E501 + generation (int, none_type): [optional] # noqa: E501 + task_id (str, none_type): [optional] # noqa: E501 + model_url (str, none_type): [optional] # noqa: E501 + manifest_url (str, none_type): [optional] # noqa: E501 + error_code (str, none_type): [optional] # noqa: E501 + error_message (str, none_type): [optional] # noqa: E501 + updated_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", ()) + + 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.build_key = build_key + self.status = status + self.attempt_count = attempt_count + self.model_binary_id = model_binary_id + self.oodd_model_binary_id = oodd_model_binary_id + self.oodd_model_url = oodd_model_url + self.pipeline_type = pipeline_type + 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 + ): + # 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." + ) diff --git a/generated/groundlight_openapi_client/model/group.py b/generated/groundlight_openapi_client/model/group.py new file mode 100644 index 000000000..436c3779a --- /dev/null +++ b/generated/groundlight_openapi_client/model/group.py @@ -0,0 +1,283 @@ +""" + Groundlight API + + Groundlight makes it simple to understand images. You can easily create computer vision detectors just by describing what you want to know using natural language. # noqa: E501 + + The version of the OpenAPI document: 0.18.2 + Contact: support@groundlight.ai + Generated by: https://openapi-generator.tech +""" + +import re # noqa: F401 +import sys # noqa: F401 + +from groundlight_openapi_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel, +) +from groundlight_openapi_client.exceptions import ApiAttributeError + + +class Group(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 = { + ("name",): { + "max_length": 150, + }, + } + + @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 + """ + 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. + """ + return { + "id": (int,), # noqa: E501 + "name": (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "id": "id", # noqa: E501 + "name": "name", # noqa: E501 + } + + read_only_vars = { + "id", # noqa: E501 + } + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, id, name, *args, **kwargs): # noqa: E501 + """Group - a model defined in OpenAPI + + Args: + id (int): + name (str): + + 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.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 + ): + # 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, name, *args, **kwargs): # noqa: E501 + """Group - a model defined in OpenAPI + + name (str): + + 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.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 + ): + # 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." + ) diff --git a/generated/groundlight_openapi_client/model/me.py b/generated/groundlight_openapi_client/model/me.py new file mode 100644 index 000000000..0151e43bf --- /dev/null +++ b/generated/groundlight_openapi_client/model/me.py @@ -0,0 +1,310 @@ +""" + 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.group import Group + + globals()["Group"] = Group + + +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 { + "email": (str,), # noqa: E501 + "username": (str,), # noqa: E501 + "group": ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + none_type, + ), # noqa: E501 + "is_superuser": (bool,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + "email": "email", # noqa: E501 + "username": "username", # noqa: E501 + "group": "group", # noqa: E501 + "is_superuser": "is_superuser", # noqa: E501 + } + + read_only_vars = {} + + _composed_schemas = {} + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, email, username, group, is_superuser, *args, **kwargs): # noqa: E501 + """Me - a model defined in OpenAPI + + Args: + email (str): Email address of the authenticated user. + username (str): Username of the authenticated user. + group (bool, date, datetime, dict, float, int, list, str, none_type): The group the authenticated user belongs to. + is_superuser (bool): Whether the authenticated user has elevated (superuser) permissions. + + 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.email = email + self.username = username + self.group = group + self.is_superuser = is_superuser + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is 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, email, username, group, is_superuser, *args, **kwargs): # noqa: E501 + """Me - a model defined in OpenAPI + + Args: + email (str): Email address of the authenticated user. + username (str): Username of the authenticated user. + group (bool, date, datetime, dict, float, int, list, str, none_type): The group the authenticated user belongs to. + is_superuser (bool): Whether the authenticated user has elevated (superuser) permissions. + + 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.email = email + self.username = username + self.group = group + self.is_superuser = is_superuser + for var_name, var_value in kwargs.items(): + if ( + var_name not in self.attribute_map + and self._configuration is 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." + ) diff --git a/generated/groundlight_openapi_client/model/patched_detector_request.py b/generated/groundlight_openapi_client/model/patched_detector_request.py index 7e7a58131..8029a1c5d 100644 --- a/generated/groundlight_openapi_client/model/patched_detector_request.py +++ b/generated/groundlight_openapi_client/model/patched_detector_request.py @@ -31,10 +31,10 @@ def lazy_import(): from groundlight_openapi_client.model.blank_enum import BlankEnum - from groundlight_openapi_client.model.status_enum import StatusEnum + from groundlight_openapi_client.model.detector_status_enum import DetectorStatusEnum globals()["BlankEnum"] = BlankEnum - globals()["StatusEnum"] = StatusEnum + globals()["DetectorStatusEnum"] = DetectorStatusEnum class PatchedDetectorRequest(ModelNormal): diff --git a/generated/groundlight_openapi_client/model/stale_from_status_enum.py b/generated/groundlight_openapi_client/model/stale_from_status_enum.py new file mode 100644 index 000000000..299bf8f86 --- /dev/null +++ b/generated/groundlight_openapi_client/model/stale_from_status_enum.py @@ -0,0 +1,283 @@ +""" + Groundlight API + + Groundlight makes it simple to understand images. You can easily create computer vision detectors just by describing what you want to know using natural language. # noqa: E501 + + The version of the OpenAPI document: 0.18.2 + Contact: support@groundlight.ai + Generated by: https://openapi-generator.tech +""" + +import re # noqa: F401 +import sys # noqa: F401 + +from groundlight_openapi_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel, +) +from groundlight_openapi_client.exceptions import ApiAttributeError + + +class StaleFromStatusEnum(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ("value",): { + "QUEUED": "queued", + "RUNNING": "running", + }, + } + + validations = {} + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + "value": (str,), + } + + @cached_property + def discriminator(): + return None + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """StaleFromStatusEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): * `queued` - queued * `running` - running., must be one of ["queued", "running", ] # noqa: E501 + + Keyword Args: + value (str): * `queued` - queued * `running` - running., must be one of ["queued", "running", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop("_path_to_item", ()) + + if "value" in kwargs: + value = kwargs.pop("value") + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """StaleFromStatusEnum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): * `queued` - queued * `running` - running., must be one of ["queued", "running", ] # noqa: E501 + + Keyword Args: + value (str): * `queued` - queued * `running` - running., must be one of ["queued", "running", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop("_path_to_item", ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if "value" in kwargs: + value = kwargs.pop("value") + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/generated/groundlight_openapi_client/model/status638_enum.py b/generated/groundlight_openapi_client/model/status638_enum.py new file mode 100644 index 000000000..9262b775d --- /dev/null +++ b/generated/groundlight_openapi_client/model/status638_enum.py @@ -0,0 +1,287 @@ +""" + Groundlight API + + Groundlight makes it simple to understand images. You can easily create computer vision detectors just by describing what you want to know using natural language. # noqa: E501 + + The version of the OpenAPI document: 0.18.2 + Contact: support@groundlight.ai + Generated by: https://openapi-generator.tech +""" + +import re # noqa: F401 +import sys # noqa: F401 + +from groundlight_openapi_client.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + none_type, + validate_get_composed_info, + OpenApiModel, +) +from groundlight_openapi_client.exceptions import ApiAttributeError + + +class Status638Enum(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ("value",): { + "NOT_REQUESTED": "not_requested", + "QUEUED": "queued", + "RUNNING": "running", + "STALE": "stale", + "FAILED": "failed", + "SUCCEEDED": "succeeded", + }, + } + + validations = {} + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a method because a model may have properties that are + of type self, this must run after the class is loaded + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + "value": (str,), + } + + @cached_property + def discriminator(): + return None + + attribute_map = {} + + read_only_vars = set() + + _composed_schemas = None + + required_properties = set([ + "_data_store", + "_check_type", + "_spec_property_naming", + "_path_to_item", + "_configuration", + "_visited_composed_classes", + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): + """Status638Enum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): * `not_requested` - not_requested * `queued` - queued * `running` - running * `stale` - stale * `failed` - failed * `succeeded` - succeeded., must be one of ["not_requested", "queued", "running", "stale", "failed", "succeeded", ] # noqa: E501 + + Keyword Args: + value (str): * `not_requested` - not_requested * `queued` - queued * `running` - running * `stale` - stale * `failed` - failed * `succeeded` - succeeded., must be one of ["not_requested", "queued", "running", "stale", "failed", "succeeded", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop("_path_to_item", ()) + + if "value" in kwargs: + value = kwargs.pop("value") + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + @classmethod + @convert_js_args_to_python_args + def _from_openapi_data(cls, *args, **kwargs): + """Status638Enum - a model defined in OpenAPI + + Note that value can be passed either in args or in kwargs, but not in both. + + Args: + args[0] (str): * `not_requested` - not_requested * `queued` - queued * `running` - running * `stale` - stale * `failed` - failed * `succeeded` - succeeded., must be one of ["not_requested", "queued", "running", "stale", "failed", "succeeded", ] # noqa: E501 + + Keyword Args: + value (str): * `not_requested` - not_requested * `queued` - queued * `running` - running * `stale` - stale * `failed` - failed * `succeeded` - succeeded., must be one of ["not_requested", "queued", "running", "stale", "failed", "succeeded", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + # required up here when default value is not given + _path_to_item = kwargs.pop("_path_to_item", ()) + + self = super(OpenApiModel, cls).__new__(cls) + + if "value" in kwargs: + value = kwargs.pop("value") + elif args: + args = list(args) + value = args.pop(0) + else: + raise ApiTypeError( + "value is required, but not passed in args or kwargs and doesn't have default", + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + _check_type = kwargs.pop("_check_type", True) + _spec_property_naming = kwargs.pop("_spec_property_naming", False) + _configuration = kwargs.pop("_configuration", None) + _visited_composed_classes = kwargs.pop("_visited_composed_classes", ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." + % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + self.value = value + if kwargs: + raise ApiTypeError( + "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." + % ( + kwargs, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + return self diff --git a/generated/groundlight_openapi_client/models/__init__.py b/generated/groundlight_openapi_client/models/__init__.py index fcc8fd762..ec07849a6 100644 --- a/generated/groundlight_openapi_client/models/__init__.py +++ b/generated/groundlight_openapi_client/models/__init__.py @@ -16,7 +16,7 @@ from groundlight_openapi_client.model.annotations_requested_enum import AnnotationsRequestedEnum from groundlight_openapi_client.model.api_token import ApiToken from groundlight_openapi_client.model.api_token_create_response import ApiTokenCreateResponse -from groundlight_openapi_client.model.api_token_request import ApiTokenRequest +from groundlight_openapi_client.model.api_token_creation_input_request import ApiTokenCreationInputRequest from groundlight_openapi_client.model.b_box_geometry import BBoxGeometry from groundlight_openapi_client.model.b_box_geometry_request import BBoxGeometryRequest from groundlight_openapi_client.model.binary_classification_result import BinaryClassificationResult @@ -34,21 +34,27 @@ from groundlight_openapi_client.model.detector_group import DetectorGroup from groundlight_openapi_client.model.detector_group_request import DetectorGroupRequest from groundlight_openapi_client.model.detector_mode_enum import DetectorModeEnum +from groundlight_openapi_client.model.detector_status_enum import DetectorStatusEnum from groundlight_openapi_client.model.detector_type_enum import DetectorTypeEnum from groundlight_openapi_client.model.edge_model_info import EdgeModelInfo from groundlight_openapi_client.model.escalation_type_enum import EscalationTypeEnum +from groundlight_openapi_client.model.gll_engine_info import GLLEngineInfo +from groundlight_openapi_client.model.gll_engine_info_request import GLLEngineInfoRequest +from groundlight_openapi_client.model.gll_model_info import GLLModelInfo +from groundlight_openapi_client.model.gll_pipeline_info import GLLPipelineInfo +from groundlight_openapi_client.model.group import Group from groundlight_openapi_client.model.image_query import ImageQuery from groundlight_openapi_client.model.image_query_type_enum import ImageQueryTypeEnum 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 @@ -74,7 +80,8 @@ from groundlight_openapi_client.model.snooze_time_unit_enum import SnoozeTimeUnitEnum from groundlight_openapi_client.model.source import Source from groundlight_openapi_client.model.source_enum import SourceEnum -from groundlight_openapi_client.model.status_enum import StatusEnum +from groundlight_openapi_client.model.stale_from_status_enum import StaleFromStatusEnum +from groundlight_openapi_client.model.status638_enum import Status638Enum from groundlight_openapi_client.model.text_mode_configuration import TextModeConfiguration from groundlight_openapi_client.model.text_recognition_result import TextRecognitionResult from groundlight_openapi_client.model.verb_enum import VerbEnum diff --git a/generated/model.py b/generated/model.py index a916206b9..8b24be848 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-09-10T22:51:11+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,26 +65,29 @@ 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.") -class ApiTokenRequest(BaseModel): +class ApiTokenCreationInputRequest(BaseModel): + """ + Public create-token body (name only). + """ + name: constr(min_length=1, max_length=64) = Field( ..., description="An nickname for the API token. This name must be unique for this user." ) - expires_at: Optional[datetime] = Field( - None, description="When does this token expire? If Null, the token never expires." - ) class BBoxGeometry(BaseModel): @@ -132,28 +137,6 @@ class DetectorGroupRequest(BaseModel): name: constr(min_length=1, max_length=100) -class Group(BaseModel): - """ - The group the authenticated user belongs to. - """ - - id: int - name: constr(max_length=150) - - -class Me(BaseModel): - """ - Authenticated user identity from GET /v1/me (email, username, group, is_superuser). - """ - - email: str = Field(..., description="Email address of the authenticated user.") - username: str = Field(..., description="Username of the authenticated user.") - group: Group = Field(..., description="The group the authenticated user belongs to.") - is_superuser: bool = Field( - ..., description="Whether the authenticated user has elevated (superuser) permissions." - ) - - class DetectorModeEnum(str, Enum): """ * `BINARY` - BINARY @@ -170,6 +153,16 @@ class DetectorModeEnum(str, Enum): BOUNDING_BOX = "BOUNDING_BOX" +class DetectorStatusEnum(str, Enum): + """ + * `ON` - ON + * `OFF` - OFF + """ + + ON = "ON" + OFF = "OFF" + + class DetectorTypeEnum(str, Enum): detector = "detector" @@ -189,6 +182,28 @@ class EdgeModelInfo(BaseModel): minimal_compatible: bool = False +class GLLModelInfo(BaseModel): + """ + Lightweight pointer used by GLL clients to detect when the server has a + newer model binary than the one they have cached locally. No S3 calls, + no pre-signed URLs - one DB read. + """ + + model_binary_id: str + oodd_model_binary_id: Optional[str] = None + mode: str + updated_at: Optional[datetime] = None + + +class Group(BaseModel): + """ + The group the authenticated user belongs to. + """ + + id: int + name: constr(max_length=150) + + class ImageQueryTypeEnum(str, Enum): image_query = "image_query" @@ -233,6 +248,17 @@ class MLPipeline(BaseModel): ) +class Me(BaseModel): + """ + Authenticated user identity from GET /v1/me (email, username, group, is_superuser). + """ + + email: str = Field(..., description="Email address of the authenticated user.") + username: str = Field(..., description="Username of the authenticated user.") + group: Group = Field(..., description="The group the authenticated user belongs to.") + is_superuser: bool = Field(..., description="Whether the authenticated user has elevated (superuser) permissions.") + + class ModeEnum(str, Enum): BINARY = "BINARY" COUNT = "COUNT" @@ -271,6 +297,31 @@ class PaginatedMLPipelineList(BaseModel): results: List[MLPipeline] +class PatchedDetectorRequest(BaseModel): + """ + Groundlight Detectors provide answers to natural language questions about images. + + Each detector can answer a single question, and multiple detectors can be strung together for + more complex logic. Detectors can be created through the create_detector method, or through the + create_[MODE]_detector methods for pro tier users + """ + + name: Optional[constr(min_length=1, max_length=200)] = Field( + None, description="A short, descriptive name for the detector." + ) + confidence_threshold: confloat(ge=0.0, le=1.0) = Field( + 0.9, + description=( + "If the detector's prediction is below this confidence threshold, send the image query for human review." + ), + ) + patience_time: confloat(ge=0.0, le=3600.0) = Field( + 30.0, description="How long Groundlight will attempt to generate a confident prediction" + ) + status: Optional[Union[DetectorStatusEnum, BlankEnum]] = None + escalation_type: Optional[constr(min_length=1)] = None + + class PayloadTemplate(BaseModel): template: str headers: Optional[Dict[str, str]] = None @@ -410,14 +461,56 @@ class SnoozeTimeUnitEnum(str, Enum): SECONDS = "SECONDS" -class StatusEnum(str, Enum): +class StaleFromStatusEnum(str, Enum): """ - * `ON` - ON - * `OFF` - OFF + * `queued` - queued + * `running` - running """ - ON = "ON" - OFF = "OFF" + queued = "queued" + running = "running" + + +class Status638Enum(str, Enum): + """ + * `not_requested` - not_requested + * `queued` - queued + * `running` - running + * `stale` - stale + * `failed` - failed + * `succeeded` - succeeded + """ + + not_requested = "not_requested" + queued = "queued" + running = "running" + stale = "stale" + failed = "failed" + succeeded = "succeeded" + + +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): @@ -591,30 +684,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 @@ -652,7 +721,7 @@ class Detector(BaseModel): metadata: Optional[Dict[str, Any]] = Field(..., description="Metadata about the detector.") mode: str mode_configuration: Optional[Dict[str, Any]] = Field(...) - status: Optional[Union[StatusEnum, BlankEnum]] = None + status: Optional[Union[DetectorStatusEnum, BlankEnum]] = None escalation_type: Optional[str] = None @@ -703,10 +772,95 @@ class DetectorCreationInputRequest(BaseModel): Union[CountModeConfiguration, MultiClassModeConfiguration, TextModeConfiguration, BoundingBoxModeConfiguration] ] = None priming_group_id: Optional[constr(min_length=1, max_length=44)] = Field( - None, description="ID of an existing PrimingGroup to associate with this detector (optional)." + None, + description=( + "ID of an existing PrimingGroup to associate with this detector (optional). Must be a priming group your" + " account owns or a global one; any other ID is reported as not found." + ), ) +class GLLEngineInfo(BaseModel): + """ + Durable TensorRT build status and generation-scoped artifacts. + """ + + build_key: str + status: Status638Enum + stale_from_status: Optional[StaleFromStatusEnum] = None + generation: Optional[int] = None + task_id: Optional[str] = None + attempt_count: int + engine_url: Optional[str] = None + engine_s3_key: Optional[str] = None + metadata: Optional[Any] = None + metadata_s3_key: Optional[str] = None + model_binary_id: str + compute_capability: str + precision: str + batch_size: int + trt_version: str + workspace_bytes: int + engine_contract_version: str + metadata_format_version: str + error_code: Optional[str] = None + error_message: Optional[str] = None + updated_at: Optional[datetime] = None + expires_at: Optional[datetime] = None + + +class GLLEngineInfoRequest(BaseModel): + """ + Durable TensorRT build status and generation-scoped artifacts. + """ + + build_key: constr(min_length=1) + status: Status638Enum + stale_from_status: Optional[StaleFromStatusEnum] = None + generation: Optional[int] = None + task_id: Optional[constr(min_length=1)] = None + attempt_count: int + engine_url: Optional[constr(min_length=1)] = None + engine_s3_key: Optional[constr(min_length=1)] = None + metadata: Optional[Any] = None + metadata_s3_key: Optional[constr(min_length=1)] = None + model_binary_id: constr(min_length=1) + compute_capability: constr(min_length=1) + precision: constr(min_length=1) + batch_size: int + trt_version: constr(min_length=1) + workspace_bytes: int + engine_contract_version: constr(min_length=1) + metadata_format_version: constr(min_length=1) + error_code: Optional[constr(min_length=1)] = None + error_message: Optional[constr(min_length=1)] = None + updated_at: Optional[datetime] = None + expires_at: Optional[datetime] = None + + +class GLLPipelineInfo(BaseModel): + """ + Durable build status and, once ready, ONNX model URLs. + """ + + build_key: str + status: Status638Enum + stale_from_status: Optional[StaleFromStatusEnum] = None + generation: Optional[int] = None + task_id: Optional[str] = None + attempt_count: int + model_binary_id: str + model_url: Optional[str] = None + oodd_model_binary_id: Optional[str] = Field(...) + oodd_model_url: Optional[str] = Field(...) + manifest_url: Optional[str] = None + pipeline_type: str + detector_mode: str + error_code: Optional[str] = None + error_message: Optional[str] = None + updated_at: Optional[datetime] = None + + class ImageQuery(BaseModel): """ ImageQuery objects are the answers to natural language questions about images created by detectors. @@ -782,31 +936,6 @@ class PaginatedPrimingGroupList(BaseModel): results: List[PrimingGroup] -class PatchedDetectorRequest(BaseModel): - """ - Groundlight Detectors provide answers to natural language questions about images. - - Each detector can answer a single question, and multiple detectors can be strung together for - more complex logic. Detectors can be created through the create_detector method, or through the - create_[MODE]_detector methods for pro tier users - """ - - name: Optional[constr(min_length=1, max_length=200)] = Field( - None, description="A short, descriptive name for the detector." - ) - confidence_threshold: confloat(ge=0.0, le=1.0) = Field( - 0.9, - description=( - "If the detector's prediction is below this confidence threshold, send the image query for human review." - ), - ) - patience_time: confloat(ge=0.0, le=3600.0) = Field( - 30.0, description="How long Groundlight will attempt to generate a confident prediction" - ) - status: Optional[Union[StatusEnum, BlankEnum]] = None - escalation_type: Optional[constr(min_length=1)] = None - - class Rule(BaseModel): id: int detector_id: str diff --git a/generated/test/test_api_token_creation_input_request.py b/generated/test/test_api_token_creation_input_request.py new file mode 100644 index 000000000..db165e77a --- /dev/null +++ b/generated/test/test_api_token_creation_input_request.py @@ -0,0 +1,35 @@ +""" + 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.api_token_creation_input_request import ApiTokenCreationInputRequest + + +class TestApiTokenCreationInputRequest(unittest.TestCase): + """ApiTokenCreationInputRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testApiTokenCreationInputRequest(self): + """Test ApiTokenCreationInputRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = ApiTokenCreationInputRequest() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/generated/test/test_detector_status_enum.py b/generated/test/test_detector_status_enum.py new file mode 100644 index 000000000..0f7456610 --- /dev/null +++ b/generated/test/test_detector_status_enum.py @@ -0,0 +1,35 @@ +""" + 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.detector_status_enum import DetectorStatusEnum + + +class TestDetectorStatusEnum(unittest.TestCase): + """DetectorStatusEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testDetectorStatusEnum(self): + """Test DetectorStatusEnum""" + # FIXME: construct object with mandatory attributes with example values + # model = DetectorStatusEnum() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/generated/test/test_gll_engine_info.py b/generated/test/test_gll_engine_info.py new file mode 100644 index 000000000..063efe07f --- /dev/null +++ b/generated/test/test_gll_engine_info.py @@ -0,0 +1,40 @@ +""" + 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.stale_from_status_enum import StaleFromStatusEnum +from groundlight_openapi_client.model.status638_enum import Status638Enum + +globals()["StaleFromStatusEnum"] = StaleFromStatusEnum +globals()["Status638Enum"] = Status638Enum +from groundlight_openapi_client.model.gll_engine_info import GLLEngineInfo + + +class TestGLLEngineInfo(unittest.TestCase): + """GLLEngineInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGLLEngineInfo(self): + """Test GLLEngineInfo""" + # FIXME: construct object with mandatory attributes with example values + # model = GLLEngineInfo() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/generated/test/test_gll_engine_info_request.py b/generated/test/test_gll_engine_info_request.py new file mode 100644 index 000000000..1c4bc8184 --- /dev/null +++ b/generated/test/test_gll_engine_info_request.py @@ -0,0 +1,40 @@ +""" + 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.stale_from_status_enum import StaleFromStatusEnum +from groundlight_openapi_client.model.status638_enum import Status638Enum + +globals()["StaleFromStatusEnum"] = StaleFromStatusEnum +globals()["Status638Enum"] = Status638Enum +from groundlight_openapi_client.model.gll_engine_info_request import GLLEngineInfoRequest + + +class TestGLLEngineInfoRequest(unittest.TestCase): + """GLLEngineInfoRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGLLEngineInfoRequest(self): + """Test GLLEngineInfoRequest""" + # FIXME: construct object with mandatory attributes with example values + # model = GLLEngineInfoRequest() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/generated/test/test_gll_model_info.py b/generated/test/test_gll_model_info.py new file mode 100644 index 000000000..dec78021f --- /dev/null +++ b/generated/test/test_gll_model_info.py @@ -0,0 +1,35 @@ +""" + 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.gll_model_info import GLLModelInfo + + +class TestGLLModelInfo(unittest.TestCase): + """GLLModelInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGLLModelInfo(self): + """Test GLLModelInfo""" + # FIXME: construct object with mandatory attributes with example values + # model = GLLModelInfo() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/generated/test/test_gll_pipeline_info.py b/generated/test/test_gll_pipeline_info.py new file mode 100644 index 000000000..9e8f4e17f --- /dev/null +++ b/generated/test/test_gll_pipeline_info.py @@ -0,0 +1,40 @@ +""" + 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.stale_from_status_enum import StaleFromStatusEnum +from groundlight_openapi_client.model.status638_enum import Status638Enum + +globals()["StaleFromStatusEnum"] = StaleFromStatusEnum +globals()["Status638Enum"] = Status638Enum +from groundlight_openapi_client.model.gll_pipeline_info import GLLPipelineInfo + + +class TestGLLPipelineInfo(unittest.TestCase): + """GLLPipelineInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGLLPipelineInfo(self): + """Test GLLPipelineInfo""" + # FIXME: construct object with mandatory attributes with example values + # model = GLLPipelineInfo() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/generated/test/test_group.py b/generated/test/test_group.py new file mode 100644 index 000000000..8d1ca0ed3 --- /dev/null +++ b/generated/test/test_group.py @@ -0,0 +1,35 @@ +""" + 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 + + +class TestGroup(unittest.TestCase): + """Group unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testGroup(self): + """Test Group""" + # FIXME: construct object with mandatory attributes with example values + # model = Group() # noqa: E501 + pass + + +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..2c879e5b7 --- /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/generated/test/test_stale_from_status_enum.py b/generated/test/test_stale_from_status_enum.py new file mode 100644 index 000000000..4d64dfd7f --- /dev/null +++ b/generated/test/test_stale_from_status_enum.py @@ -0,0 +1,35 @@ +""" + 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.stale_from_status_enum import StaleFromStatusEnum + + +class TestStaleFromStatusEnum(unittest.TestCase): + """StaleFromStatusEnum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStaleFromStatusEnum(self): + """Test StaleFromStatusEnum""" + # FIXME: construct object with mandatory attributes with example values + # model = StaleFromStatusEnum() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/generated/test/test_status638_enum.py b/generated/test/test_status638_enum.py new file mode 100644 index 000000000..b248a8893 --- /dev/null +++ b/generated/test/test_status638_enum.py @@ -0,0 +1,35 @@ +""" + 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.status638_enum import Status638Enum + + +class TestStatus638Enum(unittest.TestCase): + """Status638Enum unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testStatus638Enum(self): + """Test Status638Enum""" + # FIXME: construct object with mandatory attributes with example values + # model = Status638Enum() # noqa: E501 + pass + + +if __name__ == "__main__": + unittest.main() diff --git a/spec/public-api.yaml b/spec/public-api.yaml index f2ff875e4..b57441a78 100644 --- a/spec/public-api.yaml +++ b/spec/public-api.yaml @@ -183,13 +183,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/ApiTokenRequest' + $ref: '#/components/schemas/ApiTokenCreationInputRequest' application/x-www-form-urlencoded: schema: - $ref: '#/components/schemas/ApiTokenRequest' + $ref: '#/components/schemas/ApiTokenCreationInputRequest' multipart/form-data: schema: - $ref: '#/components/schemas/ApiTokenRequest' + $ref: '#/components/schemas/ApiTokenCreationInputRequest' required: true security: - ApiToken: [] @@ -638,6 +638,172 @@ paths: schema: $ref: '#/components/schemas/EdgeModelInfo' description: '' + /v1/edge/gll-engine/{detector_id}/: + get: + operationId: Get GLL TensorRT Engine Build + description: |- + Get pre-signed URL + sidecar for a TensorRT engine. + + Query params: + cc: Compute capability (e.g., "8.9" for Ada/L4, "7.5" for Turing/T4) + precision: Precision mode (default: "fp16") + batch_size: Batch size (default: 1) + trt_version: TensorRT version major.minor[.patch...] (default: server's installed TRT version) + + Returns: + 200: Engine URL + sidecar metadata + 400: Invalid params + 403: Edge model download not enabled + 404: Detector or matching engine not found + parameters: + - in: path + name: detector_id + schema: + type: string + required: true + tags: + - edge + security: + - ApiToken: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GLLEngineInfo' + description: '' + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/GLLEngineInfo' + description: '' + post: + operationId: Initiate GLL TensorRT Engine Build + description: |- + Request TensorRT engine build. + + Query params or body: + compute_capability: Compute capability (default: configured builder GPU) + precision: Precision mode (default: "fp16") + batch_size: Batch size (default: 1) + trt_version: TensorRT version (default: server's installed TRT version) + + Returns: + 200: Already built + 202: Build requested + 400: Invalid parameters + 403: Not authorized + 409: Requested TRT version doesn't match build worker + parameters: + - in: path + name: detector_id + schema: + type: string + required: true + tags: + - edge + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/GLLEngineInfoRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/GLLEngineInfoRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/GLLEngineInfoRequest' + required: true + security: + - ApiToken: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GLLEngineInfo' + description: '' + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/GLLEngineInfo' + description: '' + /v1/edge/gll-pipeline/{detector_id}/: + get: + operationId: Get GLL Pipeline + description: Look up current build state without dispatching work. + parameters: + - in: path + name: detector_id + schema: + type: string + required: true + tags: + - edge + security: + - ApiToken: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GLLPipelineInfo' + description: '' + post: + operationId: Initiate GLL Pipeline Build + description: Initiate or deduplicate an ONNX export. + parameters: + - in: path + name: detector_id + schema: + type: string + required: true + tags: + - edge + security: + - ApiToken: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GLLPipelineInfo' + description: '' + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/GLLPipelineInfo' + description: '' + /v1/edge/model-info/{detector_id}/: + get: + operationId: Get GLL Model Info + description: |- + Lightweight model-info pointer for `Pipeline.has_update_available()`. + + Returns the current `model_binary_id`, `oodd_model_binary_id`, `mode`, and + `updated_at` for a GLL-compatible detector. NO S3 calls, NO pre-signed + URLs - one DB read per request, with a short client-side Cache-Control + so polling clients can't hammer janzu. + parameters: + - in: path + name: detector_id + schema: + type: string + required: true + tags: + - edge + security: + - ApiToken: [] + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/GLLModelInfo' + description: '' /v1/edge/report-metrics: post: operationId: edge_report_metrics_create @@ -1062,12 +1228,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 @@ -1180,10 +1358,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 @@ -1194,7 +1372,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 @@ -1224,10 +1403,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 @@ -1238,7 +1417,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 @@ -1250,8 +1430,9 @@ components: - name - raw_key - raw_key_snippet - ApiTokenRequest: + ApiTokenCreationInputRequest: type: object + description: Public create-token body (name only). properties: name: type: string @@ -1259,11 +1440,6 @@ components: description: An nickname for the API token. This name must be unique for this user. maxLength: 64 - expires_at: - type: string - format: date-time - nullable: true - description: When does this token expire? If Null, the token never expires. required: - name BBoxGeometry: @@ -1409,7 +1585,7 @@ components: readOnly: true status: oneOf: - - $ref: '#/components/schemas/StatusEnum' + - $ref: '#/components/schemas/DetectorStatusEnum' - $ref: '#/components/schemas/BlankEnum' escalation_type: type: string @@ -1501,7 +1677,8 @@ components: nullable: true minLength: 1 description: ID of an existing PrimingGroup to associate with this detector - (optional). + (optional). Must be a priming group your account owns or a global one; + any other ID is reported as not found. maxLength: 44 required: - name @@ -1542,6 +1719,14 @@ components: * `MULTI_CLASS` - MULTI_CLASS * `TEXT` - TEXT * `BOUNDING_BOX` - BOUNDING_BOX + DetectorStatusEnum: + enum: + - 'ON' + - 'OFF' + type: string + description: |- + * `ON` - ON + * `OFF` - OFF DetectorTypeEnum: enum: - detector @@ -1565,6 +1750,235 @@ components: minimal_compatible: type: boolean default: false + GLLEngineInfo: + type: object + description: Durable TensorRT build status and generation-scoped artifacts. + properties: + build_key: + type: string + status: + $ref: '#/components/schemas/Status638Enum' + stale_from_status: + $ref: '#/components/schemas/StaleFromStatusEnum' + generation: + type: integer + nullable: true + task_id: + type: string + nullable: true + attempt_count: + type: integer + engine_url: + type: string + nullable: true + engine_s3_key: + type: string + nullable: true + metadata: + nullable: true + metadata_s3_key: + type: string + nullable: true + model_binary_id: + type: string + compute_capability: + type: string + precision: + type: string + batch_size: + type: integer + trt_version: + type: string + workspace_bytes: + type: integer + engine_contract_version: + type: string + metadata_format_version: + type: string + error_code: + type: string + nullable: true + error_message: + type: string + nullable: true + updated_at: + type: string + format: date-time + nullable: true + expires_at: + type: string + format: date-time + required: + - attempt_count + - batch_size + - build_key + - compute_capability + - engine_contract_version + - metadata_format_version + - model_binary_id + - precision + - status + - trt_version + - workspace_bytes + GLLEngineInfoRequest: + type: object + description: Durable TensorRT build status and generation-scoped artifacts. + properties: + build_key: + type: string + minLength: 1 + status: + $ref: '#/components/schemas/Status638Enum' + stale_from_status: + $ref: '#/components/schemas/StaleFromStatusEnum' + generation: + type: integer + nullable: true + task_id: + type: string + nullable: true + minLength: 1 + attempt_count: + type: integer + engine_url: + type: string + nullable: true + minLength: 1 + engine_s3_key: + type: string + nullable: true + minLength: 1 + metadata: + nullable: true + metadata_s3_key: + type: string + nullable: true + minLength: 1 + model_binary_id: + type: string + minLength: 1 + compute_capability: + type: string + minLength: 1 + precision: + type: string + minLength: 1 + batch_size: + type: integer + trt_version: + type: string + minLength: 1 + workspace_bytes: + type: integer + engine_contract_version: + type: string + minLength: 1 + metadata_format_version: + type: string + minLength: 1 + error_code: + type: string + nullable: true + minLength: 1 + error_message: + type: string + nullable: true + minLength: 1 + updated_at: + type: string + format: date-time + nullable: true + expires_at: + type: string + format: date-time + required: + - attempt_count + - batch_size + - build_key + - compute_capability + - engine_contract_version + - metadata_format_version + - model_binary_id + - precision + - status + - trt_version + - workspace_bytes + GLLModelInfo: + type: object + description: |- + Lightweight pointer used by GLL clients to detect when the server has a + newer model binary than the one they have cached locally. No S3 calls, + no pre-signed URLs - one DB read. + properties: + model_binary_id: + type: string + oodd_model_binary_id: + type: string + nullable: true + mode: + type: string + updated_at: + type: string + format: date-time + nullable: true + required: + - mode + - model_binary_id + GLLPipelineInfo: + type: object + description: Durable build status and, once ready, ONNX model URLs. + properties: + build_key: + type: string + status: + $ref: '#/components/schemas/Status638Enum' + stale_from_status: + $ref: '#/components/schemas/StaleFromStatusEnum' + generation: + type: integer + nullable: true + task_id: + type: string + nullable: true + attempt_count: + type: integer + model_binary_id: + type: string + model_url: + type: string + nullable: true + oodd_model_binary_id: + type: string + nullable: true + oodd_model_url: + type: string + nullable: true + manifest_url: + type: string + nullable: true + pipeline_type: + type: string + detector_mode: + type: string + error_code: + type: string + nullable: true + error_message: + type: string + nullable: true + updated_at: + type: string + format: date-time + nullable: true + required: + - attempt_count + - build_key + - detector_mode + - model_binary_id + - oodd_model_binary_id + - oodd_model_url + - pipeline_type + - status Group: type: object description: The group the authenticated user belongs to. @@ -2071,7 +2485,7 @@ components: description: How long Groundlight will attempt to generate a confident prediction status: oneOf: - - $ref: '#/components/schemas/StatusEnum' + - $ref: '#/components/schemas/DetectorStatusEnum' - $ref: '#/components/schemas/BlankEnum' escalation_type: type: string @@ -2356,14 +2770,103 @@ components: * `HOURS` - HOURS * `MINUTES` - MINUTES * `SECONDS` - SECONDS - StatusEnum: + StaleFromStatusEnum: enum: - - 'ON' - - 'OFF' + - queued + - running type: string description: |- - * `ON` - ON - * `OFF` - OFF + * `queued` - queued + * `running` - running + Status638Enum: + enum: + - not_requested + - queued + - running + - stale + - failed + - succeeded + type: string + description: |- + * `not_requested` - not_requested + * `queued` - queued + * `running` - running + * `stale` - stale + * `failed` - failed + * `succeeded` - succeeded + 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: @@ -2648,79 +3151,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/client.py b/src/groundlight/client.py index 82663a6c1..4c3483a02 100644 --- a/src/groundlight/client.py +++ b/src/groundlight/client.py @@ -20,11 +20,11 @@ from groundlight_openapi_client.model.count_mode_configuration import CountModeConfiguration from groundlight_openapi_client.model.detector_creation_input_request import DetectorCreationInputRequest from groundlight_openapi_client.model.detector_group_request import DetectorGroupRequest +from groundlight_openapi_client.model.detector_status_enum import DetectorStatusEnum from groundlight_openapi_client.model.label_value_request import LabelValueRequest from groundlight_openapi_client.model.multi_class_mode_configuration import MultiClassModeConfiguration from groundlight_openapi_client.model.patched_detector_request import PatchedDetectorRequest from groundlight_openapi_client.model.roi_request import ROIRequest -from groundlight_openapi_client.model.status_enum import StatusEnum from model import ( ROI, AccountMonthToDateInfo, @@ -1516,7 +1516,9 @@ def update_detector_status(self, detector: Union[str, Detector], enabled: bool) detector = detector.id self.detectors_api.update_detector( detector, - patched_detector_request=PatchedDetectorRequest(status=StatusEnum("ON") if enabled else StatusEnum("OFF")), + patched_detector_request=PatchedDetectorRequest( + status=DetectorStatusEnum("ON") if enabled else DetectorStatusEnum("OFF") + ), ) def update_detector_escalation_type(self, detector: Union[str, Detector], escalation_type: str) -> None: diff --git a/src/groundlight/token_manager.py b/src/groundlight/token_manager.py index da6adc96a..5019fde4f 100644 --- a/src/groundlight/token_manager.py +++ b/src/groundlight/token_manager.py @@ -17,7 +17,7 @@ from groundlight_openapi_client.exceptions import ApiException, NotFoundException, UnauthorizedException from groundlight_openapi_client.model.api_token import ApiToken from groundlight_openapi_client.model.api_token_create_response import ApiTokenCreateResponse -from groundlight_openapi_client.model.api_token_request import ApiTokenRequest +from groundlight_openapi_client.model.api_token_creation_input_request import ApiTokenCreationInputRequest from platformdirs import user_data_path from groundlight.internalapi import GroundlightApiClient, api_exception_detail @@ -408,7 +408,7 @@ def _mint_replacement(self, base_name: str, previous: Optional[PreviousToken]) - minted_at = _utc_now() # Omit expires_at so the server applies the identity's token lifetime policy. response = self._api_tokens.create_api_token( - ApiTokenRequest(name=new_name), + ApiTokenCreationInputRequest(name=new_name), _request_timeout=self._request_timeout, ) current = self._current_from_response(response, minted_at)