Skip to content

Commit 05bb6df

Browse files
committed
chore: generate proto typeshed stubs.
We're using the following command to generate protos and proto type stubs using `grpcio-tools` package. The command should be run from the repo root. ``` python -m grpc_tools.protoc -I.\cloudevents\proto\ --python_out=.\cloudevents\proto --pyi_out=.\cloudevents\proto .\cloudevents\proto\cloudevents.proto ``` Signed-off-by: Yurii Serhiichuk <savik.ne@gmail.com>
1 parent 53005c6 commit 05bb6df

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

cloudevents/proto/cloudevents_pb2.pyi

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
from google.protobuf import any_pb2 as _any_pb2
2+
from google.protobuf import timestamp_pb2 as _timestamp_pb2
3+
from google.protobuf.internal import containers as _containers
4+
from google.protobuf import descriptor as _descriptor
5+
from google.protobuf import message as _message
6+
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union
7+
8+
DESCRIPTOR: _descriptor.FileDescriptor
9+
10+
class CloudEvent(_message.Message):
11+
__slots__ = ["attributes", "binary_data", "id", "proto_data", "source", "spec_version", "text_data", "type"]
12+
class AttributesEntry(_message.Message):
13+
__slots__ = ["key", "value"]
14+
KEY_FIELD_NUMBER: _ClassVar[int]
15+
VALUE_FIELD_NUMBER: _ClassVar[int]
16+
key: str
17+
value: CloudEvent.CloudEventAttributeValue
18+
def __init__(self, key: _Optional[str] = ..., value: _Optional[_Union[CloudEvent.CloudEventAttributeValue, _Mapping]] = ...) -> None: ...
19+
class CloudEventAttributeValue(_message.Message):
20+
__slots__ = ["ce_boolean", "ce_bytes", "ce_integer", "ce_string", "ce_timestamp", "ce_uri", "ce_uri_ref"]
21+
CE_BOOLEAN_FIELD_NUMBER: _ClassVar[int]
22+
CE_BYTES_FIELD_NUMBER: _ClassVar[int]
23+
CE_INTEGER_FIELD_NUMBER: _ClassVar[int]
24+
CE_STRING_FIELD_NUMBER: _ClassVar[int]
25+
CE_TIMESTAMP_FIELD_NUMBER: _ClassVar[int]
26+
CE_URI_FIELD_NUMBER: _ClassVar[int]
27+
CE_URI_REF_FIELD_NUMBER: _ClassVar[int]
28+
ce_boolean: bool
29+
ce_bytes: bytes
30+
ce_integer: int
31+
ce_string: str
32+
ce_timestamp: _timestamp_pb2.Timestamp
33+
ce_uri: str
34+
ce_uri_ref: str
35+
def __init__(self, ce_boolean: bool = ..., ce_integer: _Optional[int] = ..., ce_string: _Optional[str] = ..., ce_bytes: _Optional[bytes] = ..., ce_uri: _Optional[str] = ..., ce_uri_ref: _Optional[str] = ..., ce_timestamp: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ...
36+
ATTRIBUTES_FIELD_NUMBER: _ClassVar[int]
37+
BINARY_DATA_FIELD_NUMBER: _ClassVar[int]
38+
ID_FIELD_NUMBER: _ClassVar[int]
39+
PROTO_DATA_FIELD_NUMBER: _ClassVar[int]
40+
SOURCE_FIELD_NUMBER: _ClassVar[int]
41+
SPEC_VERSION_FIELD_NUMBER: _ClassVar[int]
42+
TEXT_DATA_FIELD_NUMBER: _ClassVar[int]
43+
TYPE_FIELD_NUMBER: _ClassVar[int]
44+
attributes: _containers.MessageMap[str, CloudEvent.CloudEventAttributeValue]
45+
binary_data: bytes
46+
id: str
47+
proto_data: _any_pb2.Any
48+
source: str
49+
spec_version: str
50+
text_data: str
51+
type: str
52+
def __init__(self, id: _Optional[str] = ..., source: _Optional[str] = ..., spec_version: _Optional[str] = ..., type: _Optional[str] = ..., attributes: _Optional[_Mapping[str, CloudEvent.CloudEventAttributeValue]] = ..., binary_data: _Optional[bytes] = ..., text_data: _Optional[str] = ..., proto_data: _Optional[_Union[_any_pb2.Any, _Mapping]] = ...) -> None: ...
53+
54+
class CloudEventBatch(_message.Message):
55+
__slots__ = ["events"]
56+
EVENTS_FIELD_NUMBER: _ClassVar[int]
57+
events: _containers.RepeatedCompositeFieldContainer[CloudEvent]
58+
def __init__(self, events: _Optional[_Iterable[_Union[CloudEvent, _Mapping]]] = ...) -> None: ...

0 commit comments

Comments
 (0)