cosmotech-api 4.0.0.dev9__py3-none-any.whl → 5.0.0b3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cosmotech-api might be problematic. Click here for more details.
- cosmotech_api/__init__.py +32 -27
- cosmotech_api/api/__init__.py +1 -1
- cosmotech_api/api/connector_api.py +19 -8
- cosmotech_api/api/dataset_api.py +1496 -4126
- cosmotech_api/api/meta_api.py +281 -0
- cosmotech_api/api/organization_api.py +605 -562
- cosmotech_api/api/run_api.py +42 -22
- cosmotech_api/api/runner_api.py +512 -467
- cosmotech_api/api/scenario_api.py +141 -121
- cosmotech_api/api/scenariorun_api.py +76 -66
- cosmotech_api/api/scenariorunresult_api.py +1 -1
- cosmotech_api/api/solution_api.py +2980 -795
- cosmotech_api/api/twingraph_api.py +83 -72
- cosmotech_api/api/validator_api.py +1 -1
- cosmotech_api/api/workspace_api.py +795 -1331
- cosmotech_api/api_client.py +14 -5
- cosmotech_api/configuration.py +167 -40
- cosmotech_api/exceptions.py +18 -1
- cosmotech_api/model/component_role_permissions.py +1 -1
- cosmotech_api/model/connector.py +1 -1
- cosmotech_api/model/connector_parameter.py +1 -1
- cosmotech_api/model/connector_parameter_group.py +1 -1
- cosmotech_api/model/container_resource_size_info.py +1 -1
- cosmotech_api/model/container_resource_sizing.py +1 -1
- cosmotech_api/model/dataset.py +1 -1
- cosmotech_api/model/dataset_access_control.py +1 -1
- cosmotech_api/model/dataset_compatibility.py +1 -1
- cosmotech_api/model/dataset_connector.py +1 -1
- cosmotech_api/model/dataset_copy_parameters.py +1 -1
- cosmotech_api/model/dataset_role.py +1 -1
- cosmotech_api/model/dataset_search.py +1 -1
- cosmotech_api/model/dataset_security.py +1 -1
- cosmotech_api/model/dataset_source_type.py +1 -1
- cosmotech_api/model/dataset_twin_graph_hash.py +1 -1
- cosmotech_api/model/dataset_twin_graph_info.py +1 -1
- cosmotech_api/model/dataset_twin_graph_query.py +1 -1
- cosmotech_api/model/delete_historical_data.py +1 -1
- cosmotech_api/model/file_upload_metadata.py +1 -1
- cosmotech_api/model/file_upload_validation.py +1 -1
- cosmotech_api/model/graph_properties.py +1 -1
- cosmotech_api/model/organization.py +1 -1
- cosmotech_api/model/organization_access_control.py +1 -1
- cosmotech_api/model/organization_role.py +1 -1
- cosmotech_api/model/organization_security.py +1 -1
- cosmotech_api/model/organization_service.py +1 -1
- cosmotech_api/model/organization_services.py +1 -1
- cosmotech_api/model/resource_size_info.py +1 -1
- cosmotech_api/model/run.py +1 -1
- cosmotech_api/model/run_container.py +1 -1
- cosmotech_api/model/run_container_artifact.py +1 -1
- cosmotech_api/model/run_container_logs.py +1 -1
- cosmotech_api/model/run_logs.py +1 -1
- cosmotech_api/model/run_resource_requested.py +1 -1
- cosmotech_api/model/run_search.py +1 -1
- cosmotech_api/model/run_start_containers.py +1 -1
- cosmotech_api/model/run_state.py +1 -1
- cosmotech_api/model/run_status.py +1 -1
- cosmotech_api/model/run_status_node.py +1 -1
- cosmotech_api/model/run_template.py +1 -1
- cosmotech_api/model/run_template_handler_id.py +1 -1
- cosmotech_api/model/run_template_orchestrator.py +1 -1
- cosmotech_api/model/run_template_parameter.py +1 -1
- cosmotech_api/model/run_template_parameter_group.py +1 -1
- cosmotech_api/model/run_template_parameter_value.py +1 -1
- cosmotech_api/model/run_template_resource_sizing.py +1 -1
- cosmotech_api/model/run_template_step_source.py +1 -1
- cosmotech_api/model/runner.py +1 -1
- cosmotech_api/model/runner_access_control.py +1 -1
- cosmotech_api/model/runner_changed_parameter_value.py +1 -1
- cosmotech_api/model/runner_comparison_result.py +1 -1
- cosmotech_api/model/runner_data_download_info.py +1 -1
- cosmotech_api/model/runner_data_download_job.py +1 -1
- cosmotech_api/model/runner_job_state.py +1 -1
- cosmotech_api/model/runner_last_run.py +1 -1
- cosmotech_api/model/runner_resource_sizing.py +1 -1
- cosmotech_api/model/runner_role.py +1 -1
- cosmotech_api/model/runner_run_template_parameter_value.py +1 -1
- cosmotech_api/model/runner_security.py +1 -1
- cosmotech_api/model/runner_validation_status.py +1 -1
- cosmotech_api/model/scenario.py +1 -1
- cosmotech_api/model/scenario_access_control.py +1 -1
- cosmotech_api/model/scenario_changed_parameter_value.py +1 -1
- cosmotech_api/model/scenario_comparison_result.py +1 -1
- cosmotech_api/model/scenario_data_download_info.py +1 -1
- cosmotech_api/model/scenario_data_download_job.py +1 -1
- cosmotech_api/model/scenario_job_state.py +1 -1
- cosmotech_api/model/scenario_last_run.py +1 -1
- cosmotech_api/model/scenario_resource_sizing.py +1 -1
- cosmotech_api/model/scenario_role.py +1 -1
- cosmotech_api/model/scenario_run.py +1 -1
- cosmotech_api/model/scenario_run_container.py +1 -1
- cosmotech_api/model/scenario_run_container_artifact.py +1 -1
- cosmotech_api/model/scenario_run_container_logs.py +1 -1
- cosmotech_api/model/scenario_run_logs.py +1 -1
- cosmotech_api/model/scenario_run_resource_requested.py +1 -1
- cosmotech_api/model/scenario_run_result.py +1 -1
- cosmotech_api/model/scenario_run_search.py +1 -1
- cosmotech_api/model/scenario_run_start_containers.py +1 -1
- cosmotech_api/model/scenario_run_state.py +1 -1
- cosmotech_api/model/scenario_run_status.py +1 -1
- cosmotech_api/model/scenario_run_status_node.py +1 -1
- cosmotech_api/model/scenario_run_template_parameter_value.py +1 -1
- cosmotech_api/model/scenario_security.py +1 -1
- cosmotech_api/model/scenario_validation_status.py +1 -1
- cosmotech_api/model/solution.py +1 -1
- cosmotech_api/model/solution_access_control.py +1 -1
- cosmotech_api/model/solution_role.py +1 -1
- cosmotech_api/model/solution_security.py +1 -1
- cosmotech_api/model/source_info.py +1 -1
- cosmotech_api/model/sub_dataset_graph_query.py +1 -1
- cosmotech_api/model/translated_labels.py +1 -1
- cosmotech_api/model/twin_graph_batch_result.py +1 -1
- cosmotech_api/model/twin_graph_hash.py +1 -1
- cosmotech_api/model/twin_graph_query.py +1 -1
- cosmotech_api/model/validator.py +1 -1
- cosmotech_api/model/validator_run.py +1 -1
- cosmotech_api/model/workspace.py +1 -1
- cosmotech_api/model/workspace_access_control.py +1 -1
- cosmotech_api/model/workspace_file.py +1 -1
- cosmotech_api/model/workspace_role.py +1 -1
- cosmotech_api/model/workspace_secret.py +1 -1
- cosmotech_api/model/workspace_security.py +1 -1
- cosmotech_api/model/workspace_solution.py +1 -1
- cosmotech_api/model/workspace_web_app.py +1 -1
- cosmotech_api/model_utils.py +1 -1
- cosmotech_api/models/__init__.py +31 -26
- cosmotech_api/models/about_info.py +92 -0
- cosmotech_api/models/about_info_version.py +100 -0
- cosmotech_api/models/component_role_permissions.py +5 -5
- cosmotech_api/models/connector.py +1 -1
- cosmotech_api/models/connector_parameter.py +1 -1
- cosmotech_api/models/connector_parameter_group.py +1 -1
- cosmotech_api/models/container_resource_size_info.py +1 -1
- cosmotech_api/models/container_resource_sizing.py +1 -1
- cosmotech_api/models/create_info.py +103 -0
- cosmotech_api/models/created_run.py +2 -2
- cosmotech_api/models/dataset.py +42 -81
- cosmotech_api/models/dataset_access_control.py +1 -1
- cosmotech_api/models/dataset_compatibility.py +1 -1
- cosmotech_api/models/dataset_connector.py +1 -1
- cosmotech_api/models/dataset_copy_parameters.py +1 -1
- cosmotech_api/models/dataset_create_request.py +121 -0
- cosmotech_api/models/dataset_part.py +130 -0
- cosmotech_api/models/dataset_part_create_request.py +98 -0
- cosmotech_api/models/dataset_part_type_enum.py +38 -0
- cosmotech_api/models/dataset_part_update_request.py +90 -0
- cosmotech_api/models/dataset_role.py +1 -1
- cosmotech_api/models/dataset_search.py +1 -1
- cosmotech_api/models/dataset_security.py +1 -1
- cosmotech_api/models/dataset_source_type.py +1 -1
- cosmotech_api/models/dataset_twin_graph_hash.py +1 -1
- cosmotech_api/models/dataset_twin_graph_info.py +1 -1
- cosmotech_api/models/dataset_twin_graph_query.py +1 -1
- cosmotech_api/models/dataset_update_request.py +109 -0
- cosmotech_api/models/delete_historical_data.py +1 -1
- cosmotech_api/models/edit_info.py +90 -0
- cosmotech_api/models/file_upload_metadata.py +1 -1
- cosmotech_api/models/file_upload_validation.py +1 -1
- cosmotech_api/models/graph_properties.py +1 -1
- cosmotech_api/models/ingestion_status_enum.py +1 -1
- cosmotech_api/models/io_types_enum.py +1 -1
- cosmotech_api/models/last_run_info.py +100 -0
- cosmotech_api/models/organization.py +18 -11
- cosmotech_api/models/organization_access_control.py +4 -4
- cosmotech_api/models/organization_create_request.py +95 -0
- cosmotech_api/models/organization_edit_info.py +90 -0
- cosmotech_api/models/organization_role.py +3 -3
- cosmotech_api/models/organization_security.py +4 -4
- cosmotech_api/models/organization_service.py +7 -7
- cosmotech_api/models/organization_services.py +7 -7
- cosmotech_api/models/organization_update_request.py +89 -0
- cosmotech_api/models/query_result.py +1 -1
- cosmotech_api/models/resource_size_info.py +1 -1
- cosmotech_api/models/run.py +8 -10
- cosmotech_api/models/run_container.py +1 -1
- cosmotech_api/models/run_container_artifact.py +7 -7
- cosmotech_api/models/run_container_logs.py +7 -7
- cosmotech_api/models/run_data.py +2 -2
- cosmotech_api/models/run_data_query.py +1 -1
- cosmotech_api/models/run_edit_info.py +90 -0
- cosmotech_api/models/run_logs.py +1 -1
- cosmotech_api/models/run_logs_entry.py +1 -1
- cosmotech_api/models/run_resource_requested.py +1 -1
- cosmotech_api/models/run_search.py +7 -7
- cosmotech_api/models/run_search_state.py +1 -1
- cosmotech_api/models/run_start_containers.py +10 -10
- cosmotech_api/models/run_state.py +2 -1
- cosmotech_api/models/run_status.py +8 -2
- cosmotech_api/models/run_status_node.py +1 -1
- cosmotech_api/models/run_template.py +14 -69
- cosmotech_api/models/run_template_create_request.py +109 -0
- cosmotech_api/models/run_template_handler_id.py +1 -1
- cosmotech_api/models/run_template_orchestrator.py +1 -1
- cosmotech_api/models/run_template_parameter.py +14 -11
- cosmotech_api/models/run_template_parameter_create_request.py +105 -0
- cosmotech_api/models/run_template_parameter_group.py +12 -9
- cosmotech_api/models/run_template_parameter_group_create_request.py +101 -0
- cosmotech_api/models/run_template_parameter_group_update_request.py +98 -0
- cosmotech_api/models/run_template_parameter_update_request.py +103 -0
- cosmotech_api/models/run_template_parameter_value.py +1 -1
- cosmotech_api/models/run_template_resource_sizing.py +2 -2
- cosmotech_api/models/run_template_step_source.py +1 -1
- cosmotech_api/models/run_template_update_request.py +107 -0
- cosmotech_api/models/runner.py +31 -28
- cosmotech_api/models/runner_access_control.py +1 -1
- cosmotech_api/models/runner_changed_parameter_value.py +7 -7
- cosmotech_api/models/runner_comparison_result.py +10 -10
- cosmotech_api/models/runner_create_request.py +154 -0
- cosmotech_api/models/runner_data_download_info.py +12 -9
- cosmotech_api/models/runner_data_download_job.py +7 -7
- cosmotech_api/models/runner_edit_info.py +90 -0
- cosmotech_api/models/runner_job_state.py +1 -1
- cosmotech_api/models/runner_last_run.py +7 -7
- cosmotech_api/models/runner_parent_last_run.py +7 -7
- cosmotech_api/models/runner_resource_sizing.py +1 -1
- cosmotech_api/models/runner_role.py +1 -1
- cosmotech_api/models/runner_root_last_run.py +7 -7
- cosmotech_api/models/runner_run_template_parameter_value.py +1 -1
- cosmotech_api/models/runner_security.py +1 -1
- cosmotech_api/models/runner_update_request.py +123 -0
- cosmotech_api/models/runner_validation_status.py +1 -1
- cosmotech_api/models/scenario.py +10 -10
- cosmotech_api/models/scenario_access_control.py +7 -7
- cosmotech_api/models/scenario_changed_parameter_value.py +7 -7
- cosmotech_api/models/scenario_comparison_result.py +10 -10
- cosmotech_api/models/scenario_data_download_info.py +7 -7
- cosmotech_api/models/scenario_data_download_job.py +7 -7
- cosmotech_api/models/scenario_job_state.py +1 -1
- cosmotech_api/models/scenario_last_run.py +7 -7
- cosmotech_api/models/scenario_resource_sizing.py +7 -7
- cosmotech_api/models/scenario_role.py +7 -7
- cosmotech_api/models/scenario_run.py +13 -13
- cosmotech_api/models/scenario_run_container.py +10 -10
- cosmotech_api/models/scenario_run_container_artifact.py +7 -7
- cosmotech_api/models/scenario_run_container_logs.py +7 -7
- cosmotech_api/models/scenario_run_logs.py +10 -10
- cosmotech_api/models/scenario_run_resource_requested.py +7 -7
- cosmotech_api/models/scenario_run_search.py +7 -7
- cosmotech_api/models/scenario_run_search_state.py +1 -1
- cosmotech_api/models/scenario_run_start_containers.py +10 -10
- cosmotech_api/models/scenario_run_state.py +1 -1
- cosmotech_api/models/scenario_run_status.py +10 -10
- cosmotech_api/models/scenario_run_status_node.py +7 -7
- cosmotech_api/models/scenario_run_template_parameter_value.py +7 -7
- cosmotech_api/models/scenario_security.py +10 -10
- cosmotech_api/models/scenario_validation_status.py +1 -1
- cosmotech_api/models/send_run_data_request.py +5 -5
- cosmotech_api/models/solution.py +45 -29
- cosmotech_api/models/solution_access_control.py +4 -4
- cosmotech_api/models/solution_create_request.py +139 -0
- cosmotech_api/models/solution_edit_info.py +90 -0
- cosmotech_api/models/solution_role.py +3 -3
- cosmotech_api/models/solution_security.py +4 -4
- cosmotech_api/models/solution_update_request.py +133 -0
- cosmotech_api/models/source_info.py +1 -1
- cosmotech_api/models/sub_dataset_graph_query.py +1 -1
- cosmotech_api/models/twin_graph_batch_result.py +1 -1
- cosmotech_api/models/twin_graph_hash.py +7 -7
- cosmotech_api/models/twin_graph_query.py +7 -7
- cosmotech_api/models/twincache_status_enum.py +1 -1
- cosmotech_api/models/validator.py +7 -7
- cosmotech_api/models/workspace.py +38 -30
- cosmotech_api/models/workspace_access_control.py +4 -4
- cosmotech_api/models/workspace_create_request.py +117 -0
- cosmotech_api/models/workspace_edit_info.py +90 -0
- cosmotech_api/models/workspace_file.py +4 -4
- cosmotech_api/models/workspace_role.py +3 -3
- cosmotech_api/models/workspace_secret.py +7 -7
- cosmotech_api/models/workspace_security.py +4 -4
- cosmotech_api/models/workspace_solution.py +14 -6
- cosmotech_api/models/workspace_update_request.py +109 -0
- cosmotech_api/models/workspace_web_app.py +4 -4
- cosmotech_api/rest.py +3 -2
- cosmotech_api-5.0.0b3.dist-info/METADATA +27 -0
- cosmotech_api-5.0.0b3.dist-info/RECORD +293 -0
- {cosmotech_api-4.0.0.dev9.dist-info → cosmotech_api-5.0.0b3.dist-info}/WHEEL +1 -1
- {cosmotech_api-4.0.0.dev9.dist-info → cosmotech_api-5.0.0b3.dist-info/licenses}/LICENSE +1 -1
- cosmotech_api-4.0.0.dev9.dist-info/METADATA +0 -18
- cosmotech_api-4.0.0.dev9.dist-info/RECORD +0 -262
- {cosmotech_api-4.0.0.dev9.dist-info → cosmotech_api-5.0.0b3.dist-info}/top_level.txt +0 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Cosmo Tech Platform API
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 5.0.0-beta3
|
|
9
9
|
Contact: platform@cosmotech.com
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
@@ -20,22 +20,24 @@ import json
|
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
25
26
|
|
|
26
27
|
class RunTemplateParameter(BaseModel):
|
|
27
28
|
"""
|
|
28
|
-
|
|
29
|
+
A Run Template Parameter
|
|
29
30
|
""" # noqa: E501
|
|
30
|
-
id:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
31
|
+
id: Annotated[str, Field(min_length=1, strict=True, max_length=50)] = Field(description="The Parameter id")
|
|
32
|
+
description: Optional[StrictStr] = Field(default=None, description="The parameter description")
|
|
33
|
+
labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="A translated label with key as ISO 639-1 code")
|
|
34
|
+
var_type: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The variable type for the parameter. Basic types or special type %DATASETID%", alias="varType")
|
|
35
|
+
default_value: Optional[StrictStr] = Field(default=None, description="The default value for this parameter", alias="defaultValue")
|
|
36
|
+
min_value: Optional[StrictStr] = Field(default=None, description="The minimum value for this parameter", alias="minValue")
|
|
37
|
+
max_value: Optional[StrictStr] = Field(default=None, description="The maximum value for this parameter", alias="maxValue")
|
|
38
|
+
regex_validation: Optional[StrictStr] = Field(default=None, description="A regex to validate the value", alias="regexValidation")
|
|
39
|
+
options: Optional[Dict[str, Any]] = Field(default=None, description="Freeform options")
|
|
40
|
+
__properties: ClassVar[List[str]] = ["id", "description", "labels", "varType", "defaultValue", "minValue", "maxValue", "regexValidation", "options"]
|
|
39
41
|
|
|
40
42
|
model_config = ConfigDict(
|
|
41
43
|
populate_by_name=True,
|
|
@@ -89,6 +91,7 @@ class RunTemplateParameter(BaseModel):
|
|
|
89
91
|
|
|
90
92
|
_obj = cls.model_validate({
|
|
91
93
|
"id": obj.get("id"),
|
|
94
|
+
"description": obj.get("description"),
|
|
92
95
|
"labels": obj.get("labels"),
|
|
93
96
|
"varType": obj.get("varType"),
|
|
94
97
|
"defaultValue": obj.get("defaultValue"),
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Cosmo Tech Platform API
|
|
5
|
+
|
|
6
|
+
Cosmo Tech Platform API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 5.0.0-beta3
|
|
9
|
+
Contact: platform@cosmotech.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class RunTemplateParameterCreateRequest(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
A Run Template Parameter for creation
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
id: Annotated[str, Field(min_length=1, strict=True, max_length=50)] = Field(description="The Parameter id")
|
|
32
|
+
description: Optional[StrictStr] = Field(default=None, description="The parameter description")
|
|
33
|
+
labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="A translated label with key as ISO 639-1 code")
|
|
34
|
+
var_type: Annotated[str, Field(min_length=1, strict=True)] = Field(description="The variable type for the parameter. Basic types or special type %DATASETID%", alias="varType")
|
|
35
|
+
default_value: Optional[StrictStr] = Field(default=None, description="The default value for this parameter", alias="defaultValue")
|
|
36
|
+
min_value: Optional[StrictStr] = Field(default=None, description="The minimum value for this parameter", alias="minValue")
|
|
37
|
+
max_value: Optional[StrictStr] = Field(default=None, description="The maximum value for this parameter", alias="maxValue")
|
|
38
|
+
regex_validation: Optional[StrictStr] = Field(default=None, description="A regex to validate the value", alias="regexValidation")
|
|
39
|
+
options: Optional[Dict[str, Any]] = Field(default=None, description="Freeform options")
|
|
40
|
+
__properties: ClassVar[List[str]] = ["id", "description", "labels", "varType", "defaultValue", "minValue", "maxValue", "regexValidation", "options"]
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
populate_by_name=True,
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
|
+
"""Create an instance of RunTemplateParameterCreateRequest from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
|
65
|
+
|
|
66
|
+
This has the following differences from calling pydantic's
|
|
67
|
+
`self.model_dump(by_alias=True)`:
|
|
68
|
+
|
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
|
70
|
+
were set at model initialization. Other fields with value `None`
|
|
71
|
+
are ignored.
|
|
72
|
+
"""
|
|
73
|
+
excluded_fields: Set[str] = set([
|
|
74
|
+
])
|
|
75
|
+
|
|
76
|
+
_dict = self.model_dump(
|
|
77
|
+
by_alias=True,
|
|
78
|
+
exclude=excluded_fields,
|
|
79
|
+
exclude_none=True,
|
|
80
|
+
)
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of RunTemplateParameterCreateRequest from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate({
|
|
93
|
+
"id": obj.get("id"),
|
|
94
|
+
"description": obj.get("description"),
|
|
95
|
+
"labels": obj.get("labels"),
|
|
96
|
+
"varType": obj.get("varType"),
|
|
97
|
+
"defaultValue": obj.get("defaultValue"),
|
|
98
|
+
"minValue": obj.get("minValue"),
|
|
99
|
+
"maxValue": obj.get("maxValue"),
|
|
100
|
+
"regexValidation": obj.get("regexValidation"),
|
|
101
|
+
"options": obj.get("options")
|
|
102
|
+
})
|
|
103
|
+
return _obj
|
|
104
|
+
|
|
105
|
+
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Cosmo Tech Platform API
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 5.0.0-beta3
|
|
9
9
|
Contact: platform@cosmotech.com
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
@@ -20,20 +20,22 @@ import json
|
|
|
20
20
|
|
|
21
21
|
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
22
22
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
25
26
|
|
|
26
27
|
class RunTemplateParameterGroup(BaseModel):
|
|
27
28
|
"""
|
|
28
|
-
|
|
29
|
+
A Parameter Group for a Run Template
|
|
29
30
|
""" # noqa: E501
|
|
30
|
-
id:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
id: Annotated[str, Field(min_length=1, strict=True, max_length=50)] = Field(description="The Parameter Group id")
|
|
32
|
+
description: Optional[StrictStr] = Field(default=None, description="A description of the parameter group")
|
|
33
|
+
labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="A translated label with key as ISO 639-1 code")
|
|
34
|
+
is_table: StrictBool = Field(description="Does the group define a table", alias="isTable")
|
|
35
|
+
options: Optional[Dict[str, Any]] = Field(default=None, description="Freeform options")
|
|
36
|
+
parent_id: Optional[StrictStr] = Field(default=None, description="The Run Template Group parent Id", alias="parentId")
|
|
37
|
+
parameters: List[StrictStr] = Field(description="An ordered list of Run Template Parameters")
|
|
38
|
+
__properties: ClassVar[List[str]] = ["id", "description", "labels", "isTable", "options", "parentId", "parameters"]
|
|
37
39
|
|
|
38
40
|
model_config = ConfigDict(
|
|
39
41
|
populate_by_name=True,
|
|
@@ -87,6 +89,7 @@ class RunTemplateParameterGroup(BaseModel):
|
|
|
87
89
|
|
|
88
90
|
_obj = cls.model_validate({
|
|
89
91
|
"id": obj.get("id"),
|
|
92
|
+
"description": obj.get("description"),
|
|
90
93
|
"labels": obj.get("labels"),
|
|
91
94
|
"isTable": obj.get("isTable"),
|
|
92
95
|
"options": obj.get("options"),
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Cosmo Tech Platform API
|
|
5
|
+
|
|
6
|
+
Cosmo Tech Platform API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 5.0.0-beta3
|
|
9
|
+
Contact: platform@cosmotech.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class RunTemplateParameterGroupCreateRequest(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
A Parameter Group Create Request for a Run Template
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
id: Annotated[str, Field(min_length=1, strict=True, max_length=50)] = Field(description="The Parameter Group id")
|
|
32
|
+
description: Optional[StrictStr] = Field(default=None, description="A description of the parameter group")
|
|
33
|
+
labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="A translated label with key as ISO 639-1 code")
|
|
34
|
+
is_table: Optional[StrictBool] = Field(default=False, description="Does the group define a table", alias="isTable")
|
|
35
|
+
options: Optional[Dict[str, Any]] = Field(default=None, description="Freeform options")
|
|
36
|
+
parent_id: Optional[StrictStr] = Field(default=None, description="The Run Template Group parent Id", alias="parentId")
|
|
37
|
+
parameters: Optional[List[StrictStr]] = Field(default=None, description="An ordered list of Run Template Parameters")
|
|
38
|
+
__properties: ClassVar[List[str]] = ["id", "description", "labels", "isTable", "options", "parentId", "parameters"]
|
|
39
|
+
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
50
|
+
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
|
53
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
54
|
+
return json.dumps(self.to_dict())
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
58
|
+
"""Create an instance of RunTemplateParameterGroupCreateRequest from a JSON string"""
|
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
|
60
|
+
|
|
61
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
62
|
+
"""Return the dictionary representation of the model using alias.
|
|
63
|
+
|
|
64
|
+
This has the following differences from calling pydantic's
|
|
65
|
+
`self.model_dump(by_alias=True)`:
|
|
66
|
+
|
|
67
|
+
* `None` is only added to the output dict for nullable fields that
|
|
68
|
+
were set at model initialization. Other fields with value `None`
|
|
69
|
+
are ignored.
|
|
70
|
+
"""
|
|
71
|
+
excluded_fields: Set[str] = set([
|
|
72
|
+
])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of RunTemplateParameterGroupCreateRequest from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"id": obj.get("id"),
|
|
92
|
+
"description": obj.get("description"),
|
|
93
|
+
"labels": obj.get("labels"),
|
|
94
|
+
"isTable": obj.get("isTable") if obj.get("isTable") is not None else False,
|
|
95
|
+
"options": obj.get("options"),
|
|
96
|
+
"parentId": obj.get("parentId"),
|
|
97
|
+
"parameters": obj.get("parameters")
|
|
98
|
+
})
|
|
99
|
+
return _obj
|
|
100
|
+
|
|
101
|
+
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Cosmo Tech Platform API
|
|
5
|
+
|
|
6
|
+
Cosmo Tech Platform API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 5.0.0-beta3
|
|
9
|
+
Contact: platform@cosmotech.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class RunTemplateParameterGroupUpdateRequest(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
A Parameter Group Update Request for a Run Template
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
description: Optional[StrictStr] = Field(default=None, description="A description of the parameter group")
|
|
31
|
+
labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="A translated label with key as ISO 639-1 code")
|
|
32
|
+
is_table: Optional[StrictBool] = Field(default=None, description="Does the group define a table", alias="isTable")
|
|
33
|
+
options: Optional[Dict[str, Any]] = Field(default=None, description="Freeform options")
|
|
34
|
+
parent_id: Optional[StrictStr] = Field(default=None, description="The Run Template Group parent Id", alias="parentId")
|
|
35
|
+
parameters: Optional[List[StrictStr]] = Field(default=None, description="An ordered list of Run Template Parameters")
|
|
36
|
+
__properties: ClassVar[List[str]] = ["description", "labels", "isTable", "options", "parentId", "parameters"]
|
|
37
|
+
|
|
38
|
+
model_config = ConfigDict(
|
|
39
|
+
populate_by_name=True,
|
|
40
|
+
validate_assignment=True,
|
|
41
|
+
protected_namespaces=(),
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def to_str(self) -> str:
|
|
46
|
+
"""Returns the string representation of the model using alias"""
|
|
47
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
48
|
+
|
|
49
|
+
def to_json(self) -> str:
|
|
50
|
+
"""Returns the JSON representation of the model using alias"""
|
|
51
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
52
|
+
return json.dumps(self.to_dict())
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
56
|
+
"""Create an instance of RunTemplateParameterGroupUpdateRequest from a JSON string"""
|
|
57
|
+
return cls.from_dict(json.loads(json_str))
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
60
|
+
"""Return the dictionary representation of the model using alias.
|
|
61
|
+
|
|
62
|
+
This has the following differences from calling pydantic's
|
|
63
|
+
`self.model_dump(by_alias=True)`:
|
|
64
|
+
|
|
65
|
+
* `None` is only added to the output dict for nullable fields that
|
|
66
|
+
were set at model initialization. Other fields with value `None`
|
|
67
|
+
are ignored.
|
|
68
|
+
"""
|
|
69
|
+
excluded_fields: Set[str] = set([
|
|
70
|
+
])
|
|
71
|
+
|
|
72
|
+
_dict = self.model_dump(
|
|
73
|
+
by_alias=True,
|
|
74
|
+
exclude=excluded_fields,
|
|
75
|
+
exclude_none=True,
|
|
76
|
+
)
|
|
77
|
+
return _dict
|
|
78
|
+
|
|
79
|
+
@classmethod
|
|
80
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
81
|
+
"""Create an instance of RunTemplateParameterGroupUpdateRequest from a dict"""
|
|
82
|
+
if obj is None:
|
|
83
|
+
return None
|
|
84
|
+
|
|
85
|
+
if not isinstance(obj, dict):
|
|
86
|
+
return cls.model_validate(obj)
|
|
87
|
+
|
|
88
|
+
_obj = cls.model_validate({
|
|
89
|
+
"description": obj.get("description"),
|
|
90
|
+
"labels": obj.get("labels"),
|
|
91
|
+
"isTable": obj.get("isTable"),
|
|
92
|
+
"options": obj.get("options"),
|
|
93
|
+
"parentId": obj.get("parentId"),
|
|
94
|
+
"parameters": obj.get("parameters")
|
|
95
|
+
})
|
|
96
|
+
return _obj
|
|
97
|
+
|
|
98
|
+
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Cosmo Tech Platform API
|
|
5
|
+
|
|
6
|
+
Cosmo Tech Platform API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 5.0.0-beta3
|
|
9
|
+
Contact: platform@cosmotech.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class RunTemplateParameterUpdateRequest(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
A Run Template Parameter for update parameter
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
description: Optional[StrictStr] = Field(default=None, description="The parameter description")
|
|
32
|
+
labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="A translated label with key as ISO 639-1 code")
|
|
33
|
+
var_type: Optional[Annotated[str, Field(min_length=1, strict=True)]] = Field(default=None, description="The variable type for the parameter. Basic types or special type %DATASETID%", alias="varType")
|
|
34
|
+
default_value: Optional[StrictStr] = Field(default=None, description="The default value for this parameter", alias="defaultValue")
|
|
35
|
+
min_value: Optional[StrictStr] = Field(default=None, description="The minimum value for this parameter", alias="minValue")
|
|
36
|
+
max_value: Optional[StrictStr] = Field(default=None, description="The maximum value for this parameter", alias="maxValue")
|
|
37
|
+
regex_validation: Optional[StrictStr] = Field(default=None, description="A regex to validate the value", alias="regexValidation")
|
|
38
|
+
options: Optional[Dict[str, Any]] = Field(default=None, description="Freeform options")
|
|
39
|
+
__properties: ClassVar[List[str]] = ["description", "labels", "varType", "defaultValue", "minValue", "maxValue", "regexValidation", "options"]
|
|
40
|
+
|
|
41
|
+
model_config = ConfigDict(
|
|
42
|
+
populate_by_name=True,
|
|
43
|
+
validate_assignment=True,
|
|
44
|
+
protected_namespaces=(),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def to_str(self) -> str:
|
|
49
|
+
"""Returns the string representation of the model using alias"""
|
|
50
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
51
|
+
|
|
52
|
+
def to_json(self) -> str:
|
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
|
54
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
55
|
+
return json.dumps(self.to_dict())
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
|
+
"""Create an instance of RunTemplateParameterUpdateRequest from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
61
|
+
|
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
|
64
|
+
|
|
65
|
+
This has the following differences from calling pydantic's
|
|
66
|
+
`self.model_dump(by_alias=True)`:
|
|
67
|
+
|
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
|
69
|
+
were set at model initialization. Other fields with value `None`
|
|
70
|
+
are ignored.
|
|
71
|
+
"""
|
|
72
|
+
excluded_fields: Set[str] = set([
|
|
73
|
+
])
|
|
74
|
+
|
|
75
|
+
_dict = self.model_dump(
|
|
76
|
+
by_alias=True,
|
|
77
|
+
exclude=excluded_fields,
|
|
78
|
+
exclude_none=True,
|
|
79
|
+
)
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of RunTemplateParameterUpdateRequest from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"description": obj.get("description"),
|
|
93
|
+
"labels": obj.get("labels"),
|
|
94
|
+
"varType": obj.get("varType"),
|
|
95
|
+
"defaultValue": obj.get("defaultValue"),
|
|
96
|
+
"minValue": obj.get("minValue"),
|
|
97
|
+
"maxValue": obj.get("maxValue"),
|
|
98
|
+
"regexValidation": obj.get("regexValidation"),
|
|
99
|
+
"options": obj.get("options")
|
|
100
|
+
})
|
|
101
|
+
return _obj
|
|
102
|
+
|
|
103
|
+
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Cosmo Tech Platform API
|
|
7
7
|
|
|
8
|
-
The version of the OpenAPI document:
|
|
8
|
+
The version of the OpenAPI document: 5.0.0-beta3
|
|
9
9
|
Contact: platform@cosmotech.com
|
|
10
10
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
11
|
|
|
@@ -26,7 +26,7 @@ from typing_extensions import Self
|
|
|
26
26
|
|
|
27
27
|
class RunTemplateResourceSizing(BaseModel):
|
|
28
28
|
"""
|
|
29
|
-
|
|
29
|
+
A description object for resource requests and limits
|
|
30
30
|
""" # noqa: E501
|
|
31
31
|
requests: ResourceSizeInfo
|
|
32
32
|
limits: ResourceSizeInfo
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Cosmo Tech Platform API
|
|
5
|
+
|
|
6
|
+
Cosmo Tech Platform API
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 5.0.0-beta3
|
|
9
|
+
Contact: platform@cosmotech.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from cosmotech_api.models.run_template_resource_sizing import RunTemplateResourceSizing
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class RunTemplateUpdateRequest(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
A Solution Run Template Create Request
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=50)]] = Field(default=None, description="The Run Template name")
|
|
33
|
+
labels: Optional[Dict[str, StrictStr]] = Field(default=None, description="A translated label with key as ISO 639-1 code")
|
|
34
|
+
description: Optional[StrictStr] = Field(default=None, description="The Run Template description")
|
|
35
|
+
tags: Optional[List[StrictStr]] = Field(default=None, description="The list of Run Template tags")
|
|
36
|
+
compute_size: Optional[StrictStr] = Field(default=None, description="The compute size needed for this Run Template", alias="computeSize")
|
|
37
|
+
run_sizing: Optional[RunTemplateResourceSizing] = Field(default=None, alias="runSizing")
|
|
38
|
+
parameter_groups: Optional[List[StrictStr]] = Field(default=None, description="The ordered list of parameters groups for the Run Template", alias="parameterGroups")
|
|
39
|
+
execution_timeout: Optional[StrictInt] = Field(default=None, description="An optional duration in seconds in which a workflow is allowed to run", alias="executionTimeout")
|
|
40
|
+
__properties: ClassVar[List[str]] = ["name", "labels", "description", "tags", "computeSize", "runSizing", "parameterGroups", "executionTimeout"]
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
populate_by_name=True,
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
|
+
"""Create an instance of RunTemplateUpdateRequest from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
|
65
|
+
|
|
66
|
+
This has the following differences from calling pydantic's
|
|
67
|
+
`self.model_dump(by_alias=True)`:
|
|
68
|
+
|
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
|
70
|
+
were set at model initialization. Other fields with value `None`
|
|
71
|
+
are ignored.
|
|
72
|
+
"""
|
|
73
|
+
excluded_fields: Set[str] = set([
|
|
74
|
+
])
|
|
75
|
+
|
|
76
|
+
_dict = self.model_dump(
|
|
77
|
+
by_alias=True,
|
|
78
|
+
exclude=excluded_fields,
|
|
79
|
+
exclude_none=True,
|
|
80
|
+
)
|
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of run_sizing
|
|
82
|
+
if self.run_sizing:
|
|
83
|
+
_dict['runSizing'] = self.run_sizing.to_dict()
|
|
84
|
+
return _dict
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
|
+
"""Create an instance of RunTemplateUpdateRequest from a dict"""
|
|
89
|
+
if obj is None:
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
if not isinstance(obj, dict):
|
|
93
|
+
return cls.model_validate(obj)
|
|
94
|
+
|
|
95
|
+
_obj = cls.model_validate({
|
|
96
|
+
"name": obj.get("name"),
|
|
97
|
+
"labels": obj.get("labels"),
|
|
98
|
+
"description": obj.get("description"),
|
|
99
|
+
"tags": obj.get("tags"),
|
|
100
|
+
"computeSize": obj.get("computeSize"),
|
|
101
|
+
"runSizing": RunTemplateResourceSizing.from_dict(obj["runSizing"]) if obj.get("runSizing") is not None else None,
|
|
102
|
+
"parameterGroups": obj.get("parameterGroups"),
|
|
103
|
+
"executionTimeout": obj.get("executionTimeout")
|
|
104
|
+
})
|
|
105
|
+
return _obj
|
|
106
|
+
|
|
107
|
+
|