Skip to content

Commit

Permalink
Update protos, use modern protobuf, fix examples (dapr#595)
Browse files Browse the repository at this point in the history
* Update protos, use modern protobuf

Signed-off-by: Bernd Verst <[email protected]>

* Fix examples to reflect current expected output

Signed-off-by: Bernd Verst <[email protected]>

* Make metadata example version agnostic

Signed-off-by: Bernd Verst <[email protected]>

---------

Signed-off-by: Bernd Verst <[email protected]>
  • Loading branch information
berndverst authored Aug 23, 2023
1 parent 5904cff commit 3337a98
Show file tree
Hide file tree
Showing 16 changed files with 554 additions and 1,523 deletions.
145 changes: 30 additions & 115 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.

16 changes: 13 additions & 3 deletions dapr/proto/common/v1/common_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ else:

DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@typing_extensions.final
class HTTPExtension(google.protobuf.message.Message):
"""HTTPExtension includes HTTP verb and querystring
when Dapr runtime delivers HTTP content.
Expand All @@ -46,7 +47,7 @@ class HTTPExtension(google.protobuf.message.Message):
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _VerbEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[HTTPExtension._Verb.ValueType], builtins.type): # noqa: F821
class _VerbEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[HTTPExtension._Verb.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
NONE: HTTPExtension._Verb.ValueType # 0
GET: HTTPExtension._Verb.ValueType # 1
Expand Down Expand Up @@ -92,6 +93,7 @@ class HTTPExtension(google.protobuf.message.Message):

global___HTTPExtension = HTTPExtension

@typing_extensions.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 Down Expand Up @@ -137,6 +139,7 @@ class InvokeRequest(google.protobuf.message.Message):

global___InvokeRequest = InvokeRequest

@typing_extensions.final
class InvokeResponse(google.protobuf.message.Message):
"""InvokeResponse is the response message including data and its content type
from app callback.
Expand Down Expand Up @@ -164,6 +167,7 @@ class InvokeResponse(google.protobuf.message.Message):

global___InvokeResponse = InvokeResponse

@typing_extensions.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 Down Expand Up @@ -191,11 +195,13 @@ class StreamPayload(google.protobuf.message.Message):

global___StreamPayload = StreamPayload

@typing_extensions.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
class MetadataEntry(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor

Expand Down Expand Up @@ -245,6 +251,7 @@ class StateItem(google.protobuf.message.Message):

global___StateItem = StateItem

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

Expand All @@ -262,6 +269,7 @@ class Etag(google.protobuf.message.Message):

global___Etag = Etag

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

Expand All @@ -271,7 +279,7 @@ class StateOptions(google.protobuf.message.Message):
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _StateConcurrencyEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[StateOptions._StateConcurrency.ValueType], builtins.type): # noqa: F821
class _StateConcurrencyEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[StateOptions._StateConcurrency.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
CONCURRENCY_UNSPECIFIED: StateOptions._StateConcurrency.ValueType # 0
CONCURRENCY_FIRST_WRITE: StateOptions._StateConcurrency.ValueType # 1
Expand All @@ -288,7 +296,7 @@ class StateOptions(google.protobuf.message.Message):
ValueType = typing.NewType("ValueType", builtins.int)
V: typing_extensions.TypeAlias = ValueType

class _StateConsistencyEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[StateOptions._StateConsistency.ValueType], builtins.type): # noqa: F821
class _StateConsistencyEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[StateOptions._StateConsistency.ValueType], builtins.type):
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
CONSISTENCY_UNSPECIFIED: StateOptions._StateConsistency.ValueType # 0
CONSISTENCY_EVENTUAL: StateOptions._StateConsistency.ValueType # 1
Expand All @@ -315,11 +323,13 @@ class StateOptions(google.protobuf.message.Message):

global___StateOptions = StateOptions

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

DESCRIPTOR: google.protobuf.descriptor.Descriptor

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

Expand Down
Loading

0 comments on commit 3337a98

Please sign in to comment.