cognite-toolkit 0.7.45__py3-none-any.whl → 0.7.46__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.
- cognite_toolkit/_cdf_tk/apps/_download_app.py +1 -1
- cognite_toolkit/_cdf_tk/apps/_dump_app.py +1 -1
- cognite_toolkit/_cdf_tk/builders/_raw.py +1 -1
- cognite_toolkit/_cdf_tk/client/_toolkit_client.py +19 -3
- cognite_toolkit/_cdf_tk/client/api/assets.py +30 -18
- cognite_toolkit/_cdf_tk/client/api/datasets.py +141 -0
- cognite_toolkit/_cdf_tk/client/api/events.py +31 -17
- cognite_toolkit/_cdf_tk/client/api/extraction_pipelines.py +148 -0
- cognite_toolkit/_cdf_tk/client/api/filemetadata.py +42 -16
- cognite_toolkit/_cdf_tk/client/api/hosted_extractor_destinations.py +131 -0
- cognite_toolkit/_cdf_tk/client/api/hosted_extractor_jobs.py +122 -0
- cognite_toolkit/_cdf_tk/client/api/hosted_extractor_mappings.py +129 -0
- cognite_toolkit/_cdf_tk/client/api/hosted_extractor_sources.py +136 -0
- cognite_toolkit/_cdf_tk/client/api/hosted_extractors.py +23 -0
- cognite_toolkit/_cdf_tk/client/api/infield.py +7 -7
- cognite_toolkit/_cdf_tk/client/api/labels.py +125 -0
- cognite_toolkit/_cdf_tk/client/api/legacy/canvas.py +2 -2
- cognite_toolkit/_cdf_tk/client/api/legacy/charts.py +1 -1
- cognite_toolkit/_cdf_tk/client/api/legacy/extended_data_modeling.py +1 -1
- cognite_toolkit/_cdf_tk/client/api/legacy/extended_files.py +2 -2
- cognite_toolkit/_cdf_tk/client/api/legacy/extended_raw.py +1 -1
- cognite_toolkit/_cdf_tk/client/api/legacy/extended_timeseries.py +2 -2
- cognite_toolkit/_cdf_tk/client/api/legacy/location_filters.py +1 -1
- cognite_toolkit/_cdf_tk/client/api/legacy/robotics/capabilities.py +1 -1
- cognite_toolkit/_cdf_tk/client/api/legacy/robotics/data_postprocessing.py +1 -1
- cognite_toolkit/_cdf_tk/client/api/legacy/robotics/frames.py +1 -1
- cognite_toolkit/_cdf_tk/client/api/legacy/robotics/locations.py +1 -1
- cognite_toolkit/_cdf_tk/client/api/legacy/robotics/maps.py +1 -1
- cognite_toolkit/_cdf_tk/client/api/legacy/robotics/robots.py +1 -1
- cognite_toolkit/_cdf_tk/client/api/legacy/search_config.py +1 -1
- cognite_toolkit/_cdf_tk/client/api/migration.py +1 -1
- cognite_toolkit/_cdf_tk/client/api/project.py +1 -1
- cognite_toolkit/_cdf_tk/client/api/raw.py +38 -8
- cognite_toolkit/_cdf_tk/client/api/security_categories.py +94 -0
- cognite_toolkit/_cdf_tk/client/api/sequences.py +133 -0
- cognite_toolkit/_cdf_tk/client/api/simulator_models.py +32 -6
- cognite_toolkit/_cdf_tk/client/api/streams.py +1 -1
- cognite_toolkit/_cdf_tk/client/api/three_d.py +11 -11
- cognite_toolkit/_cdf_tk/client/api/timeseries.py +31 -17
- cognite_toolkit/_cdf_tk/client/api/token.py +1 -1
- cognite_toolkit/_cdf_tk/client/api/transformations.py +146 -0
- cognite_toolkit/_cdf_tk/client/api/workflow_triggers.py +128 -0
- cognite_toolkit/_cdf_tk/client/api/workflow_versions.py +138 -0
- cognite_toolkit/_cdf_tk/client/api/workflows.py +119 -0
- cognite_toolkit/_cdf_tk/client/cdf_client/api.py +38 -40
- cognite_toolkit/_cdf_tk/client/http_client/_data_classes2.py +5 -7
- cognite_toolkit/_cdf_tk/client/http_client/_exception.py +10 -1
- cognite_toolkit/_cdf_tk/client/request_classes/base.py +19 -0
- cognite_toolkit/_cdf_tk/client/request_classes/filters.py +38 -0
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/agent.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/annotation.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/asset.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/data_modeling/_constraints.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/data_modeling/_container.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/data_modeling/_data_model.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/data_modeling/_data_types.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/data_modeling/_indexes.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/data_modeling/_instance.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/data_modeling/_references.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/data_modeling/_space.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/data_modeling/_view.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/data_modeling/_view_property.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/dataset.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/event.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/extraction_pipeline.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/filemetadata.py +1 -1
- cognite_toolkit/_cdf_tk/client/resource_classes/function.py +53 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/function_schedule.py +61 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/graphql_data_model.py +40 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/group/__init__.py +187 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/group/_constants.py +2 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/group/acls.py +653 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/group/capability.py +56 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/group/group.py +59 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/group/scopes.py +166 -0
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/hosted_extractor_destination.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/hosted_extractor_job.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/hosted_extractor_mapping.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/hosted_extractor_source/_auth.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/hosted_extractor_source/_base.py +2 -2
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/hosted_extractor_source/_certificate.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/hosted_extractor_source/_eventhub.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/hosted_extractor_source/_kafka.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/hosted_extractor_source/_mqtt.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/hosted_extractor_source/_rest.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/identifiers.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/label.py +1 -1
- cognite_toolkit/_cdf_tk/client/resource_classes/legacy/__init__.py +0 -0
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/legacy/canvas.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/legacy/charts.py +1 -1
- cognite_toolkit/_cdf_tk/client/resource_classes/location_filter.py +77 -0
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/raw.py +1 -1
- cognite_toolkit/_cdf_tk/client/resource_classes/relationship.py +43 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/robotics/__init__.py +37 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/robotics/_capability.py +53 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/robotics/_common.py +34 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/robotics/_data_post_processing.py +49 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/robotics/_frame.py +46 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/robotics/_location.py +36 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/robotics/_map.py +60 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/robotics/_robot.py +53 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/search_config_resource.py +54 -0
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/securitycategory.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/sequence.py +1 -1
- cognite_toolkit/_cdf_tk/client/resource_classes/sequence_rows.py +56 -0
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/simulator_model.py +1 -1
- cognite_toolkit/_cdf_tk/client/resource_classes/streamlit_.py +71 -0
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/streams.py +6 -5
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/timeseries.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/transformation.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/workflow.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/workflow_trigger.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/workflow_version.py +1 -1
- cognite_toolkit/_cdf_tk/client/testing.py +20 -2
- cognite_toolkit/_cdf_tk/commands/_migrate/conversion.py +5 -5
- cognite_toolkit/_cdf_tk/commands/_migrate/creators.py +1 -1
- cognite_toolkit/_cdf_tk/commands/_migrate/data_classes.py +6 -6
- cognite_toolkit/_cdf_tk/commands/_migrate/data_mapper.py +6 -6
- cognite_toolkit/_cdf_tk/commands/_migrate/default_mappings.py +1 -1
- cognite_toolkit/_cdf_tk/commands/_migrate/issues.py +1 -1
- cognite_toolkit/_cdf_tk/commands/_migrate/migration_io.py +8 -8
- cognite_toolkit/_cdf_tk/commands/_profile.py +1 -1
- cognite_toolkit/_cdf_tk/commands/_purge.py +1 -1
- cognite_toolkit/_cdf_tk/commands/build_cmd.py +1 -1
- cognite_toolkit/_cdf_tk/commands/dump_resource.py +4 -4
- cognite_toolkit/_cdf_tk/commands/run.py +1 -1
- cognite_toolkit/_cdf_tk/cruds/_data_cruds.py +3 -3
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/auth.py +2 -2
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/classic.py +11 -27
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/configuration.py +1 -1
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/datamodel.py +1 -1
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/extraction_pipeline.py +1 -1
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/fieldops.py +4 -4
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/file.py +7 -14
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/function.py +1 -1
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/industrial_tool.py +1 -1
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/location.py +2 -2
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/migration.py +1 -1
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/raw.py +6 -1
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/relationship.py +1 -1
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/robotics.py +1 -1
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/simulators.py +6 -3
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/streams.py +2 -2
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/timeseries.py +6 -13
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/transformation.py +1 -1
- cognite_toolkit/_cdf_tk/resource_classes/capabilities.py +6 -0
- cognite_toolkit/_cdf_tk/resource_classes/search_config.py +1 -1
- cognite_toolkit/_cdf_tk/storageio/_applications.py +3 -3
- cognite_toolkit/_cdf_tk/storageio/_asset_centric.py +21 -27
- cognite_toolkit/_cdf_tk/storageio/_file_content.py +2 -2
- cognite_toolkit/_cdf_tk/storageio/_instances.py +1 -1
- cognite_toolkit/_cdf_tk/utils/cdf.py +1 -1
- cognite_toolkit/_cdf_tk/utils/interactive_select.py +5 -5
- cognite_toolkit/_cdf_tk/utils/useful_types2.py +3 -3
- cognite_toolkit/_repo_files/GitHub/.github/workflows/deploy.yaml +1 -1
- cognite_toolkit/_repo_files/GitHub/.github/workflows/dry-run.yaml +1 -1
- cognite_toolkit/_resources/cdf.toml +1 -1
- cognite_toolkit/_version.py +1 -1
- {cognite_toolkit-0.7.45.dist-info → cognite_toolkit-0.7.46.dist-info}/METADATA +3 -3
- {cognite_toolkit-0.7.45.dist-info → cognite_toolkit-0.7.46.dist-info}/RECORD +189 -150
- {cognite_toolkit-0.7.45.dist-info → cognite_toolkit-0.7.46.dist-info}/WHEEL +2 -2
- /cognite_toolkit/_cdf_tk/client/{data_classes → request_classes}/__init__.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes/legacy → resource_classes}/__init__.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/base.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/capabilities.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/charts_data.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/data_modeling/__init__.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/hosted_extractor_source/__init__.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/infield.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/instance_api.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/legacy/apm_config_v1.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/legacy/extendable_cognite_file.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/legacy/extended_filemetadata.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/legacy/extended_filemetdata.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/legacy/extended_timeseries.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/legacy/functions.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/legacy/graphql_data_models.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/legacy/instances.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/legacy/location_filters.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/legacy/migration.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/legacy/pending_instances_ids.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/legacy/project.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/legacy/raw.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/legacy/robotics.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/legacy/search_config.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/legacy/sequences.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/legacy/streamlit_.py +0 -0
- /cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/three_d.py +0 -0
- {cognite_toolkit-0.7.45.dist-info → cognite_toolkit-0.7.46.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""Group request and response classes.
|
|
2
|
+
|
|
3
|
+
Based on the API specification at:
|
|
4
|
+
https://api-docs.cognite.com/20230101/tag/Groups/operation/createGroups
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Literal
|
|
8
|
+
|
|
9
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.base import (
|
|
10
|
+
BaseModelObject,
|
|
11
|
+
RequestResource,
|
|
12
|
+
ResponseResource,
|
|
13
|
+
)
|
|
14
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.identifiers import NameId
|
|
15
|
+
|
|
16
|
+
from .capability import GroupCapability
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class TokenAttributes(BaseModelObject):
|
|
20
|
+
"""Token attributes for group."""
|
|
21
|
+
|
|
22
|
+
app_ids: list[str] | None = None
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class GroupAttributes(BaseModelObject):
|
|
26
|
+
"""Attributes for a group."""
|
|
27
|
+
|
|
28
|
+
token: TokenAttributes | None = None
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class Group(BaseModelObject):
|
|
32
|
+
"""Base class for Group resources."""
|
|
33
|
+
|
|
34
|
+
name: str
|
|
35
|
+
capabilities: list[GroupCapability] | None = None
|
|
36
|
+
metadata: dict[str, str] | None = None
|
|
37
|
+
attributes: GroupAttributes | None = None
|
|
38
|
+
source_id: str | None = None
|
|
39
|
+
members: list[str] | Literal["allUserAccounts"] | None = None
|
|
40
|
+
|
|
41
|
+
def as_id(self) -> NameId:
|
|
42
|
+
return NameId(name=self.name)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class GroupRequest(Group, RequestResource):
|
|
46
|
+
"""Group request resource for creating/updating groups."""
|
|
47
|
+
|
|
48
|
+
...
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class GroupResponse(Group, ResponseResource[GroupRequest]):
|
|
52
|
+
"""Group response resource returned from API."""
|
|
53
|
+
|
|
54
|
+
id: int
|
|
55
|
+
is_deleted: bool = False
|
|
56
|
+
deleted_time: int | None = None
|
|
57
|
+
|
|
58
|
+
def as_request_resource(self) -> GroupRequest:
|
|
59
|
+
return GroupRequest.model_validate(self.dump(), extra="ignore")
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"""Scope definitions for Group capabilities.
|
|
2
|
+
|
|
3
|
+
Based on the API specification at:
|
|
4
|
+
https://api-docs.cognite.com/20230101/tag/Groups/operation/createGroups
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Annotated, Any, Literal, TypeAlias
|
|
8
|
+
|
|
9
|
+
from pydantic import BeforeValidator, Field, TypeAdapter
|
|
10
|
+
|
|
11
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.base import BaseModelObject
|
|
12
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.group._constants import SCOPE_NAME
|
|
13
|
+
from cognite_toolkit._cdf_tk.utils._auxiliary import get_concrete_subclasses
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ScopeDefinition(BaseModelObject):
|
|
17
|
+
"""Base class for all scope definitions."""
|
|
18
|
+
|
|
19
|
+
scope_name: str
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class AllScope(ScopeDefinition):
|
|
23
|
+
"""Scope that applies to all resources."""
|
|
24
|
+
|
|
25
|
+
scope_name: Literal["all"] = Field("all", exclude=True)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class CurrentUserScope(ScopeDefinition):
|
|
29
|
+
"""Scope that applies to the current user only."""
|
|
30
|
+
|
|
31
|
+
scope_name: Literal["currentuserscope"] = Field("currentuserscope", exclude=True)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class DataSetScope(ScopeDefinition):
|
|
35
|
+
"""Scope limited to specific data sets by ID."""
|
|
36
|
+
|
|
37
|
+
scope_name: Literal["datasetScope"] = Field("datasetScope", exclude=True)
|
|
38
|
+
ids: list[int]
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class IDScope(ScopeDefinition):
|
|
42
|
+
"""Scope limited to specific resource IDs."""
|
|
43
|
+
|
|
44
|
+
scope_name: Literal["idScope"] = Field("idScope", exclude=True)
|
|
45
|
+
ids: list[int]
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class IDScopeLowerCase(ScopeDefinition):
|
|
49
|
+
"""Scope limited to specific resource IDs (lowercase variant)."""
|
|
50
|
+
|
|
51
|
+
scope_name: Literal["idscope"] = Field("idscope", exclude=True)
|
|
52
|
+
ids: list[int]
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class SpaceIDScope(ScopeDefinition):
|
|
56
|
+
"""Scope limited to specific spaces by ID."""
|
|
57
|
+
|
|
58
|
+
scope_name: Literal["spaceIdScope"] = Field("spaceIdScope", exclude=True)
|
|
59
|
+
space_ids: list[str]
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
class AssetRootIDScope(ScopeDefinition):
|
|
63
|
+
"""Scope limited to assets under specific root assets."""
|
|
64
|
+
|
|
65
|
+
scope_name: Literal["assetRootIdScope"] = Field("assetRootIdScope", exclude=True)
|
|
66
|
+
root_ids: list[int]
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class TableScope(ScopeDefinition):
|
|
70
|
+
"""Scope limited to specific RAW tables."""
|
|
71
|
+
|
|
72
|
+
scope_name: Literal["tableScope"] = Field("tableScope", exclude=True)
|
|
73
|
+
dbs_to_tables: dict[str, list[str]]
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
class ExtractionPipelineScope(ScopeDefinition):
|
|
77
|
+
"""Scope limited to specific extraction pipelines."""
|
|
78
|
+
|
|
79
|
+
scope_name: Literal["extractionPipelineScope"] = Field("extractionPipelineScope", exclude=True)
|
|
80
|
+
ids: list[int]
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class InstancesScope(ScopeDefinition):
|
|
84
|
+
"""Scope limited to specific instances."""
|
|
85
|
+
|
|
86
|
+
scope_name: Literal["instancesScope"] = Field("instancesScope", exclude=True)
|
|
87
|
+
instances: list[str]
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
class PartitionScope(ScopeDefinition):
|
|
91
|
+
"""Scope limited to specific partitions."""
|
|
92
|
+
|
|
93
|
+
scope_name: Literal["partition"] = Field("partition", exclude=True)
|
|
94
|
+
partition_ids: list[int]
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
class ExperimentScope(ScopeDefinition):
|
|
98
|
+
"""Scope limited to specific experiments."""
|
|
99
|
+
|
|
100
|
+
scope_name: Literal["experimentscope"] = Field("experimentscope", exclude=True)
|
|
101
|
+
experiments: list[str]
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
class AppConfigScope(ScopeDefinition):
|
|
105
|
+
"""Scope limited to specific app configurations."""
|
|
106
|
+
|
|
107
|
+
scope_name: Literal["appScope"] = Field("appScope", exclude=True)
|
|
108
|
+
apps: list[str]
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
class PostgresGatewayUsersScope(ScopeDefinition):
|
|
112
|
+
"""Scope limited to specific PostgreSQL gateway users."""
|
|
113
|
+
|
|
114
|
+
scope_name: Literal["usersScope"] = Field("usersScope", exclude=True)
|
|
115
|
+
usernames: list[str]
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
class UnknownScope(ScopeDefinition):
|
|
119
|
+
"""Fallback class for unknown scope definitions."""
|
|
120
|
+
|
|
121
|
+
scope_name: str
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def _get_scope_name(cls: type[ScopeDefinition]) -> str | None:
|
|
125
|
+
"""Get the scope_name default value from a Pydantic model class."""
|
|
126
|
+
field = cls.model_fields.get("scope_name")
|
|
127
|
+
if field is not None and field.default is not None:
|
|
128
|
+
return field.default
|
|
129
|
+
return None
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
_KNOWN_SCOPES = {
|
|
133
|
+
name: scope
|
|
134
|
+
for scope in get_concrete_subclasses(ScopeDefinition)
|
|
135
|
+
if (name := _get_scope_name(scope)) is not None and scope is not UnknownScope
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
def _handle_unknown_scope(value: Any) -> Any:
|
|
140
|
+
if isinstance(value, dict) and isinstance(scope_name := value.get(SCOPE_NAME), str):
|
|
141
|
+
scope_class = _KNOWN_SCOPES.get(scope_name)
|
|
142
|
+
if scope_class:
|
|
143
|
+
return TypeAdapter(scope_class).validate_python(value)
|
|
144
|
+
return UnknownScope.model_validate(value)
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
Scope: TypeAlias = Annotated[
|
|
148
|
+
(
|
|
149
|
+
AllScope
|
|
150
|
+
| CurrentUserScope
|
|
151
|
+
| DataSetScope
|
|
152
|
+
| IDScope
|
|
153
|
+
| IDScopeLowerCase
|
|
154
|
+
| SpaceIDScope
|
|
155
|
+
| AssetRootIDScope
|
|
156
|
+
| TableScope
|
|
157
|
+
| ExtractionPipelineScope
|
|
158
|
+
| InstancesScope
|
|
159
|
+
| PartitionScope
|
|
160
|
+
| ExperimentScope
|
|
161
|
+
| AppConfigScope
|
|
162
|
+
| PostgresGatewayUsersScope
|
|
163
|
+
| UnknownScope
|
|
164
|
+
),
|
|
165
|
+
BeforeValidator(_handle_unknown_scope),
|
|
166
|
+
]
|
|
@@ -2,7 +2,7 @@ from typing import Annotated, Literal
|
|
|
2
2
|
|
|
3
3
|
from pydantic import Field, JsonValue
|
|
4
4
|
|
|
5
|
-
from cognite_toolkit._cdf_tk.client.
|
|
5
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.base import (
|
|
6
6
|
BaseModelObject,
|
|
7
7
|
RequestUpdateable,
|
|
8
8
|
ResponseResource,
|
cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/hosted_extractor_source/_base.py
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
from typing import Any, Literal
|
|
2
2
|
|
|
3
|
-
from cognite_toolkit._cdf_tk.client.
|
|
3
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.base import (
|
|
4
4
|
BaseModelObject,
|
|
5
5
|
RequestUpdateable,
|
|
6
6
|
)
|
|
7
|
-
from cognite_toolkit._cdf_tk.client.
|
|
7
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.identifiers import ExternalId
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class SourceRequestDefinition(RequestUpdateable):
|
|
@@ -3,7 +3,7 @@ from typing import Annotated, Literal
|
|
|
3
3
|
|
|
4
4
|
from pydantic import Field
|
|
5
5
|
|
|
6
|
-
from cognite_toolkit._cdf_tk.client.
|
|
6
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.base import Identifier
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class InternalOrExternalIdDefinition(Identifier):
|
|
File without changes
|
|
@@ -30,7 +30,7 @@ from cognite.client.data_classes.data_modeling.instances import (
|
|
|
30
30
|
TypedNodeApply,
|
|
31
31
|
)
|
|
32
32
|
|
|
33
|
-
from cognite_toolkit._cdf_tk.client.
|
|
33
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.legacy.migration import AssetCentricId
|
|
34
34
|
from cognite_toolkit._cdf_tk.utils.useful_types import JsonVal
|
|
35
35
|
|
|
36
36
|
if sys.version_info >= (3, 11):
|
|
@@ -9,7 +9,7 @@ from cognite.client.data_classes._base import (
|
|
|
9
9
|
WriteableCogniteResourceList,
|
|
10
10
|
)
|
|
11
11
|
|
|
12
|
-
from cognite_toolkit._cdf_tk.client.
|
|
12
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.charts_data import ChartData
|
|
13
13
|
|
|
14
14
|
if sys.version_info >= (3, 11):
|
|
15
15
|
from typing import Self
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
from typing import Literal
|
|
2
|
+
|
|
3
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.base import BaseModelObject, RequestResource, ResponseResource
|
|
4
|
+
|
|
5
|
+
from .data_modeling import DataModelReference
|
|
6
|
+
from .identifiers import ExternalId, InternalId
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class LocationFilterScene(BaseModelObject):
|
|
10
|
+
"""Scene configuration for a location filter."""
|
|
11
|
+
|
|
12
|
+
external_id: str
|
|
13
|
+
space: str
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class LocationFilterView(BaseModelObject):
|
|
17
|
+
"""View identifier with entity type for location filter."""
|
|
18
|
+
|
|
19
|
+
external_id: str
|
|
20
|
+
space: str
|
|
21
|
+
version: str
|
|
22
|
+
represents_entity: Literal["MAINTENANCE_ORDER", "OPERATION", "NOTIFICATION", "ASSET"] | None = None
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class AssetCentricSubFilter(BaseModelObject):
|
|
26
|
+
"""Sub-filter for asset-centric resource types."""
|
|
27
|
+
|
|
28
|
+
data_set_ids: list[int] | None = None
|
|
29
|
+
asset_subtree_ids: list[ExternalId | InternalId] | None = None
|
|
30
|
+
external_id_prefix: str | None = None
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class AssetCentricFilter(BaseModelObject):
|
|
34
|
+
"""Filter definition for asset-centric resource types."""
|
|
35
|
+
|
|
36
|
+
assets: AssetCentricSubFilter | None = None
|
|
37
|
+
events: AssetCentricSubFilter | None = None
|
|
38
|
+
files: AssetCentricSubFilter | None = None
|
|
39
|
+
timeseries: AssetCentricSubFilter | None = None
|
|
40
|
+
sequences: AssetCentricSubFilter | None = None
|
|
41
|
+
data_set_ids: list[int] | None = None
|
|
42
|
+
asset_subtree_ids: list[ExternalId | InternalId] | None = None
|
|
43
|
+
external_id_prefix: str | None = None
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class LocationFilter(BaseModelObject):
|
|
47
|
+
"""Base class for location filter with common fields."""
|
|
48
|
+
|
|
49
|
+
external_id: str
|
|
50
|
+
name: str
|
|
51
|
+
description: str | None = None
|
|
52
|
+
parent_id: int | None = None
|
|
53
|
+
data_models: list[DataModelReference] | None = None
|
|
54
|
+
instance_spaces: list[str] | None = None
|
|
55
|
+
scene: LocationFilterScene | None = None
|
|
56
|
+
asset_centric: AssetCentricFilter | None = None
|
|
57
|
+
views: list[LocationFilterView] | None = None
|
|
58
|
+
data_modeling_type: Literal["HYBRID", "DATA_MODELING_ONLY"] | None = None
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class LocationFilterRequest(LocationFilter, RequestResource):
|
|
62
|
+
"""Request resource for creating/updating location filters."""
|
|
63
|
+
|
|
64
|
+
def as_id(self) -> ExternalId:
|
|
65
|
+
return ExternalId(external_id=self.external_id)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class LocationFilterResponse(LocationFilter, ResponseResource[LocationFilterRequest]):
|
|
69
|
+
"""Response resource for location filters."""
|
|
70
|
+
|
|
71
|
+
id: int
|
|
72
|
+
created_time: int
|
|
73
|
+
updated_time: int
|
|
74
|
+
locations: list["LocationFilterResponse"] | None = None
|
|
75
|
+
|
|
76
|
+
def as_request_resource(self) -> LocationFilterRequest:
|
|
77
|
+
return LocationFilterRequest.model_validate(self.dump(), extra="ignore")
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
from typing import Literal
|
|
2
|
+
|
|
3
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.base import BaseModelObject, RequestResource, ResponseResource
|
|
4
|
+
|
|
5
|
+
from .identifiers import ExternalId
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class LabelRef(BaseModelObject):
|
|
9
|
+
"""Reference to a label."""
|
|
10
|
+
|
|
11
|
+
external_id: str
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class Relationship(BaseModelObject):
|
|
15
|
+
"""Base class for relationship with common fields."""
|
|
16
|
+
|
|
17
|
+
external_id: str
|
|
18
|
+
source_external_id: str
|
|
19
|
+
source_type: Literal["asset", "timeSeries", "file", "event", "sequence"]
|
|
20
|
+
target_external_id: str
|
|
21
|
+
target_type: Literal["asset", "timeSeries", "file", "event", "sequence"]
|
|
22
|
+
start_time: int | None = None
|
|
23
|
+
end_time: int | None = None
|
|
24
|
+
confidence: float | None = None
|
|
25
|
+
data_set_id: int | None = None
|
|
26
|
+
labels: list[LabelRef] | None = None
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class RelationshipRequest(Relationship, RequestResource):
|
|
30
|
+
"""Request resource for creating/updating relationships."""
|
|
31
|
+
|
|
32
|
+
def as_id(self) -> ExternalId:
|
|
33
|
+
return ExternalId(external_id=self.external_id)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class RelationshipResponse(Relationship, ResponseResource[RelationshipRequest]):
|
|
37
|
+
"""Response resource for relationships."""
|
|
38
|
+
|
|
39
|
+
created_time: int
|
|
40
|
+
last_updated_time: int
|
|
41
|
+
|
|
42
|
+
def as_request_resource(self) -> RelationshipRequest:
|
|
43
|
+
return RelationshipRequest.model_validate(self.dump(), extra="ignore")
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from ._capability import RobotCapability, RobotCapabilityRequest, RobotCapabilityResponse
|
|
2
|
+
from ._common import MapType, Point3D, Quaternion, RobotType, Transform
|
|
3
|
+
from ._data_post_processing import (
|
|
4
|
+
RobotDataPostProcessing,
|
|
5
|
+
RobotDataPostProcessingRequest,
|
|
6
|
+
RobotDataPostProcessingResponse,
|
|
7
|
+
)
|
|
8
|
+
from ._frame import RobotFrame, RobotFrameRequest, RobotFrameResponse
|
|
9
|
+
from ._location import RobotLocation, RobotLocationRequest, RobotLocationResponse
|
|
10
|
+
from ._map import RobotMap, RobotMapRequest, RobotMapResponse
|
|
11
|
+
from ._robot import Robot, RobotRequest, RobotResponse
|
|
12
|
+
|
|
13
|
+
__all__ = [
|
|
14
|
+
"MapType",
|
|
15
|
+
"Point3D",
|
|
16
|
+
"Quaternion",
|
|
17
|
+
"Robot",
|
|
18
|
+
"RobotCapability",
|
|
19
|
+
"RobotCapabilityRequest",
|
|
20
|
+
"RobotCapabilityResponse",
|
|
21
|
+
"RobotDataPostProcessing",
|
|
22
|
+
"RobotDataPostProcessingRequest",
|
|
23
|
+
"RobotDataPostProcessingResponse",
|
|
24
|
+
"RobotFrame",
|
|
25
|
+
"RobotFrameRequest",
|
|
26
|
+
"RobotFrameResponse",
|
|
27
|
+
"RobotLocation",
|
|
28
|
+
"RobotLocationRequest",
|
|
29
|
+
"RobotLocationResponse",
|
|
30
|
+
"RobotMap",
|
|
31
|
+
"RobotMapRequest",
|
|
32
|
+
"RobotMapResponse",
|
|
33
|
+
"RobotRequest",
|
|
34
|
+
"RobotResponse",
|
|
35
|
+
"RobotType",
|
|
36
|
+
"Transform",
|
|
37
|
+
]
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
from typing import ClassVar
|
|
2
|
+
|
|
3
|
+
from pydantic import JsonValue
|
|
4
|
+
|
|
5
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.base import (
|
|
6
|
+
BaseModelObject,
|
|
7
|
+
RequestUpdateable,
|
|
8
|
+
ResponseResource,
|
|
9
|
+
)
|
|
10
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.identifiers import ExternalId
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class RobotCapability(BaseModelObject):
|
|
14
|
+
"""Robot capabilities define what actions that robots can execute, including data capture (PTZ, PTZ-IR, 360)
|
|
15
|
+
and behaviors (e.g., docking).
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
name: RobotCapability name.
|
|
19
|
+
external_id: RobotCapability external id. Must be unique for the resource type.
|
|
20
|
+
method: RobotCapability method. The method is used to call the right functionality on the robot.
|
|
21
|
+
input_schema: Schema that defines what inputs are needed for the action.
|
|
22
|
+
The input are values that configure the action, e.g pan, tilt and zoom values.
|
|
23
|
+
data_handling_schema: Schema that defines how the data from a RobotCapability should be handled,
|
|
24
|
+
including upload instructions.
|
|
25
|
+
description: Description of RobotCapability. Textual description of the RobotCapability.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
external_id: str
|
|
29
|
+
name: str
|
|
30
|
+
method: str
|
|
31
|
+
description: str | None = None
|
|
32
|
+
|
|
33
|
+
def as_id(self) -> ExternalId:
|
|
34
|
+
return ExternalId(external_id=self.external_id)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class RobotCapabilityRequest(RobotCapability, RequestUpdateable):
|
|
38
|
+
"""Request resource for creating or updating a RobotCapability."""
|
|
39
|
+
|
|
40
|
+
non_nullable_fields: ClassVar[frozenset[str]] = frozenset({"input_schema", "data_handling_schema"})
|
|
41
|
+
input_schema: dict[str, JsonValue] | None = None
|
|
42
|
+
data_handling_schema: dict[str, JsonValue] | None = None
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class RobotCapabilityResponse(RobotCapability, ResponseResource[RobotCapabilityRequest]):
|
|
46
|
+
"""Response resource for a RobotCapability."""
|
|
47
|
+
|
|
48
|
+
# The response always has input_schema and data_handling_schema
|
|
49
|
+
input_schema: dict[str, JsonValue]
|
|
50
|
+
data_handling_schema: dict[str, JsonValue]
|
|
51
|
+
|
|
52
|
+
def as_request_resource(self) -> RobotCapabilityRequest:
|
|
53
|
+
return RobotCapabilityRequest.model_validate(self.dump(), extra="ignore")
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from typing import Literal
|
|
2
|
+
|
|
3
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.base import BaseModelObject
|
|
4
|
+
|
|
5
|
+
RobotType = Literal["SPOT", "ANYMAL", "DJI_DRONE", "TAUROB", "UNKNOWN"]
|
|
6
|
+
MapType = Literal["WAYPOINTMAP", "THREEDMODEL", "TWODMAP", "POINTCLOUD"]
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class Point3D(BaseModelObject):
|
|
10
|
+
"""A point in 3D space."""
|
|
11
|
+
|
|
12
|
+
x: float
|
|
13
|
+
y: float
|
|
14
|
+
z: float
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Quaternion(Point3D):
|
|
18
|
+
"""A quaternion representing orientation."""
|
|
19
|
+
|
|
20
|
+
w: float
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Transform(BaseModelObject):
|
|
24
|
+
"""Transform of the parent frame to the current frame.
|
|
25
|
+
|
|
26
|
+
Args:
|
|
27
|
+
parent_frame_external_id: The external id of the parent frame.
|
|
28
|
+
translation: Transform translation (Point3D).
|
|
29
|
+
orientation: Transform orientation as quaternion (Quaternion).
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
parent_frame_external_id: str
|
|
33
|
+
translation: Point3D
|
|
34
|
+
orientation: Quaternion
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
from typing import ClassVar
|
|
2
|
+
|
|
3
|
+
from pydantic import JsonValue
|
|
4
|
+
|
|
5
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.base import (
|
|
6
|
+
BaseModelObject,
|
|
7
|
+
RequestUpdateable,
|
|
8
|
+
ResponseResource,
|
|
9
|
+
)
|
|
10
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.identifiers import ExternalId
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class RobotDataPostProcessing(BaseModelObject):
|
|
14
|
+
"""DataPostprocessing define types of data processing on data captured by the robot.
|
|
15
|
+
DataPostprocessing enables you to automatically process data captured by the robot.
|
|
16
|
+
|
|
17
|
+
Args:
|
|
18
|
+
name: DataPostProcessing name.
|
|
19
|
+
external_id: DataPostProcessing external id. Must be unique for the resource type.
|
|
20
|
+
method: DataPostProcessing method. The method is used to call the right functionality on the robot.
|
|
21
|
+
input_schema: Schema that defines what inputs are needed for the data postprocessing.
|
|
22
|
+
The input are values that configure the data postprocessing, e.g max and min values for a gauge.
|
|
23
|
+
description: Description of DataPostProcessing. Textual description of the DataPostProcessing.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
external_id: str
|
|
27
|
+
name: str
|
|
28
|
+
method: str
|
|
29
|
+
description: str | None = None
|
|
30
|
+
|
|
31
|
+
def as_id(self) -> ExternalId:
|
|
32
|
+
return ExternalId(external_id=self.external_id)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class RobotDataPostProcessingRequest(RobotDataPostProcessing, RequestUpdateable):
|
|
36
|
+
"""Request resource for creating or updating a DataPostProcessing."""
|
|
37
|
+
|
|
38
|
+
non_nullable_fields: ClassVar[frozenset[str]] = frozenset({"input_schema"})
|
|
39
|
+
input_schema: dict[str, JsonValue] | None = None
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class RobotDataPostProcessingResponse(RobotDataPostProcessing, ResponseResource[RobotDataPostProcessingRequest]):
|
|
43
|
+
"""Response resource for a DataPostProcessing."""
|
|
44
|
+
|
|
45
|
+
# The response always has input_schema
|
|
46
|
+
input_schema: dict[str, JsonValue]
|
|
47
|
+
|
|
48
|
+
def as_request_resource(self) -> RobotDataPostProcessingRequest:
|
|
49
|
+
return RobotDataPostProcessingRequest.model_validate(self.dump(), extra="ignore")
|