Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cognite/client/data_classes/simulators/routine_revisions.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ class SimulatorRoutineRevision(SimulatorRoutineRevisionCore):
id (int): The unique identifier of the simulator routine revision.
external_id (str): The external ID provided by the client. Must be unique for the resource type.
simulator_external_id (str): The external ID of the simulator.
simulator_integration_external_id (str): The external ID of the simulator integration.
simulator_integration_external_id (str | None): The external ID of the simulator integration.
routine_external_id (str): The external ID of the simulator routine.
model_external_id (str): The external ID of the simulator model.
version_number (int): The version number of the simulator routine revision. Unique for each simulator routine.
Expand All @@ -619,7 +619,7 @@ def __init__(
id: int,
external_id: str,
simulator_external_id: str,
simulator_integration_external_id: str,
simulator_integration_external_id: str | None,
routine_external_id: str,
model_external_id: str,
version_number: int,
Expand Down Expand Up @@ -659,7 +659,7 @@ def _load(cls, resource: dict[str, Any], cognite_client: CogniteClient | None =
external_id=resource["externalId"],
simulator_external_id=resource["simulatorExternalId"],
routine_external_id=resource["routineExternalId"],
simulator_integration_external_id=resource["simulatorIntegrationExternalId"],
simulator_integration_external_id=resource.get("simulatorIntegrationExternalId"),
model_external_id=resource["modelExternalId"],
data_set_id=resource["dataSetId"],
created_by_user_id=resource["createdByUserId"],
Expand Down
12 changes: 6 additions & 6 deletions cognite/client/data_classes/simulators/routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class SimulatorRoutineCore(WriteableCogniteResource["SimulatorRoutineWrite"], AB
Args:
external_id (str): External id of the simulator routine
model_external_id (str): External id of the associated simulator model
simulator_integration_external_id (str): External id of the associated simulator integration
simulator_integration_external_id (str | None): External id of the associated simulator integration
name (str): The name of the simulator routine
description (str | None): The description of the simulator routine
kind (Literal['long'] | None): The kind of simulator routine. Routines with kind 'long' may have more inputs/outputs, steps, and longer runtime.
Expand All @@ -40,7 +40,7 @@ def __init__(
self,
external_id: str,
model_external_id: str,
simulator_integration_external_id: str,
simulator_integration_external_id: str | None,
name: str,
description: str | None = None,
kind: Literal["long"] | None = None,
Expand All @@ -57,7 +57,7 @@ def _load(cls, resource: dict[str, Any], cognite_client: CogniteClient | None =
return cls(
external_id=resource["externalId"],
model_external_id=resource["modelExternalId"],
simulator_integration_external_id=resource["simulatorIntegrationExternalId"],
simulator_integration_external_id=resource.get("simulatorIntegrationExternalId"),
name=resource["name"],
description=resource.get("description"),
kind=resource.get("kind"),
Expand Down Expand Up @@ -102,7 +102,7 @@ class SimulatorRoutine(SimulatorRoutineCore):
id (int): A unique id of a simulator routine
external_id (str): External id of the simulator routine
model_external_id (str): External id of the associated simulator model
simulator_integration_external_id (str): External id of the associated simulator integration
simulator_integration_external_id (str | None): External id of the associated simulator integration
name (str): The name of the simulator routine
data_set_id (int): The id of the dataset associated with the simulator routine
simulator_external_id (str): External id of the associated simulator
Expand All @@ -117,7 +117,7 @@ def __init__(
id: int,
external_id: str,
model_external_id: str,
simulator_integration_external_id: str,
simulator_integration_external_id: str | None,
name: str,
data_set_id: int,
simulator_external_id: str,
Expand Down Expand Up @@ -147,7 +147,7 @@ def _load(cls, resource: dict[str, Any], cognite_client: CogniteClient | None =
external_id=resource["externalId"],
simulator_external_id=resource["simulatorExternalId"],
model_external_id=resource["modelExternalId"],
simulator_integration_external_id=resource["simulatorIntegrationExternalId"],
simulator_integration_external_id=resource.get("simulatorIntegrationExternalId"),
name=resource["name"],
data_set_id=resource["dataSetId"],
description=resource.get("description"),
Expand Down
6 changes: 3 additions & 3 deletions cognite/client/data_classes/simulators/runs.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ class SimulationRun(SimulationRunCore):
Args:
id (int): The id of the simulation run
simulator_external_id (str): External id of the associated simulator
simulator_integration_external_id (str): External id of the associated simulator integration
simulator_integration_external_id (str | None): External id of the associated simulator integration
model_external_id (str): External id of the associated simulator model
model_revision_external_id (str): External id of the associated simulator model revision
routine_revision_external_id (str): External id of the associated simulator routine revision
Expand All @@ -236,7 +236,7 @@ def __init__(
self,
id: int,
simulator_external_id: str,
simulator_integration_external_id: str,
simulator_integration_external_id: str | None,
model_external_id: str,
model_revision_external_id: str,
routine_revision_external_id: str,
Expand Down Expand Up @@ -338,7 +338,7 @@ def _load(cls, resource: dict[str, Any], cognite_client: CogniteClient | None =
created_time=resource["createdTime"],
last_updated_time=resource["lastUpdatedTime"],
simulator_external_id=resource["simulatorExternalId"],
simulator_integration_external_id=resource["simulatorIntegrationExternalId"],
simulator_integration_external_id=resource.get("simulatorIntegrationExternalId"),
model_external_id=resource["modelExternalId"],
model_revision_external_id=resource["modelRevisionExternalId"],
routine_external_id=resource["routineExternalId"],
Expand Down