cognite-toolkit 0.7.39__py3-none-any.whl → 0.7.51__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/apps/_migrate_app.py +6 -6
- cognite_toolkit/_cdf_tk/builders/_function.py +81 -9
- cognite_toolkit/_cdf_tk/builders/_raw.py +1 -1
- cognite_toolkit/_cdf_tk/client/_resource_base.py +187 -0
- cognite_toolkit/_cdf_tk/client/_toolkit_client.py +37 -5
- cognite_toolkit/_cdf_tk/client/api/agents.py +107 -0
- cognite_toolkit/_cdf_tk/client/api/annotations.py +129 -0
- cognite_toolkit/_cdf_tk/client/api/assets.py +130 -0
- cognite_toolkit/_cdf_tk/client/api/containers.py +132 -0
- cognite_toolkit/_cdf_tk/client/api/data_models.py +137 -0
- cognite_toolkit/_cdf_tk/client/api/datasets.py +141 -0
- cognite_toolkit/_cdf_tk/client/api/events.py +129 -0
- cognite_toolkit/_cdf_tk/client/api/extraction_pipelines.py +148 -0
- cognite_toolkit/_cdf_tk/client/api/filemetadata.py +176 -0
- cognite_toolkit/_cdf_tk/client/api/function_schedules.py +115 -0
- cognite_toolkit/_cdf_tk/client/api/functions.py +113 -0
- cognite_toolkit/_cdf_tk/client/api/graphql_data_models.py +167 -0
- cognite_toolkit/_cdf_tk/client/api/groups.py +121 -0
- 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 +8 -8
- cognite_toolkit/_cdf_tk/client/api/instances.py +139 -0
- cognite_toolkit/_cdf_tk/client/api/labels.py +125 -0
- cognite_toolkit/_cdf_tk/client/api/legacy/canvas.py +3 -3
- 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_functions.py +1 -1
- 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/location_filters.py +177 -0
- cognite_toolkit/_cdf_tk/client/api/migration.py +1 -1
- cognite_toolkit/_cdf_tk/client/api/project.py +2 -2
- cognite_toolkit/_cdf_tk/client/api/raw.py +204 -0
- cognite_toolkit/_cdf_tk/client/api/relationships.py +133 -0
- cognite_toolkit/_cdf_tk/client/api/robotics.py +19 -0
- cognite_toolkit/_cdf_tk/client/api/robotics_capabilities.py +127 -0
- cognite_toolkit/_cdf_tk/client/api/robotics_data_postprocessing.py +138 -0
- cognite_toolkit/_cdf_tk/client/api/robotics_frames.py +122 -0
- cognite_toolkit/_cdf_tk/client/api/robotics_locations.py +127 -0
- cognite_toolkit/_cdf_tk/client/api/robotics_maps.py +122 -0
- cognite_toolkit/_cdf_tk/client/api/robotics_robots.py +122 -0
- cognite_toolkit/_cdf_tk/client/api/search_config.py +101 -0
- 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 +154 -0
- cognite_toolkit/_cdf_tk/client/api/simulators.py +8 -0
- cognite_toolkit/_cdf_tk/client/api/spaces.py +117 -0
- cognite_toolkit/_cdf_tk/client/api/streams.py +65 -57
- cognite_toolkit/_cdf_tk/client/api/three_d.py +300 -283
- cognite_toolkit/_cdf_tk/client/api/timeseries.py +137 -0
- 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/views.py +139 -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/__init__.py +10 -0
- cognite_toolkit/_cdf_tk/client/cdf_client/api.py +358 -0
- cognite_toolkit/_cdf_tk/client/cdf_client/responses.py +38 -0
- cognite_toolkit/_cdf_tk/{utils → client}/http_client/__init__.py +9 -7
- cognite_toolkit/_cdf_tk/{utils → client}/http_client/_client.py +23 -14
- cognite_toolkit/_cdf_tk/{utils → client}/http_client/_data_classes.py +12 -2
- cognite_toolkit/_cdf_tk/client/http_client/_data_classes2.py +151 -0
- cognite_toolkit/_cdf_tk/client/http_client/_exception.py +13 -0
- cognite_toolkit/_cdf_tk/client/http_client/_item_classes.py +118 -0
- cognite_toolkit/_cdf_tk/client/request_classes/base.py +19 -0
- cognite_toolkit/_cdf_tk/client/request_classes/filters.py +113 -0
- cognite_toolkit/_cdf_tk/client/request_classes/graphql.py +28 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/agent.py +130 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/annotation.py +79 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/apm_config.py +128 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/asset.py +47 -0
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/charts_data.py +1 -1
- cognite_toolkit/_cdf_tk/client/resource_classes/cognite_file.py +53 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/data_modeling/__init__.py +168 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/data_modeling/_constraints.py +37 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/data_modeling/_container.py +50 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/data_modeling/_data_model.py +73 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/data_modeling/_data_types.py +116 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/data_modeling/_indexes.py +26 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/data_modeling/_instance.py +154 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/data_modeling/_references.py +86 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/data_modeling/_space.py +26 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/data_modeling/_view.py +143 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/data_modeling/_view_property.py +152 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/dataset.py +35 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/event.py +40 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/extraction_pipeline.py +59 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/filemetadata.py +52 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/function.py +53 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/function_schedule.py +65 -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 +63 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/group/scopes.py +166 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/hosted_extractor_destination.py +34 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/hosted_extractor_job.py +134 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/hosted_extractor_mapping.py +72 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/hosted_extractor_source/__init__.py +63 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/hosted_extractor_source/_auth.py +63 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/hosted_extractor_source/_base.py +26 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/hosted_extractor_source/_certificate.py +20 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/hosted_extractor_source/_eventhub.py +31 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/hosted_extractor_source/_kafka.py +53 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/hosted_extractor_source/_mqtt.py +36 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/hosted_extractor_source/_rest.py +49 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/identifiers.py +59 -0
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/infield.py +1 -1
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/instance_api.py +35 -1
- cognite_toolkit/_cdf_tk/client/resource_classes/label.py +27 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/legacy/__init__.py +0 -0
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/legacy/canvas.py +48 -15
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/legacy/charts.py +1 -1
- cognite_toolkit/_cdf_tk/client/resource_classes/location_filter.py +84 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/raw.py +44 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/relationship.py +49 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/resource_view_mapping.py +38 -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 +65 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/robotics/_robot.py +58 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/search_config.py +54 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/securitycategory.py +24 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/sequence.py +45 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/sequence_rows.py +56 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/simulator_model.py +50 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/streamlit_.py +71 -0
- cognite_toolkit/_cdf_tk/client/{data_classes → resource_classes}/streams.py +9 -26
- cognite_toolkit/_cdf_tk/client/resource_classes/three_d.py +135 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/timeseries.py +52 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/transformation.py +140 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/workflow.py +27 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/workflow_trigger.py +63 -0
- cognite_toolkit/_cdf_tk/client/resource_classes/workflow_version.py +155 -0
- cognite_toolkit/_cdf_tk/client/testing.py +31 -2
- cognite_toolkit/_cdf_tk/commands/_migrate/command.py +103 -108
- cognite_toolkit/_cdf_tk/commands/_migrate/conversion.py +22 -15
- cognite_toolkit/_cdf_tk/commands/_migrate/creators.py +1 -1
- cognite_toolkit/_cdf_tk/commands/_migrate/data_classes.py +11 -10
- cognite_toolkit/_cdf_tk/commands/_migrate/data_mapper.py +148 -57
- cognite_toolkit/_cdf_tk/commands/_migrate/default_mappings.py +1 -1
- cognite_toolkit/_cdf_tk/commands/_migrate/issues.py +22 -39
- cognite_toolkit/_cdf_tk/commands/_migrate/migration_io.py +29 -27
- cognite_toolkit/_cdf_tk/commands/_profile.py +1 -1
- cognite_toolkit/_cdf_tk/commands/_purge.py +8 -8
- cognite_toolkit/_cdf_tk/commands/_upload.py +1 -1
- cognite_toolkit/_cdf_tk/commands/build_cmd.py +12 -2
- cognite_toolkit/_cdf_tk/commands/build_v2/_module_parser.py +138 -0
- cognite_toolkit/_cdf_tk/commands/build_v2/_modules_parser.py +163 -0
- cognite_toolkit/_cdf_tk/commands/build_v2/build_cmd.py +83 -96
- cognite_toolkit/_cdf_tk/commands/build_v2/{build_input.py → build_parameters.py} +8 -22
- cognite_toolkit/_cdf_tk/commands/build_v2/data_classes/_modules.py +27 -0
- cognite_toolkit/_cdf_tk/commands/build_v2/data_classes/_resource.py +22 -0
- cognite_toolkit/_cdf_tk/commands/dump_resource.py +4 -4
- cognite_toolkit/_cdf_tk/commands/pull.py +97 -2
- cognite_toolkit/_cdf_tk/commands/run.py +1 -1
- cognite_toolkit/_cdf_tk/cruds/__init__.py +16 -6
- cognite_toolkit/_cdf_tk/cruds/_data_cruds.py +9 -5
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/__init__.py +2 -0
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/auth.py +6 -2
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/classic.py +70 -89
- 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 +14 -7
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/file.py +50 -59
- 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 +4 -3
- 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 +5 -4
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/robotics.py +1 -1
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/simulators.py +122 -0
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/streams.py +15 -31
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/timeseries.py +42 -47
- cognite_toolkit/_cdf_tk/cruds/_resource_cruds/transformation.py +1 -1
- cognite_toolkit/_cdf_tk/data_classes/__init__.py +3 -0
- cognite_toolkit/_cdf_tk/data_classes/_issues.py +36 -0
- cognite_toolkit/_cdf_tk/data_classes/_module_directories.py +2 -1
- cognite_toolkit/_cdf_tk/data_classes/_tracking_info.py +4 -0
- cognite_toolkit/_cdf_tk/feature_flags.py +8 -0
- cognite_toolkit/_cdf_tk/resource_classes/__init__.py +2 -0
- 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/resource_classes/simulator_model.py +17 -0
- cognite_toolkit/_cdf_tk/resource_classes/workflow_version.py +13 -4
- cognite_toolkit/_cdf_tk/storageio/_applications.py +53 -15
- cognite_toolkit/_cdf_tk/storageio/_asset_centric.py +117 -107
- cognite_toolkit/_cdf_tk/storageio/_base.py +3 -1
- cognite_toolkit/_cdf_tk/storageio/_datapoints.py +7 -7
- cognite_toolkit/_cdf_tk/storageio/_file_content.py +64 -54
- cognite_toolkit/_cdf_tk/storageio/_instances.py +1 -1
- cognite_toolkit/_cdf_tk/storageio/_raw.py +1 -1
- cognite_toolkit/_cdf_tk/storageio/logger.py +162 -0
- cognite_toolkit/_cdf_tk/tk_warnings/__init__.py +2 -0
- cognite_toolkit/_cdf_tk/tk_warnings/fileread.py +20 -0
- cognite_toolkit/_cdf_tk/utils/__init__.py +11 -1
- cognite_toolkit/_cdf_tk/utils/cdf.py +1 -1
- cognite_toolkit/_cdf_tk/utils/interactive_select.py +8 -6
- cognite_toolkit/_cdf_tk/utils/modules.py +7 -0
- cognite_toolkit/_cdf_tk/utils/pip_validator.py +96 -0
- cognite_toolkit/_cdf_tk/utils/useful_types.py +4 -7
- cognite_toolkit/_cdf_tk/utils/useful_types2.py +14 -0
- 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.39.dist-info → cognite_toolkit-0.7.51.dist-info}/METADATA +13 -3
- cognite_toolkit-0.7.51.dist-info/RECORD +445 -0
- {cognite_toolkit-0.7.39.dist-info → cognite_toolkit-0.7.51.dist-info}/WHEEL +2 -2
- cognite_toolkit/_cdf_tk/client/data_classes/api_classes.py +0 -30
- cognite_toolkit/_cdf_tk/client/data_classes/base.py +0 -67
- cognite_toolkit/_cdf_tk/client/data_classes/three_d.py +0 -112
- cognite_toolkit/_cdf_tk/commands/build_v2/build_issues.py +0 -27
- cognite_toolkit/_cdf_tk/utils/http_client/_data_classes2.py +0 -247
- cognite_toolkit/_cdf_tk/utils/http_client/_exception.py +0 -4
- cognite_toolkit-0.7.39.dist-info/RECORD +0 -322
- /cognite_toolkit/_cdf_tk/{utils → client}/http_client/_tracker.py +0 -0
- /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}/capabilities.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-0.7.39.dist-info → cognite_toolkit-0.7.51.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
from abc import ABC
|
|
2
|
+
from typing import Annotated, Any, Literal
|
|
3
|
+
|
|
4
|
+
from pydantic import Field, JsonValue, TypeAdapter, field_serializer
|
|
5
|
+
from pydantic_core.core_schema import FieldSerializationInfo
|
|
6
|
+
|
|
7
|
+
from cognite_toolkit._cdf_tk.client._resource_base import BaseModelObject
|
|
8
|
+
|
|
9
|
+
from ._data_types import DataType
|
|
10
|
+
from ._references import ContainerDirectReference, ContainerReference, NodeReference, ViewDirectReference, ViewReference
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ViewPropertyDefinition(BaseModelObject, ABC):
|
|
14
|
+
connection_type: str
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ViewCoreProperty(ViewPropertyDefinition, ABC):
|
|
18
|
+
# Core properties do not have connection type in the API, but we add it here such that
|
|
19
|
+
# we can use it as a discriminator in unions. The exclude=True ensures that it is not
|
|
20
|
+
# sent to the API.
|
|
21
|
+
connection_type: Literal["primary_property"] = Field(default="primary_property", exclude=True)
|
|
22
|
+
name: str | None = None
|
|
23
|
+
description: str | None = None
|
|
24
|
+
container: ContainerReference
|
|
25
|
+
container_property_identifier: str
|
|
26
|
+
|
|
27
|
+
@field_serializer("container", mode="plain")
|
|
28
|
+
@classmethod
|
|
29
|
+
def serialize_container(cls, container: ContainerReference, info: FieldSerializationInfo) -> dict[str, Any]:
|
|
30
|
+
return {**container.model_dump(**vars(info)), "type": "container"}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class ViewCorePropertyRequest(ViewCoreProperty):
|
|
34
|
+
source: ViewReference | None = None
|
|
35
|
+
|
|
36
|
+
@field_serializer("source", mode="plain")
|
|
37
|
+
@classmethod
|
|
38
|
+
def serialize_source(cls, source: ViewReference | None, info: FieldSerializationInfo) -> dict[str, Any] | None:
|
|
39
|
+
if source is None:
|
|
40
|
+
return None
|
|
41
|
+
return {**source.model_dump(**vars(info)), "type": "view"}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class ConstraintOrIndexState(BaseModelObject):
|
|
45
|
+
nullability: Literal["current", "pending", "failed"] | None = None
|
|
46
|
+
max_list_size: Literal["current", "pending", "failed"] | None = None
|
|
47
|
+
max_text_size: Literal["current", "pending", "failed"] | None = None
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class ViewCorePropertyResponse(ViewCoreProperty):
|
|
51
|
+
immutable: bool | None = None
|
|
52
|
+
nullable: bool | None = None
|
|
53
|
+
auto_increment: bool | None = None
|
|
54
|
+
default_value: str | int | bool | dict[str, JsonValue] | None = None
|
|
55
|
+
constraint_state: ConstraintOrIndexState
|
|
56
|
+
type: DataType
|
|
57
|
+
|
|
58
|
+
def as_request(self) -> ViewCorePropertyRequest:
|
|
59
|
+
return ViewCorePropertyRequest.model_validate(self.model_dump(by_alias=True))
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
class ConnectionPropertyDefinition(ViewPropertyDefinition, ABC):
|
|
63
|
+
name: str | None = None
|
|
64
|
+
description: str | None = None
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class EdgeProperty(ConnectionPropertyDefinition, ABC):
|
|
68
|
+
source: ViewReference
|
|
69
|
+
type: NodeReference
|
|
70
|
+
edge_source: ViewReference | None = None
|
|
71
|
+
direction: Literal["outwards", "inwards"] = "outwards"
|
|
72
|
+
|
|
73
|
+
@field_serializer("source", "edge_source", mode="plain")
|
|
74
|
+
@classmethod
|
|
75
|
+
def serialize_source(cls, source: ViewReference | None, info: FieldSerializationInfo) -> dict[str, Any] | None:
|
|
76
|
+
if source is None:
|
|
77
|
+
return None
|
|
78
|
+
return {**source.model_dump(**vars(info)), "type": "view"}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class SingleEdgeProperty(EdgeProperty):
|
|
82
|
+
connection_type: Literal["single_edge_connection"] = "single_edge_connection"
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
class MultiEdgeProperty(EdgeProperty):
|
|
86
|
+
connection_type: Literal["multi_edge_connection"] = "multi_edge_connection"
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class ReverseDirectRelationProperty(ConnectionPropertyDefinition, ABC):
|
|
90
|
+
source: ViewReference
|
|
91
|
+
through: ContainerDirectReference | ViewDirectReference
|
|
92
|
+
|
|
93
|
+
@field_serializer("source", mode="plain")
|
|
94
|
+
@classmethod
|
|
95
|
+
def serialize_source(cls, source: ViewReference, info: FieldSerializationInfo) -> dict[str, Any]:
|
|
96
|
+
return {**source.model_dump(**vars(info)), "type": "view"}
|
|
97
|
+
|
|
98
|
+
@field_serializer("through", mode="plain")
|
|
99
|
+
@classmethod
|
|
100
|
+
def serialize_through(
|
|
101
|
+
cls, through: ContainerDirectReference | ViewDirectReference, info: FieldSerializationInfo
|
|
102
|
+
) -> dict[str, Any]:
|
|
103
|
+
output = through.model_dump(**vars(info))
|
|
104
|
+
if isinstance(through, ContainerDirectReference):
|
|
105
|
+
output["source"]["type"] = "container"
|
|
106
|
+
else:
|
|
107
|
+
output["source"]["type"] = "view"
|
|
108
|
+
return output
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
class SingleReverseDirectRelationPropertyRequest(ReverseDirectRelationProperty):
|
|
112
|
+
connection_type: Literal["single_reverse_direct_relation"] = "single_reverse_direct_relation"
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
class MultiReverseDirectRelationPropertyRequest(ReverseDirectRelationProperty):
|
|
116
|
+
connection_type: Literal["multi_reverse_direct_relation"] = "multi_reverse_direct_relation"
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
class SingleReverseDirectRelationPropertyResponse(ReverseDirectRelationProperty):
|
|
120
|
+
connection_type: Literal["single_reverse_direct_relation"] = "single_reverse_direct_relation"
|
|
121
|
+
targets_list: bool
|
|
122
|
+
|
|
123
|
+
def as_request(self) -> SingleReverseDirectRelationPropertyRequest:
|
|
124
|
+
return SingleReverseDirectRelationPropertyRequest.model_validate(self.model_dump(by_alias=True))
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
class MultiReverseDirectRelationPropertyResponse(ReverseDirectRelationProperty):
|
|
128
|
+
connection_type: Literal["multi_reverse_direct_relation"] = "multi_reverse_direct_relation"
|
|
129
|
+
targets_list: bool
|
|
130
|
+
|
|
131
|
+
def as_request(self) -> MultiReverseDirectRelationPropertyRequest:
|
|
132
|
+
return MultiReverseDirectRelationPropertyRequest.model_validate(self.model_dump(by_alias=True))
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
ViewRequestProperty = Annotated[
|
|
136
|
+
SingleEdgeProperty
|
|
137
|
+
| MultiEdgeProperty
|
|
138
|
+
| SingleReverseDirectRelationPropertyRequest
|
|
139
|
+
| MultiReverseDirectRelationPropertyRequest
|
|
140
|
+
| ViewCorePropertyRequest,
|
|
141
|
+
Field(discriminator="connection_type"),
|
|
142
|
+
]
|
|
143
|
+
ViewResponseProperty = Annotated[
|
|
144
|
+
SingleEdgeProperty
|
|
145
|
+
| MultiEdgeProperty
|
|
146
|
+
| SingleReverseDirectRelationPropertyResponse
|
|
147
|
+
| MultiReverseDirectRelationPropertyResponse
|
|
148
|
+
| ViewCorePropertyResponse,
|
|
149
|
+
Field(discriminator="connection_type"),
|
|
150
|
+
]
|
|
151
|
+
|
|
152
|
+
ViewRequestPropertyAdapter: TypeAdapter[ViewRequestProperty] = TypeAdapter(ViewRequestProperty)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from typing import ClassVar
|
|
2
|
+
|
|
3
|
+
from cognite_toolkit._cdf_tk.client._resource_base import (
|
|
4
|
+
BaseModelObject,
|
|
5
|
+
ResponseResource,
|
|
6
|
+
UpdatableRequestResource,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
from .identifiers import ExternalId
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class DataSet(BaseModelObject):
|
|
13
|
+
external_id: str | None = None
|
|
14
|
+
name: str | None = None
|
|
15
|
+
description: str | None = None
|
|
16
|
+
metadata: dict[str, str] | None = None
|
|
17
|
+
write_protected: bool = False
|
|
18
|
+
|
|
19
|
+
def as_id(self) -> ExternalId:
|
|
20
|
+
if self.external_id is None:
|
|
21
|
+
raise ValueError("Cannot convert DataSet to ExternalId when external_id is None")
|
|
22
|
+
return ExternalId(external_id=self.external_id)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class DataSetRequest(DataSet, UpdatableRequestResource):
|
|
26
|
+
container_fields: ClassVar[frozenset[str]] = frozenset({"metadata"})
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class DataSetResponse(DataSet, ResponseResource[DataSetRequest]):
|
|
30
|
+
id: int
|
|
31
|
+
created_time: int
|
|
32
|
+
last_updated_time: int
|
|
33
|
+
|
|
34
|
+
def as_request_resource(self) -> DataSetRequest:
|
|
35
|
+
return DataSetRequest.model_validate(self.dump(), extra="ignore")
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from typing import ClassVar
|
|
2
|
+
|
|
3
|
+
from cognite_toolkit._cdf_tk.client._resource_base import (
|
|
4
|
+
BaseModelObject,
|
|
5
|
+
ResponseResource,
|
|
6
|
+
UpdatableRequestResource,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
from .identifiers import ExternalId, InternalOrExternalId
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Event(BaseModelObject):
|
|
13
|
+
external_id: str | None = None
|
|
14
|
+
data_set_id: int | None = None
|
|
15
|
+
start_time: int | None = None
|
|
16
|
+
end_time: int | None = None
|
|
17
|
+
type: str | None = None
|
|
18
|
+
subtype: str | None = None
|
|
19
|
+
description: str | None = None
|
|
20
|
+
metadata: dict[str, str] | None = None
|
|
21
|
+
asset_ids: list[int] | None = None
|
|
22
|
+
source: str | None = None
|
|
23
|
+
|
|
24
|
+
def as_id(self) -> InternalOrExternalId:
|
|
25
|
+
if self.external_id is None:
|
|
26
|
+
raise ValueError("Cannot convert EventRequest to ExternalId when external_id is None")
|
|
27
|
+
return ExternalId(external_id=self.external_id)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class EventRequest(Event, UpdatableRequestResource):
|
|
31
|
+
container_fields: ClassVar[frozenset[str]] = frozenset({"metadata", "asset_ids"})
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class EventResponse(Event, ResponseResource[EventRequest]):
|
|
35
|
+
id: int
|
|
36
|
+
created_time: int
|
|
37
|
+
last_updated_time: int
|
|
38
|
+
|
|
39
|
+
def as_request_resource(self) -> EventRequest:
|
|
40
|
+
return EventRequest.model_validate(self.dump(), extra="ignore")
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
from typing import ClassVar
|
|
2
|
+
|
|
3
|
+
from cognite_toolkit._cdf_tk.client._resource_base import (
|
|
4
|
+
BaseModelObject,
|
|
5
|
+
ResponseResource,
|
|
6
|
+
UpdatableRequestResource,
|
|
7
|
+
)
|
|
8
|
+
|
|
9
|
+
from .identifiers import ExternalId
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class RawTable(BaseModelObject):
|
|
13
|
+
db_name: str
|
|
14
|
+
table_name: str
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Contact(BaseModelObject):
|
|
18
|
+
name: str | None = None
|
|
19
|
+
email: str | None = None
|
|
20
|
+
role: str | None = None
|
|
21
|
+
send_notification: bool | None = None
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class NotificationConfig(BaseModelObject):
|
|
25
|
+
allowed_not_seen_range_in_minutes: int | None = None
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class ExtractionPipeline(BaseModelObject):
|
|
29
|
+
external_id: str
|
|
30
|
+
name: str
|
|
31
|
+
description: str | None = None
|
|
32
|
+
data_set_id: int
|
|
33
|
+
raw_tables: list[RawTable] | None = None
|
|
34
|
+
schedule: str | None = None
|
|
35
|
+
contacts: list[Contact] | None = None
|
|
36
|
+
metadata: dict[str, str] | None = None
|
|
37
|
+
source: str | None = None
|
|
38
|
+
documentation: str | None = None
|
|
39
|
+
notification_config: NotificationConfig | None = None
|
|
40
|
+
created_by: str | None = None
|
|
41
|
+
|
|
42
|
+
def as_id(self) -> ExternalId:
|
|
43
|
+
return ExternalId(external_id=self.external_id)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class ExtractionPipelineRequest(ExtractionPipeline, UpdatableRequestResource):
|
|
47
|
+
container_fields: ClassVar[frozenset[str]] = frozenset({"raw_tables", "contacts", "metadata"})
|
|
48
|
+
non_nullable_fields: ClassVar[frozenset[str]] = frozenset(
|
|
49
|
+
{"documentation", "source", "notification_config", "schedule", "description"}
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class ExtractionPipelineResponse(ExtractionPipeline, ResponseResource[ExtractionPipelineRequest]):
|
|
54
|
+
id: int
|
|
55
|
+
created_time: int
|
|
56
|
+
last_updated_time: int
|
|
57
|
+
|
|
58
|
+
def as_request_resource(self) -> ExtractionPipelineRequest:
|
|
59
|
+
return ExtractionPipelineRequest.model_validate(self.dump(), extra="ignore")
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
from typing import ClassVar, Literal
|
|
2
|
+
|
|
3
|
+
from pydantic import Field, JsonValue
|
|
4
|
+
|
|
5
|
+
from cognite_toolkit._cdf_tk.client._resource_base import BaseModelObject, ResponseResource, UpdatableRequestResource
|
|
6
|
+
|
|
7
|
+
from .identifiers import ExternalId
|
|
8
|
+
from .instance_api import NodeReference
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class FileMetadata(BaseModelObject):
|
|
12
|
+
external_id: str | None = None
|
|
13
|
+
name: str
|
|
14
|
+
directory: str | None = None
|
|
15
|
+
source: str | None = None
|
|
16
|
+
mime_type: str | None = None
|
|
17
|
+
metadata: dict[str, str] | None = None
|
|
18
|
+
asset_ids: list[int] | None = None
|
|
19
|
+
data_set_id: int | None = None
|
|
20
|
+
labels: list[dict[Literal["externalId"], str]] | None = None
|
|
21
|
+
geo_location: JsonValue | None = None
|
|
22
|
+
source_created_time: int | None = None
|
|
23
|
+
source_modified_time: int | None = None
|
|
24
|
+
security_categories: list[int] | None = None
|
|
25
|
+
|
|
26
|
+
def as_id(self) -> ExternalId:
|
|
27
|
+
if self.external_id is None:
|
|
28
|
+
raise ValueError("Cannot convert FileMetadataRequest to ExternalId when external_id is None")
|
|
29
|
+
return ExternalId(external_id=self.external_id)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class FileMetadataRequest(FileMetadata, UpdatableRequestResource):
|
|
33
|
+
container_fields: ClassVar[frozenset[str]] = frozenset({"metadata", "labels", "asset_ids", "security_categories"})
|
|
34
|
+
non_nullable_fields: ClassVar[frozenset[str]] = frozenset({"asset_ids", "security_categories"})
|
|
35
|
+
# This field is not part of the request when creating or updating a resource
|
|
36
|
+
# but we added it here for convenience so that it is available when converting
|
|
37
|
+
# from response to request.
|
|
38
|
+
instance_id: NodeReference | None = Field(default=None, exclude=True)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class FileMetadataResponse(FileMetadata, ResponseResource[FileMetadataRequest]):
|
|
42
|
+
created_time: int
|
|
43
|
+
last_updated_time: int
|
|
44
|
+
uploaded_time: int | None = None
|
|
45
|
+
uploaded: bool
|
|
46
|
+
id: int
|
|
47
|
+
instance_id: NodeReference | None = None
|
|
48
|
+
# This field is required in the upload endpoint response, but not in any other file metadata response
|
|
49
|
+
upload_url: str | None = None
|
|
50
|
+
|
|
51
|
+
def as_request_resource(self) -> FileMetadataRequest:
|
|
52
|
+
return FileMetadataRequest.model_validate(self.dump(), extra="ignore")
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
from typing import Literal, TypeAlias
|
|
2
|
+
|
|
3
|
+
from cognite_toolkit._cdf_tk.client._resource_base import BaseModelObject, RequestResource, ResponseResource
|
|
4
|
+
|
|
5
|
+
from .identifiers import ExternalId
|
|
6
|
+
|
|
7
|
+
FunctionStatus: TypeAlias = Literal["Queued", "Deploying", "Ready", "Failed"]
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class FunctionBase(BaseModelObject):
|
|
11
|
+
"""Base class for Function with common fields."""
|
|
12
|
+
|
|
13
|
+
external_id: str | None = None
|
|
14
|
+
name: str
|
|
15
|
+
file_id: int
|
|
16
|
+
description: str | None = None
|
|
17
|
+
owner: str | None = None
|
|
18
|
+
function_path: str | None = None
|
|
19
|
+
secrets: dict[str, str] | None = None
|
|
20
|
+
env_vars: dict[str, str] | None = None
|
|
21
|
+
cpu: float | None = None
|
|
22
|
+
memory: float | None = None
|
|
23
|
+
runtime: Literal["py310", "py311", "py312"] | None = None
|
|
24
|
+
runtime_version: str | None = None
|
|
25
|
+
metadata: dict[str, str] | None = None
|
|
26
|
+
index_url: str | None = None
|
|
27
|
+
extra_index_urls: list[str] | None = None
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class FunctionRequest(FunctionBase, RequestResource):
|
|
31
|
+
"""Request resource for creating/updating functions."""
|
|
32
|
+
|
|
33
|
+
def as_id(self) -> ExternalId:
|
|
34
|
+
if self.external_id is None:
|
|
35
|
+
raise ValueError("Cannot create ExternalId: external_id is None")
|
|
36
|
+
return ExternalId(external_id=self.external_id)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class FunctionAPIError(BaseModelObject):
|
|
40
|
+
code: int
|
|
41
|
+
message: str
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class FunctionResponse(FunctionBase, ResponseResource[FunctionRequest]):
|
|
45
|
+
"""Response resource for functions."""
|
|
46
|
+
|
|
47
|
+
id: int
|
|
48
|
+
created_time: int
|
|
49
|
+
status: FunctionStatus | None = None
|
|
50
|
+
error: FunctionAPIError | None = None
|
|
51
|
+
|
|
52
|
+
def as_request_resource(self) -> FunctionRequest:
|
|
53
|
+
return FunctionRequest.model_validate(self.dump(), extra="ignore")
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
from pydantic import Field, JsonValue
|
|
2
|
+
|
|
3
|
+
from cognite_toolkit._cdf_tk.client._resource_base import (
|
|
4
|
+
BaseModelObject,
|
|
5
|
+
Identifier,
|
|
6
|
+
RequestResource,
|
|
7
|
+
ResponseResource,
|
|
8
|
+
)
|
|
9
|
+
from cognite_toolkit._cdf_tk.client.resource_classes.identifiers import InternalId
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class FunctionScheduleId(Identifier):
|
|
13
|
+
"""Identifier for a function schedule."""
|
|
14
|
+
|
|
15
|
+
function_external_id: str
|
|
16
|
+
name: str
|
|
17
|
+
|
|
18
|
+
def __str__(self) -> str:
|
|
19
|
+
return f"functionExternalId='{self.function_external_id}', name='{self.name}'"
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class FunctionScheduleCredentials(BaseModelObject):
|
|
23
|
+
"""Credentials for function schedule authentication."""
|
|
24
|
+
|
|
25
|
+
client_id: str
|
|
26
|
+
client_secret: str
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class FunctionSchedule(BaseModelObject):
|
|
30
|
+
"""Base class for function schedule with common fields."""
|
|
31
|
+
|
|
32
|
+
name: str
|
|
33
|
+
cron_expression: str
|
|
34
|
+
description: str | None = None
|
|
35
|
+
data: dict[str, JsonValue] | None = None
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class FunctionScheduleRequest(FunctionSchedule, RequestResource):
|
|
39
|
+
"""Request resource for creating/updating function schedules."""
|
|
40
|
+
|
|
41
|
+
# The 'id' field is not part of the request when creating a new resource,
|
|
42
|
+
# but is needed when deleting an existing resource.
|
|
43
|
+
id: int | None = Field(default=None, exclude=True)
|
|
44
|
+
function_id: int
|
|
45
|
+
function_external_id: str | None = Field(None, exclude=True)
|
|
46
|
+
nonce: str
|
|
47
|
+
|
|
48
|
+
def as_id(self) -> InternalId:
|
|
49
|
+
if self.id is None:
|
|
50
|
+
raise ValueError("Cannot convert FunctionScheduleRequest to InternalId when id is None")
|
|
51
|
+
return InternalId(id=self.id)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class FunctionScheduleResponse(FunctionSchedule, ResponseResource[FunctionScheduleRequest]):
|
|
55
|
+
"""Response resource for function schedules."""
|
|
56
|
+
|
|
57
|
+
id: int
|
|
58
|
+
created_time: int
|
|
59
|
+
when: str
|
|
60
|
+
function_id: int | None = None
|
|
61
|
+
function_external_id: str | None = None
|
|
62
|
+
session_id: int | None = None
|
|
63
|
+
|
|
64
|
+
def as_request_resource(self) -> FunctionScheduleRequest:
|
|
65
|
+
raise NotImplementedError("Cannot convert to request resource as 'nonce' is missing.")
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
from cognite_toolkit._cdf_tk.client._resource_base import (
|
|
2
|
+
BaseModelObject,
|
|
3
|
+
RequestResource,
|
|
4
|
+
ResponseResource,
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
from .data_modeling import DataModelReference, ViewReference
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class GraphQLDataModel(BaseModelObject):
|
|
11
|
+
"""Base class for GraphQL data model with common fields."""
|
|
12
|
+
|
|
13
|
+
space: str
|
|
14
|
+
external_id: str
|
|
15
|
+
version: str
|
|
16
|
+
name: str | None = None
|
|
17
|
+
description: str | None = None
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class GraphQLDataModelRequest(GraphQLDataModel, RequestResource):
|
|
21
|
+
"""Request resource for creating/updating GraphQL data models."""
|
|
22
|
+
|
|
23
|
+
previous_version: str | None = None
|
|
24
|
+
dml: str | None = None
|
|
25
|
+
preserve_dml: bool | None = None
|
|
26
|
+
|
|
27
|
+
def as_id(self) -> DataModelReference:
|
|
28
|
+
return DataModelReference(space=self.space, external_id=self.external_id, version=self.version)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class GraphQLDataModelResponse(GraphQLDataModel, ResponseResource[GraphQLDataModelRequest]):
|
|
32
|
+
"""Response resource for GraphQL data models."""
|
|
33
|
+
|
|
34
|
+
is_global: bool
|
|
35
|
+
created_time: int
|
|
36
|
+
last_updated_time: int
|
|
37
|
+
views: list[ViewReference] | None = None
|
|
38
|
+
|
|
39
|
+
def as_request_resource(self) -> GraphQLDataModelRequest:
|
|
40
|
+
return GraphQLDataModelRequest.model_validate(self.dump(), extra="ignore")
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"""Group data classes for the Cognite API Groups endpoint.
|
|
2
|
+
|
|
3
|
+
Based on the API specification at:
|
|
4
|
+
https://api-docs.cognite.com/20230101/tag/Groups/operation/createGroups
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from .acls import (
|
|
8
|
+
Acl,
|
|
9
|
+
AgentsAcl,
|
|
10
|
+
AnalyticsAcl,
|
|
11
|
+
AnnotationsAcl,
|
|
12
|
+
AppConfigAcl,
|
|
13
|
+
AssetsAcl,
|
|
14
|
+
AuditlogAcl,
|
|
15
|
+
DataModelInstancesAcl,
|
|
16
|
+
DataModelsAcl,
|
|
17
|
+
DataSetsAcl,
|
|
18
|
+
DiagramParsingAcl,
|
|
19
|
+
DigitalTwinAcl,
|
|
20
|
+
DocumentFeedbackAcl,
|
|
21
|
+
DocumentPipelinesAcl,
|
|
22
|
+
EntityMatchingAcl,
|
|
23
|
+
EventsAcl,
|
|
24
|
+
ExperimentsAcl,
|
|
25
|
+
ExtractionConfigsAcl,
|
|
26
|
+
ExtractionPipelinesAcl,
|
|
27
|
+
ExtractionRunsAcl,
|
|
28
|
+
FilePipelinesAcl,
|
|
29
|
+
FilesAcl,
|
|
30
|
+
FunctionsAcl,
|
|
31
|
+
GeospatialAcl,
|
|
32
|
+
GeospatialCrsAcl,
|
|
33
|
+
GroupsAcl,
|
|
34
|
+
HostedExtractorsAcl,
|
|
35
|
+
LabelsAcl,
|
|
36
|
+
LegacyGenericsAcl,
|
|
37
|
+
LegacyModelHostingAcl,
|
|
38
|
+
LocationFiltersAcl,
|
|
39
|
+
MonitoringTasksAcl,
|
|
40
|
+
NotificationsAcl,
|
|
41
|
+
PipelinesAcl,
|
|
42
|
+
PostgresGatewayAcl,
|
|
43
|
+
ProjectsAcl,
|
|
44
|
+
RawAcl,
|
|
45
|
+
RelationshipsAcl,
|
|
46
|
+
RoboticsAcl,
|
|
47
|
+
SAPWritebackAcl,
|
|
48
|
+
SAPWritebackRequestsAcl,
|
|
49
|
+
ScheduledCalculationsAcl,
|
|
50
|
+
SecurityCategoriesAcl,
|
|
51
|
+
SeismicAcl,
|
|
52
|
+
SequencesAcl,
|
|
53
|
+
SessionsAcl,
|
|
54
|
+
SimulatorsAcl,
|
|
55
|
+
StreamRecordsAcl,
|
|
56
|
+
StreamsAcl,
|
|
57
|
+
TemplateGroupsAcl,
|
|
58
|
+
TemplateInstancesAcl,
|
|
59
|
+
ThreeDAcl,
|
|
60
|
+
TimeSeriesAcl,
|
|
61
|
+
TimeSeriesSubscriptionsAcl,
|
|
62
|
+
TransformationsAcl,
|
|
63
|
+
TypesAcl,
|
|
64
|
+
UnknownAcl,
|
|
65
|
+
UserProfilesAcl,
|
|
66
|
+
VideoStreamingAcl,
|
|
67
|
+
VisionModelAcl,
|
|
68
|
+
WellsAcl,
|
|
69
|
+
WorkflowOrchestrationAcl,
|
|
70
|
+
)
|
|
71
|
+
from .capability import (
|
|
72
|
+
GroupCapability,
|
|
73
|
+
ProjectUrlNames,
|
|
74
|
+
)
|
|
75
|
+
from .group import (
|
|
76
|
+
Group,
|
|
77
|
+
GroupAttributes,
|
|
78
|
+
GroupRequest,
|
|
79
|
+
GroupResponse,
|
|
80
|
+
TokenAttributes,
|
|
81
|
+
)
|
|
82
|
+
from .scopes import (
|
|
83
|
+
AllScope,
|
|
84
|
+
AppConfigScope,
|
|
85
|
+
AssetRootIDScope,
|
|
86
|
+
CurrentUserScope,
|
|
87
|
+
DataSetScope,
|
|
88
|
+
ExperimentScope,
|
|
89
|
+
ExtractionPipelineScope,
|
|
90
|
+
IDScope,
|
|
91
|
+
IDScopeLowerCase,
|
|
92
|
+
InstancesScope,
|
|
93
|
+
PartitionScope,
|
|
94
|
+
PostgresGatewayUsersScope,
|
|
95
|
+
Scope,
|
|
96
|
+
ScopeDefinition,
|
|
97
|
+
SpaceIDScope,
|
|
98
|
+
TableScope,
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
__all__ = [
|
|
102
|
+
"Acl",
|
|
103
|
+
"AgentsAcl",
|
|
104
|
+
"AllScope",
|
|
105
|
+
"AnalyticsAcl",
|
|
106
|
+
"AnnotationsAcl",
|
|
107
|
+
"AppConfigAcl",
|
|
108
|
+
"AppConfigScope",
|
|
109
|
+
"AssetRootIDScope",
|
|
110
|
+
"AssetsAcl",
|
|
111
|
+
"AuditlogAcl",
|
|
112
|
+
"CurrentUserScope",
|
|
113
|
+
"DataModelInstancesAcl",
|
|
114
|
+
"DataModelsAcl",
|
|
115
|
+
"DataSetScope",
|
|
116
|
+
"DataSetsAcl",
|
|
117
|
+
"DiagramParsingAcl",
|
|
118
|
+
"DigitalTwinAcl",
|
|
119
|
+
"DocumentFeedbackAcl",
|
|
120
|
+
"DocumentPipelinesAcl",
|
|
121
|
+
"EntityMatchingAcl",
|
|
122
|
+
"EventsAcl",
|
|
123
|
+
"ExperimentScope",
|
|
124
|
+
"ExperimentsAcl",
|
|
125
|
+
"ExtractionConfigsAcl",
|
|
126
|
+
"ExtractionPipelineScope",
|
|
127
|
+
"ExtractionPipelinesAcl",
|
|
128
|
+
"ExtractionRunsAcl",
|
|
129
|
+
"FilePipelinesAcl",
|
|
130
|
+
"FilesAcl",
|
|
131
|
+
"FunctionsAcl",
|
|
132
|
+
"GeospatialAcl",
|
|
133
|
+
"GeospatialCrsAcl",
|
|
134
|
+
"Group",
|
|
135
|
+
"GroupAttributes",
|
|
136
|
+
"GroupCapability",
|
|
137
|
+
"GroupRequest",
|
|
138
|
+
"GroupResponse",
|
|
139
|
+
"GroupsAcl",
|
|
140
|
+
"HostedExtractorsAcl",
|
|
141
|
+
"IDScope",
|
|
142
|
+
"IDScopeLowerCase",
|
|
143
|
+
"InstancesScope",
|
|
144
|
+
"LabelsAcl",
|
|
145
|
+
"LegacyGenericsAcl",
|
|
146
|
+
"LegacyModelHostingAcl",
|
|
147
|
+
"LocationFiltersAcl",
|
|
148
|
+
"MonitoringTasksAcl",
|
|
149
|
+
"NotificationsAcl",
|
|
150
|
+
"PartitionScope",
|
|
151
|
+
"PipelinesAcl",
|
|
152
|
+
"PostgresGatewayAcl",
|
|
153
|
+
"PostgresGatewayUsersScope",
|
|
154
|
+
"ProjectUrlNames",
|
|
155
|
+
"ProjectsAcl",
|
|
156
|
+
"RawAcl",
|
|
157
|
+
"RelationshipsAcl",
|
|
158
|
+
"RoboticsAcl",
|
|
159
|
+
"SAPWritebackAcl",
|
|
160
|
+
"SAPWritebackRequestsAcl",
|
|
161
|
+
"ScheduledCalculationsAcl",
|
|
162
|
+
"Scope",
|
|
163
|
+
"ScopeDefinition",
|
|
164
|
+
"SecurityCategoriesAcl",
|
|
165
|
+
"SeismicAcl",
|
|
166
|
+
"SequencesAcl",
|
|
167
|
+
"SessionsAcl",
|
|
168
|
+
"SimulatorsAcl",
|
|
169
|
+
"SpaceIDScope",
|
|
170
|
+
"StreamRecordsAcl",
|
|
171
|
+
"StreamsAcl",
|
|
172
|
+
"TableScope",
|
|
173
|
+
"TemplateGroupsAcl",
|
|
174
|
+
"TemplateInstancesAcl",
|
|
175
|
+
"ThreeDAcl",
|
|
176
|
+
"TimeSeriesAcl",
|
|
177
|
+
"TimeSeriesSubscriptionsAcl",
|
|
178
|
+
"TokenAttributes",
|
|
179
|
+
"TransformationsAcl",
|
|
180
|
+
"TypesAcl",
|
|
181
|
+
"UnknownAcl",
|
|
182
|
+
"UserProfilesAcl",
|
|
183
|
+
"VideoStreamingAcl",
|
|
184
|
+
"VisionModelAcl",
|
|
185
|
+
"WellsAcl",
|
|
186
|
+
"WorkflowOrchestrationAcl",
|
|
187
|
+
]
|