Skip to content

Commit

Permalink
update protos
Browse files Browse the repository at this point in the history
Signed-off-by: Bernd Verst <github@bernd.dev>
  • Loading branch information
berndverst committed Jul 3, 2024
1 parent bffb749 commit 10ca7b7
Show file tree
Hide file tree
Showing 14 changed files with 2,315 additions and 943 deletions.
10 changes: 5 additions & 5 deletions dapr/proto/common/v1/common_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 38 additions & 30 deletions dapr/proto/common/v1/common_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ 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.
"""

import builtins
import collections.abc
import google.protobuf.any_pb2
Expand All @@ -30,7 +31,7 @@ else:

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@typing_extensions.final
@typing.final
class HTTPExtension(google.protobuf.message.Message):
"""HTTPExtension includes HTTP verb and querystring
when Dapr runtime delivers HTTP content.
Expand Down Expand Up @@ -89,11 +90,11 @@ class HTTPExtension(google.protobuf.message.Message):
verb: global___HTTPExtension.Verb.ValueType = ...,
querystring: builtins.str = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["querystring", b"querystring", "verb", b"verb"]) -> None: ...
def ClearField(self, field_name: typing.Literal["querystring", b"querystring", "verb", b"verb"]) -> None: ...

global___HTTPExtension = HTTPExtension

@typing_extensions.final
@typing.final
class InvokeRequest(google.protobuf.message.Message):
"""InvokeRequest is the message to invoke a method with the data.
This message is used in InvokeService of Dapr gRPC Service and OnInvoke
Expand All @@ -108,24 +109,26 @@ class InvokeRequest(google.protobuf.message.Message):
HTTP_EXTENSION_FIELD_NUMBER: builtins.int
method: builtins.str
"""Required. method is a method name which will be invoked by caller."""
@property
def data(self) -> google.protobuf.any_pb2.Any:
"""Required in unary RPCs. Bytes value or Protobuf message which caller sent.
Dapr treats Any.value as bytes type if Any.type_url is unset.
"""
content_type: builtins.str
"""The type of data content.
This field is required if data delivers http request body
Otherwise, this is optional.
"""
@property
def data(self) -> google.protobuf.any_pb2.Any:
"""Required in unary RPCs. Bytes value or Protobuf message which caller sent.
Dapr treats Any.value as bytes type if Any.type_url is unset.
"""

@property
def http_extension(self) -> global___HTTPExtension:
"""HTTP specific fields if request conveys http-compatible request.
This field is required for http-compatible request. Otherwise,
this field is optional.
"""

def __init__(
self,
*,
Expand All @@ -134,12 +137,12 @@ class InvokeRequest(google.protobuf.message.Message):
content_type: builtins.str = ...,
http_extension: global___HTTPExtension | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["data", b"data", "http_extension", b"http_extension"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["content_type", b"content_type", "data", b"data", "http_extension", b"http_extension", "method", b"method"]) -> None: ...
def HasField(self, field_name: typing.Literal["data", b"data", "http_extension", b"http_extension"]) -> builtins.bool: ...
def ClearField(self, field_name: typing.Literal["content_type", b"content_type", "data", b"data", "http_extension", b"http_extension", "method", b"method"]) -> None: ...

global___InvokeRequest = InvokeRequest

@typing_extensions.final
@typing.final
class InvokeResponse(google.protobuf.message.Message):
"""InvokeResponse is the response message including data and its content type
from app callback.
Expand All @@ -151,23 +154,24 @@ class InvokeResponse(google.protobuf.message.Message):

DATA_FIELD_NUMBER: builtins.int
CONTENT_TYPE_FIELD_NUMBER: builtins.int
content_type: builtins.str
"""Required. The type of data content."""
@property
def data(self) -> google.protobuf.any_pb2.Any:
"""Required in unary RPCs. The content body of InvokeService response."""
content_type: builtins.str
"""Required. The type of data content."""

def __init__(
self,
*,
data: google.protobuf.any_pb2.Any | None = ...,
content_type: builtins.str = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["data", b"data"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["content_type", b"content_type", "data", b"data"]) -> None: ...
def HasField(self, field_name: typing.Literal["data", b"data"]) -> builtins.bool: ...
def ClearField(self, field_name: typing.Literal["content_type", b"content_type", "data", b"data"]) -> None: ...

global___InvokeResponse = InvokeResponse

@typing_extensions.final
@typing.final
class StreamPayload(google.protobuf.message.Message):
"""Chunk of data sent in a streaming request or response.
This is used in requests including InternalInvokeRequestStream.
Expand All @@ -191,17 +195,17 @@ class StreamPayload(google.protobuf.message.Message):
data: builtins.bytes = ...,
seq: builtins.int = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["data", b"data", "seq", b"seq"]) -> None: ...
def ClearField(self, field_name: typing.Literal["data", b"data", "seq", b"seq"]) -> None: ...

global___StreamPayload = StreamPayload

@typing_extensions.final
@typing.final
class StateItem(google.protobuf.message.Message):
"""StateItem represents state key, value, and additional options to save state."""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

@typing_extensions.final
@typing.final
class MetadataEntry(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor

Expand All @@ -215,7 +219,7 @@ class StateItem(google.protobuf.message.Message):
key: builtins.str = ...,
value: builtins.str = ...,
) -> 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: ...

KEY_FIELD_NUMBER: builtins.int
VALUE_FIELD_NUMBER: builtins.int
Expand All @@ -231,12 +235,15 @@ class StateItem(google.protobuf.message.Message):
"""The entity tag which represents the specific version of data.
The exact ETag format is defined by the corresponding data store.
"""

@property
def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]:
"""The metadata which will be passed to state store component."""

@property
def options(self) -> global___StateOptions:
"""Options for concurrency and consistency to save the state."""

def __init__(
self,
*,
Expand All @@ -246,12 +253,12 @@ class StateItem(google.protobuf.message.Message):
metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ...,
options: global___StateOptions | None = ...,
) -> None: ...
def HasField(self, field_name: typing_extensions.Literal["etag", b"etag", "options", b"options"]) -> builtins.bool: ...
def ClearField(self, field_name: typing_extensions.Literal["etag", b"etag", "key", b"key", "metadata", b"metadata", "options", b"options", "value", b"value"]) -> None: ...
def HasField(self, field_name: typing.Literal["etag", b"etag", "options", b"options"]) -> builtins.bool: ...
def ClearField(self, field_name: typing.Literal["etag", b"etag", "key", b"key", "metadata", b"metadata", "options", b"options", "value", b"value"]) -> None: ...

global___StateItem = StateItem

@typing_extensions.final
@typing.final
class Etag(google.protobuf.message.Message):
"""Etag represents a state item version"""

Expand All @@ -265,11 +272,11 @@ class Etag(google.protobuf.message.Message):
*,
value: builtins.str = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["value", b"value"]) -> None: ...
def ClearField(self, field_name: typing.Literal["value", b"value"]) -> None: ...

global___Etag = Etag

@typing_extensions.final
@typing.final
class StateOptions(google.protobuf.message.Message):
"""StateOptions configures concurrency and consistency for state operations"""

Expand Down Expand Up @@ -319,17 +326,17 @@ class StateOptions(google.protobuf.message.Message):
concurrency: global___StateOptions.StateConcurrency.ValueType = ...,
consistency: global___StateOptions.StateConsistency.ValueType = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["concurrency", b"concurrency", "consistency", b"consistency"]) -> None: ...
def ClearField(self, field_name: typing.Literal["concurrency", b"concurrency", "consistency", b"consistency"]) -> None: ...

global___StateOptions = StateOptions

@typing_extensions.final
@typing.final
class ConfigurationItem(google.protobuf.message.Message):
"""ConfigurationItem represents all the configuration with its name(key)."""

DESCRIPTOR: google.protobuf.descriptor.Descriptor

@typing_extensions.final
@typing.final
class MetadataEntry(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor

Expand All @@ -343,7 +350,7 @@ class ConfigurationItem(google.protobuf.message.Message):
key: builtins.str = ...,
value: builtins.str = ...,
) -> 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: ...

VALUE_FIELD_NUMBER: builtins.int
VERSION_FIELD_NUMBER: builtins.int
Expand All @@ -355,13 +362,14 @@ class ConfigurationItem(google.protobuf.message.Message):
@property
def metadata(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]:
"""the metadata which will be passed to/from configuration store component."""

def __init__(
self,
*,
value: builtins.str = ...,
version: builtins.str = ...,
metadata: collections.abc.Mapping[builtins.str, builtins.str] | None = ...,
) -> None: ...
def ClearField(self, field_name: typing_extensions.Literal["metadata", b"metadata", "value", b"value", "version", b"version"]) -> None: ...
def ClearField(self, field_name: typing.Literal["metadata", b"metadata", "value", b"value", "version", b"version"]) -> None: ...

global___ConfigurationItem = ConfigurationItem
25 changes: 25 additions & 0 deletions dapr/proto/common/v1/common_pb2_grpc.py
Original file line number Diff line number Diff line change
@@ -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.63.0'
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 dapr/proto/common/v1/common_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
)
Loading

0 comments on commit 10ca7b7

Please sign in to comment.