-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generate grpc client with grpcio==1.66.1 and mypy-protobuf extension
- Loading branch information
Showing
8 changed files
with
7,443 additions
and
3 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
""" | ||
@generated by mypy-protobuf. Do not edit manually! | ||
isort:skip_file | ||
""" | ||
|
||
import google.protobuf.descriptor | ||
|
||
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
""" | ||
@generated by mypy-protobuf. Do not edit manually! | ||
isort:skip_file | ||
Fork of the google.protobuf.Value with explicit support for integer values""" | ||
|
||
import builtins | ||
import collections.abc | ||
import google.protobuf.descriptor | ||
import google.protobuf.internal.containers | ||
import google.protobuf.internal.enum_type_wrapper | ||
import google.protobuf.message | ||
import sys | ||
import typing | ||
|
||
if sys.version_info >= (3, 10): | ||
import typing as typing_extensions | ||
else: | ||
import typing_extensions | ||
|
||
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor | ||
|
||
class _NullValue: | ||
ValueType = typing.NewType("ValueType", builtins.int) | ||
V: typing_extensions.TypeAlias = ValueType | ||
|
||
class _NullValueEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_NullValue.ValueType], builtins.type): | ||
DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor | ||
NULL_VALUE: _NullValue.ValueType # 0 | ||
"""Null value.""" | ||
|
||
class NullValue(_NullValue, metaclass=_NullValueEnumTypeWrapper): | ||
"""`NullValue` is a singleton enumeration to represent the null value for the | ||
`Value` type union. | ||
The JSON representation for `NullValue` is JSON `null`. | ||
""" | ||
|
||
NULL_VALUE: NullValue.ValueType # 0 | ||
"""Null value.""" | ||
global___NullValue = NullValue | ||
|
||
@typing.final | ||
class Struct(google.protobuf.message.Message): | ||
"""`Struct` represents a structured data value, consisting of fields | ||
which map to dynamically typed values. In some languages, `Struct` | ||
might be supported by a native representation. For example, in | ||
scripting languages like JS a struct is represented as an | ||
object. The details of that representation are described together | ||
with the proto support for the language. | ||
The JSON representation for `Struct` is a JSON object. | ||
""" | ||
|
||
DESCRIPTOR: google.protobuf.descriptor.Descriptor | ||
|
||
@typing.final | ||
class FieldsEntry(google.protobuf.message.Message): | ||
DESCRIPTOR: google.protobuf.descriptor.Descriptor | ||
|
||
KEY_FIELD_NUMBER: builtins.int | ||
VALUE_FIELD_NUMBER: builtins.int | ||
key: builtins.str | ||
@property | ||
def value(self) -> global___Value: ... | ||
def __init__( | ||
self, | ||
*, | ||
key: builtins.str = ..., | ||
value: global___Value | None = ..., | ||
) -> 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, global___Value]: | ||
"""Unordered map of dynamically typed values.""" | ||
|
||
def __init__( | ||
self, | ||
*, | ||
fields: collections.abc.Mapping[builtins.str, global___Value] | None = ..., | ||
) -> None: ... | ||
def ClearField(self, field_name: typing.Literal["fields", b"fields"]) -> None: ... | ||
|
||
global___Struct = Struct | ||
|
||
@typing.final | ||
class Value(google.protobuf.message.Message): | ||
"""`Value` represents a dynamically typed value which can be either | ||
null, a number, a string, a boolean, a recursive struct value, or a | ||
list of values. A producer of value is expected to set one of those | ||
variants, absence of any variant indicates an error. | ||
The JSON representation for `Value` is a JSON value. | ||
""" | ||
|
||
DESCRIPTOR: google.protobuf.descriptor.Descriptor | ||
|
||
NULL_VALUE_FIELD_NUMBER: builtins.int | ||
DOUBLE_VALUE_FIELD_NUMBER: builtins.int | ||
INTEGER_VALUE_FIELD_NUMBER: builtins.int | ||
STRING_VALUE_FIELD_NUMBER: builtins.int | ||
BOOL_VALUE_FIELD_NUMBER: builtins.int | ||
STRUCT_VALUE_FIELD_NUMBER: builtins.int | ||
LIST_VALUE_FIELD_NUMBER: builtins.int | ||
null_value: global___NullValue.ValueType | ||
"""Represents a null value.""" | ||
double_value: builtins.float | ||
"""Represents a double value.""" | ||
integer_value: builtins.int | ||
"""Represents an integer value""" | ||
string_value: builtins.str | ||
"""Represents a string value.""" | ||
bool_value: builtins.bool | ||
"""Represents a boolean value.""" | ||
@property | ||
def struct_value(self) -> global___Struct: | ||
"""Represents a structured value.""" | ||
|
||
@property | ||
def list_value(self) -> global___ListValue: | ||
"""Represents a repeated `Value`.""" | ||
|
||
def __init__( | ||
self, | ||
*, | ||
null_value: global___NullValue.ValueType = ..., | ||
double_value: builtins.float = ..., | ||
integer_value: builtins.int = ..., | ||
string_value: builtins.str = ..., | ||
bool_value: builtins.bool = ..., | ||
struct_value: global___Struct | None = ..., | ||
list_value: global___ListValue | None = ..., | ||
) -> None: ... | ||
def HasField(self, field_name: typing.Literal["bool_value", b"bool_value", "double_value", b"double_value", "integer_value", b"integer_value", "kind", b"kind", "list_value", b"list_value", "null_value", b"null_value", "string_value", b"string_value", "struct_value", b"struct_value"]) -> builtins.bool: ... | ||
def ClearField(self, field_name: typing.Literal["bool_value", b"bool_value", "double_value", b"double_value", "integer_value", b"integer_value", "kind", b"kind", "list_value", b"list_value", "null_value", b"null_value", "string_value", b"string_value", "struct_value", b"struct_value"]) -> None: ... | ||
def WhichOneof(self, oneof_group: typing.Literal["kind", b"kind"]) -> typing.Literal["null_value", "double_value", "integer_value", "string_value", "bool_value", "struct_value", "list_value"] | None: ... | ||
|
||
global___Value = Value | ||
|
||
@typing.final | ||
class ListValue(google.protobuf.message.Message): | ||
"""`ListValue` is a wrapper around a repeated field of values. | ||
The JSON representation for `ListValue` is a JSON array. | ||
""" | ||
|
||
DESCRIPTOR: google.protobuf.descriptor.Descriptor | ||
|
||
VALUES_FIELD_NUMBER: builtins.int | ||
@property | ||
def values(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Value]: | ||
"""Repeated field of dynamically typed values.""" | ||
|
||
def __init__( | ||
self, | ||
*, | ||
values: collections.abc.Iterable[global___Value] | None = ..., | ||
) -> None: ... | ||
def ClearField(self, field_name: typing.Literal["values", b"values"]) -> None: ... | ||
|
||
global___ListValue = ListValue |
Oops, something went wrong.