viam-sdk 0.47.0__py3-none-win_amd64.whl → 0.49.0__py3-none-win_amd64.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 viam-sdk might be problematic. Click here for more details.

viam/app/data_client.py CHANGED
@@ -270,6 +270,9 @@ class DataClient:
270
270
  enabled: bool
271
271
  """Whether the data pipeline is enabled"""
272
272
 
273
+ data_source_type: TabularDataSourceType.ValueType
274
+ """The type of data source for the data pipeline"""
275
+
273
276
  @classmethod
274
277
  def from_proto(cls, data_pipeline: ProtoDataPipeline) -> Self:
275
278
  return cls(
@@ -281,6 +284,7 @@ class DataClient:
281
284
  created_on=data_pipeline.created_on.ToDatetime(),
282
285
  updated_at=data_pipeline.updated_at.ToDatetime(),
283
286
  enabled=data_pipeline.enabled,
287
+ data_source_type=data_pipeline.data_source_type,
284
288
  )
285
289
 
286
290
  @dataclass
@@ -1883,7 +1887,14 @@ class DataClient:
1883
1887
  response: ListDataPipelinesResponse = await self._data_pipelines_client.ListDataPipelines(request, metadata=self._metadata)
1884
1888
  return [DataClient.DataPipeline.from_proto(pipeline) for pipeline in response.data_pipelines]
1885
1889
 
1886
- async def create_data_pipeline(self, organization_id: str, name: str, mql_binary: List[Dict[str, Any]], schedule: str) -> str:
1890
+ async def create_data_pipeline(
1891
+ self,
1892
+ organization_id: str,
1893
+ name: str,
1894
+ mql_binary: List[Dict[str, Any]],
1895
+ schedule: str,
1896
+ data_source_type: TabularDataSourceType.ValueType = TabularDataSourceType.TABULAR_DATA_SOURCE_TYPE_STANDARD,
1897
+ ) -> str:
1887
1898
  """Create a new data pipeline.
1888
1899
 
1889
1900
  ::
@@ -1892,7 +1903,8 @@ class DataClient:
1892
1903
  organization_id="<YOUR-ORGANIZATION-ID>",
1893
1904
  name="<YOUR-PIPELINE-NAME>",
1894
1905
  mql_binary=[<YOUR-MQL-PIPELINE-AGGREGATION>],
1895
- schedule="<YOUR-SCHEDULE>"
1906
+ schedule="<YOUR-SCHEDULE>",
1907
+ data_source_type=TabularDataSourceType.TABULAR_DATA_SOURCE_TYPE_STANDARD,
1896
1908
  )
1897
1909
 
1898
1910
  Args:
@@ -1902,12 +1914,16 @@ class DataClient:
1902
1914
  mql_binary (List[Dict[str, Any]]):The MQL pipeline to run, as a list of MongoDB aggregation pipeline stages.
1903
1915
  schedule (str): A cron expression representing the expected execution schedule in UTC (note this also
1904
1916
  defines the input time window; an hourly schedule would process 1 hour of data at a time).
1917
+ data_source_type (TabularDataSourceType): The type of data source to use for the pipeline.
1918
+ Defaults to TabularDataSourceType.TABULAR_DATA_SOURCE_TYPE_STANDARD.
1905
1919
 
1906
1920
  Returns:
1907
1921
  str: The ID of the newly created pipeline.
1908
1922
  """
1909
1923
  binary: List[bytes] = [bson.encode(query) for query in mql_binary]
1910
- request = CreateDataPipelineRequest(organization_id=organization_id, name=name, mql_binary=binary, schedule=schedule)
1924
+ request = CreateDataPipelineRequest(
1925
+ organization_id=organization_id, name=name, mql_binary=binary, schedule=schedule, data_source_type=data_source_type
1926
+ )
1911
1927
  response: CreateDataPipelineResponse = await self._data_pipelines_client.CreateDataPipeline(request, metadata=self._metadata)
1912
1928
  return response.id
1913
1929
 
@@ -194,7 +194,7 @@ class Arm(ComponentBase):
194
194
 
195
195
  @abc.abstractmethod
196
196
  async def get_kinematics(
197
- self, *, extra: Optional[Dict[str, Any]] = None, timeout: Optional[float] = None
197
+ self, *, extra: Optional[Dict[str, Any]] = None, timeout: Optional[float] = None, **kwargs
198
198
  ) -> Tuple[KinematicsFileFormat.ValueType, bytes]:
199
199
  """
200
200
  Get the kinematics information associated with the arm.
@@ -1,3 +1,4 @@
1
+ from viam.proto.common import KinematicsFileFormat
1
2
  from viam.resource.registry import Registry, ResourceRegistration
2
3
 
3
4
  from .client import GripperClient
@@ -6,6 +7,7 @@ from .service import GripperRPCService
6
7
 
7
8
  __all__ = [
8
9
  "Gripper",
10
+ "KinematicsFileFormat",
9
11
  ]
10
12
 
11
13
  Registry.register_api(ResourceRegistration(Gripper, GripperRPCService, lambda name, channel: GripperClient(name, channel)))
@@ -1,12 +1,14 @@
1
- from typing import Any, Dict, List, Mapping, Optional
1
+ from typing import Any, Dict, List, Mapping, Optional, Tuple
2
2
 
3
3
  from grpclib.client import Channel
4
4
 
5
- from viam.proto.common import DoCommandRequest, DoCommandResponse, Geometry
5
+ from viam.proto.common import DoCommandRequest, DoCommandResponse, Geometry, GetKinematicsRequest, GetKinematicsResponse
6
6
  from viam.proto.component.gripper import (
7
7
  GrabRequest,
8
8
  GrabResponse,
9
9
  GripperServiceStub,
10
+ IsHoldingSomethingRequest,
11
+ IsHoldingSomethingResponse,
10
12
  IsMovingRequest,
11
13
  IsMovingResponse,
12
14
  OpenRequest,
@@ -15,6 +17,7 @@ from viam.proto.component.gripper import (
15
17
  from viam.resource.rpc_client_base import ReconfigurableResourceRPCClientBase
16
18
  from viam.utils import ValueTypes, dict_to_struct, get_geometries, struct_to_dict
17
19
 
20
+ from . import KinematicsFileFormat
18
21
  from .gripper import Gripper
19
22
 
20
23
 
@@ -62,6 +65,14 @@ class GripperClient(Gripper, ReconfigurableResourceRPCClientBase):
62
65
  request = StopRequest(name=self.name, extra=dict_to_struct(extra))
63
66
  await self.client.Stop(request, timeout=timeout, metadata=md)
64
67
 
68
+ async def is_holding_something(
69
+ self, *, extra: Optional[Dict[str, Any]] = None, timeout: Optional[float] = None, **kwargs
70
+ ) -> Gripper.HoldingStatus:
71
+ md = kwargs.get("metadata", self.Metadata()).proto
72
+ request = IsHoldingSomethingRequest(name=self.name, extra=dict_to_struct(extra))
73
+ response: IsHoldingSomethingResponse = await self.client.IsHoldingSomething(request, timeout=timeout, metadata=md)
74
+ return Gripper.HoldingStatus(response.is_holding_something, meta=struct_to_dict(response.meta))
75
+
65
76
  async def is_moving(self, *, timeout: Optional[float] = None, **kwargs) -> bool:
66
77
  md = kwargs.get("metadata", self.Metadata()).proto
67
78
  request = IsMovingRequest(name=self.name)
@@ -83,3 +94,15 @@ class GripperClient(Gripper, ReconfigurableResourceRPCClientBase):
83
94
  async def get_geometries(self, *, extra: Optional[Dict[str, Any]] = None, timeout: Optional[float] = None, **kwargs) -> List[Geometry]:
84
95
  md = kwargs.get("metadata", self.Metadata())
85
96
  return await get_geometries(self.client, self.name, extra, timeout, md)
97
+
98
+ async def get_kinematics(
99
+ self,
100
+ *,
101
+ extra: Optional[Dict[str, Any]] = None,
102
+ timeout: Optional[float] = None,
103
+ **kwargs,
104
+ ) -> Tuple[KinematicsFileFormat.ValueType, bytes]:
105
+ md = kwargs.get("metadata", self.Metadata()).proto
106
+ request = GetKinematicsRequest(name=self.name, extra=dict_to_struct(extra))
107
+ response: GetKinematicsResponse = await self.client.GetKinematics(request, timeout=timeout, metadata=md)
108
+ return (response.format, response.kinematics_data)
@@ -1,9 +1,12 @@
1
1
  import abc
2
- from typing import Any, Dict, Final, Optional
2
+ from dataclasses import dataclass
3
+ from typing import Any, Dict, Final, Optional, Tuple
3
4
 
4
5
  from viam.components.component_base import ComponentBase
5
6
  from viam.resource.types import API, RESOURCE_NAMESPACE_RDK, RESOURCE_TYPE_COMPONENT
6
7
 
8
+ from . import KinematicsFileFormat
9
+
7
10
 
8
11
  class Gripper(ComponentBase):
9
12
  """
@@ -24,6 +27,17 @@ class Gripper(ComponentBase):
24
27
  RESOURCE_NAMESPACE_RDK, RESOURCE_TYPE_COMPONENT, "gripper"
25
28
  )
26
29
 
30
+ @dataclass
31
+ class HoldingStatus:
32
+ """
33
+ HoldingStatus represents whether the gripper is currently holding onto an object. The
34
+ additional ``meta`` attribute contains other optional contextual information (i.e. confidence
35
+ interval, pressure, etc.)
36
+ """
37
+
38
+ is_holding_something: bool
39
+ meta: Optional[Dict[str, Any]] = None
40
+
27
41
  @abc.abstractmethod
28
42
  async def open(
29
43
  self,
@@ -71,6 +85,33 @@ class Gripper(ComponentBase):
71
85
  """
72
86
  ...
73
87
 
88
+ @abc.abstractmethod
89
+ async def is_holding_something(
90
+ self,
91
+ *,
92
+ extra: Optional[Dict[str, Any]] = None,
93
+ timeout: Optional[float] = None,
94
+ **kwargs,
95
+ ) -> HoldingStatus:
96
+ """
97
+ Get information about whether the gripper is currently holding onto an object.
98
+
99
+ ::
100
+
101
+ my_gripper = Gripper.from_robot(robot=machine, name="my_gripper")
102
+
103
+ # Grab with the gripper.
104
+ holding_status = await my_gripper.is_holding_something()
105
+ # get the boolean result
106
+ is_holding_something = holding_status.is_holding_something
107
+
108
+ Returns:
109
+ HoldingStatus: see documentation on `HoldingStatus` for more information
110
+
111
+ For more information, see `Gripper component <https://docs.viam.com/dev/reference/apis/components/gripper/#grab>`_.
112
+
113
+ """
114
+
74
115
  @abc.abstractmethod
75
116
  async def stop(
76
117
  self,
@@ -112,3 +153,37 @@ class Gripper(ComponentBase):
112
153
  For more information, see `Gripper component <https://docs.viam.com/dev/reference/apis/components/gripper/#is_moving>`_.
113
154
  """
114
155
  ...
156
+
157
+ @abc.abstractmethod
158
+ async def get_kinematics(
159
+ self,
160
+ *,
161
+ extra: Optional[Dict[str, Any]] = None,
162
+ timeout: Optional[float] = None,
163
+ **kwargs,
164
+ ) -> Tuple[KinematicsFileFormat.ValueType, bytes]:
165
+ """
166
+ Get the kinematics information associated with the gripper.
167
+
168
+ ::
169
+
170
+ my_gripper = Gripper.from_robot(robot=machine, name="my_gripper")
171
+
172
+ # Get the kinematics information associated with the gripper.
173
+ kinematics = await my_gripper.get_kinematics()
174
+
175
+ # Get the format of the kinematics file.
176
+ k_file = kinematics[0]
177
+
178
+ # Get the byte contents of the file.
179
+ k_bytes = kinematics[1]
180
+
181
+ Returns:
182
+ Tuple[KinematicsFileFormat.ValueType, bytes]: A tuple containing two values; the first [0] value represents the format of the
183
+ file, either in URDF format (``KinematicsFileFormat.KINEMATICS_FILE_FORMAT_URDF``) or
184
+ Viam's kinematic parameter format (spatial vector algebra) (``KinematicsFileFormat.KINEMATICS_FILE_FORMAT_SVA``),
185
+ and the second [1] value represents the byte contents of the file.
186
+
187
+ For more information, see `Gripper component <https://docs.viam.com/dev/reference/apis/components/gripper/#getkinematics>`_.
188
+ """
189
+ ...
@@ -1,10 +1,19 @@
1
1
  from grpclib.server import Stream
2
2
 
3
- from viam.proto.common import DoCommandRequest, DoCommandResponse, GetGeometriesRequest, GetGeometriesResponse
3
+ from viam.proto.common import (
4
+ DoCommandRequest,
5
+ DoCommandResponse,
6
+ GetGeometriesRequest,
7
+ GetGeometriesResponse,
8
+ GetKinematicsRequest,
9
+ GetKinematicsResponse,
10
+ )
4
11
  from viam.proto.component.gripper import (
5
12
  GrabRequest,
6
13
  GrabResponse,
7
14
  GripperServiceBase,
15
+ IsHoldingSomethingRequest,
16
+ IsHoldingSomethingResponse,
8
17
  IsMovingRequest,
9
18
  IsMovingResponse,
10
19
  OpenRequest,
@@ -62,6 +71,17 @@ class GripperRPCService(GripperServiceBase, ResourceRPCServiceBase[Gripper]):
62
71
  response = IsMovingResponse(is_moving=is_moving)
63
72
  await stream.send_message(response)
64
73
 
74
+ async def IsHoldingSomething(self, stream: Stream[IsHoldingSomethingRequest, IsHoldingSomethingResponse]) -> None:
75
+ request = await stream.recv_message()
76
+ assert request is not None
77
+ name = request.name
78
+ gripper = self.get_resource(name)
79
+ holding_status = await gripper.is_holding_something()
80
+ response = IsHoldingSomethingResponse(
81
+ is_holding_something=holding_status.is_holding_something, meta=dict_to_struct(holding_status.meta)
82
+ )
83
+ await stream.send_message(response)
84
+
65
85
  async def DoCommand(self, stream: Stream[DoCommandRequest, DoCommandResponse]) -> None:
66
86
  request = await stream.recv_message()
67
87
  assert request is not None
@@ -74,8 +94,17 @@ class GripperRPCService(GripperServiceBase, ResourceRPCServiceBase[Gripper]):
74
94
  async def GetGeometries(self, stream: Stream[GetGeometriesRequest, GetGeometriesResponse]) -> None:
75
95
  request = await stream.recv_message()
76
96
  assert request is not None
77
- arm = self.get_resource(request.name)
97
+ gripper = self.get_resource(request.name)
78
98
  timeout = stream.deadline.time_remaining() if stream.deadline else None
79
- geometries = await arm.get_geometries(extra=struct_to_dict(request.extra), timeout=timeout)
99
+ geometries = await gripper.get_geometries(extra=struct_to_dict(request.extra), timeout=timeout)
80
100
  response = GetGeometriesResponse(geometries=geometries)
81
101
  await stream.send_message(response)
102
+
103
+ async def GetKinematics(self, stream: Stream[GetKinematicsRequest, GetKinematicsResponse]) -> None:
104
+ request = await stream.recv_message()
105
+ assert request is not None
106
+ gripper = self.get_resource(request.name)
107
+ timeout = stream.deadline.time_remaining() if stream.deadline else None
108
+ format, kinematics_data = await gripper.get_kinematics(extra=struct_to_dict(request.extra), timeout=timeout)
109
+ response = GetKinematicsResponse(format=format, kinematics_data=kinematics_data)
110
+ await stream.send_message(response)
@@ -5,8 +5,8 @@ import grpclib.client
5
5
  import grpclib.exceptions
6
6
  if typing.TYPE_CHECKING:
7
7
  import grpclib.server
8
- import google.protobuf.timestamp_pb2
9
8
  from .... import app
9
+ import google.protobuf.timestamp_pb2
10
10
 
11
11
  class DataPipelinesServiceBase(abc.ABC):
12
12
 
@@ -6,51 +6,52 @@ from google.protobuf import symbol_database as _symbol_database
6
6
  from google.protobuf.internal import builder as _builder
7
7
  _runtime_version.ValidateProtobufRuntimeVersion(_runtime_version.Domain.PUBLIC, 5, 29, 2, '', 'app/datapipelines/v1/data_pipelines.proto')
8
8
  _sym_db = _symbol_database.Default()
9
+ from ....app.data.v1 import data_pb2 as app_dot_data_dot_v1_dot_data__pb2
9
10
  from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
10
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)app/datapipelines/v1/data_pipelines.proto\x12\x19viam.app.datapipelines.v1\x1a\x1fgoogle/protobuf/timestamp.proto"\xa6\x02\n\x0cDataPipeline\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\'\n\x0forganization_id\x18\x02 \x01(\tR\x0eorganizationId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x1d\n\nmql_binary\x18\x04 \x03(\x0cR\tmqlBinary\x12\x1a\n\x08schedule\x18\x05 \x01(\tR\x08schedule\x12\x18\n\x07enabled\x18\x06 \x01(\x08R\x07enabled\x129\n\ncreated_on\x18\x07 \x01(\x0b2\x1a.google.protobuf.TimestampR\tcreatedOn\x129\n\nupdated_at\x18\x08 \x01(\x0b2\x1a.google.protobuf.TimestampR\tupdatedAt"(\n\x16GetDataPipelineRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id"g\n\x17GetDataPipelineResponse\x12L\n\rdata_pipeline\x18\x01 \x01(\x0b2\'.viam.app.datapipelines.v1.DataPipelineR\x0cdataPipeline"C\n\x18ListDataPipelinesRequest\x12\'\n\x0forganization_id\x18\x01 \x01(\tR\x0eorganizationId"k\n\x19ListDataPipelinesResponse\x12N\n\x0edata_pipelines\x18\x01 \x03(\x0b2\'.viam.app.datapipelines.v1.DataPipelineR\rdataPipelines"\x93\x01\n\x19CreateDataPipelineRequest\x12\'\n\x0forganization_id\x18\x01 \x01(\tR\x0eorganizationId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x1d\n\nmql_binary\x18\x03 \x03(\x0cR\tmqlBinary\x12\x1a\n\x08schedule\x18\x04 \x01(\tR\x08schedule",\n\x1aCreateDataPipelineResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id"z\n\x19UpdateDataPipelineRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x1d\n\nmql_binary\x18\x03 \x03(\x0cR\tmqlBinary\x12\x1a\n\x08schedule\x18\x04 \x01(\tR\x08schedule"\x1c\n\x1aUpdateDataPipelineResponse"+\n\x19DeleteDataPipelineRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id"\x1c\n\x1aDeleteDataPipelineResponse"+\n\x19EnableDataPipelineRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id"\x1c\n\x1aEnableDataPipelineResponse",\n\x1aDisableDataPipelineRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id"\x1d\n\x1bDisableDataPipelineResponse"i\n\x1bListDataPipelineRunsRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1b\n\tpage_size\x18\x02 \x01(\rR\x08pageSize\x12\x1d\n\npage_token\x18\x03 \x01(\tR\tpageToken"\xa7\x01\n\x1cListDataPipelineRunsResponse\x12\x1f\n\x0bpipeline_id\x18\x01 \x01(\tR\npipelineId\x12>\n\x04runs\x18\x02 \x03(\x0b2*.viam.app.datapipelines.v1.DataPipelineRunR\x04runs\x12&\n\x0fnext_page_token\x18\x03 \x01(\tR\rnextPageToken"\xe1\x02\n\x0fDataPipelineRun\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x129\n\nstart_time\x18\x02 \x01(\x0b2\x1a.google.protobuf.TimestampR\tstartTime\x125\n\x08end_time\x18\x03 \x01(\x0b2\x1a.google.protobuf.TimestampR\x07endTime\x12B\n\x0fdata_start_time\x18\x04 \x01(\x0b2\x1a.google.protobuf.TimestampR\rdataStartTime\x12>\n\rdata_end_time\x18\x05 \x01(\x0b2\x1a.google.protobuf.TimestampR\x0bdataEndTime\x12H\n\x06status\x18\x06 \x01(\x0e20.viam.app.datapipelines.v1.DataPipelineRunStatusR\x06status*\xdc\x01\n\x15DataPipelineRunStatus\x12(\n$DATA_PIPELINE_RUN_STATUS_UNSPECIFIED\x10\x00\x12&\n"DATA_PIPELINE_RUN_STATUS_SCHEDULED\x10\x01\x12$\n DATA_PIPELINE_RUN_STATUS_STARTED\x10\x02\x12&\n"DATA_PIPELINE_RUN_STATUS_COMPLETED\x10\x03\x12#\n\x1fDATA_PIPELINE_RUN_STATUS_FAILED\x10\x042\xb1\x08\n\x14DataPipelinesService\x12x\n\x0fGetDataPipeline\x121.viam.app.datapipelines.v1.GetDataPipelineRequest\x1a2.viam.app.datapipelines.v1.GetDataPipelineResponse\x12~\n\x11ListDataPipelines\x123.viam.app.datapipelines.v1.ListDataPipelinesRequest\x1a4.viam.app.datapipelines.v1.ListDataPipelinesResponse\x12\x81\x01\n\x12CreateDataPipeline\x124.viam.app.datapipelines.v1.CreateDataPipelineRequest\x1a5.viam.app.datapipelines.v1.CreateDataPipelineResponse\x12\x81\x01\n\x12UpdateDataPipeline\x124.viam.app.datapipelines.v1.UpdateDataPipelineRequest\x1a5.viam.app.datapipelines.v1.UpdateDataPipelineResponse\x12\x81\x01\n\x12DeleteDataPipeline\x124.viam.app.datapipelines.v1.DeleteDataPipelineRequest\x1a5.viam.app.datapipelines.v1.DeleteDataPipelineResponse\x12\x81\x01\n\x12EnableDataPipeline\x124.viam.app.datapipelines.v1.EnableDataPipelineRequest\x1a5.viam.app.datapipelines.v1.EnableDataPipelineResponse\x12\x84\x01\n\x13DisableDataPipeline\x125.viam.app.datapipelines.v1.DisableDataPipelineRequest\x1a6.viam.app.datapipelines.v1.DisableDataPipelineResponse\x12\x87\x01\n\x14ListDataPipelineRuns\x126.viam.app.datapipelines.v1.ListDataPipelineRunsRequest\x1a7.viam.app.datapipelines.v1.ListDataPipelineRunsResponseB&Z$go.viam.com/api/app/datapipelines/v1b\x06proto3')
11
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n)app/datapipelines/v1/data_pipelines.proto\x12\x19viam.app.datapipelines.v1\x1a\x16app/data/v1/data.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\x93\x03\n\x0cDataPipeline\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\'\n\x0forganization_id\x18\x02 \x01(\tR\x0eorganizationId\x12\x12\n\x04name\x18\x03 \x01(\tR\x04name\x12\x1d\n\nmql_binary\x18\x04 \x03(\x0cR\tmqlBinary\x12\x1a\n\x08schedule\x18\x05 \x01(\tR\x08schedule\x12\x18\n\x07enabled\x18\x06 \x01(\x08R\x07enabled\x129\n\ncreated_on\x18\x07 \x01(\x0b2\x1a.google.protobuf.TimestampR\tcreatedOn\x129\n\nupdated_at\x18\x08 \x01(\x0b2\x1a.google.protobuf.TimestampR\tupdatedAt\x12V\n\x10data_source_type\x18\t \x01(\x0e2\'.viam.app.data.v1.TabularDataSourceTypeH\x00R\x0edataSourceType\x88\x01\x01B\x13\n\x11_data_source_type"(\n\x16GetDataPipelineRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id"g\n\x17GetDataPipelineResponse\x12L\n\rdata_pipeline\x18\x01 \x01(\x0b2\'.viam.app.datapipelines.v1.DataPipelineR\x0cdataPipeline"C\n\x18ListDataPipelinesRequest\x12\'\n\x0forganization_id\x18\x01 \x01(\tR\x0eorganizationId"k\n\x19ListDataPipelinesResponse\x12N\n\x0edata_pipelines\x18\x01 \x03(\x0b2\'.viam.app.datapipelines.v1.DataPipelineR\rdataPipelines"\xc2\x02\n\x19CreateDataPipelineRequest\x12\'\n\x0forganization_id\x18\x01 \x01(\tR\x0eorganizationId\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x1d\n\nmql_binary\x18\x03 \x03(\x0cR\tmqlBinary\x12\x1a\n\x08schedule\x18\x04 \x01(\tR\x08schedule\x12,\n\x0fenable_backfill\x18\x05 \x01(\x08H\x00R\x0eenableBackfill\x88\x01\x01\x12V\n\x10data_source_type\x18\x06 \x01(\x0e2\'.viam.app.data.v1.TabularDataSourceTypeH\x01R\x0edataSourceType\x88\x01\x01B\x12\n\x10_enable_backfillB\x13\n\x11_data_source_type",\n\x1aCreateDataPipelineResponse\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id"\xe7\x01\n\x19UpdateDataPipelineRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x12\n\x04name\x18\x02 \x01(\tR\x04name\x12\x1d\n\nmql_binary\x18\x03 \x03(\x0cR\tmqlBinary\x12\x1a\n\x08schedule\x18\x04 \x01(\tR\x08schedule\x12V\n\x10data_source_type\x18\x05 \x01(\x0e2\'.viam.app.data.v1.TabularDataSourceTypeH\x00R\x0edataSourceType\x88\x01\x01B\x13\n\x11_data_source_type"\x1c\n\x1aUpdateDataPipelineResponse"+\n\x19DeleteDataPipelineRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id"\x1c\n\x1aDeleteDataPipelineResponse"+\n\x19EnableDataPipelineRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id"\x1c\n\x1aEnableDataPipelineResponse",\n\x1aDisableDataPipelineRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id"\x1d\n\x1bDisableDataPipelineResponse"i\n\x1bListDataPipelineRunsRequest\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x1b\n\tpage_size\x18\x02 \x01(\rR\x08pageSize\x12\x1d\n\npage_token\x18\x03 \x01(\tR\tpageToken"\xa7\x01\n\x1cListDataPipelineRunsResponse\x12\x1f\n\x0bpipeline_id\x18\x01 \x01(\tR\npipelineId\x12>\n\x04runs\x18\x02 \x03(\x0b2*.viam.app.datapipelines.v1.DataPipelineRunR\x04runs\x12&\n\x0fnext_page_token\x18\x03 \x01(\tR\rnextPageToken"\xe1\x02\n\x0fDataPipelineRun\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x129\n\nstart_time\x18\x02 \x01(\x0b2\x1a.google.protobuf.TimestampR\tstartTime\x125\n\x08end_time\x18\x03 \x01(\x0b2\x1a.google.protobuf.TimestampR\x07endTime\x12B\n\x0fdata_start_time\x18\x04 \x01(\x0b2\x1a.google.protobuf.TimestampR\rdataStartTime\x12>\n\rdata_end_time\x18\x05 \x01(\x0b2\x1a.google.protobuf.TimestampR\x0bdataEndTime\x12H\n\x06status\x18\x06 \x01(\x0e20.viam.app.datapipelines.v1.DataPipelineRunStatusR\x06status*\xdc\x01\n\x15DataPipelineRunStatus\x12(\n$DATA_PIPELINE_RUN_STATUS_UNSPECIFIED\x10\x00\x12&\n"DATA_PIPELINE_RUN_STATUS_SCHEDULED\x10\x01\x12$\n DATA_PIPELINE_RUN_STATUS_STARTED\x10\x02\x12&\n"DATA_PIPELINE_RUN_STATUS_COMPLETED\x10\x03\x12#\n\x1fDATA_PIPELINE_RUN_STATUS_FAILED\x10\x042\xb1\x08\n\x14DataPipelinesService\x12x\n\x0fGetDataPipeline\x121.viam.app.datapipelines.v1.GetDataPipelineRequest\x1a2.viam.app.datapipelines.v1.GetDataPipelineResponse\x12~\n\x11ListDataPipelines\x123.viam.app.datapipelines.v1.ListDataPipelinesRequest\x1a4.viam.app.datapipelines.v1.ListDataPipelinesResponse\x12\x81\x01\n\x12CreateDataPipeline\x124.viam.app.datapipelines.v1.CreateDataPipelineRequest\x1a5.viam.app.datapipelines.v1.CreateDataPipelineResponse\x12\x81\x01\n\x12UpdateDataPipeline\x124.viam.app.datapipelines.v1.UpdateDataPipelineRequest\x1a5.viam.app.datapipelines.v1.UpdateDataPipelineResponse\x12\x81\x01\n\x12DeleteDataPipeline\x124.viam.app.datapipelines.v1.DeleteDataPipelineRequest\x1a5.viam.app.datapipelines.v1.DeleteDataPipelineResponse\x12\x81\x01\n\x12EnableDataPipeline\x124.viam.app.datapipelines.v1.EnableDataPipelineRequest\x1a5.viam.app.datapipelines.v1.EnableDataPipelineResponse\x12\x84\x01\n\x13DisableDataPipeline\x125.viam.app.datapipelines.v1.DisableDataPipelineRequest\x1a6.viam.app.datapipelines.v1.DisableDataPipelineResponse\x12\x87\x01\n\x14ListDataPipelineRuns\x126.viam.app.datapipelines.v1.ListDataPipelineRunsRequest\x1a7.viam.app.datapipelines.v1.ListDataPipelineRunsResponseB&Z$go.viam.com/api/app/datapipelines/v1b\x06proto3')
11
12
  _globals = globals()
12
13
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
13
14
  _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'app.datapipelines.v1.data_pipelines_pb2', _globals)
14
15
  if not _descriptor._USE_C_DESCRIPTORS:
15
16
  _globals['DESCRIPTOR']._loaded_options = None
16
17
  _globals['DESCRIPTOR']._serialized_options = b'Z$go.viam.com/api/app/datapipelines/v1'
17
- _globals['_DATAPIPELINERUNSTATUS']._serialized_start = 1938
18
- _globals['_DATAPIPELINERUNSTATUS']._serialized_end = 2158
19
- _globals['_DATAPIPELINE']._serialized_start = 106
20
- _globals['_DATAPIPELINE']._serialized_end = 400
21
- _globals['_GETDATAPIPELINEREQUEST']._serialized_start = 402
22
- _globals['_GETDATAPIPELINEREQUEST']._serialized_end = 442
23
- _globals['_GETDATAPIPELINERESPONSE']._serialized_start = 444
24
- _globals['_GETDATAPIPELINERESPONSE']._serialized_end = 547
25
- _globals['_LISTDATAPIPELINESREQUEST']._serialized_start = 549
26
- _globals['_LISTDATAPIPELINESREQUEST']._serialized_end = 616
27
- _globals['_LISTDATAPIPELINESRESPONSE']._serialized_start = 618
28
- _globals['_LISTDATAPIPELINESRESPONSE']._serialized_end = 725
29
- _globals['_CREATEDATAPIPELINEREQUEST']._serialized_start = 728
30
- _globals['_CREATEDATAPIPELINEREQUEST']._serialized_end = 875
31
- _globals['_CREATEDATAPIPELINERESPONSE']._serialized_start = 877
32
- _globals['_CREATEDATAPIPELINERESPONSE']._serialized_end = 921
33
- _globals['_UPDATEDATAPIPELINEREQUEST']._serialized_start = 923
34
- _globals['_UPDATEDATAPIPELINEREQUEST']._serialized_end = 1045
35
- _globals['_UPDATEDATAPIPELINERESPONSE']._serialized_start = 1047
36
- _globals['_UPDATEDATAPIPELINERESPONSE']._serialized_end = 1075
37
- _globals['_DELETEDATAPIPELINEREQUEST']._serialized_start = 1077
38
- _globals['_DELETEDATAPIPELINEREQUEST']._serialized_end = 1120
39
- _globals['_DELETEDATAPIPELINERESPONSE']._serialized_start = 1122
40
- _globals['_DELETEDATAPIPELINERESPONSE']._serialized_end = 1150
41
- _globals['_ENABLEDATAPIPELINEREQUEST']._serialized_start = 1152
42
- _globals['_ENABLEDATAPIPELINEREQUEST']._serialized_end = 1195
43
- _globals['_ENABLEDATAPIPELINERESPONSE']._serialized_start = 1197
44
- _globals['_ENABLEDATAPIPELINERESPONSE']._serialized_end = 1225
45
- _globals['_DISABLEDATAPIPELINEREQUEST']._serialized_start = 1227
46
- _globals['_DISABLEDATAPIPELINEREQUEST']._serialized_end = 1271
47
- _globals['_DISABLEDATAPIPELINERESPONSE']._serialized_start = 1273
48
- _globals['_DISABLEDATAPIPELINERESPONSE']._serialized_end = 1302
49
- _globals['_LISTDATAPIPELINERUNSREQUEST']._serialized_start = 1304
50
- _globals['_LISTDATAPIPELINERUNSREQUEST']._serialized_end = 1409
51
- _globals['_LISTDATAPIPELINERUNSRESPONSE']._serialized_start = 1412
52
- _globals['_LISTDATAPIPELINERUNSRESPONSE']._serialized_end = 1579
53
- _globals['_DATAPIPELINERUN']._serialized_start = 1582
54
- _globals['_DATAPIPELINERUN']._serialized_end = 1935
55
- _globals['_DATAPIPELINESSERVICE']._serialized_start = 2161
56
- _globals['_DATAPIPELINESSERVICE']._serialized_end = 3234
18
+ _globals['_DATAPIPELINERUNSTATUS']._serialized_start = 2356
19
+ _globals['_DATAPIPELINERUNSTATUS']._serialized_end = 2576
20
+ _globals['_DATAPIPELINE']._serialized_start = 130
21
+ _globals['_DATAPIPELINE']._serialized_end = 533
22
+ _globals['_GETDATAPIPELINEREQUEST']._serialized_start = 535
23
+ _globals['_GETDATAPIPELINEREQUEST']._serialized_end = 575
24
+ _globals['_GETDATAPIPELINERESPONSE']._serialized_start = 577
25
+ _globals['_GETDATAPIPELINERESPONSE']._serialized_end = 680
26
+ _globals['_LISTDATAPIPELINESREQUEST']._serialized_start = 682
27
+ _globals['_LISTDATAPIPELINESREQUEST']._serialized_end = 749
28
+ _globals['_LISTDATAPIPELINESRESPONSE']._serialized_start = 751
29
+ _globals['_LISTDATAPIPELINESRESPONSE']._serialized_end = 858
30
+ _globals['_CREATEDATAPIPELINEREQUEST']._serialized_start = 861
31
+ _globals['_CREATEDATAPIPELINEREQUEST']._serialized_end = 1183
32
+ _globals['_CREATEDATAPIPELINERESPONSE']._serialized_start = 1185
33
+ _globals['_CREATEDATAPIPELINERESPONSE']._serialized_end = 1229
34
+ _globals['_UPDATEDATAPIPELINEREQUEST']._serialized_start = 1232
35
+ _globals['_UPDATEDATAPIPELINEREQUEST']._serialized_end = 1463
36
+ _globals['_UPDATEDATAPIPELINERESPONSE']._serialized_start = 1465
37
+ _globals['_UPDATEDATAPIPELINERESPONSE']._serialized_end = 1493
38
+ _globals['_DELETEDATAPIPELINEREQUEST']._serialized_start = 1495
39
+ _globals['_DELETEDATAPIPELINEREQUEST']._serialized_end = 1538
40
+ _globals['_DELETEDATAPIPELINERESPONSE']._serialized_start = 1540
41
+ _globals['_DELETEDATAPIPELINERESPONSE']._serialized_end = 1568
42
+ _globals['_ENABLEDATAPIPELINEREQUEST']._serialized_start = 1570
43
+ _globals['_ENABLEDATAPIPELINEREQUEST']._serialized_end = 1613
44
+ _globals['_ENABLEDATAPIPELINERESPONSE']._serialized_start = 1615
45
+ _globals['_ENABLEDATAPIPELINERESPONSE']._serialized_end = 1643
46
+ _globals['_DISABLEDATAPIPELINEREQUEST']._serialized_start = 1645
47
+ _globals['_DISABLEDATAPIPELINEREQUEST']._serialized_end = 1689
48
+ _globals['_DISABLEDATAPIPELINERESPONSE']._serialized_start = 1691
49
+ _globals['_DISABLEDATAPIPELINERESPONSE']._serialized_end = 1720
50
+ _globals['_LISTDATAPIPELINERUNSREQUEST']._serialized_start = 1722
51
+ _globals['_LISTDATAPIPELINERUNSREQUEST']._serialized_end = 1827
52
+ _globals['_LISTDATAPIPELINERUNSRESPONSE']._serialized_start = 1830
53
+ _globals['_LISTDATAPIPELINERUNSRESPONSE']._serialized_end = 1997
54
+ _globals['_DATAPIPELINERUN']._serialized_start = 2000
55
+ _globals['_DATAPIPELINERUN']._serialized_end = 2353
56
+ _globals['_DATAPIPELINESSERVICE']._serialized_start = 2579
57
+ _globals['_DATAPIPELINESSERVICE']._serialized_end = 3652
@@ -2,6 +2,7 @@
2
2
  @generated by mypy-protobuf. Do not edit manually!
3
3
  isort:skip_file
4
4
  """
5
+ from .... import app
5
6
  import builtins
6
7
  import collections.abc
7
8
  import google.protobuf.descriptor
@@ -49,6 +50,7 @@ class DataPipeline(google.protobuf.message.Message):
49
50
  ENABLED_FIELD_NUMBER: builtins.int
50
51
  CREATED_ON_FIELD_NUMBER: builtins.int
51
52
  UPDATED_AT_FIELD_NUMBER: builtins.int
53
+ DATA_SOURCE_TYPE_FIELD_NUMBER: builtins.int
52
54
  id: builtins.str
53
55
  organization_id: builtins.str
54
56
  'The associated Viam organization ID.'
@@ -58,6 +60,8 @@ class DataPipeline(google.protobuf.message.Message):
58
60
  'A cron expression representing the expected execution schedule in UTC (note this also\n defines the input time window; an hourly schedule would process 1 hour of data at a time).\n '
59
61
  enabled: builtins.bool
60
62
  'Whether or not the pipeline is enabled.'
63
+ data_source_type: app.data.v1.data_pb2.TabularDataSourceType.ValueType
64
+ 'The type of data source for the pipeline. If not specified, default is standard data storage.'
61
65
 
62
66
  @property
63
67
  def mql_binary(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]:
@@ -73,13 +77,16 @@ class DataPipeline(google.protobuf.message.Message):
73
77
  def updated_at(self) -> google.protobuf.timestamp_pb2.Timestamp:
74
78
  """The time the pipeline was last updated."""
75
79
 
76
- def __init__(self, *, id: builtins.str=..., organization_id: builtins.str=..., name: builtins.str=..., mql_binary: collections.abc.Iterable[builtins.bytes] | None=..., schedule: builtins.str=..., enabled: builtins.bool=..., created_on: google.protobuf.timestamp_pb2.Timestamp | None=..., updated_at: google.protobuf.timestamp_pb2.Timestamp | None=...) -> None:
80
+ def __init__(self, *, id: builtins.str=..., organization_id: builtins.str=..., name: builtins.str=..., mql_binary: collections.abc.Iterable[builtins.bytes] | None=..., schedule: builtins.str=..., enabled: builtins.bool=..., created_on: google.protobuf.timestamp_pb2.Timestamp | None=..., updated_at: google.protobuf.timestamp_pb2.Timestamp | None=..., data_source_type: app.data.v1.data_pb2.TabularDataSourceType.ValueType | None=...) -> None:
77
81
  ...
78
82
 
79
- def HasField(self, field_name: typing.Literal['created_on', b'created_on', 'updated_at', b'updated_at']) -> builtins.bool:
83
+ def HasField(self, field_name: typing.Literal['_data_source_type', b'_data_source_type', 'created_on', b'created_on', 'data_source_type', b'data_source_type', 'updated_at', b'updated_at']) -> builtins.bool:
80
84
  ...
81
85
 
82
- def ClearField(self, field_name: typing.Literal['created_on', b'created_on', 'enabled', b'enabled', 'id', b'id', 'mql_binary', b'mql_binary', 'name', b'name', 'organization_id', b'organization_id', 'schedule', b'schedule', 'updated_at', b'updated_at']) -> None:
86
+ def ClearField(self, field_name: typing.Literal['_data_source_type', b'_data_source_type', 'created_on', b'created_on', 'data_source_type', b'data_source_type', 'enabled', b'enabled', 'id', b'id', 'mql_binary', b'mql_binary', 'name', b'name', 'organization_id', b'organization_id', 'schedule', b'schedule', 'updated_at', b'updated_at']) -> None:
87
+ ...
88
+
89
+ def WhichOneof(self, oneof_group: typing.Literal['_data_source_type', b'_data_source_type']) -> typing.Literal['data_source_type'] | None:
83
90
  ...
84
91
  global___DataPipeline = DataPipeline
85
92
 
@@ -153,12 +160,18 @@ class CreateDataPipelineRequest(google.protobuf.message.Message):
153
160
  NAME_FIELD_NUMBER: builtins.int
154
161
  MQL_BINARY_FIELD_NUMBER: builtins.int
155
162
  SCHEDULE_FIELD_NUMBER: builtins.int
163
+ ENABLE_BACKFILL_FIELD_NUMBER: builtins.int
164
+ DATA_SOURCE_TYPE_FIELD_NUMBER: builtins.int
156
165
  organization_id: builtins.str
157
166
  'The associated Viam organization ID.'
158
167
  name: builtins.str
159
168
  'A unique identifier at the org level.'
160
169
  schedule: builtins.str
161
170
  'A cron expression representing the expected execution schedule in UTC (note this also\n defines the input time window; an hourly schedule would process 1 hour of data at a time).\n '
171
+ enable_backfill: builtins.bool
172
+ "When true, pipeline runs will be scheduled for the organization's past data."
173
+ data_source_type: app.data.v1.data_pb2.TabularDataSourceType.ValueType
174
+ 'The type of data source for the pipeline. If not specified, default is standard data storage.'
162
175
 
163
176
  @property
164
177
  def mql_binary(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]:
@@ -166,10 +179,21 @@ class CreateDataPipelineRequest(google.protobuf.message.Message):
166
179
  each document is one stage in the pipeline.
167
180
  """
168
181
 
169
- def __init__(self, *, organization_id: builtins.str=..., name: builtins.str=..., mql_binary: collections.abc.Iterable[builtins.bytes] | None=..., schedule: builtins.str=...) -> None:
182
+ def __init__(self, *, organization_id: builtins.str=..., name: builtins.str=..., mql_binary: collections.abc.Iterable[builtins.bytes] | None=..., schedule: builtins.str=..., enable_backfill: builtins.bool | None=..., data_source_type: app.data.v1.data_pb2.TabularDataSourceType.ValueType | None=...) -> None:
183
+ ...
184
+
185
+ def HasField(self, field_name: typing.Literal['_data_source_type', b'_data_source_type', '_enable_backfill', b'_enable_backfill', 'data_source_type', b'data_source_type', 'enable_backfill', b'enable_backfill']) -> builtins.bool:
186
+ ...
187
+
188
+ def ClearField(self, field_name: typing.Literal['_data_source_type', b'_data_source_type', '_enable_backfill', b'_enable_backfill', 'data_source_type', b'data_source_type', 'enable_backfill', b'enable_backfill', 'mql_binary', b'mql_binary', 'name', b'name', 'organization_id', b'organization_id', 'schedule', b'schedule']) -> None:
170
189
  ...
171
190
 
172
- def ClearField(self, field_name: typing.Literal['mql_binary', b'mql_binary', 'name', b'name', 'organization_id', b'organization_id', 'schedule', b'schedule']) -> None:
191
+ @typing.overload
192
+ def WhichOneof(self, oneof_group: typing.Literal['_data_source_type', b'_data_source_type']) -> typing.Literal['data_source_type'] | None:
193
+ ...
194
+
195
+ @typing.overload
196
+ def WhichOneof(self, oneof_group: typing.Literal['_enable_backfill', b'_enable_backfill']) -> typing.Literal['enable_backfill'] | None:
173
197
  ...
174
198
  global___CreateDataPipelineRequest = CreateDataPipelineRequest
175
199
 
@@ -194,12 +218,15 @@ class UpdateDataPipelineRequest(google.protobuf.message.Message):
194
218
  NAME_FIELD_NUMBER: builtins.int
195
219
  MQL_BINARY_FIELD_NUMBER: builtins.int
196
220
  SCHEDULE_FIELD_NUMBER: builtins.int
221
+ DATA_SOURCE_TYPE_FIELD_NUMBER: builtins.int
197
222
  id: builtins.str
198
223
  'The ID of the data pipeline to update.'
199
224
  name: builtins.str
200
225
  'A unique identifier at the org level.'
201
226
  schedule: builtins.str
202
227
  'A cron expression representing the expected execution schedule in UTC (note this also\n defines the input time window; an hourly schedule would process 1 hour of data at a time).\n '
228
+ data_source_type: app.data.v1.data_pb2.TabularDataSourceType.ValueType
229
+ 'The type of data source for the pipeline. If not specified, default is standard data storage.'
203
230
 
204
231
  @property
205
232
  def mql_binary(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]:
@@ -207,10 +234,16 @@ class UpdateDataPipelineRequest(google.protobuf.message.Message):
207
234
  each document is one stage in the pipeline.
208
235
  """
209
236
 
210
- def __init__(self, *, id: builtins.str=..., name: builtins.str=..., mql_binary: collections.abc.Iterable[builtins.bytes] | None=..., schedule: builtins.str=...) -> None:
237
+ def __init__(self, *, id: builtins.str=..., name: builtins.str=..., mql_binary: collections.abc.Iterable[builtins.bytes] | None=..., schedule: builtins.str=..., data_source_type: app.data.v1.data_pb2.TabularDataSourceType.ValueType | None=...) -> None:
238
+ ...
239
+
240
+ def HasField(self, field_name: typing.Literal['_data_source_type', b'_data_source_type', 'data_source_type', b'data_source_type']) -> builtins.bool:
241
+ ...
242
+
243
+ def ClearField(self, field_name: typing.Literal['_data_source_type', b'_data_source_type', 'data_source_type', b'data_source_type', 'id', b'id', 'mql_binary', b'mql_binary', 'name', b'name', 'schedule', b'schedule']) -> None:
211
244
  ...
212
245
 
213
- def ClearField(self, field_name: typing.Literal['id', b'id', 'mql_binary', b'mql_binary', 'name', b'name', 'schedule', b'schedule']) -> None:
246
+ def WhichOneof(self, oneof_group: typing.Literal['_data_source_type', b'_data_source_type']) -> typing.Literal['data_source_type'] | None:
214
247
  ...
215
248
  global___UpdateDataPipelineRequest = UpdateDataPipelineRequest
216
249