From 032ff636b761ed2a701b809d764e7b9a7c4d4611 Mon Sep 17 00:00:00 2001 From: Markus Petke Date: Wed, 14 Aug 2024 07:45:54 +0200 Subject: [PATCH] regenerate files with new protobuf version --- .../.skeleton/requirements-velocitas.txt | 2 +- .../seat-adjuster/requirements-velocitas.txt | 2 +- velocitas_sdk/proto/broker_pb2.py | 83 +++--- velocitas_sdk/proto/broker_pb2.pyi | 164 +++++++--- velocitas_sdk/proto/broker_pb2_grpc.py | 280 ++++++++++++------ velocitas_sdk/proto/collector_pb2.py | 87 +++--- velocitas_sdk/proto/collector_pb2.pyi | 161 +++++++--- velocitas_sdk/proto/collector_pb2_grpc.py | 223 +++++++++----- velocitas_sdk/proto/types_pb2.py | 6 +- velocitas_sdk/proto/types_pb2.pyi | 68 +++-- velocitas_sdk/proto/types_pb2_grpc.py | 25 ++ 11 files changed, 734 insertions(+), 367 deletions(-) diff --git a/.project-creation/.skeleton/requirements-velocitas.txt b/.project-creation/.skeleton/requirements-velocitas.txt index 01373fad..84054f62 100644 --- a/.project-creation/.skeleton/requirements-velocitas.txt +++ b/.project-creation/.skeleton/requirements-velocitas.txt @@ -1 +1 @@ -velocitas-sdk==0.14.1 +velocitas-sdk==0.15.3 diff --git a/examples/seat-adjuster/requirements-velocitas.txt b/examples/seat-adjuster/requirements-velocitas.txt index 01373fad..84054f62 100644 --- a/examples/seat-adjuster/requirements-velocitas.txt +++ b/examples/seat-adjuster/requirements-velocitas.txt @@ -1 +1 @@ -velocitas-sdk==0.14.1 +velocitas-sdk==0.15.3 diff --git a/velocitas_sdk/proto/broker_pb2.py b/velocitas_sdk/proto/broker_pb2.py index af05ed2d..3a640860 100644 --- a/velocitas_sdk/proto/broker_pb2.py +++ b/velocitas_sdk/proto/broker_pb2.py @@ -1,7 +1,9 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: sdv/databroker/v1/broker.proto +# Protobuf Python Version: 5.26.1 """Generated protocol buffer code.""" + from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database @@ -14,46 +16,49 @@ from velocitas_sdk.proto import types_pb2 as sdv_dot_databroker_dot_v1_dot_types__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1esdv/databroker/v1/broker.proto\x12\x11sdv.databroker.v1\x1a\x1dsdv/databroker/v1/types.proto\"*\n\x14GetDatapointsRequest\x12\x12\n\ndatapoints\x18\x01 \x03(\t\"\xb0\x01\n\x12GetDatapointsReply\x12I\n\ndatapoints\x18\x01 \x03(\x0b\x32\x35.sdv.databroker.v1.GetDatapointsReply.DatapointsEntry\x1aO\n\x0f\x44\x61tapointsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.sdv.databroker.v1.Datapoint:\x02\x38\x01\"\xb4\x01\n\x14SetDatapointsRequest\x12K\n\ndatapoints\x18\x01 \x03(\x0b\x32\x37.sdv.databroker.v1.SetDatapointsRequest.DatapointsEntry\x1aO\n\x0f\x44\x61tapointsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.sdv.databroker.v1.Datapoint:\x02\x38\x01\"\xa9\x01\n\x12SetDatapointsReply\x12\x41\n\x06\x65rrors\x18\x01 \x03(\x0b\x32\x31.sdv.databroker.v1.SetDatapointsReply.ErrorsEntry\x1aP\n\x0b\x45rrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x30\n\x05value\x18\x02 \x01(\x0e\x32!.sdv.databroker.v1.DatapointError:\x02\x38\x01\"!\n\x10SubscribeRequest\x12\r\n\x05query\x18\x02 \x01(\t\"\x9c\x01\n\x0eSubscribeReply\x12=\n\x06\x66ields\x18\x01 \x03(\x0b\x32-.sdv.databroker.v1.SubscribeReply.FieldsEntry\x1aK\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.sdv.databroker.v1.Datapoint:\x02\x38\x01\"#\n\x12GetMetadataRequest\x12\r\n\x05names\x18\x01 \x03(\t\"=\n\x10GetMetadataReply\x12)\n\x04list\x18\x01 \x03(\x0b\x32\x1b.sdv.databroker.v1.Metadata2\xfc\x02\n\x06\x42roker\x12_\n\rGetDatapoints\x12\'.sdv.databroker.v1.GetDatapointsRequest\x1a%.sdv.databroker.v1.GetDatapointsReply\x12_\n\rSetDatapoints\x12\'.sdv.databroker.v1.SetDatapointsRequest\x1a%.sdv.databroker.v1.SetDatapointsReply\x12U\n\tSubscribe\x12#.sdv.databroker.v1.SubscribeRequest\x1a!.sdv.databroker.v1.SubscribeReply0\x01\x12Y\n\x0bGetMetadata\x12%.sdv.databroker.v1.GetMetadataRequest\x1a#.sdv.databroker.v1.GetMetadataReplyb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x1esdv/databroker/v1/broker.proto\x12\x11sdv.databroker.v1\x1a\x1dsdv/databroker/v1/types.proto"*\n\x14GetDatapointsRequest\x12\x12\n\ndatapoints\x18\x01 \x03(\t"\xb0\x01\n\x12GetDatapointsReply\x12I\n\ndatapoints\x18\x01 \x03(\x0b\x32\x35.sdv.databroker.v1.GetDatapointsReply.DatapointsEntry\x1aO\n\x0f\x44\x61tapointsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.sdv.databroker.v1.Datapoint:\x02\x38\x01"\xb4\x01\n\x14SetDatapointsRequest\x12K\n\ndatapoints\x18\x01 \x03(\x0b\x32\x37.sdv.databroker.v1.SetDatapointsRequest.DatapointsEntry\x1aO\n\x0f\x44\x61tapointsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.sdv.databroker.v1.Datapoint:\x02\x38\x01"\xa9\x01\n\x12SetDatapointsReply\x12\x41\n\x06\x65rrors\x18\x01 \x03(\x0b\x32\x31.sdv.databroker.v1.SetDatapointsReply.ErrorsEntry\x1aP\n\x0b\x45rrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x30\n\x05value\x18\x02 \x01(\x0e\x32!.sdv.databroker.v1.DatapointError:\x02\x38\x01"!\n\x10SubscribeRequest\x12\r\n\x05query\x18\x02 \x01(\t"\x9c\x01\n\x0eSubscribeReply\x12=\n\x06\x66ields\x18\x01 \x03(\x0b\x32-.sdv.databroker.v1.SubscribeReply.FieldsEntry\x1aK\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.sdv.databroker.v1.Datapoint:\x02\x38\x01"#\n\x12GetMetadataRequest\x12\r\n\x05names\x18\x01 \x03(\t"=\n\x10GetMetadataReply\x12)\n\x04list\x18\x01 \x03(\x0b\x32\x1b.sdv.databroker.v1.Metadata2\xfc\x02\n\x06\x42roker\x12_\n\rGetDatapoints\x12\'.sdv.databroker.v1.GetDatapointsRequest\x1a%.sdv.databroker.v1.GetDatapointsReply\x12_\n\rSetDatapoints\x12\'.sdv.databroker.v1.SetDatapointsRequest\x1a%.sdv.databroker.v1.SetDatapointsReply\x12U\n\tSubscribe\x12#.sdv.databroker.v1.SubscribeRequest\x1a!.sdv.databroker.v1.SubscribeReply0\x01\x12Y\n\x0bGetMetadata\x12%.sdv.databroker.v1.GetMetadataRequest\x1a#.sdv.databroker.v1.GetMetadataReplyb\x06proto3' +) _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sdv.databroker.v1.broker_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _GETDATAPOINTSREPLY_DATAPOINTSENTRY._options = None - _GETDATAPOINTSREPLY_DATAPOINTSENTRY._serialized_options = b'8\001' - _SETDATAPOINTSREQUEST_DATAPOINTSENTRY._options = None - _SETDATAPOINTSREQUEST_DATAPOINTSENTRY._serialized_options = b'8\001' - _SETDATAPOINTSREPLY_ERRORSENTRY._options = None - _SETDATAPOINTSREPLY_ERRORSENTRY._serialized_options = b'8\001' - _SUBSCRIBEREPLY_FIELDSENTRY._options = None - _SUBSCRIBEREPLY_FIELDSENTRY._serialized_options = b'8\001' - _globals['_GETDATAPOINTSREQUEST']._serialized_start=84 - _globals['_GETDATAPOINTSREQUEST']._serialized_end=126 - _globals['_GETDATAPOINTSREPLY']._serialized_start=129 - _globals['_GETDATAPOINTSREPLY']._serialized_end=305 - _globals['_GETDATAPOINTSREPLY_DATAPOINTSENTRY']._serialized_start=226 - _globals['_GETDATAPOINTSREPLY_DATAPOINTSENTRY']._serialized_end=305 - _globals['_SETDATAPOINTSREQUEST']._serialized_start=308 - _globals['_SETDATAPOINTSREQUEST']._serialized_end=488 - _globals['_SETDATAPOINTSREQUEST_DATAPOINTSENTRY']._serialized_start=226 - _globals['_SETDATAPOINTSREQUEST_DATAPOINTSENTRY']._serialized_end=305 - _globals['_SETDATAPOINTSREPLY']._serialized_start=491 - _globals['_SETDATAPOINTSREPLY']._serialized_end=660 - _globals['_SETDATAPOINTSREPLY_ERRORSENTRY']._serialized_start=580 - _globals['_SETDATAPOINTSREPLY_ERRORSENTRY']._serialized_end=660 - _globals['_SUBSCRIBEREQUEST']._serialized_start=662 - _globals['_SUBSCRIBEREQUEST']._serialized_end=695 - _globals['_SUBSCRIBEREPLY']._serialized_start=698 - _globals['_SUBSCRIBEREPLY']._serialized_end=854 - _globals['_SUBSCRIBEREPLY_FIELDSENTRY']._serialized_start=779 - _globals['_SUBSCRIBEREPLY_FIELDSENTRY']._serialized_end=854 - _globals['_GETMETADATAREQUEST']._serialized_start=856 - _globals['_GETMETADATAREQUEST']._serialized_end=891 - _globals['_GETMETADATAREPLY']._serialized_start=893 - _globals['_GETMETADATAREPLY']._serialized_end=954 - _globals['_BROKER']._serialized_start=957 - _globals['_BROKER']._serialized_end=1337 +_builder.BuildTopDescriptorsAndMessages( + DESCRIPTOR, "sdv.databroker.v1.broker_pb2", _globals +) +if not _descriptor._USE_C_DESCRIPTORS: + DESCRIPTOR._loaded_options = None + _globals["_GETDATAPOINTSREPLY_DATAPOINTSENTRY"]._loaded_options = None + _globals["_GETDATAPOINTSREPLY_DATAPOINTSENTRY"]._serialized_options = b"8\001" + _globals["_SETDATAPOINTSREQUEST_DATAPOINTSENTRY"]._loaded_options = None + _globals["_SETDATAPOINTSREQUEST_DATAPOINTSENTRY"]._serialized_options = b"8\001" + _globals["_SETDATAPOINTSREPLY_ERRORSENTRY"]._loaded_options = None + _globals["_SETDATAPOINTSREPLY_ERRORSENTRY"]._serialized_options = b"8\001" + _globals["_SUBSCRIBEREPLY_FIELDSENTRY"]._loaded_options = None + _globals["_SUBSCRIBEREPLY_FIELDSENTRY"]._serialized_options = b"8\001" + _globals["_GETDATAPOINTSREQUEST"]._serialized_start = 84 + _globals["_GETDATAPOINTSREQUEST"]._serialized_end = 126 + _globals["_GETDATAPOINTSREPLY"]._serialized_start = 129 + _globals["_GETDATAPOINTSREPLY"]._serialized_end = 305 + _globals["_GETDATAPOINTSREPLY_DATAPOINTSENTRY"]._serialized_start = 226 + _globals["_GETDATAPOINTSREPLY_DATAPOINTSENTRY"]._serialized_end = 305 + _globals["_SETDATAPOINTSREQUEST"]._serialized_start = 308 + _globals["_SETDATAPOINTSREQUEST"]._serialized_end = 488 + _globals["_SETDATAPOINTSREQUEST_DATAPOINTSENTRY"]._serialized_start = 226 + _globals["_SETDATAPOINTSREQUEST_DATAPOINTSENTRY"]._serialized_end = 305 + _globals["_SETDATAPOINTSREPLY"]._serialized_start = 491 + _globals["_SETDATAPOINTSREPLY"]._serialized_end = 660 + _globals["_SETDATAPOINTSREPLY_ERRORSENTRY"]._serialized_start = 580 + _globals["_SETDATAPOINTSREPLY_ERRORSENTRY"]._serialized_end = 660 + _globals["_SUBSCRIBEREQUEST"]._serialized_start = 662 + _globals["_SUBSCRIBEREQUEST"]._serialized_end = 695 + _globals["_SUBSCRIBEREPLY"]._serialized_start = 698 + _globals["_SUBSCRIBEREPLY"]._serialized_end = 854 + _globals["_SUBSCRIBEREPLY_FIELDSENTRY"]._serialized_start = 779 + _globals["_SUBSCRIBEREPLY_FIELDSENTRY"]._serialized_end = 854 + _globals["_GETMETADATAREQUEST"]._serialized_start = 856 + _globals["_GETMETADATAREQUEST"]._serialized_end = 891 + _globals["_GETMETADATAREPLY"]._serialized_start = 893 + _globals["_GETMETADATAREPLY"]._serialized_end = 954 + _globals["_BROKER"]._serialized_start = 957 + _globals["_BROKER"]._serialized_end = 1337 # @@protoc_insertion_point(module_scope) diff --git a/velocitas_sdk/proto/broker_pb2.pyi b/velocitas_sdk/proto/broker_pb2.pyi index 0322f7fd..404737c9 100644 --- a/velocitas_sdk/proto/broker_pb2.pyi +++ b/velocitas_sdk/proto/broker_pb2.pyi @@ -1,43 +1,58 @@ """ @generated by mypy-protobuf. Do not edit manually! +isort:skip_file +Copyright (c) 2022-2024 Contributors to the Eclipse Foundation + +This program and the accompanying materials are made available under the +terms of the Apache License, Version 2.0 which is available at +https://www.apache.org/licenses/LICENSE-2.0. + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +License for the specific language governing permissions and limitations +under the License. + +SPDX-License-Identifier: Apache-2.0 """ + import builtins import collections.abc import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.message import velocitas_sdk.proto.types_pb2 -import sys - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions +import typing DESCRIPTOR: google.protobuf.descriptor.FileDescriptor -@typing_extensions.final +@typing.final class GetDatapointsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor DATAPOINTS_FIELD_NUMBER: builtins.int @property - def datapoints(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + def datapoints( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: """A list of requested data points.""" + def __init__( self, *, datapoints: collections.abc.Iterable[builtins.str] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["datapoints", b"datapoints"]) -> None: ... + def ClearField( + self, field_name: typing.Literal["datapoints", b"datapoints"] + ) -> None: ... global___GetDatapointsRequest = GetDatapointsRequest -@typing_extensions.final +@typing.final class GetDatapointsReply(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - @typing_extensions.final + @typing.final class DatapointsEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -52,30 +67,44 @@ class GetDatapointsReply(google.protobuf.message.Message): key: builtins.str = ..., value: sdv.databroker.v1.types_pb2.Datapoint | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["value", b"value"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... DATAPOINTS_FIELD_NUMBER: builtins.int @property - def datapoints(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, sdv.databroker.v1.types_pb2.Datapoint]: + def datapoints( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.str, sdv.databroker.v1.types_pb2.Datapoint + ]: """Contains the values of the requested data points. If a requested data point is not available, the corresponding Datapoint will have the respective failure value set. """ + def __init__( self, *, - datapoints: collections.abc.Mapping[builtins.str, sdv.databroker.v1.types_pb2.Datapoint] | None = ..., + datapoints: collections.abc.Mapping[ + builtins.str, sdv.databroker.v1.types_pb2.Datapoint + ] + | None = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["datapoints", b"datapoints"] ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["datapoints", b"datapoints"]) -> None: ... global___GetDatapointsReply = GetDatapointsReply -@typing_extensions.final +@typing.final class SetDatapointsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - @typing_extensions.final + @typing.final class DatapointsEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -90,27 +119,41 @@ class SetDatapointsRequest(google.protobuf.message.Message): key: builtins.str = ..., value: sdv.databroker.v1.types_pb2.Datapoint | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["value", b"value"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... DATAPOINTS_FIELD_NUMBER: builtins.int @property - def datapoints(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, sdv.databroker.v1.types_pb2.Datapoint]: + def datapoints( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.str, sdv.databroker.v1.types_pb2.Datapoint + ]: """A map of data points to set""" + def __init__( self, *, - datapoints: collections.abc.Mapping[builtins.str, sdv.databroker.v1.types_pb2.Datapoint] | None = ..., + datapoints: collections.abc.Mapping[ + builtins.str, sdv.databroker.v1.types_pb2.Datapoint + ] + | None = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["datapoints", b"datapoints"] ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["datapoints", b"datapoints"]) -> None: ... global___SetDatapointsRequest = SetDatapointsRequest -@typing_extensions.final +@typing.final class SetDatapointsReply(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - @typing_extensions.final + @typing.final class ErrorsEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -124,22 +167,32 @@ class SetDatapointsReply(google.protobuf.message.Message): key: builtins.str = ..., value: sdv.databroker.v1.types_pb2.DatapointError.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... ERRORS_FIELD_NUMBER: builtins.int @property - def errors(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, sdv.databroker.v1.types_pb2.DatapointError.ValueType]: + def errors( + self, + ) -> google.protobuf.internal.containers.ScalarMap[ + builtins.str, sdv.databroker.v1.types_pb2.DatapointError.ValueType + ]: """A map of errors (if any)""" + def __init__( self, *, - errors: collections.abc.Mapping[builtins.str, sdv.databroker.v1.types_pb2.DatapointError.ValueType] | None = ..., + errors: collections.abc.Mapping[ + builtins.str, sdv.databroker.v1.types_pb2.DatapointError.ValueType + ] + | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["errors", b"errors"]) -> None: ... + def ClearField(self, field_name: typing.Literal["errors", b"errors"]) -> None: ... global___SetDatapointsReply = SetDatapointsReply -@typing_extensions.final +@typing.final class SubscribeRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -155,15 +208,15 @@ class SubscribeRequest(google.protobuf.message.Message): *, query: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["query", b"query"]) -> None: ... + def ClearField(self, field_name: typing.Literal["query", b"query"]) -> None: ... global___SubscribeRequest = SubscribeRequest -@typing_extensions.final +@typing.final class SubscribeReply(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - @typing_extensions.final + @typing.final class FieldsEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -178,63 +231,84 @@ class SubscribeReply(google.protobuf.message.Message): key: builtins.str = ..., value: sdv.databroker.v1.types_pb2.Datapoint | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["value", b"value"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... FIELDS_FIELD_NUMBER: builtins.int @property - def fields(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, sdv.databroker.v1.types_pb2.Datapoint]: + def fields( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.str, sdv.databroker.v1.types_pb2.Datapoint + ]: """Contains the fields specified by the query. If a requested data point value is not available, the corresponding Datapoint will have it's respective failure value set. """ + def __init__( self, *, - fields: collections.abc.Mapping[builtins.str, sdv.databroker.v1.types_pb2.Datapoint] | None = ..., + fields: collections.abc.Mapping[ + builtins.str, sdv.databroker.v1.types_pb2.Datapoint + ] + | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["fields", b"fields"]) -> None: ... + def ClearField(self, field_name: typing.Literal["fields", b"fields"]) -> None: ... global___SubscribeReply = SubscribeReply -@typing_extensions.final +@typing.final class GetMetadataRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor NAMES_FIELD_NUMBER: builtins.int @property - def names(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: + def names( + self, + ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: """Request metadata for a list of data points referenced by their names. e.g. "Vehicle.Cabin.Seat.Row1.Pos1.Position" or "Vehicle.Speed". If no names are provided, metadata for all known data points will be returned. """ + def __init__( self, *, names: collections.abc.Iterable[builtins.str] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["names", b"names"]) -> None: ... + def ClearField(self, field_name: typing.Literal["names", b"names"]) -> None: ... global___GetMetadataRequest = GetMetadataRequest -@typing_extensions.final +@typing.final class GetMetadataReply(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor LIST_FIELD_NUMBER: builtins.int @property - def list(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[sdv.databroker.v1.types_pb2.Metadata]: + def list( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + sdv.databroker.v1.types_pb2.Metadata + ]: """Contains metadata of the requested data points. If a data point doesn't exist (i.e. not known to the Data Broker) the corresponding Metadata isn't part of the returned list. """ + def __init__( self, *, - list: collections.abc.Iterable[sdv.databroker.v1.types_pb2.Metadata] | None = ..., + list: collections.abc.Iterable[sdv.databroker.v1.types_pb2.Metadata] + | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["list", b"list"]) -> None: ... + def ClearField(self, field_name: typing.Literal["list", b"list"]) -> None: ... global___GetMetadataReply = GetMetadataReply diff --git a/velocitas_sdk/proto/broker_pb2_grpc.py b/velocitas_sdk/proto/broker_pb2_grpc.py index 9bb7ba84..d16e3f0f 100644 --- a/velocitas_sdk/proto/broker_pb2_grpc.py +++ b/velocitas_sdk/proto/broker_pb2_grpc.py @@ -1,9 +1,38 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" + import grpc +import warnings from velocitas_sdk.proto import broker_pb2 as sdv_dot_databroker_dot_v1_dot_broker__pb2 +GRPC_GENERATED_VERSION = "1.64.1" +GRPC_VERSION = grpc.__version__ +EXPECTED_ERROR_RELEASE = "1.65.0" +SCHEDULED_RELEASE_DATE = "June 25, 2024" +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + + _version_not_supported = first_version_is_lower( + GRPC_VERSION, GRPC_GENERATED_VERSION + ) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + warnings.warn( + f"The grpc package installed is at version {GRPC_VERSION}," + + f" but the generated code in sdv/databroker/v1/broker_pb2_grpc.py depends on" + + f" grpcio>={GRPC_GENERATED_VERSION}." + + f" Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}" + + f" or downgrade your generated code using grpcio-tools<={GRPC_VERSION}." + + f" This warning will become an error in {EXPECTED_ERROR_RELEASE}," + + f" scheduled for release on {SCHEDULED_RELEASE_DATE}.", + RuntimeWarning, + ) + class BrokerStub(object): """Missing associated documentation comment in .proto file.""" @@ -15,25 +44,29 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.GetDatapoints = channel.unary_unary( - '/sdv.databroker.v1.Broker/GetDatapoints', - request_serializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.GetDatapointsRequest.SerializeToString, - response_deserializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.GetDatapointsReply.FromString, - ) + "/sdv.databroker.v1.Broker/GetDatapoints", + request_serializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.GetDatapointsRequest.SerializeToString, + response_deserializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.GetDatapointsReply.FromString, + _registered_method=True, + ) self.SetDatapoints = channel.unary_unary( - '/sdv.databroker.v1.Broker/SetDatapoints', - request_serializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.SetDatapointsRequest.SerializeToString, - response_deserializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.SetDatapointsReply.FromString, - ) + "/sdv.databroker.v1.Broker/SetDatapoints", + request_serializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.SetDatapointsRequest.SerializeToString, + response_deserializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.SetDatapointsReply.FromString, + _registered_method=True, + ) self.Subscribe = channel.unary_stream( - '/sdv.databroker.v1.Broker/Subscribe', - request_serializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.SubscribeRequest.SerializeToString, - response_deserializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.SubscribeReply.FromString, - ) + "/sdv.databroker.v1.Broker/Subscribe", + request_serializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.SubscribeRequest.SerializeToString, + response_deserializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.SubscribeReply.FromString, + _registered_method=True, + ) self.GetMetadata = channel.unary_unary( - '/sdv.databroker.v1.Broker/GetMetadata', - request_serializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.GetMetadataRequest.SerializeToString, - response_deserializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.GetMetadataReply.FromString, - ) + "/sdv.databroker.v1.Broker/GetMetadata", + request_serializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.GetMetadataRequest.SerializeToString, + response_deserializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.GetMetadataReply.FromString, + _registered_method=True, + ) class BrokerServicer(object): @@ -47,15 +80,14 @@ def GetDatapoints(self, request, context): InvalidArgument is returned if the request is malformed. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def SetDatapoints(self, request, context): - """Set a datapoint (values) - """ + """Set a datapoint (values)""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def Subscribe(self, request, context): """Subscribe to a set of data points or conditional expressions @@ -66,8 +98,8 @@ def Subscribe(self, request, context): InvalidArgument is returned if the request is malformed. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def GetMetadata(self, request, context): """Request the metadata of a set of datapoints @@ -75,106 +107,162 @@ def GetMetadata(self, request, context): Returns metadata of the requested data points that exist. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def add_BrokerServicer_to_server(servicer, server): rpc_method_handlers = { - 'GetDatapoints': grpc.unary_unary_rpc_method_handler( - servicer.GetDatapoints, - request_deserializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.GetDatapointsRequest.FromString, - response_serializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.GetDatapointsReply.SerializeToString, - ), - 'SetDatapoints': grpc.unary_unary_rpc_method_handler( - servicer.SetDatapoints, - request_deserializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.SetDatapointsRequest.FromString, - response_serializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.SetDatapointsReply.SerializeToString, - ), - 'Subscribe': grpc.unary_stream_rpc_method_handler( - servicer.Subscribe, - request_deserializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.SubscribeRequest.FromString, - response_serializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.SubscribeReply.SerializeToString, - ), - 'GetMetadata': grpc.unary_unary_rpc_method_handler( - servicer.GetMetadata, - request_deserializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.GetMetadataRequest.FromString, - response_serializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.GetMetadataReply.SerializeToString, - ), + "GetDatapoints": grpc.unary_unary_rpc_method_handler( + servicer.GetDatapoints, + request_deserializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.GetDatapointsRequest.FromString, + response_serializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.GetDatapointsReply.SerializeToString, + ), + "SetDatapoints": grpc.unary_unary_rpc_method_handler( + servicer.SetDatapoints, + request_deserializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.SetDatapointsRequest.FromString, + response_serializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.SetDatapointsReply.SerializeToString, + ), + "Subscribe": grpc.unary_stream_rpc_method_handler( + servicer.Subscribe, + request_deserializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.SubscribeRequest.FromString, + response_serializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.SubscribeReply.SerializeToString, + ), + "GetMetadata": grpc.unary_unary_rpc_method_handler( + servicer.GetMetadata, + request_deserializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.GetMetadataRequest.FromString, + response_serializer=sdv_dot_databroker_dot_v1_dot_broker__pb2.GetMetadataReply.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - 'sdv.databroker.v1.Broker', rpc_method_handlers) + "sdv.databroker.v1.Broker", rpc_method_handlers + ) server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers( + "sdv.databroker.v1.Broker", rpc_method_handlers + ) - # This class is part of an EXPERIMENTAL API. +# This class is part of an EXPERIMENTAL API. class Broker(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def GetDatapoints(request, + def GetDatapoints( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/sdv.databroker.v1.Broker/GetDatapoints', + "/sdv.databroker.v1.Broker/GetDatapoints", sdv_dot_databroker_dot_v1_dot_broker__pb2.GetDatapointsRequest.SerializeToString, sdv_dot_databroker_dot_v1_dot_broker__pb2.GetDatapointsReply.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True, + ) @staticmethod - def SetDatapoints(request, + def SetDatapoints( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/sdv.databroker.v1.Broker/SetDatapoints', + "/sdv.databroker.v1.Broker/SetDatapoints", sdv_dot_databroker_dot_v1_dot_broker__pb2.SetDatapointsRequest.SerializeToString, sdv_dot_databroker_dot_v1_dot_broker__pb2.SetDatapointsReply.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True, + ) @staticmethod - def Subscribe(request, + def Subscribe( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_stream( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_stream(request, target, '/sdv.databroker.v1.Broker/Subscribe', + "/sdv.databroker.v1.Broker/Subscribe", sdv_dot_databroker_dot_v1_dot_broker__pb2.SubscribeRequest.SerializeToString, sdv_dot_databroker_dot_v1_dot_broker__pb2.SubscribeReply.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True, + ) @staticmethod - def GetMetadata(request, + def GetMetadata( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/sdv.databroker.v1.Broker/GetMetadata', + "/sdv.databroker.v1.Broker/GetMetadata", sdv_dot_databroker_dot_v1_dot_broker__pb2.GetMetadataRequest.SerializeToString, sdv_dot_databroker_dot_v1_dot_broker__pb2.GetMetadataReply.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True, + ) diff --git a/velocitas_sdk/proto/collector_pb2.py b/velocitas_sdk/proto/collector_pb2.py index 2b49adee..f183af74 100644 --- a/velocitas_sdk/proto/collector_pb2.py +++ b/velocitas_sdk/proto/collector_pb2.py @@ -1,7 +1,9 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: sdv/databroker/v1/collector.proto +# Protobuf Python Version: 5.26.1 """Generated protocol buffer code.""" + from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database @@ -14,48 +16,51 @@ from velocitas_sdk.proto import types_pb2 as sdv_dot_databroker_dot_v1_dot_types__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n!sdv/databroker/v1/collector.proto\x12\x11sdv.databroker.v1\x1a\x1dsdv/databroker/v1/types.proto\"\xba\x01\n\x17UpdateDatapointsRequest\x12N\n\ndatapoints\x18\x01 \x03(\x0b\x32:.sdv.databroker.v1.UpdateDatapointsRequest.DatapointsEntry\x1aO\n\x0f\x44\x61tapointsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.sdv.databroker.v1.Datapoint:\x02\x38\x01\"\xaf\x01\n\x15UpdateDatapointsReply\x12\x44\n\x06\x65rrors\x18\x01 \x03(\x0b\x32\x34.sdv.databroker.v1.UpdateDatapointsReply.ErrorsEntry\x1aP\n\x0b\x45rrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x30\n\x05value\x18\x02 \x01(\x0e\x32!.sdv.databroker.v1.DatapointError:\x02\x38\x01\"\xba\x01\n\x17StreamDatapointsRequest\x12N\n\ndatapoints\x18\x01 \x03(\x0b\x32:.sdv.databroker.v1.StreamDatapointsRequest.DatapointsEntry\x1aO\n\x0f\x44\x61tapointsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.sdv.databroker.v1.Datapoint:\x02\x38\x01\"\xaf\x01\n\x15StreamDatapointsReply\x12\x44\n\x06\x65rrors\x18\x01 \x03(\x0b\x32\x34.sdv.databroker.v1.StreamDatapointsReply.ErrorsEntry\x1aP\n\x0b\x45rrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x30\n\x05value\x18\x02 \x01(\x0e\x32!.sdv.databroker.v1.DatapointError:\x02\x38\x01\"R\n\x19RegisterDatapointsRequest\x12\x35\n\x04list\x18\x01 \x03(\x0b\x32\'.sdv.databroker.v1.RegistrationMetadata\"\x9d\x01\n\x14RegistrationMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12.\n\tdata_type\x18\x02 \x01(\x0e\x32\x1b.sdv.databroker.v1.DataType\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x32\n\x0b\x63hange_type\x18\x04 \x01(\x0e\x32\x1d.sdv.databroker.v1.ChangeType\"\x93\x01\n\x17RegisterDatapointsReply\x12H\n\x07results\x18\x01 \x03(\x0b\x32\x37.sdv.databroker.v1.RegisterDatapointsReply.ResultsEntry\x1a.\n\x0cResultsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x32\xd3\x02\n\tCollector\x12n\n\x12RegisterDatapoints\x12,.sdv.databroker.v1.RegisterDatapointsRequest\x1a*.sdv.databroker.v1.RegisterDatapointsReply\x12h\n\x10UpdateDatapoints\x12*.sdv.databroker.v1.UpdateDatapointsRequest\x1a(.sdv.databroker.v1.UpdateDatapointsReply\x12l\n\x10StreamDatapoints\x12*.sdv.databroker.v1.StreamDatapointsRequest\x1a(.sdv.databroker.v1.StreamDatapointsReply(\x01\x30\x01\x62\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n!sdv/databroker/v1/collector.proto\x12\x11sdv.databroker.v1\x1a\x1dsdv/databroker/v1/types.proto"\xba\x01\n\x17UpdateDatapointsRequest\x12N\n\ndatapoints\x18\x01 \x03(\x0b\x32:.sdv.databroker.v1.UpdateDatapointsRequest.DatapointsEntry\x1aO\n\x0f\x44\x61tapointsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.sdv.databroker.v1.Datapoint:\x02\x38\x01"\xaf\x01\n\x15UpdateDatapointsReply\x12\x44\n\x06\x65rrors\x18\x01 \x03(\x0b\x32\x34.sdv.databroker.v1.UpdateDatapointsReply.ErrorsEntry\x1aP\n\x0b\x45rrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x30\n\x05value\x18\x02 \x01(\x0e\x32!.sdv.databroker.v1.DatapointError:\x02\x38\x01"\xba\x01\n\x17StreamDatapointsRequest\x12N\n\ndatapoints\x18\x01 \x03(\x0b\x32:.sdv.databroker.v1.StreamDatapointsRequest.DatapointsEntry\x1aO\n\x0f\x44\x61tapointsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12+\n\x05value\x18\x02 \x01(\x0b\x32\x1c.sdv.databroker.v1.Datapoint:\x02\x38\x01"\xaf\x01\n\x15StreamDatapointsReply\x12\x44\n\x06\x65rrors\x18\x01 \x03(\x0b\x32\x34.sdv.databroker.v1.StreamDatapointsReply.ErrorsEntry\x1aP\n\x0b\x45rrorsEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12\x30\n\x05value\x18\x02 \x01(\x0e\x32!.sdv.databroker.v1.DatapointError:\x02\x38\x01"R\n\x19RegisterDatapointsRequest\x12\x35\n\x04list\x18\x01 \x03(\x0b\x32\'.sdv.databroker.v1.RegistrationMetadata"\x9d\x01\n\x14RegistrationMetadata\x12\x0c\n\x04name\x18\x01 \x01(\t\x12.\n\tdata_type\x18\x02 \x01(\x0e\x32\x1b.sdv.databroker.v1.DataType\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x32\n\x0b\x63hange_type\x18\x04 \x01(\x0e\x32\x1d.sdv.databroker.v1.ChangeType"\x93\x01\n\x17RegisterDatapointsReply\x12H\n\x07results\x18\x01 \x03(\x0b\x32\x37.sdv.databroker.v1.RegisterDatapointsReply.ResultsEntry\x1a.\n\x0cResultsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\x32\xd3\x02\n\tCollector\x12n\n\x12RegisterDatapoints\x12,.sdv.databroker.v1.RegisterDatapointsRequest\x1a*.sdv.databroker.v1.RegisterDatapointsReply\x12h\n\x10UpdateDatapoints\x12*.sdv.databroker.v1.UpdateDatapointsRequest\x1a(.sdv.databroker.v1.UpdateDatapointsReply\x12l\n\x10StreamDatapoints\x12*.sdv.databroker.v1.StreamDatapointsRequest\x1a(.sdv.databroker.v1.StreamDatapointsReply(\x01\x30\x01\x62\x06proto3' +) _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sdv.databroker.v1.collector_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _UPDATEDATAPOINTSREQUEST_DATAPOINTSENTRY._options = None - _UPDATEDATAPOINTSREQUEST_DATAPOINTSENTRY._serialized_options = b'8\001' - _UPDATEDATAPOINTSREPLY_ERRORSENTRY._options = None - _UPDATEDATAPOINTSREPLY_ERRORSENTRY._serialized_options = b'8\001' - _STREAMDATAPOINTSREQUEST_DATAPOINTSENTRY._options = None - _STREAMDATAPOINTSREQUEST_DATAPOINTSENTRY._serialized_options = b'8\001' - _STREAMDATAPOINTSREPLY_ERRORSENTRY._options = None - _STREAMDATAPOINTSREPLY_ERRORSENTRY._serialized_options = b'8\001' - _REGISTERDATAPOINTSREPLY_RESULTSENTRY._options = None - _REGISTERDATAPOINTSREPLY_RESULTSENTRY._serialized_options = b'8\001' - _globals['_UPDATEDATAPOINTSREQUEST']._serialized_start=88 - _globals['_UPDATEDATAPOINTSREQUEST']._serialized_end=274 - _globals['_UPDATEDATAPOINTSREQUEST_DATAPOINTSENTRY']._serialized_start=195 - _globals['_UPDATEDATAPOINTSREQUEST_DATAPOINTSENTRY']._serialized_end=274 - _globals['_UPDATEDATAPOINTSREPLY']._serialized_start=277 - _globals['_UPDATEDATAPOINTSREPLY']._serialized_end=452 - _globals['_UPDATEDATAPOINTSREPLY_ERRORSENTRY']._serialized_start=372 - _globals['_UPDATEDATAPOINTSREPLY_ERRORSENTRY']._serialized_end=452 - _globals['_STREAMDATAPOINTSREQUEST']._serialized_start=455 - _globals['_STREAMDATAPOINTSREQUEST']._serialized_end=641 - _globals['_STREAMDATAPOINTSREQUEST_DATAPOINTSENTRY']._serialized_start=195 - _globals['_STREAMDATAPOINTSREQUEST_DATAPOINTSENTRY']._serialized_end=274 - _globals['_STREAMDATAPOINTSREPLY']._serialized_start=644 - _globals['_STREAMDATAPOINTSREPLY']._serialized_end=819 - _globals['_STREAMDATAPOINTSREPLY_ERRORSENTRY']._serialized_start=372 - _globals['_STREAMDATAPOINTSREPLY_ERRORSENTRY']._serialized_end=452 - _globals['_REGISTERDATAPOINTSREQUEST']._serialized_start=821 - _globals['_REGISTERDATAPOINTSREQUEST']._serialized_end=903 - _globals['_REGISTRATIONMETADATA']._serialized_start=906 - _globals['_REGISTRATIONMETADATA']._serialized_end=1063 - _globals['_REGISTERDATAPOINTSREPLY']._serialized_start=1066 - _globals['_REGISTERDATAPOINTSREPLY']._serialized_end=1213 - _globals['_REGISTERDATAPOINTSREPLY_RESULTSENTRY']._serialized_start=1167 - _globals['_REGISTERDATAPOINTSREPLY_RESULTSENTRY']._serialized_end=1213 - _globals['_COLLECTOR']._serialized_start=1216 - _globals['_COLLECTOR']._serialized_end=1555 +_builder.BuildTopDescriptorsAndMessages( + DESCRIPTOR, "sdv.databroker.v1.collector_pb2", _globals +) +if not _descriptor._USE_C_DESCRIPTORS: + DESCRIPTOR._loaded_options = None + _globals["_UPDATEDATAPOINTSREQUEST_DATAPOINTSENTRY"]._loaded_options = None + _globals["_UPDATEDATAPOINTSREQUEST_DATAPOINTSENTRY"]._serialized_options = b"8\001" + _globals["_UPDATEDATAPOINTSREPLY_ERRORSENTRY"]._loaded_options = None + _globals["_UPDATEDATAPOINTSREPLY_ERRORSENTRY"]._serialized_options = b"8\001" + _globals["_STREAMDATAPOINTSREQUEST_DATAPOINTSENTRY"]._loaded_options = None + _globals["_STREAMDATAPOINTSREQUEST_DATAPOINTSENTRY"]._serialized_options = b"8\001" + _globals["_STREAMDATAPOINTSREPLY_ERRORSENTRY"]._loaded_options = None + _globals["_STREAMDATAPOINTSREPLY_ERRORSENTRY"]._serialized_options = b"8\001" + _globals["_REGISTERDATAPOINTSREPLY_RESULTSENTRY"]._loaded_options = None + _globals["_REGISTERDATAPOINTSREPLY_RESULTSENTRY"]._serialized_options = b"8\001" + _globals["_UPDATEDATAPOINTSREQUEST"]._serialized_start = 88 + _globals["_UPDATEDATAPOINTSREQUEST"]._serialized_end = 274 + _globals["_UPDATEDATAPOINTSREQUEST_DATAPOINTSENTRY"]._serialized_start = 195 + _globals["_UPDATEDATAPOINTSREQUEST_DATAPOINTSENTRY"]._serialized_end = 274 + _globals["_UPDATEDATAPOINTSREPLY"]._serialized_start = 277 + _globals["_UPDATEDATAPOINTSREPLY"]._serialized_end = 452 + _globals["_UPDATEDATAPOINTSREPLY_ERRORSENTRY"]._serialized_start = 372 + _globals["_UPDATEDATAPOINTSREPLY_ERRORSENTRY"]._serialized_end = 452 + _globals["_STREAMDATAPOINTSREQUEST"]._serialized_start = 455 + _globals["_STREAMDATAPOINTSREQUEST"]._serialized_end = 641 + _globals["_STREAMDATAPOINTSREQUEST_DATAPOINTSENTRY"]._serialized_start = 195 + _globals["_STREAMDATAPOINTSREQUEST_DATAPOINTSENTRY"]._serialized_end = 274 + _globals["_STREAMDATAPOINTSREPLY"]._serialized_start = 644 + _globals["_STREAMDATAPOINTSREPLY"]._serialized_end = 819 + _globals["_STREAMDATAPOINTSREPLY_ERRORSENTRY"]._serialized_start = 372 + _globals["_STREAMDATAPOINTSREPLY_ERRORSENTRY"]._serialized_end = 452 + _globals["_REGISTERDATAPOINTSREQUEST"]._serialized_start = 821 + _globals["_REGISTERDATAPOINTSREQUEST"]._serialized_end = 903 + _globals["_REGISTRATIONMETADATA"]._serialized_start = 906 + _globals["_REGISTRATIONMETADATA"]._serialized_end = 1063 + _globals["_REGISTERDATAPOINTSREPLY"]._serialized_start = 1066 + _globals["_REGISTERDATAPOINTSREPLY"]._serialized_end = 1213 + _globals["_REGISTERDATAPOINTSREPLY_RESULTSENTRY"]._serialized_start = 1167 + _globals["_REGISTERDATAPOINTSREPLY_RESULTSENTRY"]._serialized_end = 1213 + _globals["_COLLECTOR"]._serialized_start = 1216 + _globals["_COLLECTOR"]._serialized_end = 1555 # @@protoc_insertion_point(module_scope) diff --git a/velocitas_sdk/proto/collector_pb2.pyi b/velocitas_sdk/proto/collector_pb2.pyi index 3d008375..c83aeec0 100644 --- a/velocitas_sdk/proto/collector_pb2.pyi +++ b/velocitas_sdk/proto/collector_pb2.pyi @@ -1,26 +1,36 @@ """ @generated by mypy-protobuf. Do not edit manually! +isort:skip_file +Copyright (c) 2022-2024 Contributors to the Eclipse Foundation + +This program and the accompanying materials are made available under the +terms of the Apache License, Version 2.0 which is available at +https://www.apache.org/licenses/LICENSE-2.0. + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +License for the specific language governing permissions and limitations +under the License. + +SPDX-License-Identifier: Apache-2.0 """ + import builtins import collections.abc import google.protobuf.descriptor import google.protobuf.internal.containers import google.protobuf.message import velocitas_sdk.proto.types_pb2 -import sys - -if sys.version_info >= (3, 8): - import typing as typing_extensions -else: - import typing_extensions +import typing DESCRIPTOR: google.protobuf.descriptor.FileDescriptor -@typing_extensions.final +@typing.final class UpdateDatapointsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - @typing_extensions.final + @typing.final class DatapointsEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -35,26 +45,39 @@ class UpdateDatapointsRequest(google.protobuf.message.Message): key: builtins.int = ..., value: sdv.databroker.v1.types_pb2.Datapoint | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["value", b"value"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... DATAPOINTS_FIELD_NUMBER: builtins.int @property - def datapoints(self) -> google.protobuf.internal.containers.MessageMap[builtins.int, sdv.databroker.v1.types_pb2.Datapoint]: ... + def datapoints( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.int, sdv.databroker.v1.types_pb2.Datapoint + ]: ... def __init__( self, *, - datapoints: collections.abc.Mapping[builtins.int, sdv.databroker.v1.types_pb2.Datapoint] | None = ..., + datapoints: collections.abc.Mapping[ + builtins.int, sdv.databroker.v1.types_pb2.Datapoint + ] + | None = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["datapoints", b"datapoints"] ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["datapoints", b"datapoints"]) -> None: ... global___UpdateDatapointsRequest = UpdateDatapointsRequest -@typing_extensions.final +@typing.final class UpdateDatapointsReply(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - @typing_extensions.final + @typing.final class ErrorsEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -68,26 +91,36 @@ class UpdateDatapointsReply(google.protobuf.message.Message): key: builtins.int = ..., value: sdv.databroker.v1.types_pb2.DatapointError.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... ERRORS_FIELD_NUMBER: builtins.int @property - def errors(self) -> google.protobuf.internal.containers.ScalarMap[builtins.int, sdv.databroker.v1.types_pb2.DatapointError.ValueType]: + def errors( + self, + ) -> google.protobuf.internal.containers.ScalarMap[ + builtins.int, sdv.databroker.v1.types_pb2.DatapointError.ValueType + ]: """If empty, everything went well""" + def __init__( self, *, - errors: collections.abc.Mapping[builtins.int, sdv.databroker.v1.types_pb2.DatapointError.ValueType] | None = ..., + errors: collections.abc.Mapping[ + builtins.int, sdv.databroker.v1.types_pb2.DatapointError.ValueType + ] + | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["errors", b"errors"]) -> None: ... + def ClearField(self, field_name: typing.Literal["errors", b"errors"]) -> None: ... global___UpdateDatapointsReply = UpdateDatapointsReply -@typing_extensions.final +@typing.final class StreamDatapointsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - @typing_extensions.final + @typing.final class DatapointsEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -102,26 +135,39 @@ class StreamDatapointsRequest(google.protobuf.message.Message): key: builtins.int = ..., value: sdv.databroker.v1.types_pb2.Datapoint | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["value", b"value"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ... + def HasField( + self, field_name: typing.Literal["value", b"value"] + ) -> builtins.bool: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... DATAPOINTS_FIELD_NUMBER: builtins.int @property - def datapoints(self) -> google.protobuf.internal.containers.MessageMap[builtins.int, sdv.databroker.v1.types_pb2.Datapoint]: ... + def datapoints( + self, + ) -> google.protobuf.internal.containers.MessageMap[ + builtins.int, sdv.databroker.v1.types_pb2.Datapoint + ]: ... def __init__( self, *, - datapoints: collections.abc.Mapping[builtins.int, sdv.databroker.v1.types_pb2.Datapoint] | None = ..., + datapoints: collections.abc.Mapping[ + builtins.int, sdv.databroker.v1.types_pb2.Datapoint + ] + | None = ..., + ) -> None: ... + def ClearField( + self, field_name: typing.Literal["datapoints", b"datapoints"] ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["datapoints", b"datapoints"]) -> None: ... global___StreamDatapointsRequest = StreamDatapointsRequest -@typing_extensions.final +@typing.final class StreamDatapointsReply(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - @typing_extensions.final + @typing.final class ErrorsEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -135,38 +181,52 @@ class StreamDatapointsReply(google.protobuf.message.Message): key: builtins.int = ..., value: sdv.databroker.v1.types_pb2.DatapointError.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... ERRORS_FIELD_NUMBER: builtins.int @property - def errors(self) -> google.protobuf.internal.containers.ScalarMap[builtins.int, sdv.databroker.v1.types_pb2.DatapointError.ValueType]: + def errors( + self, + ) -> google.protobuf.internal.containers.ScalarMap[ + builtins.int, sdv.databroker.v1.types_pb2.DatapointError.ValueType + ]: """If empty, everything went well""" + def __init__( self, *, - errors: collections.abc.Mapping[builtins.int, sdv.databroker.v1.types_pb2.DatapointError.ValueType] | None = ..., + errors: collections.abc.Mapping[ + builtins.int, sdv.databroker.v1.types_pb2.DatapointError.ValueType + ] + | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["errors", b"errors"]) -> None: ... + def ClearField(self, field_name: typing.Literal["errors", b"errors"]) -> None: ... global___StreamDatapointsReply = StreamDatapointsReply -@typing_extensions.final +@typing.final class RegisterDatapointsRequest(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor LIST_FIELD_NUMBER: builtins.int @property - def list(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___RegistrationMetadata]: ... + def list( + self, + ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[ + global___RegistrationMetadata + ]: ... def __init__( self, *, list: collections.abc.Iterable[global___RegistrationMetadata] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["list", b"list"]) -> None: ... + def ClearField(self, field_name: typing.Literal["list", b"list"]) -> None: ... global___RegisterDatapointsRequest = RegisterDatapointsRequest -@typing_extensions.final +@typing.final class RegistrationMetadata(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -189,15 +249,27 @@ class RegistrationMetadata(google.protobuf.message.Message): description: builtins.str = ..., change_type: sdv.databroker.v1.types_pb2.ChangeType.ValueType = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["change_type", b"change_type", "data_type", b"data_type", "description", b"description", "name", b"name"]) -> None: ... + def ClearField( + self, + field_name: typing.Literal[ + "change_type", + b"change_type", + "data_type", + b"data_type", + "description", + b"description", + "name", + b"name", + ], + ) -> None: ... global___RegistrationMetadata = RegistrationMetadata -@typing_extensions.final +@typing.final class RegisterDatapointsReply(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor - @typing_extensions.final + @typing.final class ResultsEntry(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -211,17 +283,22 @@ class RegisterDatapointsReply(google.protobuf.message.Message): key: builtins.str = ..., value: builtins.int = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ... + def ClearField( + self, field_name: typing.Literal["key", b"key", "value", b"value"] + ) -> None: ... RESULTS_FIELD_NUMBER: builtins.int @property - def results(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.int]: + def results( + self, + ) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.int]: """Maps each data point name passed in RegisterDatapointsRequest to a data point id""" + def __init__( self, *, results: collections.abc.Mapping[builtins.str, builtins.int] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["results", b"results"]) -> None: ... + def ClearField(self, field_name: typing.Literal["results", b"results"]) -> None: ... global___RegisterDatapointsReply = RegisterDatapointsReply diff --git a/velocitas_sdk/proto/collector_pb2_grpc.py b/velocitas_sdk/proto/collector_pb2_grpc.py index c4e62298..e15c07bb 100644 --- a/velocitas_sdk/proto/collector_pb2_grpc.py +++ b/velocitas_sdk/proto/collector_pb2_grpc.py @@ -1,8 +1,39 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" -import grpc -from velocitas_sdk.proto import collector_pb2 as sdv_dot_databroker_dot_v1_dot_collector__pb2 +import grpc +import warnings + +from velocitas_sdk.proto import ( + collector_pb2 as sdv_dot_databroker_dot_v1_dot_collector__pb2, +) + +GRPC_GENERATED_VERSION = "1.64.1" +GRPC_VERSION = grpc.__version__ +EXPECTED_ERROR_RELEASE = "1.65.0" +SCHEDULED_RELEASE_DATE = "June 25, 2024" +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + + _version_not_supported = first_version_is_lower( + GRPC_VERSION, GRPC_GENERATED_VERSION + ) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + warnings.warn( + f"The grpc package installed is at version {GRPC_VERSION}," + + f" but the generated code in sdv/databroker/v1/collector_pb2_grpc.py depends on" + + f" grpcio>={GRPC_GENERATED_VERSION}." + + f" Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}" + + f" or downgrade your generated code using grpcio-tools<={GRPC_VERSION}." + + f" This warning will become an error in {EXPECTED_ERROR_RELEASE}," + + f" scheduled for release on {SCHEDULED_RELEASE_DATE}.", + RuntimeWarning, + ) class CollectorStub(object): @@ -15,20 +46,23 @@ def __init__(self, channel): channel: A grpc.Channel. """ self.RegisterDatapoints = channel.unary_unary( - '/sdv.databroker.v1.Collector/RegisterDatapoints', - request_serializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.RegisterDatapointsRequest.SerializeToString, - response_deserializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.RegisterDatapointsReply.FromString, - ) + "/sdv.databroker.v1.Collector/RegisterDatapoints", + request_serializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.RegisterDatapointsRequest.SerializeToString, + response_deserializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.RegisterDatapointsReply.FromString, + _registered_method=True, + ) self.UpdateDatapoints = channel.unary_unary( - '/sdv.databroker.v1.Collector/UpdateDatapoints', - request_serializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.UpdateDatapointsRequest.SerializeToString, - response_deserializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.UpdateDatapointsReply.FromString, - ) + "/sdv.databroker.v1.Collector/UpdateDatapoints", + request_serializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.UpdateDatapointsRequest.SerializeToString, + response_deserializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.UpdateDatapointsReply.FromString, + _registered_method=True, + ) self.StreamDatapoints = channel.stream_stream( - '/sdv.databroker.v1.Collector/StreamDatapoints', - request_serializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.StreamDatapointsRequest.SerializeToString, - response_deserializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.StreamDatapointsReply.FromString, - ) + "/sdv.databroker.v1.Collector/StreamDatapoints", + request_serializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.StreamDatapointsRequest.SerializeToString, + response_deserializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.StreamDatapointsReply.FromString, + _registered_method=True, + ) class CollectorServicer(object): @@ -49,8 +83,8 @@ def RegisterDatapoints(self, request, context): * INVALID_CHANGE_TYPE - The passed ChangeType is not supported """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def UpdateDatapoints(self, request, context): """Provide a set of updated datapoint values to the broker. @@ -66,8 +100,8 @@ def UpdateDatapoints(self, request, context): """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def StreamDatapoints(self, request_iterator, context): """Provide a stream with updated datapoint values to the broker. @@ -83,84 +117,127 @@ def StreamDatapoints(self, request_iterator, context): """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + context.set_details("Method not implemented!") + raise NotImplementedError("Method not implemented!") def add_CollectorServicer_to_server(servicer, server): rpc_method_handlers = { - 'RegisterDatapoints': grpc.unary_unary_rpc_method_handler( - servicer.RegisterDatapoints, - request_deserializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.RegisterDatapointsRequest.FromString, - response_serializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.RegisterDatapointsReply.SerializeToString, - ), - 'UpdateDatapoints': grpc.unary_unary_rpc_method_handler( - servicer.UpdateDatapoints, - request_deserializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.UpdateDatapointsRequest.FromString, - response_serializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.UpdateDatapointsReply.SerializeToString, - ), - 'StreamDatapoints': grpc.stream_stream_rpc_method_handler( - servicer.StreamDatapoints, - request_deserializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.StreamDatapointsRequest.FromString, - response_serializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.StreamDatapointsReply.SerializeToString, - ), + "RegisterDatapoints": grpc.unary_unary_rpc_method_handler( + servicer.RegisterDatapoints, + request_deserializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.RegisterDatapointsRequest.FromString, + response_serializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.RegisterDatapointsReply.SerializeToString, + ), + "UpdateDatapoints": grpc.unary_unary_rpc_method_handler( + servicer.UpdateDatapoints, + request_deserializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.UpdateDatapointsRequest.FromString, + response_serializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.UpdateDatapointsReply.SerializeToString, + ), + "StreamDatapoints": grpc.stream_stream_rpc_method_handler( + servicer.StreamDatapoints, + request_deserializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.StreamDatapointsRequest.FromString, + response_serializer=sdv_dot_databroker_dot_v1_dot_collector__pb2.StreamDatapointsReply.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( - 'sdv.databroker.v1.Collector', rpc_method_handlers) + "sdv.databroker.v1.Collector", rpc_method_handlers + ) server.add_generic_rpc_handlers((generic_handler,)) + server.add_registered_method_handlers( + "sdv.databroker.v1.Collector", rpc_method_handlers + ) - # This class is part of an EXPERIMENTAL API. +# This class is part of an EXPERIMENTAL API. class Collector(object): """Missing associated documentation comment in .proto file.""" @staticmethod - def RegisterDatapoints(request, + def RegisterDatapoints( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/sdv.databroker.v1.Collector/RegisterDatapoints', + "/sdv.databroker.v1.Collector/RegisterDatapoints", sdv_dot_databroker_dot_v1_dot_collector__pb2.RegisterDatapointsRequest.SerializeToString, sdv_dot_databroker_dot_v1_dot_collector__pb2.RegisterDatapointsReply.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True, + ) @staticmethod - def UpdateDatapoints(request, + def UpdateDatapoints( + request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.unary_unary( + request, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.unary_unary(request, target, '/sdv.databroker.v1.Collector/UpdateDatapoints', + "/sdv.databroker.v1.Collector/UpdateDatapoints", sdv_dot_databroker_dot_v1_dot_collector__pb2.UpdateDatapointsRequest.SerializeToString, sdv_dot_databroker_dot_v1_dot_collector__pb2.UpdateDatapointsReply.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True, + ) @staticmethod - def StreamDatapoints(request_iterator, + def StreamDatapoints( + request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None, + ): + return grpc.experimental.stream_stream( + request_iterator, target, - options=(), - channel_credentials=None, - call_credentials=None, - insecure=False, - compression=None, - wait_for_ready=None, - timeout=None, - metadata=None): - return grpc.experimental.stream_stream(request_iterator, target, '/sdv.databroker.v1.Collector/StreamDatapoints', + "/sdv.databroker.v1.Collector/StreamDatapoints", sdv_dot_databroker_dot_v1_dot_collector__pb2.StreamDatapointsRequest.SerializeToString, sdv_dot_databroker_dot_v1_dot_collector__pb2.StreamDatapointsReply.FromString, - options, channel_credentials, - insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + options, + channel_credentials, + insecure, + call_credentials, + compression, + wait_for_ready, + timeout, + metadata, + _registered_method=True, + ) diff --git a/velocitas_sdk/proto/types_pb2.py b/velocitas_sdk/proto/types_pb2.py index 8412f296..fa6e2e2a 100644 --- a/velocitas_sdk/proto/types_pb2.py +++ b/velocitas_sdk/proto/types_pb2.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: sdv/databroker/v1/types.proto +# Protobuf Python Version: 5.26.1 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool @@ -19,9 +20,8 @@ _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'sdv.databroker.v1.types_pb2', _globals) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None +if not _descriptor._USE_C_DESCRIPTORS: + DESCRIPTOR._loaded_options = None _globals['_DATATYPE']._serialized_start=1358 _globals['_DATATYPE']._serialized_end=1746 _globals['_DATAPOINTERROR']._serialized_start=1748 diff --git a/velocitas_sdk/proto/types_pb2.pyi b/velocitas_sdk/proto/types_pb2.pyi index 3cd0bd23..35df587d 100644 --- a/velocitas_sdk/proto/types_pb2.pyi +++ b/velocitas_sdk/proto/types_pb2.pyi @@ -1,6 +1,21 @@ """ @generated by mypy-protobuf. Do not edit manually! +isort:skip_file +Copyright (c) 2022-2024 Contributors to the Eclipse Foundation + +This program and the accompanying materials are made available under the +terms of the Apache License, Version 2.0 which is available at +https://www.apache.org/licenses/LICENSE-2.0. + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +License for the specific language governing permissions and limitations +under the License. + +SPDX-License-Identifier: Apache-2.0 """ + import builtins import collections.abc import google.protobuf.descriptor @@ -134,7 +149,7 @@ Value is updated continuously. Broker needs to tell """ global___ChangeType = ChangeType -@typing_extensions.final +@typing.final class StringArray(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -146,11 +161,11 @@ class StringArray(google.protobuf.message.Message): *, values: collections.abc.Iterable[builtins.str] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["values", b"values"]) -> None: ... + def ClearField(self, field_name: typing.Literal["values", b"values"]) -> None: ... global___StringArray = StringArray -@typing_extensions.final +@typing.final class BoolArray(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -162,11 +177,11 @@ class BoolArray(google.protobuf.message.Message): *, values: collections.abc.Iterable[builtins.bool] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["values", b"values"]) -> None: ... + def ClearField(self, field_name: typing.Literal["values", b"values"]) -> None: ... global___BoolArray = BoolArray -@typing_extensions.final +@typing.final class Int32Array(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -178,11 +193,11 @@ class Int32Array(google.protobuf.message.Message): *, values: collections.abc.Iterable[builtins.int] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["values", b"values"]) -> None: ... + def ClearField(self, field_name: typing.Literal["values", b"values"]) -> None: ... global___Int32Array = Int32Array -@typing_extensions.final +@typing.final class Int64Array(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -194,11 +209,11 @@ class Int64Array(google.protobuf.message.Message): *, values: collections.abc.Iterable[builtins.int] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["values", b"values"]) -> None: ... + def ClearField(self, field_name: typing.Literal["values", b"values"]) -> None: ... global___Int64Array = Int64Array -@typing_extensions.final +@typing.final class Uint32Array(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -210,11 +225,11 @@ class Uint32Array(google.protobuf.message.Message): *, values: collections.abc.Iterable[builtins.int] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["values", b"values"]) -> None: ... + def ClearField(self, field_name: typing.Literal["values", b"values"]) -> None: ... global___Uint32Array = Uint32Array -@typing_extensions.final +@typing.final class Uint64Array(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -226,11 +241,11 @@ class Uint64Array(google.protobuf.message.Message): *, values: collections.abc.Iterable[builtins.int] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["values", b"values"]) -> None: ... + def ClearField(self, field_name: typing.Literal["values", b"values"]) -> None: ... global___Uint64Array = Uint64Array -@typing_extensions.final +@typing.final class FloatArray(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -242,11 +257,11 @@ class FloatArray(google.protobuf.message.Message): *, values: collections.abc.Iterable[builtins.float] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["values", b"values"]) -> None: ... + def ClearField(self, field_name: typing.Literal["values", b"values"]) -> None: ... global___FloatArray = FloatArray -@typing_extensions.final +@typing.final class DoubleArray(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -258,11 +273,11 @@ class DoubleArray(google.protobuf.message.Message): *, values: collections.abc.Iterable[builtins.float] | None = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["values", b"values"]) -> None: ... + def ClearField(self, field_name: typing.Literal["values", b"values"]) -> None: ... global___DoubleArray = DoubleArray -@typing_extensions.final +@typing.final class Datapoint(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -270,7 +285,7 @@ class Datapoint(google.protobuf.message.Message): ValueType = typing.NewType("ValueType", builtins.int) V: typing_extensions.TypeAlias = ValueType - class _FailureEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Datapoint._Failure.ValueType], builtins.type): # noqa: F821 + class _FailureEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Datapoint._Failure.ValueType], builtins.type): DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor INVALID_VALUE: Datapoint._Failure.ValueType # 0 """The data point is known, but doesn't have a valid value""" @@ -313,9 +328,6 @@ class Datapoint(google.protobuf.message.Message): UINT64_ARRAY_FIELD_NUMBER: builtins.int FLOAT_ARRAY_FIELD_NUMBER: builtins.int DOUBLE_ARRAY_FIELD_NUMBER: builtins.int - @property - def timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: - """Timestamp of the value""" failure_value: global___Datapoint.Failure.ValueType string_value: builtins.str bool_value: builtins.bool @@ -325,6 +337,10 @@ class Datapoint(google.protobuf.message.Message): uint64_value: builtins.int float_value: builtins.float double_value: builtins.float + @property + def timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: + """Timestamp of the value""" + @property def string_array(self) -> global___StringArray: ... @property @@ -363,13 +379,13 @@ class Datapoint(google.protobuf.message.Message): float_array: global___FloatArray | None = ..., double_array: global___DoubleArray | None = ..., ) -> None: ... - def HasField(self, field_name: typing_extensions.Literal["bool_array", b"bool_array", "bool_value", b"bool_value", "double_array", b"double_array", "double_value", b"double_value", "failure_value", b"failure_value", "float_array", b"float_array", "float_value", b"float_value", "int32_array", b"int32_array", "int32_value", b"int32_value", "int64_array", b"int64_array", "int64_value", b"int64_value", "string_array", b"string_array", "string_value", b"string_value", "timestamp", b"timestamp", "uint32_array", b"uint32_array", "uint32_value", b"uint32_value", "uint64_array", b"uint64_array", "uint64_value", b"uint64_value", "value", b"value"]) -> builtins.bool: ... - def ClearField(self, field_name: typing_extensions.Literal["bool_array", b"bool_array", "bool_value", b"bool_value", "double_array", b"double_array", "double_value", b"double_value", "failure_value", b"failure_value", "float_array", b"float_array", "float_value", b"float_value", "int32_array", b"int32_array", "int32_value", b"int32_value", "int64_array", b"int64_array", "int64_value", b"int64_value", "string_array", b"string_array", "string_value", b"string_value", "timestamp", b"timestamp", "uint32_array", b"uint32_array", "uint32_value", b"uint32_value", "uint64_array", b"uint64_array", "uint64_value", b"uint64_value", "value", b"value"]) -> None: ... - def WhichOneof(self, oneof_group: typing_extensions.Literal["value", b"value"]) -> typing_extensions.Literal["failure_value", "string_value", "bool_value", "int32_value", "int64_value", "uint32_value", "uint64_value", "float_value", "double_value", "string_array", "bool_array", "int32_array", "int64_array", "uint32_array", "uint64_array", "float_array", "double_array"] | None: ... + def HasField(self, field_name: typing.Literal["bool_array", b"bool_array", "bool_value", b"bool_value", "double_array", b"double_array", "double_value", b"double_value", "failure_value", b"failure_value", "float_array", b"float_array", "float_value", b"float_value", "int32_array", b"int32_array", "int32_value", b"int32_value", "int64_array", b"int64_array", "int64_value", b"int64_value", "string_array", b"string_array", "string_value", b"string_value", "timestamp", b"timestamp", "uint32_array", b"uint32_array", "uint32_value", b"uint32_value", "uint64_array", b"uint64_array", "uint64_value", b"uint64_value", "value", b"value"]) -> builtins.bool: ... + def ClearField(self, field_name: typing.Literal["bool_array", b"bool_array", "bool_value", b"bool_value", "double_array", b"double_array", "double_value", b"double_value", "failure_value", b"failure_value", "float_array", b"float_array", "float_value", b"float_value", "int32_array", b"int32_array", "int32_value", b"int32_value", "int64_array", b"int64_array", "int64_value", b"int64_value", "string_array", b"string_array", "string_value", b"string_value", "timestamp", b"timestamp", "uint32_array", b"uint32_array", "uint32_value", b"uint32_value", "uint64_array", b"uint64_array", "uint64_value", b"uint64_value", "value", b"value"]) -> None: ... + def WhichOneof(self, oneof_group: typing.Literal["value", b"value"]) -> typing.Literal["failure_value", "string_value", "bool_value", "int32_value", "int64_value", "uint32_value", "uint64_value", "float_value", "double_value", "string_array", "bool_array", "int32_array", "int64_array", "uint32_array", "uint64_array", "float_array", "double_array"] | None: ... global___Datapoint = Datapoint -@typing_extensions.final +@typing.final class Metadata(google.protobuf.message.Message): DESCRIPTOR: google.protobuf.descriptor.Descriptor @@ -396,6 +412,6 @@ class Metadata(google.protobuf.message.Message): change_type: global___ChangeType.ValueType = ..., description: builtins.str = ..., ) -> None: ... - def ClearField(self, field_name: typing_extensions.Literal["change_type", b"change_type", "data_type", b"data_type", "description", b"description", "id", b"id", "name", b"name"]) -> None: ... + def ClearField(self, field_name: typing.Literal["change_type", b"change_type", "data_type", b"data_type", "description", b"description", "id", b"id", "name", b"name"]) -> None: ... global___Metadata = Metadata diff --git a/velocitas_sdk/proto/types_pb2_grpc.py b/velocitas_sdk/proto/types_pb2_grpc.py index 2daafffe..293ff197 100644 --- a/velocitas_sdk/proto/types_pb2_grpc.py +++ b/velocitas_sdk/proto/types_pb2_grpc.py @@ -1,4 +1,29 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc +import warnings + +GRPC_GENERATED_VERSION = '1.64.1' +GRPC_VERSION = grpc.__version__ +EXPECTED_ERROR_RELEASE = '1.65.0' +SCHEDULED_RELEASE_DATE = 'June 25, 2024' +_version_not_supported = False + +try: + from grpc._utilities import first_version_is_lower + _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION) +except ImportError: + _version_not_supported = True + +if _version_not_supported: + warnings.warn( + f'The grpc package installed is at version {GRPC_VERSION},' + + f' but the generated code in sdv/databroker/v1/types_pb2_grpc.py depends on' + + f' grpcio>={GRPC_GENERATED_VERSION}.' + + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}' + + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.' + + f' This warning will become an error in {EXPECTED_ERROR_RELEASE},' + + f' scheduled for release on {SCHEDULED_RELEASE_DATE}.', + RuntimeWarning + )