Skip to content

Commit 1ade187

Browse files
viambotedobranov
andauthored
Automated Protos Update (#1033)
Co-authored-by: Evgeni Dobranov <[email protected]>
1 parent ec9d781 commit 1ade187

File tree

13 files changed

+457
-28
lines changed

13 files changed

+457
-28
lines changed

src/viam/gen/app/data/v1/data_grpc.py

Lines changed: 42 additions & 2 deletions
Large diffs are not rendered by default.

src/viam/gen/app/data/v1/data_pb2.py

Lines changed: 35 additions & 13 deletions
Large diffs are not rendered by default.

src/viam/gen/app/data/v1/data_pb2.pyi

Lines changed: 186 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1685,4 +1685,189 @@ class Index(google.protobuf.message.Message):
16851685

16861686
def WhichOneof(self, oneof_group: typing.Literal['_pipeline_name', b'_pipeline_name']) -> typing.Literal['pipeline_name'] | None:
16871687
...
1688-
global___Index = Index
1688+
global___Index = Index
1689+
1690+
@typing.final
1691+
class CreateSavedQueryRequest(google.protobuf.message.Message):
1692+
"""CreateSavedQueryRequest saves a mql query."""
1693+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
1694+
ORGANIZATION_ID_FIELD_NUMBER: builtins.int
1695+
NAME_FIELD_NUMBER: builtins.int
1696+
MQL_BINARY_FIELD_NUMBER: builtins.int
1697+
organization_id: builtins.str
1698+
name: builtins.str
1699+
1700+
@property
1701+
def mql_binary(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]:
1702+
...
1703+
1704+
def __init__(self, *, organization_id: builtins.str=..., name: builtins.str=..., mql_binary: collections.abc.Iterable[builtins.bytes] | None=...) -> None:
1705+
...
1706+
1707+
def ClearField(self, field_name: typing.Literal['mql_binary', b'mql_binary', 'name', b'name', 'organization_id', b'organization_id']) -> None:
1708+
...
1709+
global___CreateSavedQueryRequest = CreateSavedQueryRequest
1710+
1711+
@typing.final
1712+
class CreateSavedQueryResponse(google.protobuf.message.Message):
1713+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
1714+
ID_FIELD_NUMBER: builtins.int
1715+
id: builtins.str
1716+
1717+
def __init__(self, *, id: builtins.str=...) -> None:
1718+
...
1719+
1720+
def ClearField(self, field_name: typing.Literal['id', b'id']) -> None:
1721+
...
1722+
global___CreateSavedQueryResponse = CreateSavedQueryResponse
1723+
1724+
@typing.final
1725+
class Query(google.protobuf.message.Message):
1726+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
1727+
ID_FIELD_NUMBER: builtins.int
1728+
ORGANIZATION_ID_FIELD_NUMBER: builtins.int
1729+
NAME_FIELD_NUMBER: builtins.int
1730+
MQL_BINARY_FIELD_NUMBER: builtins.int
1731+
CREATED_ON_FIELD_NUMBER: builtins.int
1732+
UPDATED_AT_FIELD_NUMBER: builtins.int
1733+
id: builtins.str
1734+
organization_id: builtins.str
1735+
name: builtins.str
1736+
1737+
@property
1738+
def mql_binary(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]:
1739+
...
1740+
1741+
@property
1742+
def created_on(self) -> google.protobuf.timestamp_pb2.Timestamp:
1743+
...
1744+
1745+
@property
1746+
def updated_at(self) -> google.protobuf.timestamp_pb2.Timestamp:
1747+
...
1748+
1749+
def __init__(self, *, id: builtins.str=..., organization_id: builtins.str=..., name: builtins.str=..., mql_binary: collections.abc.Iterable[builtins.bytes] | None=..., created_on: google.protobuf.timestamp_pb2.Timestamp | None=..., updated_at: google.protobuf.timestamp_pb2.Timestamp | None=...) -> None:
1750+
...
1751+
1752+
def HasField(self, field_name: typing.Literal['created_on', b'created_on', 'updated_at', b'updated_at']) -> builtins.bool:
1753+
...
1754+
1755+
def ClearField(self, field_name: typing.Literal['created_on', b'created_on', 'id', b'id', 'mql_binary', b'mql_binary', 'name', b'name', 'organization_id', b'organization_id', 'updated_at', b'updated_at']) -> None:
1756+
...
1757+
global___Query = Query
1758+
1759+
@typing.final
1760+
class DeleteSavedQueryRequest(google.protobuf.message.Message):
1761+
"""DeleteSavedQuery deletes a saved query based on the given id."""
1762+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
1763+
ID_FIELD_NUMBER: builtins.int
1764+
id: builtins.str
1765+
1766+
def __init__(self, *, id: builtins.str=...) -> None:
1767+
...
1768+
1769+
def ClearField(self, field_name: typing.Literal['id', b'id']) -> None:
1770+
...
1771+
global___DeleteSavedQueryRequest = DeleteSavedQueryRequest
1772+
1773+
@typing.final
1774+
class DeleteSavedQueryResponse(google.protobuf.message.Message):
1775+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
1776+
1777+
def __init__(self) -> None:
1778+
...
1779+
global___DeleteSavedQueryResponse = DeleteSavedQueryResponse
1780+
1781+
@typing.final
1782+
class GetSavedQueryRequest(google.protobuf.message.Message):
1783+
"""GetSavedQuery retrieves a saved query by id."""
1784+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
1785+
ID_FIELD_NUMBER: builtins.int
1786+
id: builtins.str
1787+
1788+
def __init__(self, *, id: builtins.str=...) -> None:
1789+
...
1790+
1791+
def ClearField(self, field_name: typing.Literal['id', b'id']) -> None:
1792+
...
1793+
global___GetSavedQueryRequest = GetSavedQueryRequest
1794+
1795+
@typing.final
1796+
class GetSavedQueryResponse(google.protobuf.message.Message):
1797+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
1798+
SAVED_QUERY_FIELD_NUMBER: builtins.int
1799+
1800+
@property
1801+
def saved_query(self) -> global___Query:
1802+
...
1803+
1804+
def __init__(self, *, saved_query: global___Query | None=...) -> None:
1805+
...
1806+
1807+
def HasField(self, field_name: typing.Literal['saved_query', b'saved_query']) -> builtins.bool:
1808+
...
1809+
1810+
def ClearField(self, field_name: typing.Literal['saved_query', b'saved_query']) -> None:
1811+
...
1812+
global___GetSavedQueryResponse = GetSavedQueryResponse
1813+
1814+
@typing.final
1815+
class UpdateSavedQueryRequest(google.protobuf.message.Message):
1816+
"""UpdateSavedQuery updates the saved query with the given id."""
1817+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
1818+
ID_FIELD_NUMBER: builtins.int
1819+
NAME_FIELD_NUMBER: builtins.int
1820+
MQL_BINARY_FIELD_NUMBER: builtins.int
1821+
id: builtins.str
1822+
name: builtins.str
1823+
1824+
@property
1825+
def mql_binary(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]:
1826+
...
1827+
1828+
def __init__(self, *, id: builtins.str=..., name: builtins.str=..., mql_binary: collections.abc.Iterable[builtins.bytes] | None=...) -> None:
1829+
...
1830+
1831+
def ClearField(self, field_name: typing.Literal['id', b'id', 'mql_binary', b'mql_binary', 'name', b'name']) -> None:
1832+
...
1833+
global___UpdateSavedQueryRequest = UpdateSavedQueryRequest
1834+
1835+
@typing.final
1836+
class UpdateSavedQueryResponse(google.protobuf.message.Message):
1837+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
1838+
1839+
def __init__(self) -> None:
1840+
...
1841+
global___UpdateSavedQueryResponse = UpdateSavedQueryResponse
1842+
1843+
@typing.final
1844+
class ListSavedQueriesRequest(google.protobuf.message.Message):
1845+
"""ListSavedQueries lists saved queries for a given organization."""
1846+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
1847+
ORGANIZATION_ID_FIELD_NUMBER: builtins.int
1848+
LIMIT_FIELD_NUMBER: builtins.int
1849+
organization_id: builtins.str
1850+
limit: builtins.int
1851+
1852+
def __init__(self, *, organization_id: builtins.str=..., limit: builtins.int=...) -> None:
1853+
...
1854+
1855+
def ClearField(self, field_name: typing.Literal['limit', b'limit', 'organization_id', b'organization_id']) -> None:
1856+
...
1857+
global___ListSavedQueriesRequest = ListSavedQueriesRequest
1858+
1859+
@typing.final
1860+
class ListSavedQueriesResponse(google.protobuf.message.Message):
1861+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
1862+
QUERIES_FIELD_NUMBER: builtins.int
1863+
1864+
@property
1865+
def queries(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Query]:
1866+
...
1867+
1868+
def __init__(self, *, queries: collections.abc.Iterable[global___Query] | None=...) -> None:
1869+
...
1870+
1871+
def ClearField(self, field_name: typing.Literal['queries', b'queries']) -> None:
1872+
...
1873+
global___ListSavedQueriesResponse = ListSavedQueriesResponse

src/viam/gen/app/v1/billing_pb2.py

Lines changed: 10 additions & 10 deletions
Large diffs are not rendered by default.

src/viam/gen/app/v1/billing_pb2.pyi

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,12 @@ global___CreateInvoiceAndChargeImmediatelyRequest = CreateInvoiceAndChargeImmedi
555555
@typing.final
556556
class CreateInvoiceAndChargeImmediatelyResponse(google.protobuf.message.Message):
557557
DESCRIPTOR: google.protobuf.descriptor.Descriptor
558+
INVOICE_ID_FIELD_NUMBER: builtins.int
559+
invoice_id: builtins.str
558560

559-
def __init__(self) -> None:
561+
def __init__(self, *, invoice_id: builtins.str=...) -> None:
562+
...
563+
564+
def ClearField(self, field_name: typing.Literal['invoice_id', b'invoice_id']) -> None:
560565
...
561566
global___CreateInvoiceAndChargeImmediatelyResponse = CreateInvoiceAndChargeImmediatelyResponse

src/viam/gen/service/video/__init__.py

Whitespace-only changes.

src/viam/gen/service/video/v1/__init__.py

Whitespace-only changes.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import abc
2+
import typing
3+
import grpclib.const
4+
import grpclib.client
5+
import grpclib.exceptions
6+
if typing.TYPE_CHECKING:
7+
import grpclib.server
8+
from .... import common
9+
import google.api.annotations_pb2
10+
import google.protobuf.struct_pb2
11+
import google.protobuf.timestamp_pb2
12+
from .... import service
13+
14+
class VideoServiceBase(abc.ABC):
15+
16+
@abc.abstractmethod
17+
async def GetVideo(self, stream: 'grpclib.server.Stream[service.video.v1.video_pb2.GetVideoRequest, service.video.v1.video_pb2.GetVideoResponse]') -> None:
18+
pass
19+
20+
@abc.abstractmethod
21+
async def DoCommand(self, stream: 'grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]') -> None:
22+
pass
23+
24+
def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
25+
return {'/viam.service.video.v1.VideoService/GetVideo': grpclib.const.Handler(self.GetVideo, grpclib.const.Cardinality.UNARY_STREAM, service.video.v1.video_pb2.GetVideoRequest, service.video.v1.video_pb2.GetVideoResponse), '/viam.service.video.v1.VideoService/DoCommand': grpclib.const.Handler(self.DoCommand, grpclib.const.Cardinality.UNARY_UNARY, common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse)}
26+
27+
class UnimplementedVideoServiceBase(VideoServiceBase):
28+
29+
async def GetVideo(self, stream: 'grpclib.server.Stream[service.video.v1.video_pb2.GetVideoRequest, service.video.v1.video_pb2.GetVideoResponse]') -> None:
30+
raise grpclib.exceptions.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
31+
32+
async def DoCommand(self, stream: 'grpclib.server.Stream[common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse]') -> None:
33+
raise grpclib.exceptions.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
34+
35+
class VideoServiceStub:
36+
37+
def __init__(self, channel: grpclib.client.Channel) -> None:
38+
self.GetVideo = grpclib.client.UnaryStreamMethod(channel, '/viam.service.video.v1.VideoService/GetVideo', service.video.v1.video_pb2.GetVideoRequest, service.video.v1.video_pb2.GetVideoResponse)
39+
self.DoCommand = grpclib.client.UnaryUnaryMethod(channel, '/viam.service.video.v1.VideoService/DoCommand', common.v1.common_pb2.DoCommandRequest, common.v1.common_pb2.DoCommandResponse)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
"""Generated protocol buffer code."""
2+
from google.protobuf import descriptor as _descriptor
3+
from google.protobuf import descriptor_pool as _descriptor_pool
4+
from google.protobuf import runtime_version as _runtime_version
5+
from google.protobuf import symbol_database as _symbol_database
6+
from google.protobuf.internal import builder as _builder
7+
_runtime_version.ValidateProtobufRuntimeVersion(_runtime_version.Domain.PUBLIC, 5, 29, 2, '', 'service/video/v1/video.proto')
8+
_sym_db = _symbol_database.Default()
9+
from ....common.v1 import common_pb2 as common_dot_v1_dot_common__pb2
10+
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
11+
from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
12+
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
13+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cservice/video/v1/video.proto\x12\x15viam.service.video.v1\x1a\x16common/v1/common.proto\x1a\x1cgoogle/api/annotations.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xc3\x02\n\x0fGetVideoRequest\x12\x12\n\x04name\x18\x01 \x01(\tR\x04name\x12C\n\x0fstart_timestamp\x18\x02 \x01(\x0b2\x1a.google.protobuf.TimestampR\x0estartTimestamp\x12?\n\rend_timestamp\x18\x03 \x01(\x0b2\x1a.google.protobuf.TimestampR\x0cendTimestamp\x12\x1f\n\x0bvideo_codec\x18\x04 \x01(\tR\nvideoCodec\x12\'\n\x0fvideo_container\x18\x05 \x01(\tR\x0evideoContainer\x12\x1d\n\nrequest_id\x18\x06 \x01(\tR\trequestId\x12-\n\x05extra\x18c \x01(\x0b2\x17.google.protobuf.StructR\x05extra"y\n\x10GetVideoResponse\x12\x1d\n\nvideo_data\x18\x01 \x01(\x0cR\tvideoData\x12\'\n\x0fvideo_container\x18\x02 \x01(\tR\x0evideoContainer\x12\x1d\n\nrequest_id\x18\x03 \x01(\tR\trequestId2\xb3\x02\n\x0cVideoService\x12\x99\x01\n\x08GetVideo\x12&.viam.service.video.v1.GetVideoRequest\x1a\'.viam.service.video.v1.GetVideoResponse":\x82\xd3\xe4\x93\x024"2/viam/api/v1/service/video/{name}/get_video_stream0\x01\x12\x86\x01\n\tDoCommand\x12 .viam.common.v1.DoCommandRequest\x1a!.viam.common.v1.DoCommandResponse"4\x82\xd3\xe4\x93\x02.",/viam/api/v1/service/video/{name}/do_commandB=\n\x19com.viam.service.video.v1Z go.viam.com/api/service/video/v1b\x06proto3')
14+
_globals = globals()
15+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
16+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'service.video.v1.video_pb2', _globals)
17+
if not _descriptor._USE_C_DESCRIPTORS:
18+
_globals['DESCRIPTOR']._loaded_options = None
19+
_globals['DESCRIPTOR']._serialized_options = b'\n\x19com.viam.service.video.v1Z go.viam.com/api/service/video/v1'
20+
_globals['_VIDEOSERVICE'].methods_by_name['GetVideo']._loaded_options = None
21+
_globals['_VIDEOSERVICE'].methods_by_name['GetVideo']._serialized_options = b'\x82\xd3\xe4\x93\x024"2/viam/api/v1/service/video/{name}/get_video_stream'
22+
_globals['_VIDEOSERVICE'].methods_by_name['DoCommand']._loaded_options = None
23+
_globals['_VIDEOSERVICE'].methods_by_name['DoCommand']._serialized_options = b'\x82\xd3\xe4\x93\x02.",/viam/api/v1/service/video/{name}/do_command'
24+
_globals['_GETVIDEOREQUEST']._serialized_start = 173
25+
_globals['_GETVIDEOREQUEST']._serialized_end = 496
26+
_globals['_GETVIDEORESPONSE']._serialized_start = 498
27+
_globals['_GETVIDEORESPONSE']._serialized_end = 619
28+
_globals['_VIDEOSERVICE']._serialized_start = 622
29+
_globals['_VIDEOSERVICE']._serialized_end = 929
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
"""
2+
@generated by mypy-protobuf. Do not edit manually!
3+
isort:skip_file
4+
"""
5+
import builtins
6+
import google.protobuf.descriptor
7+
import google.protobuf.message
8+
import google.protobuf.struct_pb2
9+
import google.protobuf.timestamp_pb2
10+
import typing
11+
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
12+
13+
@typing.final
14+
class GetVideoRequest(google.protobuf.message.Message):
15+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
16+
NAME_FIELD_NUMBER: builtins.int
17+
START_TIMESTAMP_FIELD_NUMBER: builtins.int
18+
END_TIMESTAMP_FIELD_NUMBER: builtins.int
19+
VIDEO_CODEC_FIELD_NUMBER: builtins.int
20+
VIDEO_CONTAINER_FIELD_NUMBER: builtins.int
21+
REQUEST_ID_FIELD_NUMBER: builtins.int
22+
EXTRA_FIELD_NUMBER: builtins.int
23+
name: builtins.str
24+
'Name of the video source'
25+
video_codec: builtins.str
26+
'Codec for the video retrieval (e.g., "h264", "h265")'
27+
video_container: builtins.str
28+
'Container format for the video retrieval (e.g., "mp4", "fmp4")'
29+
request_id: builtins.str
30+
'To match a request to its responses'
31+
32+
@property
33+
def start_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp:
34+
"""Start time for the video retrieval"""
35+
36+
@property
37+
def end_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp:
38+
"""End time for the video retrieval"""
39+
40+
@property
41+
def extra(self) -> google.protobuf.struct_pb2.Struct:
42+
"""Additional arguments to the method"""
43+
44+
def __init__(self, *, name: builtins.str=..., start_timestamp: google.protobuf.timestamp_pb2.Timestamp | None=..., end_timestamp: google.protobuf.timestamp_pb2.Timestamp | None=..., video_codec: builtins.str=..., video_container: builtins.str=..., request_id: builtins.str=..., extra: google.protobuf.struct_pb2.Struct | None=...) -> None:
45+
...
46+
47+
def HasField(self, field_name: typing.Literal['end_timestamp', b'end_timestamp', 'extra', b'extra', 'start_timestamp', b'start_timestamp']) -> builtins.bool:
48+
...
49+
50+
def ClearField(self, field_name: typing.Literal['end_timestamp', b'end_timestamp', 'extra', b'extra', 'name', b'name', 'request_id', b'request_id', 'start_timestamp', b'start_timestamp', 'video_codec', b'video_codec', 'video_container', b'video_container']) -> None:
51+
...
52+
global___GetVideoRequest = GetVideoRequest
53+
54+
@typing.final
55+
class GetVideoResponse(google.protobuf.message.Message):
56+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
57+
VIDEO_DATA_FIELD_NUMBER: builtins.int
58+
VIDEO_CONTAINER_FIELD_NUMBER: builtins.int
59+
REQUEST_ID_FIELD_NUMBER: builtins.int
60+
video_data: builtins.bytes
61+
'Video data chunk'
62+
video_container: builtins.str
63+
'Container format (e.g., "mp4", "fmp4")'
64+
request_id: builtins.str
65+
'Request ID to match this response to its request'
66+
67+
def __init__(self, *, video_data: builtins.bytes=..., video_container: builtins.str=..., request_id: builtins.str=...) -> None:
68+
...
69+
70+
def ClearField(self, field_name: typing.Literal['request_id', b'request_id', 'video_container', b'video_container', 'video_data', b'video_data']) -> None:
71+
...
72+
global___GetVideoResponse = GetVideoResponse

0 commit comments

Comments
 (0)