summaryrefslogtreecommitdiffstats
path: root/contrib/python
diff options
context:
space:
mode:
authormikhnenko <[email protected]>2025-09-19 07:24:48 +0300
committermikhnenko <[email protected]>2025-09-19 07:41:42 +0300
commite2959ffb47c9b624ae895613ea9a1b3e035aebbe (patch)
tree2daca07d4c279b03b8665649bc22c7fd58fb3ce9 /contrib/python
parent802a273af8ad8c633162b496bb73a0afb6f7f071 (diff)
Add more stubs to types-protobuf
commit_hash:3c5da68d1f3404e2446a9df36db77bdd7b757b8d
Diffstat (limited to 'contrib/python')
-rw-r--r--contrib/python/types-protobuf/.arcignore1
-rw-r--r--contrib/python/types-protobuf/.yandex_meta/yamaker.yaml4
-rw-r--r--contrib/python/types-protobuf/google-stubs/protobuf/any_pb2.pyi172
-rw-r--r--contrib/python/types-protobuf/google-stubs/protobuf/api_pb2.pyi305
-rw-r--r--contrib/python/types-protobuf/google-stubs/protobuf/compiler/plugin_pb2.pyi362
-rw-r--r--contrib/python/types-protobuf/google-stubs/protobuf/descriptor_pb2.pyi2855
-rw-r--r--contrib/python/types-protobuf/google-stubs/protobuf/duration_pb2.pyi126
-rw-r--r--contrib/python/types-protobuf/google-stubs/protobuf/empty_pb2.pyi57
-rw-r--r--contrib/python/types-protobuf/google-stubs/protobuf/field_mask_pb2.pyi259
-rw-r--r--contrib/python/types-protobuf/google-stubs/protobuf/source_context_pb2.pyi59
-rw-r--r--contrib/python/types-protobuf/google-stubs/protobuf/struct_pb2.pyi215
-rw-r--r--contrib/python/types-protobuf/google-stubs/protobuf/timestamp_pb2.pyi155
-rw-r--r--contrib/python/types-protobuf/google-stubs/protobuf/type_pb2.pyi464
-rw-r--r--contrib/python/types-protobuf/google-stubs/protobuf/wrappers_pb2.pyi238
-rw-r--r--contrib/python/types-protobuf/ya.make13
15 files changed, 5283 insertions, 2 deletions
diff --git a/contrib/python/types-protobuf/.arcignore b/contrib/python/types-protobuf/.arcignore
new file mode 100644
index 00000000000..c2ca675f875
--- /dev/null
+++ b/contrib/python/types-protobuf/.arcignore
@@ -0,0 +1 @@
+!*_pb2.pyi
diff --git a/contrib/python/types-protobuf/.yandex_meta/yamaker.yaml b/contrib/python/types-protobuf/.yandex_meta/yamaker.yaml
index b108f0f3ae7..65322935800 100644
--- a/contrib/python/types-protobuf/.yandex_meta/yamaker.yaml
+++ b/contrib/python/types-protobuf/.yandex_meta/yamaker.yaml
@@ -1,2 +1,2 @@
-exclude:
- - '*_pb2.pyi'
+keep:
+ - .arcignore
diff --git a/contrib/python/types-protobuf/google-stubs/protobuf/any_pb2.pyi b/contrib/python/types-protobuf/google-stubs/protobuf/any_pb2.pyi
new file mode 100644
index 00000000000..c12c7e4a813
--- /dev/null
+++ b/contrib/python/types-protobuf/google-stubs/protobuf/any_pb2.pyi
@@ -0,0 +1,172 @@
+"""
+@generated by mypy-protobuf. Do not edit manually!
+isort:skip_file
+Protocol Buffers - Google's data interchange format
+Copyright 2008 Google Inc. All rights reserved.
+https://developers.google.com/protocol-buffers/
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+"""
+
+import builtins
+import typing
+
+import google.protobuf.descriptor
+import google.protobuf.internal.well_known_types
+import google.protobuf.message
+
+DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
+
+class Any(google.protobuf.message.Message, google.protobuf.internal.well_known_types.Any):
+ """`Any` contains an arbitrary serialized protocol buffer message along with a
+ URL that describes the type of the serialized message.
+
+ Protobuf library provides support to pack/unpack Any values in the form
+ of utility functions or additional generated methods of the Any type.
+
+ Example 1: Pack and unpack a message in C++.
+
+ Foo foo = ...;
+ Any any;
+ any.PackFrom(foo);
+ ...
+ if (any.UnpackTo(&foo)) {
+ ...
+ }
+
+ Example 2: Pack and unpack a message in Java.
+
+ Foo foo = ...;
+ Any any = Any.pack(foo);
+ ...
+ if (any.is(Foo.class)) {
+ foo = any.unpack(Foo.class);
+ }
+ // or ...
+ if (any.isSameTypeAs(Foo.getDefaultInstance())) {
+ foo = any.unpack(Foo.getDefaultInstance());
+ }
+
+ Example 3: Pack and unpack a message in Python.
+
+ foo = Foo(...)
+ any = Any()
+ any.Pack(foo)
+ ...
+ if any.Is(Foo.DESCRIPTOR):
+ any.Unpack(foo)
+ ...
+
+ Example 4: Pack and unpack a message in Go
+
+ foo := &pb.Foo{...}
+ any, err := anypb.New(foo)
+ if err != nil {
+ ...
+ }
+ ...
+ foo := &pb.Foo{}
+ if err := any.UnmarshalTo(foo); err != nil {
+ ...
+ }
+
+ The pack methods provided by protobuf library will by default use
+ 'type.googleapis.com/full.type.name' as the type URL and the unpack
+ methods only use the fully qualified type name after the last '/'
+ in the type URL, for example "foo.bar.com/x/y.z" will yield type
+ name "y.z".
+
+ JSON
+ ====
+ The JSON representation of an `Any` value uses the regular
+ representation of the deserialized, embedded message, with an
+ additional field `@type` which contains the type URL. Example:
+
+ package google.profile;
+ message Person {
+ string first_name = 1;
+ string last_name = 2;
+ }
+
+ {
+ "@type": "type.googleapis.com/google.profile.Person",
+ "firstName": <string>,
+ "lastName": <string>
+ }
+
+ If the embedded message type is well-known and has a custom JSON
+ representation, that representation will be embedded adding a field
+ `value` which holds the custom JSON in addition to the `@type`
+ field. Example (for message [google.protobuf.Duration][]):
+
+ {
+ "@type": "type.googleapis.com/google.protobuf.Duration",
+ "value": "1.212s"
+ }
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ TYPE_URL_FIELD_NUMBER: builtins.int
+ VALUE_FIELD_NUMBER: builtins.int
+ type_url: builtins.str
+ """A URL/resource name that uniquely identifies the type of the serialized
+ protocol buffer message. This string must contain at least
+ one "/" character. The last segment of the URL's path must represent
+ the fully qualified name of the type (as in
+ `path/google.protobuf.Duration`). The name should be in a canonical form
+ (e.g., leading "." is not accepted).
+
+ In practice, teams usually precompile into the binary all types that they
+ expect it to use in the context of Any. However, for URLs which use the
+ scheme `http`, `https`, or no scheme, one can optionally set up a type
+ server that maps type URLs to message definitions as follows:
+
+ * If no scheme is provided, `https` is assumed.
+ * An HTTP GET on the URL must yield a [google.protobuf.Type][]
+ value in binary format, or produce an error.
+ * Applications are allowed to cache lookup results based on the
+ URL, or have them precompiled into a binary to avoid any
+ lookup. Therefore, binary compatibility needs to be preserved
+ on changes to types. (Use versioned type names to manage
+ breaking changes.)
+
+ Note: this functionality is not currently available in the official
+ protobuf release, and it is not used for type URLs beginning with
+ type.googleapis.com. As of May 2023, there are no widely used type server
+ implementations and no plans to implement one.
+
+ Schemes other than `http`, `https` (or the empty scheme) might be
+ used with implementation specific semantics.
+ """
+ value: builtins.bytes
+ """Must be a valid serialized protocol buffer of the above specified type."""
+ def __init__(self, *, type_url: builtins.str | None = ..., value: builtins.bytes | None = ...) -> None: ...
+ def ClearField(self, field_name: typing.Literal["type_url", b"type_url", "value", b"value"]) -> None: ...
+
+global___Any = Any
diff --git a/contrib/python/types-protobuf/google-stubs/protobuf/api_pb2.pyi b/contrib/python/types-protobuf/google-stubs/protobuf/api_pb2.pyi
new file mode 100644
index 00000000000..71e8ca47853
--- /dev/null
+++ b/contrib/python/types-protobuf/google-stubs/protobuf/api_pb2.pyi
@@ -0,0 +1,305 @@
+"""
+@generated by mypy-protobuf. Do not edit manually!
+isort:skip_file
+Protocol Buffers - Google's data interchange format
+Copyright 2008 Google Inc. All rights reserved.
+https://developers.google.com/protocol-buffers/
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+"""
+
+import builtins
+import collections.abc
+import typing
+
+import google.protobuf.descriptor
+import google.protobuf.internal.containers
+import google.protobuf.message
+import google.protobuf.source_context_pb2
+import google.protobuf.type_pb2
+
+DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
+
+class Api(google.protobuf.message.Message):
+ """Api is a light-weight descriptor for an API Interface.
+
+ Interfaces are also described as "protocol buffer services" in some contexts,
+ such as by the "service" keyword in a .proto file, but they are different
+ from API Services, which represent a concrete implementation of an interface
+ as opposed to simply a description of methods and bindings. They are also
+ sometimes simply referred to as "APIs" in other contexts, such as the name of
+ this message itself. See https://cloud.google.com/apis/design/glossary for
+ detailed terminology.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ NAME_FIELD_NUMBER: builtins.int
+ METHODS_FIELD_NUMBER: builtins.int
+ OPTIONS_FIELD_NUMBER: builtins.int
+ VERSION_FIELD_NUMBER: builtins.int
+ SOURCE_CONTEXT_FIELD_NUMBER: builtins.int
+ MIXINS_FIELD_NUMBER: builtins.int
+ SYNTAX_FIELD_NUMBER: builtins.int
+ name: builtins.str
+ """The fully qualified name of this interface, including package name
+ followed by the interface's simple name.
+ """
+ version: builtins.str
+ """A version string for this interface. If specified, must have the form
+ `major-version.minor-version`, as in `1.10`. If the minor version is
+ omitted, it defaults to zero. If the entire version field is empty, the
+ major version is derived from the package name, as outlined below. If the
+ field is not empty, the version in the package name will be verified to be
+ consistent with what is provided here.
+
+ The versioning schema uses [semantic
+ versioning](http://semver.org) where the major version number
+ indicates a breaking change and the minor version an additive,
+ non-breaking change. Both version numbers are signals to users
+ what to expect from different versions, and should be carefully
+ chosen based on the product plan.
+
+ The major version is also reflected in the package name of the
+ interface, which must end in `v<major-version>`, as in
+ `google.feature.v1`. For major versions 0 and 1, the suffix can
+ be omitted. Zero major versions must only be used for
+ experimental, non-GA interfaces.
+ """
+ syntax: google.protobuf.type_pb2.Syntax.ValueType
+ """The source syntax of the service."""
+ @property
+ def methods(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Method]:
+ """The methods of this interface, in unspecified order."""
+
+ @property
+ def options(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[google.protobuf.type_pb2.Option]:
+ """Any metadata attached to the interface."""
+
+ @property
+ def source_context(self) -> google.protobuf.source_context_pb2.SourceContext:
+ """Source context for the protocol buffer service represented by this
+ message.
+ """
+
+ @property
+ def mixins(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Mixin]:
+ """Included interfaces. See [Mixin][]."""
+
+ def __init__(
+ self,
+ *,
+ name: builtins.str | None = ...,
+ methods: collections.abc.Iterable[global___Method] | None = ...,
+ options: collections.abc.Iterable[google.protobuf.type_pb2.Option] | None = ...,
+ version: builtins.str | None = ...,
+ source_context: google.protobuf.source_context_pb2.SourceContext | None = ...,
+ mixins: collections.abc.Iterable[global___Mixin] | None = ...,
+ syntax: google.protobuf.type_pb2.Syntax.ValueType | None = ...,
+ ) -> None: ...
+ def HasField(self, field_name: typing.Literal["source_context", b"source_context"]) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "methods",
+ b"methods",
+ "mixins",
+ b"mixins",
+ "name",
+ b"name",
+ "options",
+ b"options",
+ "source_context",
+ b"source_context",
+ "syntax",
+ b"syntax",
+ "version",
+ b"version",
+ ],
+ ) -> None: ...
+
+global___Api = Api
+
+class Method(google.protobuf.message.Message):
+ """Method represents a method of an API interface."""
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ NAME_FIELD_NUMBER: builtins.int
+ REQUEST_TYPE_URL_FIELD_NUMBER: builtins.int
+ REQUEST_STREAMING_FIELD_NUMBER: builtins.int
+ RESPONSE_TYPE_URL_FIELD_NUMBER: builtins.int
+ RESPONSE_STREAMING_FIELD_NUMBER: builtins.int
+ OPTIONS_FIELD_NUMBER: builtins.int
+ SYNTAX_FIELD_NUMBER: builtins.int
+ name: builtins.str
+ """The simple name of this method."""
+ request_type_url: builtins.str
+ """A URL of the input message type."""
+ request_streaming: builtins.bool
+ """If true, the request is streamed."""
+ response_type_url: builtins.str
+ """The URL of the output message type."""
+ response_streaming: builtins.bool
+ """If true, the response is streamed."""
+ syntax: google.protobuf.type_pb2.Syntax.ValueType
+ """The source syntax of this method."""
+ @property
+ def options(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[google.protobuf.type_pb2.Option]:
+ """Any metadata attached to the method."""
+
+ def __init__(
+ self,
+ *,
+ name: builtins.str | None = ...,
+ request_type_url: builtins.str | None = ...,
+ request_streaming: builtins.bool | None = ...,
+ response_type_url: builtins.str | None = ...,
+ response_streaming: builtins.bool | None = ...,
+ options: collections.abc.Iterable[google.protobuf.type_pb2.Option] | None = ...,
+ syntax: google.protobuf.type_pb2.Syntax.ValueType | None = ...,
+ ) -> None: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "name",
+ b"name",
+ "options",
+ b"options",
+ "request_streaming",
+ b"request_streaming",
+ "request_type_url",
+ b"request_type_url",
+ "response_streaming",
+ b"response_streaming",
+ "response_type_url",
+ b"response_type_url",
+ "syntax",
+ b"syntax",
+ ],
+ ) -> None: ...
+
+global___Method = Method
+
+class Mixin(google.protobuf.message.Message):
+ """Declares an API Interface to be included in this interface. The including
+ interface must redeclare all the methods from the included interface, but
+ documentation and options are inherited as follows:
+
+ - If after comment and whitespace stripping, the documentation
+ string of the redeclared method is empty, it will be inherited
+ from the original method.
+
+ - Each annotation belonging to the service config (http,
+ visibility) which is not set in the redeclared method will be
+ inherited.
+
+ - If an http annotation is inherited, the path pattern will be
+ modified as follows. Any version prefix will be replaced by the
+ version of the including interface plus the [root][] path if
+ specified.
+
+ Example of a simple mixin:
+
+ package google.acl.v1;
+ service AccessControl {
+ // Get the underlying ACL object.
+ rpc GetAcl(GetAclRequest) returns (Acl) {
+ option (google.api.http).get = "/v1/{resource=**}:getAcl";
+ }
+ }
+
+ package google.storage.v2;
+ service Storage {
+ rpc GetAcl(GetAclRequest) returns (Acl);
+
+ // Get a data record.
+ rpc GetData(GetDataRequest) returns (Data) {
+ option (google.api.http).get = "/v2/{resource=**}";
+ }
+ }
+
+ Example of a mixin configuration:
+
+ apis:
+ - name: google.storage.v2.Storage
+ mixins:
+ - name: google.acl.v1.AccessControl
+
+ The mixin construct implies that all methods in `AccessControl` are
+ also declared with same name and request/response types in
+ `Storage`. A documentation generator or annotation processor will
+ see the effective `Storage.GetAcl` method after inheriting
+ documentation and annotations as follows:
+
+ service Storage {
+ // Get the underlying ACL object.
+ rpc GetAcl(GetAclRequest) returns (Acl) {
+ option (google.api.http).get = "/v2/{resource=**}:getAcl";
+ }
+ ...
+ }
+
+ Note how the version in the path pattern changed from `v1` to `v2`.
+
+ If the `root` field in the mixin is specified, it should be a
+ relative path under which inherited HTTP paths are placed. Example:
+
+ apis:
+ - name: google.storage.v2.Storage
+ mixins:
+ - name: google.acl.v1.AccessControl
+ root: acls
+
+ This implies the following inherited HTTP annotation:
+
+ service Storage {
+ // Get the underlying ACL object.
+ rpc GetAcl(GetAclRequest) returns (Acl) {
+ option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
+ }
+ ...
+ }
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ NAME_FIELD_NUMBER: builtins.int
+ ROOT_FIELD_NUMBER: builtins.int
+ name: builtins.str
+ """The fully qualified name of the interface which is included."""
+ root: builtins.str
+ """If non-empty specifies a path under which inherited HTTP paths
+ are rooted.
+ """
+ def __init__(self, *, name: builtins.str | None = ..., root: builtins.str | None = ...) -> None: ...
+ def ClearField(self, field_name: typing.Literal["name", b"name", "root", b"root"]) -> None: ...
+
+global___Mixin = Mixin
diff --git a/contrib/python/types-protobuf/google-stubs/protobuf/compiler/plugin_pb2.pyi b/contrib/python/types-protobuf/google-stubs/protobuf/compiler/plugin_pb2.pyi
new file mode 100644
index 00000000000..a6f744c2607
--- /dev/null
+++ b/contrib/python/types-protobuf/google-stubs/protobuf/compiler/plugin_pb2.pyi
@@ -0,0 +1,362 @@
+"""
+@generated by mypy-protobuf. Do not edit manually!
+isort:skip_file
+Author: [email protected] (Kenton Varda)
+
+protoc (aka the Protocol Compiler) can be extended via plugins. A plugin is
+just a program that reads a CodeGeneratorRequest from stdin and writes a
+CodeGeneratorResponse to stdout.
+
+Plugins written using C++ can use google/protobuf/compiler/plugin.h instead
+of dealing with the raw protocol defined here.
+
+A plugin executable needs only to be placed somewhere in the path. The
+plugin should be named "protoc-gen-$NAME", and will then be used when the
+flag "--${NAME}_out" is passed to protoc.
+"""
+
+import builtins
+import collections.abc
+import sys
+import typing
+
+import google.protobuf.descriptor
+import google.protobuf.descriptor_pb2
+import google.protobuf.internal.containers
+import google.protobuf.internal.enum_type_wrapper
+import google.protobuf.message
+
+if sys.version_info >= (3, 10):
+ import typing as typing_extensions
+else:
+ import typing_extensions
+
+DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
+
+class Version(google.protobuf.message.Message):
+ """The version number of protocol compiler."""
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ MAJOR_FIELD_NUMBER: builtins.int
+ MINOR_FIELD_NUMBER: builtins.int
+ PATCH_FIELD_NUMBER: builtins.int
+ SUFFIX_FIELD_NUMBER: builtins.int
+ major: builtins.int
+ minor: builtins.int
+ patch: builtins.int
+ suffix: builtins.str
+ """A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
+ be empty for mainline stable releases.
+ """
+ def __init__(
+ self,
+ *,
+ major: builtins.int | None = ...,
+ minor: builtins.int | None = ...,
+ patch: builtins.int | None = ...,
+ suffix: builtins.str | None = ...,
+ ) -> None: ...
+ def HasField(
+ self, field_name: typing.Literal["major", b"major", "minor", b"minor", "patch", b"patch", "suffix", b"suffix"]
+ ) -> builtins.bool: ...
+ def ClearField(
+ self, field_name: typing.Literal["major", b"major", "minor", b"minor", "patch", b"patch", "suffix", b"suffix"]
+ ) -> None: ...
+
+global___Version = Version
+
+class CodeGeneratorRequest(google.protobuf.message.Message):
+ """An encoded CodeGeneratorRequest is written to the plugin's stdin."""
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ FILE_TO_GENERATE_FIELD_NUMBER: builtins.int
+ PARAMETER_FIELD_NUMBER: builtins.int
+ PROTO_FILE_FIELD_NUMBER: builtins.int
+ SOURCE_FILE_DESCRIPTORS_FIELD_NUMBER: builtins.int
+ COMPILER_VERSION_FIELD_NUMBER: builtins.int
+ parameter: builtins.str
+ """The generator parameter passed on the command-line."""
+ @property
+ def file_to_generate(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
+ """The .proto files that were explicitly listed on the command-line. The
+ code generator should generate code only for these files. Each file's
+ descriptor will be included in proto_file, below.
+ """
+
+ @property
+ def proto_file(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[google.protobuf.descriptor_pb2.FileDescriptorProto]:
+ """FileDescriptorProtos for all files in files_to_generate and everything
+ they import. The files will appear in topological order, so each file
+ appears before any file that imports it.
+
+ Note: the files listed in files_to_generate will include runtime-retention
+ options only, but all other files will include source-retention options.
+ The source_file_descriptors field below is available in case you need
+ source-retention options for files_to_generate.
+
+ protoc guarantees that all proto_files will be written after
+ the fields above, even though this is not technically guaranteed by the
+ protobuf wire format. This theoretically could allow a plugin to stream
+ in the FileDescriptorProtos and handle them one by one rather than read
+ the entire set into memory at once. However, as of this writing, this
+ is not similarly optimized on protoc's end -- it will store all fields in
+ memory at once before sending them to the plugin.
+
+ Type names of fields and extensions in the FileDescriptorProto are always
+ fully qualified.
+ """
+
+ @property
+ def source_file_descriptors(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[google.protobuf.descriptor_pb2.FileDescriptorProto]:
+ """File descriptors with all options, including source-retention options.
+ These descriptors are only provided for the files listed in
+ files_to_generate.
+ """
+
+ @property
+ def compiler_version(self) -> global___Version:
+ """The version number of protocol compiler."""
+
+ def __init__(
+ self,
+ *,
+ file_to_generate: collections.abc.Iterable[builtins.str] | None = ...,
+ parameter: builtins.str | None = ...,
+ proto_file: collections.abc.Iterable[google.protobuf.descriptor_pb2.FileDescriptorProto] | None = ...,
+ source_file_descriptors: collections.abc.Iterable[google.protobuf.descriptor_pb2.FileDescriptorProto] | None = ...,
+ compiler_version: global___Version | None = ...,
+ ) -> None: ...
+ def HasField(
+ self, field_name: typing.Literal["compiler_version", b"compiler_version", "parameter", b"parameter"]
+ ) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "compiler_version",
+ b"compiler_version",
+ "file_to_generate",
+ b"file_to_generate",
+ "parameter",
+ b"parameter",
+ "proto_file",
+ b"proto_file",
+ "source_file_descriptors",
+ b"source_file_descriptors",
+ ],
+ ) -> None: ...
+
+global___CodeGeneratorRequest = CodeGeneratorRequest
+
+class CodeGeneratorResponse(google.protobuf.message.Message):
+ """The plugin writes an encoded CodeGeneratorResponse to stdout."""
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ class _Feature:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+ class _FeatureEnumTypeWrapper(
+ google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[CodeGeneratorResponse._Feature.ValueType], builtins.type
+ ):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ FEATURE_NONE: CodeGeneratorResponse._Feature.ValueType # 0
+ FEATURE_PROTO3_OPTIONAL: CodeGeneratorResponse._Feature.ValueType # 1
+ FEATURE_SUPPORTS_EDITIONS: CodeGeneratorResponse._Feature.ValueType # 2
+
+ class Feature(_Feature, metaclass=_FeatureEnumTypeWrapper):
+ """Sync with code_generator.h."""
+
+ FEATURE_NONE: CodeGeneratorResponse.Feature.ValueType # 0
+ FEATURE_PROTO3_OPTIONAL: CodeGeneratorResponse.Feature.ValueType # 1
+ FEATURE_SUPPORTS_EDITIONS: CodeGeneratorResponse.Feature.ValueType # 2
+
+ @typing.final
+ class File(google.protobuf.message.Message):
+ """Represents a single generated file."""
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ NAME_FIELD_NUMBER: builtins.int
+ INSERTION_POINT_FIELD_NUMBER: builtins.int
+ CONTENT_FIELD_NUMBER: builtins.int
+ GENERATED_CODE_INFO_FIELD_NUMBER: builtins.int
+ name: builtins.str
+ """The file name, relative to the output directory. The name must not
+ contain "." or ".." components and must be relative, not be absolute (so,
+ the file cannot lie outside the output directory). "/" must be used as
+ the path separator, not "\\".
+
+ If the name is omitted, the content will be appended to the previous
+ file. This allows the generator to break large files into small chunks,
+ and allows the generated text to be streamed back to protoc so that large
+ files need not reside completely in memory at one time. Note that as of
+ this writing protoc does not optimize for this -- it will read the entire
+ CodeGeneratorResponse before writing files to disk.
+ """
+ insertion_point: builtins.str
+ """If non-empty, indicates that the named file should already exist, and the
+ content here is to be inserted into that file at a defined insertion
+ point. This feature allows a code generator to extend the output
+ produced by another code generator. The original generator may provide
+ insertion points by placing special annotations in the file that look
+ like:
+ @@protoc_insertion_point(NAME)
+ The annotation can have arbitrary text before and after it on the line,
+ which allows it to be placed in a comment. NAME should be replaced with
+ an identifier naming the point -- this is what other generators will use
+ as the insertion_point. Code inserted at this point will be placed
+ immediately above the line containing the insertion point (thus multiple
+ insertions to the same point will come out in the order they were added).
+ The double-@ is intended to make it unlikely that the generated code
+ could contain things that look like insertion points by accident.
+
+ For example, the C++ code generator places the following line in the
+ .pb.h files that it generates:
+ // @@protoc_insertion_point(namespace_scope)
+ This line appears within the scope of the file's package namespace, but
+ outside of any particular class. Another plugin can then specify the
+ insertion_point "namespace_scope" to generate additional classes or
+ other declarations that should be placed in this scope.
+
+ Note that if the line containing the insertion point begins with
+ whitespace, the same whitespace will be added to every line of the
+ inserted text. This is useful for languages like Python, where
+ indentation matters. In these languages, the insertion point comment
+ should be indented the same amount as any inserted code will need to be
+ in order to work correctly in that context.
+
+ The code generator that generates the initial file and the one which
+ inserts into it must both run as part of a single invocation of protoc.
+ Code generators are executed in the order in which they appear on the
+ command line.
+
+ If |insertion_point| is present, |name| must also be present.
+ """
+ content: builtins.str
+ """The file contents."""
+ @property
+ def generated_code_info(self) -> google.protobuf.descriptor_pb2.GeneratedCodeInfo:
+ """Information describing the file content being inserted. If an insertion
+ point is used, this information will be appropriately offset and inserted
+ into the code generation metadata for the generated files.
+ """
+
+ def __init__(
+ self,
+ *,
+ name: builtins.str | None = ...,
+ insertion_point: builtins.str | None = ...,
+ content: builtins.str | None = ...,
+ generated_code_info: google.protobuf.descriptor_pb2.GeneratedCodeInfo | None = ...,
+ ) -> None: ...
+ def HasField(
+ self,
+ field_name: typing.Literal[
+ "content",
+ b"content",
+ "generated_code_info",
+ b"generated_code_info",
+ "insertion_point",
+ b"insertion_point",
+ "name",
+ b"name",
+ ],
+ ) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "content",
+ b"content",
+ "generated_code_info",
+ b"generated_code_info",
+ "insertion_point",
+ b"insertion_point",
+ "name",
+ b"name",
+ ],
+ ) -> None: ...
+
+ ERROR_FIELD_NUMBER: builtins.int
+ SUPPORTED_FEATURES_FIELD_NUMBER: builtins.int
+ MINIMUM_EDITION_FIELD_NUMBER: builtins.int
+ MAXIMUM_EDITION_FIELD_NUMBER: builtins.int
+ FILE_FIELD_NUMBER: builtins.int
+ error: builtins.str
+ """Error message. If non-empty, code generation failed. The plugin process
+ should exit with status code zero even if it reports an error in this way.
+
+ This should be used to indicate errors in .proto files which prevent the
+ code generator from generating correct code. Errors which indicate a
+ problem in protoc itself -- such as the input CodeGeneratorRequest being
+ unparseable -- should be reported by writing a message to stderr and
+ exiting with a non-zero status code.
+ """
+ supported_features: builtins.int
+ """A bitmask of supported features that the code generator supports.
+ This is a bitwise "or" of values from the Feature enum.
+ """
+ minimum_edition: builtins.int
+ """The minimum edition this plugin supports. This will be treated as an
+ Edition enum, but we want to allow unknown values. It should be specified
+ according the edition enum value, *not* the edition number. Only takes
+ effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
+ """
+ maximum_edition: builtins.int
+ """The maximum edition this plugin supports. This will be treated as an
+ Edition enum, but we want to allow unknown values. It should be specified
+ according the edition enum value, *not* the edition number. Only takes
+ effect for plugins that have FEATURE_SUPPORTS_EDITIONS set.
+ """
+ @property
+ def file(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___CodeGeneratorResponse.File]: ...
+ def __init__(
+ self,
+ *,
+ error: builtins.str | None = ...,
+ supported_features: builtins.int | None = ...,
+ minimum_edition: builtins.int | None = ...,
+ maximum_edition: builtins.int | None = ...,
+ file: collections.abc.Iterable[global___CodeGeneratorResponse.File] | None = ...,
+ ) -> None: ...
+ def HasField(
+ self,
+ field_name: typing.Literal[
+ "error",
+ b"error",
+ "maximum_edition",
+ b"maximum_edition",
+ "minimum_edition",
+ b"minimum_edition",
+ "supported_features",
+ b"supported_features",
+ ],
+ ) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "error",
+ b"error",
+ "file",
+ b"file",
+ "maximum_edition",
+ b"maximum_edition",
+ "minimum_edition",
+ b"minimum_edition",
+ "supported_features",
+ b"supported_features",
+ ],
+ ) -> None: ...
+
+global___CodeGeneratorResponse = CodeGeneratorResponse
diff --git a/contrib/python/types-protobuf/google-stubs/protobuf/descriptor_pb2.pyi b/contrib/python/types-protobuf/google-stubs/protobuf/descriptor_pb2.pyi
new file mode 100644
index 00000000000..d3bc182e4be
--- /dev/null
+++ b/contrib/python/types-protobuf/google-stubs/protobuf/descriptor_pb2.pyi
@@ -0,0 +1,2855 @@
+"""
+@generated by mypy-protobuf. Do not edit manually!
+isort:skip_file
+Author: [email protected] (Kenton Varda)
+ Based on original Protocol Buffers design by
+ Sanjay Ghemawat, Jeff Dean, and others.
+
+The messages in this file describe the definitions found in .proto files.
+A valid .proto file can be translated directly to a FileDescriptorProto
+without any other information (e.g. without reading its imports).
+"""
+
+import builtins
+import collections.abc
+import sys
+import typing
+
+import google.protobuf.descriptor
+import google.protobuf.internal.containers
+import google.protobuf.internal.enum_type_wrapper
+import google.protobuf.message
+
+if sys.version_info >= (3, 10):
+ import typing as typing_extensions
+else:
+ import typing_extensions
+
+DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
+
+class _Edition:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+class _EditionEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Edition.ValueType], builtins.type):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ EDITION_UNKNOWN: _Edition.ValueType # 0
+ """A placeholder for an unknown edition value."""
+ EDITION_LEGACY: _Edition.ValueType # 900
+ """A placeholder edition for specifying default behaviors *before* a feature
+ was first introduced. This is effectively an "infinite past".
+ """
+ EDITION_PROTO2: _Edition.ValueType # 998
+ """Legacy syntax "editions". These pre-date editions, but behave much like
+ distinct editions. These can't be used to specify the edition of proto
+ files, but feature definitions must supply proto2/proto3 defaults for
+ backwards compatibility.
+ """
+ EDITION_PROTO3: _Edition.ValueType # 999
+ EDITION_2023: _Edition.ValueType # 1000
+ """Editions that have been released. The specific values are arbitrary and
+ should not be depended on, but they will always be time-ordered for easy
+ comparison.
+ """
+ EDITION_2024: _Edition.ValueType # 1001
+ EDITION_1_TEST_ONLY: _Edition.ValueType # 1
+ """Placeholder editions for testing feature resolution. These should not be
+ used or relied on outside of tests.
+ """
+ EDITION_2_TEST_ONLY: _Edition.ValueType # 2
+ EDITION_99997_TEST_ONLY: _Edition.ValueType # 99997
+ EDITION_99998_TEST_ONLY: _Edition.ValueType # 99998
+ EDITION_99999_TEST_ONLY: _Edition.ValueType # 99999
+ EDITION_MAX: _Edition.ValueType # 2147483647
+ """Placeholder for specifying unbounded edition support. This should only
+ ever be used by plugins that can expect to never require any changes to
+ support a new edition.
+ """
+
+class Edition(_Edition, metaclass=_EditionEnumTypeWrapper):
+ """The full set of known editions."""
+
+EDITION_UNKNOWN: Edition.ValueType # 0
+"""A placeholder for an unknown edition value."""
+EDITION_LEGACY: Edition.ValueType # 900
+"""A placeholder edition for specifying default behaviors *before* a feature
+was first introduced. This is effectively an "infinite past".
+"""
+EDITION_PROTO2: Edition.ValueType # 998
+"""Legacy syntax "editions". These pre-date editions, but behave much like
+distinct editions. These can't be used to specify the edition of proto
+files, but feature definitions must supply proto2/proto3 defaults for
+backwards compatibility.
+"""
+EDITION_PROTO3: Edition.ValueType # 999
+EDITION_2023: Edition.ValueType # 1000
+"""Editions that have been released. The specific values are arbitrary and
+should not be depended on, but they will always be time-ordered for easy
+comparison.
+"""
+EDITION_2024: Edition.ValueType # 1001
+EDITION_1_TEST_ONLY: Edition.ValueType # 1
+"""Placeholder editions for testing feature resolution. These should not be
+used or relied on outside of tests.
+"""
+EDITION_2_TEST_ONLY: Edition.ValueType # 2
+EDITION_99997_TEST_ONLY: Edition.ValueType # 99997
+EDITION_99998_TEST_ONLY: Edition.ValueType # 99998
+EDITION_99999_TEST_ONLY: Edition.ValueType # 99999
+EDITION_MAX: Edition.ValueType # 2147483647
+"""Placeholder for specifying unbounded edition support. This should only
+ever be used by plugins that can expect to never require any changes to
+support a new edition.
+"""
+global___Edition = Edition
+
+class FileDescriptorSet(google.protobuf.message.Message):
+ """The protocol compiler can output a FileDescriptorSet containing the .proto
+ files it parses.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ FILE_FIELD_NUMBER: builtins.int
+ @property
+ def file(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___FileDescriptorProto]: ...
+ def __init__(self, *, file: collections.abc.Iterable[global___FileDescriptorProto] | None = ...) -> None: ...
+ def ClearField(self, field_name: typing.Literal["file", b"file"]) -> None: ...
+
+global___FileDescriptorSet = FileDescriptorSet
+
+class FileDescriptorProto(google.protobuf.message.Message):
+ """Describes a complete .proto file."""
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ NAME_FIELD_NUMBER: builtins.int
+ PACKAGE_FIELD_NUMBER: builtins.int
+ DEPENDENCY_FIELD_NUMBER: builtins.int
+ PUBLIC_DEPENDENCY_FIELD_NUMBER: builtins.int
+ WEAK_DEPENDENCY_FIELD_NUMBER: builtins.int
+ MESSAGE_TYPE_FIELD_NUMBER: builtins.int
+ ENUM_TYPE_FIELD_NUMBER: builtins.int
+ SERVICE_FIELD_NUMBER: builtins.int
+ EXTENSION_FIELD_NUMBER: builtins.int
+ OPTIONS_FIELD_NUMBER: builtins.int
+ SOURCE_CODE_INFO_FIELD_NUMBER: builtins.int
+ SYNTAX_FIELD_NUMBER: builtins.int
+ EDITION_FIELD_NUMBER: builtins.int
+ name: builtins.str
+ """file name, relative to root of source tree"""
+ package: builtins.str
+ """e.g. "foo", "foo.bar", etc."""
+ syntax: builtins.str
+ """The syntax of the proto file.
+ The supported values are "proto2", "proto3", and "editions".
+
+ If `edition` is present, this value must be "editions".
+ WARNING: This field should only be used by protobuf plugins or special
+ cases like the proto compiler. Other uses are discouraged and
+ developers should rely on the protoreflect APIs for their client language.
+ """
+ edition: global___Edition.ValueType
+ """The edition of the proto file.
+ WARNING: This field should only be used by protobuf plugins or special
+ cases like the proto compiler. Other uses are discouraged and
+ developers should rely on the protoreflect APIs for their client language.
+ """
+ @property
+ def dependency(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
+ """Names of files imported by this file."""
+
+ @property
+ def public_dependency(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
+ """Indexes of the public imported files in the dependency list above."""
+
+ @property
+ def weak_dependency(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
+ """Indexes of the weak imported files in the dependency list.
+ For Google-internal migration only. Do not use.
+ """
+
+ @property
+ def message_type(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___DescriptorProto]:
+ """All top-level definitions in this file."""
+
+ @property
+ def enum_type(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___EnumDescriptorProto]: ...
+ @property
+ def service(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ServiceDescriptorProto]: ...
+ @property
+ def extension(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___FieldDescriptorProto]: ...
+ @property
+ def options(self) -> global___FileOptions: ...
+ @property
+ def source_code_info(self) -> global___SourceCodeInfo:
+ """This field contains optional information about the original source code.
+ You may safely remove this entire field without harming runtime
+ functionality of the descriptors -- the information is needed only by
+ development tools.
+ """
+
+ def __init__(
+ self,
+ *,
+ name: builtins.str | None = ...,
+ package: builtins.str | None = ...,
+ dependency: collections.abc.Iterable[builtins.str] | None = ...,
+ public_dependency: collections.abc.Iterable[builtins.int] | None = ...,
+ weak_dependency: collections.abc.Iterable[builtins.int] | None = ...,
+ message_type: collections.abc.Iterable[global___DescriptorProto] | None = ...,
+ enum_type: collections.abc.Iterable[global___EnumDescriptorProto] | None = ...,
+ service: collections.abc.Iterable[global___ServiceDescriptorProto] | None = ...,
+ extension: collections.abc.Iterable[global___FieldDescriptorProto] | None = ...,
+ options: global___FileOptions | None = ...,
+ source_code_info: global___SourceCodeInfo | None = ...,
+ syntax: builtins.str | None = ...,
+ edition: global___Edition.ValueType | None = ...,
+ ) -> None: ...
+ def HasField(
+ self,
+ field_name: typing.Literal[
+ "edition",
+ b"edition",
+ "name",
+ b"name",
+ "options",
+ b"options",
+ "package",
+ b"package",
+ "source_code_info",
+ b"source_code_info",
+ "syntax",
+ b"syntax",
+ ],
+ ) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "dependency",
+ b"dependency",
+ "edition",
+ b"edition",
+ "enum_type",
+ b"enum_type",
+ "extension",
+ b"extension",
+ "message_type",
+ b"message_type",
+ "name",
+ b"name",
+ "options",
+ b"options",
+ "package",
+ b"package",
+ "public_dependency",
+ b"public_dependency",
+ "service",
+ b"service",
+ "source_code_info",
+ b"source_code_info",
+ "syntax",
+ b"syntax",
+ "weak_dependency",
+ b"weak_dependency",
+ ],
+ ) -> None: ...
+
+global___FileDescriptorProto = FileDescriptorProto
+
+class DescriptorProto(google.protobuf.message.Message):
+ """Describes a message type."""
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ @typing.final
+ class ExtensionRange(google.protobuf.message.Message):
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ START_FIELD_NUMBER: builtins.int
+ END_FIELD_NUMBER: builtins.int
+ OPTIONS_FIELD_NUMBER: builtins.int
+ start: builtins.int
+ """Inclusive."""
+ end: builtins.int
+ """Exclusive."""
+ @property
+ def options(self) -> global___ExtensionRangeOptions: ...
+ def __init__(
+ self,
+ *,
+ start: builtins.int | None = ...,
+ end: builtins.int | None = ...,
+ options: global___ExtensionRangeOptions | None = ...,
+ ) -> None: ...
+ def HasField(
+ self, field_name: typing.Literal["end", b"end", "options", b"options", "start", b"start"]
+ ) -> builtins.bool: ...
+ def ClearField(self, field_name: typing.Literal["end", b"end", "options", b"options", "start", b"start"]) -> None: ...
+
+ @typing.final
+ class ReservedRange(google.protobuf.message.Message):
+ """Range of reserved tag numbers. Reserved tag numbers may not be used by
+ fields or extension ranges in the same message. Reserved ranges may
+ not overlap.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ START_FIELD_NUMBER: builtins.int
+ END_FIELD_NUMBER: builtins.int
+ start: builtins.int
+ """Inclusive."""
+ end: builtins.int
+ """Exclusive."""
+ def __init__(self, *, start: builtins.int | None = ..., end: builtins.int | None = ...) -> None: ...
+ def HasField(self, field_name: typing.Literal["end", b"end", "start", b"start"]) -> builtins.bool: ...
+ def ClearField(self, field_name: typing.Literal["end", b"end", "start", b"start"]) -> None: ...
+
+ NAME_FIELD_NUMBER: builtins.int
+ FIELD_FIELD_NUMBER: builtins.int
+ EXTENSION_FIELD_NUMBER: builtins.int
+ NESTED_TYPE_FIELD_NUMBER: builtins.int
+ ENUM_TYPE_FIELD_NUMBER: builtins.int
+ EXTENSION_RANGE_FIELD_NUMBER: builtins.int
+ ONEOF_DECL_FIELD_NUMBER: builtins.int
+ OPTIONS_FIELD_NUMBER: builtins.int
+ RESERVED_RANGE_FIELD_NUMBER: builtins.int
+ RESERVED_NAME_FIELD_NUMBER: builtins.int
+ name: builtins.str
+ @property
+ def field(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___FieldDescriptorProto]: ...
+ @property
+ def extension(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___FieldDescriptorProto]: ...
+ @property
+ def nested_type(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___DescriptorProto]: ...
+ @property
+ def enum_type(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___EnumDescriptorProto]: ...
+ @property
+ def extension_range(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___DescriptorProto.ExtensionRange]: ...
+ @property
+ def oneof_decl(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___OneofDescriptorProto]: ...
+ @property
+ def options(self) -> global___MessageOptions: ...
+ @property
+ def reserved_range(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___DescriptorProto.ReservedRange]: ...
+ @property
+ def reserved_name(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
+ """Reserved field names, which may not be used by fields in the same message.
+ A given name may only be reserved once.
+ """
+
+ def __init__(
+ self,
+ *,
+ name: builtins.str | None = ...,
+ field: collections.abc.Iterable[global___FieldDescriptorProto] | None = ...,
+ extension: collections.abc.Iterable[global___FieldDescriptorProto] | None = ...,
+ nested_type: collections.abc.Iterable[global___DescriptorProto] | None = ...,
+ enum_type: collections.abc.Iterable[global___EnumDescriptorProto] | None = ...,
+ extension_range: collections.abc.Iterable[global___DescriptorProto.ExtensionRange] | None = ...,
+ oneof_decl: collections.abc.Iterable[global___OneofDescriptorProto] | None = ...,
+ options: global___MessageOptions | None = ...,
+ reserved_range: collections.abc.Iterable[global___DescriptorProto.ReservedRange] | None = ...,
+ reserved_name: collections.abc.Iterable[builtins.str] | None = ...,
+ ) -> None: ...
+ def HasField(self, field_name: typing.Literal["name", b"name", "options", b"options"]) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "enum_type",
+ b"enum_type",
+ "extension",
+ b"extension",
+ "extension_range",
+ b"extension_range",
+ "field",
+ b"field",
+ "name",
+ b"name",
+ "nested_type",
+ b"nested_type",
+ "oneof_decl",
+ b"oneof_decl",
+ "options",
+ b"options",
+ "reserved_name",
+ b"reserved_name",
+ "reserved_range",
+ b"reserved_range",
+ ],
+ ) -> None: ...
+
+global___DescriptorProto = DescriptorProto
+
+class ExtensionRangeOptions(google.protobuf.message.Message):
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ class _VerificationState:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+ class _VerificationStateEnumTypeWrapper(
+ google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[ExtensionRangeOptions._VerificationState.ValueType],
+ builtins.type,
+ ):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ DECLARATION: ExtensionRangeOptions._VerificationState.ValueType # 0
+ """All the extensions of the range must be declared."""
+ UNVERIFIED: ExtensionRangeOptions._VerificationState.ValueType # 1
+
+ class VerificationState(_VerificationState, metaclass=_VerificationStateEnumTypeWrapper):
+ """The verification state of the extension range."""
+
+ DECLARATION: ExtensionRangeOptions.VerificationState.ValueType # 0
+ """All the extensions of the range must be declared."""
+ UNVERIFIED: ExtensionRangeOptions.VerificationState.ValueType # 1
+
+ @typing.final
+ class Declaration(google.protobuf.message.Message):
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ NUMBER_FIELD_NUMBER: builtins.int
+ FULL_NAME_FIELD_NUMBER: builtins.int
+ TYPE_FIELD_NUMBER: builtins.int
+ RESERVED_FIELD_NUMBER: builtins.int
+ REPEATED_FIELD_NUMBER: builtins.int
+ number: builtins.int
+ """The extension number declared within the extension range."""
+ full_name: builtins.str
+ """The fully-qualified name of the extension field. There must be a leading
+ dot in front of the full name.
+ """
+ type: builtins.str
+ """The fully-qualified type name of the extension field. Unlike
+ Metadata.type, Declaration.type must have a leading dot for messages
+ and enums.
+ """
+ reserved: builtins.bool
+ """If true, indicates that the number is reserved in the extension range,
+ and any extension field with the number will fail to compile. Set this
+ when a declared extension field is deleted.
+ """
+ repeated: builtins.bool
+ """If true, indicates that the extension must be defined as repeated.
+ Otherwise the extension must be defined as optional.
+ """
+ def __init__(
+ self,
+ *,
+ number: builtins.int | None = ...,
+ full_name: builtins.str | None = ...,
+ type: builtins.str | None = ...,
+ reserved: builtins.bool | None = ...,
+ repeated: builtins.bool | None = ...,
+ ) -> None: ...
+ def HasField(
+ self,
+ field_name: typing.Literal[
+ "full_name", b"full_name", "number", b"number", "repeated", b"repeated", "reserved", b"reserved", "type", b"type"
+ ],
+ ) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "full_name", b"full_name", "number", b"number", "repeated", b"repeated", "reserved", b"reserved", "type", b"type"
+ ],
+ ) -> None: ...
+
+ UNINTERPRETED_OPTION_FIELD_NUMBER: builtins.int
+ DECLARATION_FIELD_NUMBER: builtins.int
+ FEATURES_FIELD_NUMBER: builtins.int
+ VERIFICATION_FIELD_NUMBER: builtins.int
+ verification: global___ExtensionRangeOptions.VerificationState.ValueType
+ """The verification state of the range.
+ TODO: flip the default to DECLARATION once all empty ranges
+ are marked as UNVERIFIED.
+ """
+ @property
+ def uninterpreted_option(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UninterpretedOption]:
+ """The parser stores options it doesn't recognize here. See above."""
+
+ @property
+ def declaration(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ExtensionRangeOptions.Declaration]:
+ """For external users: DO NOT USE. We are in the process of open sourcing
+ extension declaration and executing internal cleanups before it can be
+ used externally.
+ """
+
+ @property
+ def features(self) -> global___FeatureSet:
+ """Any features defined in the specific edition."""
+
+ def __init__(
+ self,
+ *,
+ uninterpreted_option: collections.abc.Iterable[global___UninterpretedOption] | None = ...,
+ declaration: collections.abc.Iterable[global___ExtensionRangeOptions.Declaration] | None = ...,
+ features: global___FeatureSet | None = ...,
+ verification: global___ExtensionRangeOptions.VerificationState.ValueType | None = ...,
+ ) -> None: ...
+ def HasField(self, field_name: typing.Literal["features", b"features", "verification", b"verification"]) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "declaration",
+ b"declaration",
+ "features",
+ b"features",
+ "uninterpreted_option",
+ b"uninterpreted_option",
+ "verification",
+ b"verification",
+ ],
+ ) -> None: ...
+
+global___ExtensionRangeOptions = ExtensionRangeOptions
+
+class FieldDescriptorProto(google.protobuf.message.Message):
+ """Describes a field within a message."""
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ class _Type:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+ class _TypeEnumTypeWrapper(
+ google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[FieldDescriptorProto._Type.ValueType], builtins.type
+ ):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ TYPE_DOUBLE: FieldDescriptorProto._Type.ValueType # 1
+ """0 is reserved for errors.
+ Order is weird for historical reasons.
+ """
+ TYPE_FLOAT: FieldDescriptorProto._Type.ValueType # 2
+ TYPE_INT64: FieldDescriptorProto._Type.ValueType # 3
+ """Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
+ negative values are likely.
+ """
+ TYPE_UINT64: FieldDescriptorProto._Type.ValueType # 4
+ TYPE_INT32: FieldDescriptorProto._Type.ValueType # 5
+ """Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
+ negative values are likely.
+ """
+ TYPE_FIXED64: FieldDescriptorProto._Type.ValueType # 6
+ TYPE_FIXED32: FieldDescriptorProto._Type.ValueType # 7
+ TYPE_BOOL: FieldDescriptorProto._Type.ValueType # 8
+ TYPE_STRING: FieldDescriptorProto._Type.ValueType # 9
+ TYPE_GROUP: FieldDescriptorProto._Type.ValueType # 10
+ """Tag-delimited aggregate.
+ Group type is deprecated and not supported after google.protobuf. However, Proto3
+ implementations should still be able to parse the group wire format and
+ treat group fields as unknown fields. In Editions, the group wire format
+ can be enabled via the `message_encoding` feature.
+ """
+ TYPE_MESSAGE: FieldDescriptorProto._Type.ValueType # 11
+ """Length-delimited aggregate."""
+ TYPE_BYTES: FieldDescriptorProto._Type.ValueType # 12
+ """New in version 2."""
+ TYPE_UINT32: FieldDescriptorProto._Type.ValueType # 13
+ TYPE_ENUM: FieldDescriptorProto._Type.ValueType # 14
+ TYPE_SFIXED32: FieldDescriptorProto._Type.ValueType # 15
+ TYPE_SFIXED64: FieldDescriptorProto._Type.ValueType # 16
+ TYPE_SINT32: FieldDescriptorProto._Type.ValueType # 17
+ """Uses ZigZag encoding."""
+ TYPE_SINT64: FieldDescriptorProto._Type.ValueType # 18
+ """Uses ZigZag encoding."""
+
+ class Type(_Type, metaclass=_TypeEnumTypeWrapper): ...
+ TYPE_DOUBLE: FieldDescriptorProto.Type.ValueType # 1
+ """0 is reserved for errors.
+ Order is weird for historical reasons.
+ """
+ TYPE_FLOAT: FieldDescriptorProto.Type.ValueType # 2
+ TYPE_INT64: FieldDescriptorProto.Type.ValueType # 3
+ """Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if
+ negative values are likely.
+ """
+ TYPE_UINT64: FieldDescriptorProto.Type.ValueType # 4
+ TYPE_INT32: FieldDescriptorProto.Type.ValueType # 5
+ """Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if
+ negative values are likely.
+ """
+ TYPE_FIXED64: FieldDescriptorProto.Type.ValueType # 6
+ TYPE_FIXED32: FieldDescriptorProto.Type.ValueType # 7
+ TYPE_BOOL: FieldDescriptorProto.Type.ValueType # 8
+ TYPE_STRING: FieldDescriptorProto.Type.ValueType # 9
+ TYPE_GROUP: FieldDescriptorProto.Type.ValueType # 10
+ """Tag-delimited aggregate.
+ Group type is deprecated and not supported after google.protobuf. However, Proto3
+ implementations should still be able to parse the group wire format and
+ treat group fields as unknown fields. In Editions, the group wire format
+ can be enabled via the `message_encoding` feature.
+ """
+ TYPE_MESSAGE: FieldDescriptorProto.Type.ValueType # 11
+ """Length-delimited aggregate."""
+ TYPE_BYTES: FieldDescriptorProto.Type.ValueType # 12
+ """New in version 2."""
+ TYPE_UINT32: FieldDescriptorProto.Type.ValueType # 13
+ TYPE_ENUM: FieldDescriptorProto.Type.ValueType # 14
+ TYPE_SFIXED32: FieldDescriptorProto.Type.ValueType # 15
+ TYPE_SFIXED64: FieldDescriptorProto.Type.ValueType # 16
+ TYPE_SINT32: FieldDescriptorProto.Type.ValueType # 17
+ """Uses ZigZag encoding."""
+ TYPE_SINT64: FieldDescriptorProto.Type.ValueType # 18
+ """Uses ZigZag encoding."""
+
+ class _Label:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+ class _LabelEnumTypeWrapper(
+ google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[FieldDescriptorProto._Label.ValueType], builtins.type
+ ):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ LABEL_OPTIONAL: FieldDescriptorProto._Label.ValueType # 1
+ """0 is reserved for errors"""
+ LABEL_REPEATED: FieldDescriptorProto._Label.ValueType # 3
+ LABEL_REQUIRED: FieldDescriptorProto._Label.ValueType # 2
+ """The required label is only allowed in google.protobuf. In proto3 and Editions
+ it's explicitly prohibited. In Editions, the `field_presence` feature
+ can be used to get this behavior.
+ """
+
+ class Label(_Label, metaclass=_LabelEnumTypeWrapper): ...
+ LABEL_OPTIONAL: FieldDescriptorProto.Label.ValueType # 1
+ """0 is reserved for errors"""
+ LABEL_REPEATED: FieldDescriptorProto.Label.ValueType # 3
+ LABEL_REQUIRED: FieldDescriptorProto.Label.ValueType # 2
+ """The required label is only allowed in google.protobuf. In proto3 and Editions
+ it's explicitly prohibited. In Editions, the `field_presence` feature
+ can be used to get this behavior.
+ """
+
+ NAME_FIELD_NUMBER: builtins.int
+ NUMBER_FIELD_NUMBER: builtins.int
+ LABEL_FIELD_NUMBER: builtins.int
+ TYPE_FIELD_NUMBER: builtins.int
+ TYPE_NAME_FIELD_NUMBER: builtins.int
+ EXTENDEE_FIELD_NUMBER: builtins.int
+ DEFAULT_VALUE_FIELD_NUMBER: builtins.int
+ ONEOF_INDEX_FIELD_NUMBER: builtins.int
+ JSON_NAME_FIELD_NUMBER: builtins.int
+ OPTIONS_FIELD_NUMBER: builtins.int
+ PROTO3_OPTIONAL_FIELD_NUMBER: builtins.int
+ name: builtins.str
+ number: builtins.int
+ label: global___FieldDescriptorProto.Label.ValueType
+ type: global___FieldDescriptorProto.Type.ValueType
+ """If type_name is set, this need not be set. If both this and type_name
+ are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP.
+ """
+ type_name: builtins.str
+ """For message and enum types, this is the name of the type. If the name
+ starts with a '.', it is fully-qualified. Otherwise, C++-like scoping
+ rules are used to find the type (i.e. first the nested types within this
+ message are searched, then within the parent, on up to the root
+ namespace).
+ """
+ extendee: builtins.str
+ """For extensions, this is the name of the type being extended. It is
+ resolved in the same manner as type_name.
+ """
+ default_value: builtins.str
+ """For numeric types, contains the original text representation of the value.
+ For booleans, "true" or "false".
+ For strings, contains the default text contents (not escaped in any way).
+ For bytes, contains the C escaped value. All bytes >= 128 are escaped.
+ """
+ oneof_index: builtins.int
+ """If set, gives the index of a oneof in the containing type's oneof_decl
+ list. This field is a member of that oneof.
+ """
+ json_name: builtins.str
+ """JSON name of this field. The value is set by protocol compiler. If the
+ user has set a "json_name" option on this field, that option's value
+ will be used. Otherwise, it's deduced from the field's name by converting
+ it to camelCase.
+ """
+ proto3_optional: builtins.bool
+ """If true, this is a proto3 "optional". When a proto3 field is optional, it
+ tracks presence regardless of field type.
+
+ When proto3_optional is true, this field must belong to a oneof to signal
+ to old proto3 clients that presence is tracked for this field. This oneof
+ is known as a "synthetic" oneof, and this field must be its sole member
+ (each proto3 optional field gets its own synthetic oneof). Synthetic oneofs
+ exist in the descriptor only, and do not generate any API. Synthetic oneofs
+ must be ordered after all "real" oneofs.
+
+ For message fields, proto3_optional doesn't create any semantic change,
+ since non-repeated message fields always track presence. However it still
+ indicates the semantic detail of whether the user wrote "optional" or not.
+ This can be useful for round-tripping the .proto file. For consistency we
+ give message fields a synthetic oneof also, even though it is not required
+ to track presence. This is especially important because the parser can't
+ tell if a field is a message or an enum, so it must always create a
+ synthetic oneof.
+
+ Proto2 optional fields do not set this flag, because they already indicate
+ optional with `LABEL_OPTIONAL`.
+ """
+ @property
+ def options(self) -> global___FieldOptions: ...
+ def __init__(
+ self,
+ *,
+ name: builtins.str | None = ...,
+ number: builtins.int | None = ...,
+ label: global___FieldDescriptorProto.Label.ValueType | None = ...,
+ type: global___FieldDescriptorProto.Type.ValueType | None = ...,
+ type_name: builtins.str | None = ...,
+ extendee: builtins.str | None = ...,
+ default_value: builtins.str | None = ...,
+ oneof_index: builtins.int | None = ...,
+ json_name: builtins.str | None = ...,
+ options: global___FieldOptions | None = ...,
+ proto3_optional: builtins.bool | None = ...,
+ ) -> None: ...
+ def HasField(
+ self,
+ field_name: typing.Literal[
+ "default_value",
+ b"default_value",
+ "extendee",
+ b"extendee",
+ "json_name",
+ b"json_name",
+ "label",
+ b"label",
+ "name",
+ b"name",
+ "number",
+ b"number",
+ "oneof_index",
+ b"oneof_index",
+ "options",
+ b"options",
+ "proto3_optional",
+ b"proto3_optional",
+ "type",
+ b"type",
+ "type_name",
+ b"type_name",
+ ],
+ ) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "default_value",
+ b"default_value",
+ "extendee",
+ b"extendee",
+ "json_name",
+ b"json_name",
+ "label",
+ b"label",
+ "name",
+ b"name",
+ "number",
+ b"number",
+ "oneof_index",
+ b"oneof_index",
+ "options",
+ b"options",
+ "proto3_optional",
+ b"proto3_optional",
+ "type",
+ b"type",
+ "type_name",
+ b"type_name",
+ ],
+ ) -> None: ...
+
+global___FieldDescriptorProto = FieldDescriptorProto
+
+class OneofDescriptorProto(google.protobuf.message.Message):
+ """Describes a oneof."""
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ NAME_FIELD_NUMBER: builtins.int
+ OPTIONS_FIELD_NUMBER: builtins.int
+ name: builtins.str
+ @property
+ def options(self) -> global___OneofOptions: ...
+ def __init__(self, *, name: builtins.str | None = ..., options: global___OneofOptions | None = ...) -> None: ...
+ def HasField(self, field_name: typing.Literal["name", b"name", "options", b"options"]) -> builtins.bool: ...
+ def ClearField(self, field_name: typing.Literal["name", b"name", "options", b"options"]) -> None: ...
+
+global___OneofDescriptorProto = OneofDescriptorProto
+
+class EnumDescriptorProto(google.protobuf.message.Message):
+ """Describes an enum type."""
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ @typing.final
+ class EnumReservedRange(google.protobuf.message.Message):
+ """Range of reserved numeric values. Reserved values may not be used by
+ entries in the same enum. Reserved ranges may not overlap.
+
+ Note that this is distinct from DescriptorProto.ReservedRange in that it
+ is inclusive such that it can appropriately represent the entire int32
+ domain.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ START_FIELD_NUMBER: builtins.int
+ END_FIELD_NUMBER: builtins.int
+ start: builtins.int
+ """Inclusive."""
+ end: builtins.int
+ """Inclusive."""
+ def __init__(self, *, start: builtins.int | None = ..., end: builtins.int | None = ...) -> None: ...
+ def HasField(self, field_name: typing.Literal["end", b"end", "start", b"start"]) -> builtins.bool: ...
+ def ClearField(self, field_name: typing.Literal["end", b"end", "start", b"start"]) -> None: ...
+
+ NAME_FIELD_NUMBER: builtins.int
+ VALUE_FIELD_NUMBER: builtins.int
+ OPTIONS_FIELD_NUMBER: builtins.int
+ RESERVED_RANGE_FIELD_NUMBER: builtins.int
+ RESERVED_NAME_FIELD_NUMBER: builtins.int
+ name: builtins.str
+ @property
+ def value(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___EnumValueDescriptorProto]: ...
+ @property
+ def options(self) -> global___EnumOptions: ...
+ @property
+ def reserved_range(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___EnumDescriptorProto.EnumReservedRange]:
+ """Range of reserved numeric values. Reserved numeric values may not be used
+ by enum values in the same enum declaration. Reserved ranges may not
+ overlap.
+ """
+
+ @property
+ def reserved_name(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
+ """Reserved enum value names, which may not be reused. A given name may only
+ be reserved once.
+ """
+
+ def __init__(
+ self,
+ *,
+ name: builtins.str | None = ...,
+ value: collections.abc.Iterable[global___EnumValueDescriptorProto] | None = ...,
+ options: global___EnumOptions | None = ...,
+ reserved_range: collections.abc.Iterable[global___EnumDescriptorProto.EnumReservedRange] | None = ...,
+ reserved_name: collections.abc.Iterable[builtins.str] | None = ...,
+ ) -> None: ...
+ def HasField(self, field_name: typing.Literal["name", b"name", "options", b"options"]) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "name",
+ b"name",
+ "options",
+ b"options",
+ "reserved_name",
+ b"reserved_name",
+ "reserved_range",
+ b"reserved_range",
+ "value",
+ b"value",
+ ],
+ ) -> None: ...
+
+global___EnumDescriptorProto = EnumDescriptorProto
+
+class EnumValueDescriptorProto(google.protobuf.message.Message):
+ """Describes a value within an enum."""
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ NAME_FIELD_NUMBER: builtins.int
+ NUMBER_FIELD_NUMBER: builtins.int
+ OPTIONS_FIELD_NUMBER: builtins.int
+ name: builtins.str
+ number: builtins.int
+ @property
+ def options(self) -> global___EnumValueOptions: ...
+ def __init__(
+ self,
+ *,
+ name: builtins.str | None = ...,
+ number: builtins.int | None = ...,
+ options: global___EnumValueOptions | None = ...,
+ ) -> None: ...
+ def HasField(
+ self, field_name: typing.Literal["name", b"name", "number", b"number", "options", b"options"]
+ ) -> builtins.bool: ...
+ def ClearField(self, field_name: typing.Literal["name", b"name", "number", b"number", "options", b"options"]) -> None: ...
+
+global___EnumValueDescriptorProto = EnumValueDescriptorProto
+
+class ServiceDescriptorProto(google.protobuf.message.Message):
+ """Describes a service."""
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ NAME_FIELD_NUMBER: builtins.int
+ METHOD_FIELD_NUMBER: builtins.int
+ OPTIONS_FIELD_NUMBER: builtins.int
+ name: builtins.str
+ @property
+ def method(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___MethodDescriptorProto]: ...
+ @property
+ def options(self) -> global___ServiceOptions: ...
+ def __init__(
+ self,
+ *,
+ name: builtins.str | None = ...,
+ method: collections.abc.Iterable[global___MethodDescriptorProto] | None = ...,
+ options: global___ServiceOptions | None = ...,
+ ) -> None: ...
+ def HasField(self, field_name: typing.Literal["name", b"name", "options", b"options"]) -> builtins.bool: ...
+ def ClearField(self, field_name: typing.Literal["method", b"method", "name", b"name", "options", b"options"]) -> None: ...
+
+global___ServiceDescriptorProto = ServiceDescriptorProto
+
+class MethodDescriptorProto(google.protobuf.message.Message):
+ """Describes a method of a service."""
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ NAME_FIELD_NUMBER: builtins.int
+ INPUT_TYPE_FIELD_NUMBER: builtins.int
+ OUTPUT_TYPE_FIELD_NUMBER: builtins.int
+ OPTIONS_FIELD_NUMBER: builtins.int
+ CLIENT_STREAMING_FIELD_NUMBER: builtins.int
+ SERVER_STREAMING_FIELD_NUMBER: builtins.int
+ name: builtins.str
+ input_type: builtins.str
+ """Input and output type names. These are resolved in the same way as
+ FieldDescriptorProto.type_name, but must refer to a message type.
+ """
+ output_type: builtins.str
+ client_streaming: builtins.bool
+ """Identifies if client streams multiple client messages"""
+ server_streaming: builtins.bool
+ """Identifies if server streams multiple server messages"""
+ @property
+ def options(self) -> global___MethodOptions: ...
+ def __init__(
+ self,
+ *,
+ name: builtins.str | None = ...,
+ input_type: builtins.str | None = ...,
+ output_type: builtins.str | None = ...,
+ options: global___MethodOptions | None = ...,
+ client_streaming: builtins.bool | None = ...,
+ server_streaming: builtins.bool | None = ...,
+ ) -> None: ...
+ def HasField(
+ self,
+ field_name: typing.Literal[
+ "client_streaming",
+ b"client_streaming",
+ "input_type",
+ b"input_type",
+ "name",
+ b"name",
+ "options",
+ b"options",
+ "output_type",
+ b"output_type",
+ "server_streaming",
+ b"server_streaming",
+ ],
+ ) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "client_streaming",
+ b"client_streaming",
+ "input_type",
+ b"input_type",
+ "name",
+ b"name",
+ "options",
+ b"options",
+ "output_type",
+ b"output_type",
+ "server_streaming",
+ b"server_streaming",
+ ],
+ ) -> None: ...
+
+global___MethodDescriptorProto = MethodDescriptorProto
+
+class FileOptions(google.protobuf.message.Message):
+ """Each of the definitions above may have "options" attached. These are
+ just annotations which may cause code to be generated slightly differently
+ or may contain hints for code that manipulates protocol messages.
+
+ Clients may define custom options as extensions of the *Options messages.
+ These extensions may not yet be known at parsing time, so the parser cannot
+ store the values in them. Instead it stores them in a field in the *Options
+ message called uninterpreted_option. This field must have the same name
+ across all *Options messages. We then use this field to populate the
+ extensions when we build a descriptor, at which point all protos have been
+ parsed and so all extensions are known.
+
+ Extension numbers for custom options may be chosen as follows:
+ * For options which will only be used within a single application or
+ organization, or for experimental options, use field numbers 50000
+ through 99999. It is up to you to ensure that you do not use the
+ same number for multiple options.
+ * For options which will be published and used publicly by multiple
+ independent entities, e-mail [email protected]
+ to reserve extension numbers. Simply provide your project name (e.g.
+ Objective-C plugin) and your project website (if available) -- there's no
+ need to explain how you intend to use them. Usually you only need one
+ extension number. You can declare multiple options with only one extension
+ number by putting them in a sub-message. See the Custom Options section of
+ the docs for examples:
+ https://developers.google.com/protocol-buffers/docs/proto#options
+ If this turns out to be popular, a web service will be set up
+ to automatically assign option numbers.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ class _OptimizeMode:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+ class _OptimizeModeEnumTypeWrapper(
+ google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[FileOptions._OptimizeMode.ValueType], builtins.type
+ ):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ SPEED: FileOptions._OptimizeMode.ValueType # 1
+ """Generate complete code for parsing, serialization,"""
+ CODE_SIZE: FileOptions._OptimizeMode.ValueType # 2
+ """etc.
+ Use ReflectionOps to implement these methods.
+ """
+ LITE_RUNTIME: FileOptions._OptimizeMode.ValueType # 3
+ """Generate code using MessageLite and the lite runtime."""
+
+ class OptimizeMode(_OptimizeMode, metaclass=_OptimizeModeEnumTypeWrapper):
+ """Generated classes can be optimized for speed or code size."""
+
+ SPEED: FileOptions.OptimizeMode.ValueType # 1
+ """Generate complete code for parsing, serialization,"""
+ CODE_SIZE: FileOptions.OptimizeMode.ValueType # 2
+ """etc.
+ Use ReflectionOps to implement these methods.
+ """
+ LITE_RUNTIME: FileOptions.OptimizeMode.ValueType # 3
+ """Generate code using MessageLite and the lite runtime."""
+
+ JAVA_PACKAGE_FIELD_NUMBER: builtins.int
+ JAVA_OUTER_CLASSNAME_FIELD_NUMBER: builtins.int
+ JAVA_MULTIPLE_FILES_FIELD_NUMBER: builtins.int
+ JAVA_GENERATE_EQUALS_AND_HASH_FIELD_NUMBER: builtins.int
+ JAVA_STRING_CHECK_UTF8_FIELD_NUMBER: builtins.int
+ OPTIMIZE_FOR_FIELD_NUMBER: builtins.int
+ GO_PACKAGE_FIELD_NUMBER: builtins.int
+ CC_GENERIC_SERVICES_FIELD_NUMBER: builtins.int
+ JAVA_GENERIC_SERVICES_FIELD_NUMBER: builtins.int
+ PY_GENERIC_SERVICES_FIELD_NUMBER: builtins.int
+ DEPRECATED_FIELD_NUMBER: builtins.int
+ CC_ENABLE_ARENAS_FIELD_NUMBER: builtins.int
+ OBJC_CLASS_PREFIX_FIELD_NUMBER: builtins.int
+ CSHARP_NAMESPACE_FIELD_NUMBER: builtins.int
+ SWIFT_PREFIX_FIELD_NUMBER: builtins.int
+ PHP_CLASS_PREFIX_FIELD_NUMBER: builtins.int
+ PHP_NAMESPACE_FIELD_NUMBER: builtins.int
+ PHP_METADATA_NAMESPACE_FIELD_NUMBER: builtins.int
+ RUBY_PACKAGE_FIELD_NUMBER: builtins.int
+ FEATURES_FIELD_NUMBER: builtins.int
+ UNINTERPRETED_OPTION_FIELD_NUMBER: builtins.int
+ java_package: builtins.str
+ """Sets the Java package where classes generated from this .proto will be
+ placed. By default, the proto package is used, but this is often
+ inappropriate because proto packages do not normally start with backwards
+ domain names.
+ """
+ java_outer_classname: builtins.str
+ """Controls the name of the wrapper Java class generated for the .proto file.
+ That class will always contain the .proto file's getDescriptor() method as
+ well as any top-level extensions defined in the .proto file.
+ If java_multiple_files is disabled, then all the other classes from the
+ .proto file will be nested inside the single wrapper outer class.
+ """
+ java_multiple_files: builtins.bool
+ """If enabled, then the Java code generator will generate a separate .java
+ file for each top-level message, enum, and service defined in the .proto
+ file. Thus, these types will *not* be nested inside the wrapper class
+ named by java_outer_classname. However, the wrapper class will still be
+ generated to contain the file's getDescriptor() method as well as any
+ top-level extensions defined in the file.
+ """
+ java_generate_equals_and_hash: builtins.bool
+ """This option does nothing."""
+ java_string_check_utf8: builtins.bool
+ """A proto2 file can set this to true to opt in to UTF-8 checking for Java,
+ which will throw an exception if invalid UTF-8 is parsed from the wire or
+ assigned to a string field.
+
+ TODO: clarify exactly what kinds of field types this option
+ applies to, and update these docs accordingly.
+
+ Proto3 files already perform these checks. Setting the option explicitly to
+ false has no effect: it cannot be used to opt proto3 files out of UTF-8
+ checks.
+ """
+ optimize_for: global___FileOptions.OptimizeMode.ValueType
+ go_package: builtins.str
+ """Sets the Go package where structs generated from this .proto will be
+ placed. If omitted, the Go package will be derived from the following:
+ - The basename of the package import path, if provided.
+ - Otherwise, the package statement in the .proto file, if present.
+ - Otherwise, the basename of the .proto file, without extension.
+ """
+ cc_generic_services: builtins.bool
+ """Should generic services be generated in each language? "Generic" services
+ are not specific to any particular RPC system. They are generated by the
+ main code generators in each language (without additional plugins).
+ Generic services were the only kind of service generation supported by
+ early versions of google.protobuf.
+
+ Generic services are now considered deprecated in favor of using plugins
+ that generate code specific to your particular RPC system. Therefore,
+ these default to false. Old code which depends on generic services should
+ explicitly set them to true.
+ """
+ java_generic_services: builtins.bool
+ py_generic_services: builtins.bool
+ deprecated: builtins.bool
+ """Is this file deprecated?
+ Depending on the target platform, this can emit Deprecated annotations
+ for everything in the file, or it will be completely ignored; in the very
+ least, this is a formalization for deprecating files.
+ """
+ cc_enable_arenas: builtins.bool
+ """Enables the use of arenas for the proto messages in this file. This applies
+ only to generated classes for C++.
+ """
+ objc_class_prefix: builtins.str
+ """Sets the objective c class prefix which is prepended to all objective c
+ generated classes from this .proto. There is no default.
+ """
+ csharp_namespace: builtins.str
+ """Namespace for generated classes; defaults to the package."""
+ swift_prefix: builtins.str
+ """By default Swift generators will take the proto package and CamelCase it
+ replacing '.' with underscore and use that to prefix the types/symbols
+ defined. When this options is provided, they will use this value instead
+ to prefix the types/symbols defined.
+ """
+ php_class_prefix: builtins.str
+ """Sets the php class prefix which is prepended to all php generated classes
+ from this .proto. Default is empty.
+ """
+ php_namespace: builtins.str
+ """Use this option to change the namespace of php generated classes. Default
+ is empty. When this option is empty, the package name will be used for
+ determining the namespace.
+ """
+ php_metadata_namespace: builtins.str
+ """Use this option to change the namespace of php generated metadata classes.
+ Default is empty. When this option is empty, the proto file name will be
+ used for determining the namespace.
+ """
+ ruby_package: builtins.str
+ """Use this option to change the package of ruby generated classes. Default
+ is empty. When this option is not set, the package name will be used for
+ determining the ruby package.
+ """
+ @property
+ def features(self) -> global___FeatureSet:
+ """Any features defined in the specific edition.
+ WARNING: This field should only be used by protobuf plugins or special
+ cases like the proto compiler. Other uses are discouraged and
+ developers should rely on the protoreflect APIs for their client language.
+ """
+
+ @property
+ def uninterpreted_option(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UninterpretedOption]:
+ """The parser stores options it doesn't recognize here.
+ See the documentation for the "Options" section above.
+ """
+
+ def __init__(
+ self,
+ *,
+ java_package: builtins.str | None = ...,
+ java_outer_classname: builtins.str | None = ...,
+ java_multiple_files: builtins.bool | None = ...,
+ java_generate_equals_and_hash: builtins.bool | None = ...,
+ java_string_check_utf8: builtins.bool | None = ...,
+ optimize_for: global___FileOptions.OptimizeMode.ValueType | None = ...,
+ go_package: builtins.str | None = ...,
+ cc_generic_services: builtins.bool | None = ...,
+ java_generic_services: builtins.bool | None = ...,
+ py_generic_services: builtins.bool | None = ...,
+ deprecated: builtins.bool | None = ...,
+ cc_enable_arenas: builtins.bool | None = ...,
+ objc_class_prefix: builtins.str | None = ...,
+ csharp_namespace: builtins.str | None = ...,
+ swift_prefix: builtins.str | None = ...,
+ php_class_prefix: builtins.str | None = ...,
+ php_namespace: builtins.str | None = ...,
+ php_metadata_namespace: builtins.str | None = ...,
+ ruby_package: builtins.str | None = ...,
+ features: global___FeatureSet | None = ...,
+ uninterpreted_option: collections.abc.Iterable[global___UninterpretedOption] | None = ...,
+ ) -> None: ...
+ def HasField(
+ self,
+ field_name: typing.Literal[
+ "cc_enable_arenas",
+ b"cc_enable_arenas",
+ "cc_generic_services",
+ b"cc_generic_services",
+ "csharp_namespace",
+ b"csharp_namespace",
+ "deprecated",
+ b"deprecated",
+ "features",
+ b"features",
+ "go_package",
+ b"go_package",
+ "java_generate_equals_and_hash",
+ b"java_generate_equals_and_hash",
+ "java_generic_services",
+ b"java_generic_services",
+ "java_multiple_files",
+ b"java_multiple_files",
+ "java_outer_classname",
+ b"java_outer_classname",
+ "java_package",
+ b"java_package",
+ "java_string_check_utf8",
+ b"java_string_check_utf8",
+ "objc_class_prefix",
+ b"objc_class_prefix",
+ "optimize_for",
+ b"optimize_for",
+ "php_class_prefix",
+ b"php_class_prefix",
+ "php_metadata_namespace",
+ b"php_metadata_namespace",
+ "php_namespace",
+ b"php_namespace",
+ "py_generic_services",
+ b"py_generic_services",
+ "ruby_package",
+ b"ruby_package",
+ "swift_prefix",
+ b"swift_prefix",
+ ],
+ ) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "cc_enable_arenas",
+ b"cc_enable_arenas",
+ "cc_generic_services",
+ b"cc_generic_services",
+ "csharp_namespace",
+ b"csharp_namespace",
+ "deprecated",
+ b"deprecated",
+ "features",
+ b"features",
+ "go_package",
+ b"go_package",
+ "java_generate_equals_and_hash",
+ b"java_generate_equals_and_hash",
+ "java_generic_services",
+ b"java_generic_services",
+ "java_multiple_files",
+ b"java_multiple_files",
+ "java_outer_classname",
+ b"java_outer_classname",
+ "java_package",
+ b"java_package",
+ "java_string_check_utf8",
+ b"java_string_check_utf8",
+ "objc_class_prefix",
+ b"objc_class_prefix",
+ "optimize_for",
+ b"optimize_for",
+ "php_class_prefix",
+ b"php_class_prefix",
+ "php_metadata_namespace",
+ b"php_metadata_namespace",
+ "php_namespace",
+ b"php_namespace",
+ "py_generic_services",
+ b"py_generic_services",
+ "ruby_package",
+ b"ruby_package",
+ "swift_prefix",
+ b"swift_prefix",
+ "uninterpreted_option",
+ b"uninterpreted_option",
+ ],
+ ) -> None: ...
+
+global___FileOptions = FileOptions
+
+class MessageOptions(google.protobuf.message.Message):
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ MESSAGE_SET_WIRE_FORMAT_FIELD_NUMBER: builtins.int
+ NO_STANDARD_DESCRIPTOR_ACCESSOR_FIELD_NUMBER: builtins.int
+ DEPRECATED_FIELD_NUMBER: builtins.int
+ MAP_ENTRY_FIELD_NUMBER: builtins.int
+ DEPRECATED_LEGACY_JSON_FIELD_CONFLICTS_FIELD_NUMBER: builtins.int
+ FEATURES_FIELD_NUMBER: builtins.int
+ UNINTERPRETED_OPTION_FIELD_NUMBER: builtins.int
+ message_set_wire_format: builtins.bool
+ """Set true to use the old proto1 MessageSet wire format for extensions.
+ This is provided for backwards-compatibility with the MessageSet wire
+ format. You should not use this for any other reason: It's less
+ efficient, has fewer features, and is more complicated.
+
+ The message must be defined exactly as follows:
+ message Foo {
+ option message_set_wire_format = true;
+ extensions 4 to max;
+ }
+ Note that the message cannot have any defined fields; MessageSets only
+ have extensions.
+
+ All extensions of your type must be singular messages; e.g. they cannot
+ be int32s, enums, or repeated messages.
+
+ Because this is an option, the above two restrictions are not enforced by
+ the protocol compiler.
+ """
+ no_standard_descriptor_accessor: builtins.bool
+ """Disables the generation of the standard "descriptor()" accessor, which can
+ conflict with a field of the same name. This is meant to make migration
+ from proto1 easier; new code should avoid fields named "descriptor".
+ """
+ deprecated: builtins.bool
+ """Is this message deprecated?
+ Depending on the target platform, this can emit Deprecated annotations
+ for the message, or it will be completely ignored; in the very least,
+ this is a formalization for deprecating messages.
+ """
+ map_entry: builtins.bool
+ """Whether the message is an automatically generated map entry type for the
+ maps field.
+
+ For maps fields:
+ map<KeyType, ValueType> map_field = 1;
+ The parsed descriptor looks like:
+ message MapFieldEntry {
+ option map_entry = true;
+ optional KeyType key = 1;
+ optional ValueType value = 2;
+ }
+ repeated MapFieldEntry map_field = 1;
+
+ Implementations may choose not to generate the map_entry=true message, but
+ use a native map in the target language to hold the keys and values.
+ The reflection APIs in such implementations still need to work as
+ if the field is a repeated message field.
+
+ NOTE: Do not set the option in .proto files. Always use the maps syntax
+ instead. The option should only be implicitly set by the proto compiler
+ parser.
+ """
+ deprecated_legacy_json_field_conflicts: builtins.bool
+ """Enable the legacy handling of JSON field name conflicts. This lowercases
+ and strips underscored from the fields before comparison in proto3 only.
+ The new behavior takes `json_name` into account and applies to proto2 as
+ well.
+
+ This should only be used as a temporary measure against broken builds due
+ to the change in behavior for JSON field name conflicts.
+
+ TODO This is legacy behavior we plan to remove once downstream
+ teams have had time to migrate.
+ """
+ @property
+ def features(self) -> global___FeatureSet:
+ """Any features defined in the specific edition.
+ WARNING: This field should only be used by protobuf plugins or special
+ cases like the proto compiler. Other uses are discouraged and
+ developers should rely on the protoreflect APIs for their client language.
+ """
+
+ @property
+ def uninterpreted_option(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UninterpretedOption]:
+ """The parser stores options it doesn't recognize here. See above."""
+
+ def __init__(
+ self,
+ *,
+ message_set_wire_format: builtins.bool | None = ...,
+ no_standard_descriptor_accessor: builtins.bool | None = ...,
+ deprecated: builtins.bool | None = ...,
+ map_entry: builtins.bool | None = ...,
+ deprecated_legacy_json_field_conflicts: builtins.bool | None = ...,
+ features: global___FeatureSet | None = ...,
+ uninterpreted_option: collections.abc.Iterable[global___UninterpretedOption] | None = ...,
+ ) -> None: ...
+ def HasField(
+ self,
+ field_name: typing.Literal[
+ "deprecated",
+ b"deprecated",
+ "deprecated_legacy_json_field_conflicts",
+ b"deprecated_legacy_json_field_conflicts",
+ "features",
+ b"features",
+ "map_entry",
+ b"map_entry",
+ "message_set_wire_format",
+ b"message_set_wire_format",
+ "no_standard_descriptor_accessor",
+ b"no_standard_descriptor_accessor",
+ ],
+ ) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "deprecated",
+ b"deprecated",
+ "deprecated_legacy_json_field_conflicts",
+ b"deprecated_legacy_json_field_conflicts",
+ "features",
+ b"features",
+ "map_entry",
+ b"map_entry",
+ "message_set_wire_format",
+ b"message_set_wire_format",
+ "no_standard_descriptor_accessor",
+ b"no_standard_descriptor_accessor",
+ "uninterpreted_option",
+ b"uninterpreted_option",
+ ],
+ ) -> None: ...
+
+global___MessageOptions = MessageOptions
+
+class FieldOptions(google.protobuf.message.Message):
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ class _CType:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+ class _CTypeEnumTypeWrapper(
+ google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[FieldOptions._CType.ValueType], builtins.type
+ ):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ STRING: FieldOptions._CType.ValueType # 0
+ """Default mode."""
+ CORD: FieldOptions._CType.ValueType # 1
+ """The option [ctype=CORD] may be applied to a non-repeated field of type
+ "bytes". It indicates that in C++, the data should be stored in a Cord
+ instead of a string. For very large strings, this may reduce memory
+ fragmentation. It may also allow better performance when parsing from a
+ Cord, or when parsing with aliasing enabled, as the parsed Cord may then
+ alias the original buffer.
+ """
+ STRING_PIECE: FieldOptions._CType.ValueType # 2
+
+ class CType(_CType, metaclass=_CTypeEnumTypeWrapper): ...
+ STRING: FieldOptions.CType.ValueType # 0
+ """Default mode."""
+ CORD: FieldOptions.CType.ValueType # 1
+ """The option [ctype=CORD] may be applied to a non-repeated field of type
+ "bytes". It indicates that in C++, the data should be stored in a Cord
+ instead of a string. For very large strings, this may reduce memory
+ fragmentation. It may also allow better performance when parsing from a
+ Cord, or when parsing with aliasing enabled, as the parsed Cord may then
+ alias the original buffer.
+ """
+ STRING_PIECE: FieldOptions.CType.ValueType # 2
+
+ class _JSType:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+ class _JSTypeEnumTypeWrapper(
+ google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[FieldOptions._JSType.ValueType], builtins.type
+ ):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ JS_NORMAL: FieldOptions._JSType.ValueType # 0
+ """Use the default type."""
+ JS_STRING: FieldOptions._JSType.ValueType # 1
+ """Use JavaScript strings."""
+ JS_NUMBER: FieldOptions._JSType.ValueType # 2
+ """Use JavaScript numbers."""
+
+ class JSType(_JSType, metaclass=_JSTypeEnumTypeWrapper): ...
+ JS_NORMAL: FieldOptions.JSType.ValueType # 0
+ """Use the default type."""
+ JS_STRING: FieldOptions.JSType.ValueType # 1
+ """Use JavaScript strings."""
+ JS_NUMBER: FieldOptions.JSType.ValueType # 2
+ """Use JavaScript numbers."""
+
+ class _OptionRetention:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+ class _OptionRetentionEnumTypeWrapper(
+ google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[FieldOptions._OptionRetention.ValueType], builtins.type
+ ):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ RETENTION_UNKNOWN: FieldOptions._OptionRetention.ValueType # 0
+ RETENTION_RUNTIME: FieldOptions._OptionRetention.ValueType # 1
+ RETENTION_SOURCE: FieldOptions._OptionRetention.ValueType # 2
+
+ class OptionRetention(_OptionRetention, metaclass=_OptionRetentionEnumTypeWrapper):
+ """If set to RETENTION_SOURCE, the option will be omitted from the binary."""
+
+ RETENTION_UNKNOWN: FieldOptions.OptionRetention.ValueType # 0
+ RETENTION_RUNTIME: FieldOptions.OptionRetention.ValueType # 1
+ RETENTION_SOURCE: FieldOptions.OptionRetention.ValueType # 2
+
+ class _OptionTargetType:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+ class _OptionTargetTypeEnumTypeWrapper(
+ google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[FieldOptions._OptionTargetType.ValueType], builtins.type
+ ):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ TARGET_TYPE_UNKNOWN: FieldOptions._OptionTargetType.ValueType # 0
+ TARGET_TYPE_FILE: FieldOptions._OptionTargetType.ValueType # 1
+ TARGET_TYPE_EXTENSION_RANGE: FieldOptions._OptionTargetType.ValueType # 2
+ TARGET_TYPE_MESSAGE: FieldOptions._OptionTargetType.ValueType # 3
+ TARGET_TYPE_FIELD: FieldOptions._OptionTargetType.ValueType # 4
+ TARGET_TYPE_ONEOF: FieldOptions._OptionTargetType.ValueType # 5
+ TARGET_TYPE_ENUM: FieldOptions._OptionTargetType.ValueType # 6
+ TARGET_TYPE_ENUM_ENTRY: FieldOptions._OptionTargetType.ValueType # 7
+ TARGET_TYPE_SERVICE: FieldOptions._OptionTargetType.ValueType # 8
+ TARGET_TYPE_METHOD: FieldOptions._OptionTargetType.ValueType # 9
+
+ class OptionTargetType(_OptionTargetType, metaclass=_OptionTargetTypeEnumTypeWrapper):
+ """This indicates the types of entities that the field may apply to when used
+ as an option. If it is unset, then the field may be freely used as an
+ option on any kind of entity.
+ """
+
+ TARGET_TYPE_UNKNOWN: FieldOptions.OptionTargetType.ValueType # 0
+ TARGET_TYPE_FILE: FieldOptions.OptionTargetType.ValueType # 1
+ TARGET_TYPE_EXTENSION_RANGE: FieldOptions.OptionTargetType.ValueType # 2
+ TARGET_TYPE_MESSAGE: FieldOptions.OptionTargetType.ValueType # 3
+ TARGET_TYPE_FIELD: FieldOptions.OptionTargetType.ValueType # 4
+ TARGET_TYPE_ONEOF: FieldOptions.OptionTargetType.ValueType # 5
+ TARGET_TYPE_ENUM: FieldOptions.OptionTargetType.ValueType # 6
+ TARGET_TYPE_ENUM_ENTRY: FieldOptions.OptionTargetType.ValueType # 7
+ TARGET_TYPE_SERVICE: FieldOptions.OptionTargetType.ValueType # 8
+ TARGET_TYPE_METHOD: FieldOptions.OptionTargetType.ValueType # 9
+
+ @typing.final
+ class EditionDefault(google.protobuf.message.Message):
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ EDITION_FIELD_NUMBER: builtins.int
+ VALUE_FIELD_NUMBER: builtins.int
+ edition: global___Edition.ValueType
+ value: builtins.str
+ """Textproto value."""
+ def __init__(self, *, edition: global___Edition.ValueType | None = ..., value: builtins.str | None = ...) -> None: ...
+ def HasField(self, field_name: typing.Literal["edition", b"edition", "value", b"value"]) -> builtins.bool: ...
+ def ClearField(self, field_name: typing.Literal["edition", b"edition", "value", b"value"]) -> None: ...
+
+ @typing.final
+ class FeatureSupport(google.protobuf.message.Message):
+ """Information about the support window of a feature."""
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ EDITION_INTRODUCED_FIELD_NUMBER: builtins.int
+ EDITION_DEPRECATED_FIELD_NUMBER: builtins.int
+ DEPRECATION_WARNING_FIELD_NUMBER: builtins.int
+ EDITION_REMOVED_FIELD_NUMBER: builtins.int
+ edition_introduced: global___Edition.ValueType
+ """The edition that this feature was first available in. In editions
+ earlier than this one, the default assigned to EDITION_LEGACY will be
+ used, and proto files will not be able to override it.
+ """
+ edition_deprecated: global___Edition.ValueType
+ """The edition this feature becomes deprecated in. Using this after this
+ edition may trigger warnings.
+ """
+ deprecation_warning: builtins.str
+ """The deprecation warning text if this feature is used after the edition it
+ was marked deprecated in.
+ """
+ edition_removed: global___Edition.ValueType
+ """The edition this feature is no longer available in. In editions after
+ this one, the last default assigned will be used, and proto files will
+ not be able to override it.
+ """
+ def __init__(
+ self,
+ *,
+ edition_introduced: global___Edition.ValueType | None = ...,
+ edition_deprecated: global___Edition.ValueType | None = ...,
+ deprecation_warning: builtins.str | None = ...,
+ edition_removed: global___Edition.ValueType | None = ...,
+ ) -> None: ...
+ def HasField(
+ self,
+ field_name: typing.Literal[
+ "deprecation_warning",
+ b"deprecation_warning",
+ "edition_deprecated",
+ b"edition_deprecated",
+ "edition_introduced",
+ b"edition_introduced",
+ "edition_removed",
+ b"edition_removed",
+ ],
+ ) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "deprecation_warning",
+ b"deprecation_warning",
+ "edition_deprecated",
+ b"edition_deprecated",
+ "edition_introduced",
+ b"edition_introduced",
+ "edition_removed",
+ b"edition_removed",
+ ],
+ ) -> None: ...
+
+ CTYPE_FIELD_NUMBER: builtins.int
+ PACKED_FIELD_NUMBER: builtins.int
+ JSTYPE_FIELD_NUMBER: builtins.int
+ LAZY_FIELD_NUMBER: builtins.int
+ UNVERIFIED_LAZY_FIELD_NUMBER: builtins.int
+ DEPRECATED_FIELD_NUMBER: builtins.int
+ WEAK_FIELD_NUMBER: builtins.int
+ DEBUG_REDACT_FIELD_NUMBER: builtins.int
+ RETENTION_FIELD_NUMBER: builtins.int
+ TARGETS_FIELD_NUMBER: builtins.int
+ EDITION_DEFAULTS_FIELD_NUMBER: builtins.int
+ FEATURES_FIELD_NUMBER: builtins.int
+ FEATURE_SUPPORT_FIELD_NUMBER: builtins.int
+ UNINTERPRETED_OPTION_FIELD_NUMBER: builtins.int
+ ctype: global___FieldOptions.CType.ValueType
+ """NOTE: ctype is deprecated. Use `features.(pb.cpp).string_type` instead.
+ The ctype option instructs the C++ code generator to use a different
+ representation of the field than it normally would. See the specific
+ options below. This option is only implemented to support use of
+ [ctype=CORD] and [ctype=STRING] (the default) on non-repeated fields of
+ type "bytes" in the open source release.
+ TODO: make ctype actually deprecated.
+ """
+ packed: builtins.bool
+ """The packed option can be enabled for repeated primitive fields to enable
+ a more efficient representation on the wire. Rather than repeatedly
+ writing the tag and type for each element, the entire array is encoded as
+ a single length-delimited blob. In proto3, only explicit setting it to
+ false will avoid using packed encoding. This option is prohibited in
+ Editions, but the `repeated_field_encoding` feature can be used to control
+ the behavior.
+ """
+ jstype: global___FieldOptions.JSType.ValueType
+ """The jstype option determines the JavaScript type used for values of the
+ field. The option is permitted only for 64 bit integral and fixed types
+ (int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
+ is represented as JavaScript string, which avoids loss of precision that
+ can happen when a large value is converted to a floating point JavaScript.
+ Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
+ use the JavaScript "number" type. The behavior of the default option
+ JS_NORMAL is implementation dependent.
+
+ This option is an enum to permit additional types to be added, e.g.
+ goog.math.Integer.
+ """
+ lazy: builtins.bool
+ """Should this field be parsed lazily? Lazy applies only to message-type
+ fields. It means that when the outer message is initially parsed, the
+ inner message's contents will not be parsed but instead stored in encoded
+ form. The inner message will actually be parsed when it is first accessed.
+
+ This is only a hint. Implementations are free to choose whether to use
+ eager or lazy parsing regardless of the value of this option. However,
+ setting this option true suggests that the protocol author believes that
+ using lazy parsing on this field is worth the additional bookkeeping
+ overhead typically needed to implement it.
+
+ This option does not affect the public interface of any generated code;
+ all method signatures remain the same. Furthermore, thread-safety of the
+ interface is not affected by this option; const methods remain safe to
+ call from multiple threads concurrently, while non-const methods continue
+ to require exclusive access.
+
+ Note that lazy message fields are still eagerly verified to check
+ ill-formed wireformat or missing required fields. Calling IsInitialized()
+ on the outer message would fail if the inner message has missing required
+ fields. Failed verification would result in parsing failure (except when
+ uninitialized messages are acceptable).
+ """
+ unverified_lazy: builtins.bool
+ """unverified_lazy does no correctness checks on the byte stream. This should
+ only be used where lazy with verification is prohibitive for performance
+ reasons.
+ """
+ deprecated: builtins.bool
+ """Is this field deprecated?
+ Depending on the target platform, this can emit Deprecated annotations
+ for accessors, or it will be completely ignored; in the very least, this
+ is a formalization for deprecating fields.
+ """
+ weak: builtins.bool
+ """For Google-internal migration only. Do not use."""
+ debug_redact: builtins.bool
+ """Indicate that the field value should not be printed out when using debug
+ formats, e.g. when the field contains sensitive credentials.
+ """
+ retention: global___FieldOptions.OptionRetention.ValueType
+ @property
+ def targets(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[global___FieldOptions.OptionTargetType.ValueType]: ...
+ @property
+ def edition_defaults(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___FieldOptions.EditionDefault]: ...
+ @property
+ def features(self) -> global___FeatureSet:
+ """Any features defined in the specific edition.
+ WARNING: This field should only be used by protobuf plugins or special
+ cases like the proto compiler. Other uses are discouraged and
+ developers should rely on the protoreflect APIs for their client language.
+ """
+
+ @property
+ def feature_support(self) -> global___FieldOptions.FeatureSupport: ...
+ @property
+ def uninterpreted_option(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UninterpretedOption]:
+ """The parser stores options it doesn't recognize here. See above."""
+
+ def __init__(
+ self,
+ *,
+ ctype: global___FieldOptions.CType.ValueType | None = ...,
+ packed: builtins.bool | None = ...,
+ jstype: global___FieldOptions.JSType.ValueType | None = ...,
+ lazy: builtins.bool | None = ...,
+ unverified_lazy: builtins.bool | None = ...,
+ deprecated: builtins.bool | None = ...,
+ weak: builtins.bool | None = ...,
+ debug_redact: builtins.bool | None = ...,
+ retention: global___FieldOptions.OptionRetention.ValueType | None = ...,
+ targets: collections.abc.Iterable[global___FieldOptions.OptionTargetType.ValueType] | None = ...,
+ edition_defaults: collections.abc.Iterable[global___FieldOptions.EditionDefault] | None = ...,
+ features: global___FeatureSet | None = ...,
+ feature_support: global___FieldOptions.FeatureSupport | None = ...,
+ uninterpreted_option: collections.abc.Iterable[global___UninterpretedOption] | None = ...,
+ ) -> None: ...
+ def HasField(
+ self,
+ field_name: typing.Literal[
+ "ctype",
+ b"ctype",
+ "debug_redact",
+ b"debug_redact",
+ "deprecated",
+ b"deprecated",
+ "feature_support",
+ b"feature_support",
+ "features",
+ b"features",
+ "jstype",
+ b"jstype",
+ "lazy",
+ b"lazy",
+ "packed",
+ b"packed",
+ "retention",
+ b"retention",
+ "unverified_lazy",
+ b"unverified_lazy",
+ "weak",
+ b"weak",
+ ],
+ ) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "ctype",
+ b"ctype",
+ "debug_redact",
+ b"debug_redact",
+ "deprecated",
+ b"deprecated",
+ "edition_defaults",
+ b"edition_defaults",
+ "feature_support",
+ b"feature_support",
+ "features",
+ b"features",
+ "jstype",
+ b"jstype",
+ "lazy",
+ b"lazy",
+ "packed",
+ b"packed",
+ "retention",
+ b"retention",
+ "targets",
+ b"targets",
+ "uninterpreted_option",
+ b"uninterpreted_option",
+ "unverified_lazy",
+ b"unverified_lazy",
+ "weak",
+ b"weak",
+ ],
+ ) -> None: ...
+
+global___FieldOptions = FieldOptions
+
+class OneofOptions(google.protobuf.message.Message):
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ FEATURES_FIELD_NUMBER: builtins.int
+ UNINTERPRETED_OPTION_FIELD_NUMBER: builtins.int
+ @property
+ def features(self) -> global___FeatureSet:
+ """Any features defined in the specific edition.
+ WARNING: This field should only be used by protobuf plugins or special
+ cases like the proto compiler. Other uses are discouraged and
+ developers should rely on the protoreflect APIs for their client language.
+ """
+
+ @property
+ def uninterpreted_option(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UninterpretedOption]:
+ """The parser stores options it doesn't recognize here. See above."""
+
+ def __init__(
+ self,
+ *,
+ features: global___FeatureSet | None = ...,
+ uninterpreted_option: collections.abc.Iterable[global___UninterpretedOption] | None = ...,
+ ) -> None: ...
+ def HasField(self, field_name: typing.Literal["features", b"features"]) -> builtins.bool: ...
+ def ClearField(
+ self, field_name: typing.Literal["features", b"features", "uninterpreted_option", b"uninterpreted_option"]
+ ) -> None: ...
+
+global___OneofOptions = OneofOptions
+
+class EnumOptions(google.protobuf.message.Message):
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ ALLOW_ALIAS_FIELD_NUMBER: builtins.int
+ DEPRECATED_FIELD_NUMBER: builtins.int
+ DEPRECATED_LEGACY_JSON_FIELD_CONFLICTS_FIELD_NUMBER: builtins.int
+ FEATURES_FIELD_NUMBER: builtins.int
+ UNINTERPRETED_OPTION_FIELD_NUMBER: builtins.int
+ allow_alias: builtins.bool
+ """Set this option to true to allow mapping different tag names to the same
+ value.
+ """
+ deprecated: builtins.bool
+ """Is this enum deprecated?
+ Depending on the target platform, this can emit Deprecated annotations
+ for the enum, or it will be completely ignored; in the very least, this
+ is a formalization for deprecating enums.
+ """
+ deprecated_legacy_json_field_conflicts: builtins.bool
+ """Enable the legacy handling of JSON field name conflicts. This lowercases
+ and strips underscored from the fields before comparison in proto3 only.
+ The new behavior takes `json_name` into account and applies to proto2 as
+ well.
+ TODO Remove this legacy behavior once downstream teams have
+ had time to migrate.
+ """
+ @property
+ def features(self) -> global___FeatureSet:
+ """Any features defined in the specific edition.
+ WARNING: This field should only be used by protobuf plugins or special
+ cases like the proto compiler. Other uses are discouraged and
+ developers should rely on the protoreflect APIs for their client language.
+ """
+
+ @property
+ def uninterpreted_option(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UninterpretedOption]:
+ """The parser stores options it doesn't recognize here. See above."""
+
+ def __init__(
+ self,
+ *,
+ allow_alias: builtins.bool | None = ...,
+ deprecated: builtins.bool | None = ...,
+ deprecated_legacy_json_field_conflicts: builtins.bool | None = ...,
+ features: global___FeatureSet | None = ...,
+ uninterpreted_option: collections.abc.Iterable[global___UninterpretedOption] | None = ...,
+ ) -> None: ...
+ def HasField(
+ self,
+ field_name: typing.Literal[
+ "allow_alias",
+ b"allow_alias",
+ "deprecated",
+ b"deprecated",
+ "deprecated_legacy_json_field_conflicts",
+ b"deprecated_legacy_json_field_conflicts",
+ "features",
+ b"features",
+ ],
+ ) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "allow_alias",
+ b"allow_alias",
+ "deprecated",
+ b"deprecated",
+ "deprecated_legacy_json_field_conflicts",
+ b"deprecated_legacy_json_field_conflicts",
+ "features",
+ b"features",
+ "uninterpreted_option",
+ b"uninterpreted_option",
+ ],
+ ) -> None: ...
+
+global___EnumOptions = EnumOptions
+
+class EnumValueOptions(google.protobuf.message.Message):
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ DEPRECATED_FIELD_NUMBER: builtins.int
+ FEATURES_FIELD_NUMBER: builtins.int
+ DEBUG_REDACT_FIELD_NUMBER: builtins.int
+ FEATURE_SUPPORT_FIELD_NUMBER: builtins.int
+ UNINTERPRETED_OPTION_FIELD_NUMBER: builtins.int
+ deprecated: builtins.bool
+ """Is this enum value deprecated?
+ Depending on the target platform, this can emit Deprecated annotations
+ for the enum value, or it will be completely ignored; in the very least,
+ this is a formalization for deprecating enum values.
+ """
+ debug_redact: builtins.bool
+ """Indicate that fields annotated with this enum value should not be printed
+ out when using debug formats, e.g. when the field contains sensitive
+ credentials.
+ """
+ @property
+ def features(self) -> global___FeatureSet:
+ """Any features defined in the specific edition.
+ WARNING: This field should only be used by protobuf plugins or special
+ cases like the proto compiler. Other uses are discouraged and
+ developers should rely on the protoreflect APIs for their client language.
+ """
+
+ @property
+ def feature_support(self) -> global___FieldOptions.FeatureSupport:
+ """Information about the support window of a feature value."""
+
+ @property
+ def uninterpreted_option(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UninterpretedOption]:
+ """The parser stores options it doesn't recognize here. See above."""
+
+ def __init__(
+ self,
+ *,
+ deprecated: builtins.bool | None = ...,
+ features: global___FeatureSet | None = ...,
+ debug_redact: builtins.bool | None = ...,
+ feature_support: global___FieldOptions.FeatureSupport | None = ...,
+ uninterpreted_option: collections.abc.Iterable[global___UninterpretedOption] | None = ...,
+ ) -> None: ...
+ def HasField(
+ self,
+ field_name: typing.Literal[
+ "debug_redact",
+ b"debug_redact",
+ "deprecated",
+ b"deprecated",
+ "feature_support",
+ b"feature_support",
+ "features",
+ b"features",
+ ],
+ ) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "debug_redact",
+ b"debug_redact",
+ "deprecated",
+ b"deprecated",
+ "feature_support",
+ b"feature_support",
+ "features",
+ b"features",
+ "uninterpreted_option",
+ b"uninterpreted_option",
+ ],
+ ) -> None: ...
+
+global___EnumValueOptions = EnumValueOptions
+
+class ServiceOptions(google.protobuf.message.Message):
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ FEATURES_FIELD_NUMBER: builtins.int
+ DEPRECATED_FIELD_NUMBER: builtins.int
+ UNINTERPRETED_OPTION_FIELD_NUMBER: builtins.int
+ deprecated: builtins.bool
+ """Note: Field numbers 1 through 32 are reserved for Google's internal RPC
+ framework. We apologize for hoarding these numbers to ourselves, but
+ we were already using them long before we decided to release Protocol
+ Buffers.
+
+ Is this service deprecated?
+ Depending on the target platform, this can emit Deprecated annotations
+ for the service, or it will be completely ignored; in the very least,
+ this is a formalization for deprecating services.
+ """
+ @property
+ def features(self) -> global___FeatureSet:
+ """Any features defined in the specific edition.
+ WARNING: This field should only be used by protobuf plugins or special
+ cases like the proto compiler. Other uses are discouraged and
+ developers should rely on the protoreflect APIs for their client language.
+ """
+
+ @property
+ def uninterpreted_option(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UninterpretedOption]:
+ """The parser stores options it doesn't recognize here. See above."""
+
+ def __init__(
+ self,
+ *,
+ features: global___FeatureSet | None = ...,
+ deprecated: builtins.bool | None = ...,
+ uninterpreted_option: collections.abc.Iterable[global___UninterpretedOption] | None = ...,
+ ) -> None: ...
+ def HasField(self, field_name: typing.Literal["deprecated", b"deprecated", "features", b"features"]) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "deprecated", b"deprecated", "features", b"features", "uninterpreted_option", b"uninterpreted_option"
+ ],
+ ) -> None: ...
+
+global___ServiceOptions = ServiceOptions
+
+class MethodOptions(google.protobuf.message.Message):
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ class _IdempotencyLevel:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+ class _IdempotencyLevelEnumTypeWrapper(
+ google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[MethodOptions._IdempotencyLevel.ValueType], builtins.type
+ ):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ IDEMPOTENCY_UNKNOWN: MethodOptions._IdempotencyLevel.ValueType # 0
+ NO_SIDE_EFFECTS: MethodOptions._IdempotencyLevel.ValueType # 1
+ """implies idempotent"""
+ IDEMPOTENT: MethodOptions._IdempotencyLevel.ValueType # 2
+ """idempotent, but may have side effects"""
+
+ class IdempotencyLevel(_IdempotencyLevel, metaclass=_IdempotencyLevelEnumTypeWrapper):
+ """Is this method side-effect-free (or safe in HTTP parlance), or idempotent,
+ or neither? HTTP based RPC implementation may choose GET verb for safe
+ methods, and PUT verb for idempotent methods instead of the default POST.
+ """
+
+ IDEMPOTENCY_UNKNOWN: MethodOptions.IdempotencyLevel.ValueType # 0
+ NO_SIDE_EFFECTS: MethodOptions.IdempotencyLevel.ValueType # 1
+ """implies idempotent"""
+ IDEMPOTENT: MethodOptions.IdempotencyLevel.ValueType # 2
+ """idempotent, but may have side effects"""
+
+ DEPRECATED_FIELD_NUMBER: builtins.int
+ IDEMPOTENCY_LEVEL_FIELD_NUMBER: builtins.int
+ FEATURES_FIELD_NUMBER: builtins.int
+ UNINTERPRETED_OPTION_FIELD_NUMBER: builtins.int
+ deprecated: builtins.bool
+ """Note: Field numbers 1 through 32 are reserved for Google's internal RPC
+ framework. We apologize for hoarding these numbers to ourselves, but
+ we were already using them long before we decided to release Protocol
+ Buffers.
+
+ Is this method deprecated?
+ Depending on the target platform, this can emit Deprecated annotations
+ for the method, or it will be completely ignored; in the very least,
+ this is a formalization for deprecating methods.
+ """
+ idempotency_level: global___MethodOptions.IdempotencyLevel.ValueType
+ @property
+ def features(self) -> global___FeatureSet:
+ """Any features defined in the specific edition.
+ WARNING: This field should only be used by protobuf plugins or special
+ cases like the proto compiler. Other uses are discouraged and
+ developers should rely on the protoreflect APIs for their client language.
+ """
+
+ @property
+ def uninterpreted_option(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UninterpretedOption]:
+ """The parser stores options it doesn't recognize here. See above."""
+
+ def __init__(
+ self,
+ *,
+ deprecated: builtins.bool | None = ...,
+ idempotency_level: global___MethodOptions.IdempotencyLevel.ValueType | None = ...,
+ features: global___FeatureSet | None = ...,
+ uninterpreted_option: collections.abc.Iterable[global___UninterpretedOption] | None = ...,
+ ) -> None: ...
+ def HasField(
+ self,
+ field_name: typing.Literal[
+ "deprecated", b"deprecated", "features", b"features", "idempotency_level", b"idempotency_level"
+ ],
+ ) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "deprecated",
+ b"deprecated",
+ "features",
+ b"features",
+ "idempotency_level",
+ b"idempotency_level",
+ "uninterpreted_option",
+ b"uninterpreted_option",
+ ],
+ ) -> None: ...
+
+global___MethodOptions = MethodOptions
+
+class UninterpretedOption(google.protobuf.message.Message):
+ """A message representing a option the parser does not recognize. This only
+ appears in options protos created by the compiler::Parser class.
+ DescriptorPool resolves these when building Descriptor objects. Therefore,
+ options protos in descriptor objects (e.g. returned by Descriptor::options(),
+ or produced by Descriptor::CopyTo()) will never have UninterpretedOptions
+ in them.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ @typing.final
+ class NamePart(google.protobuf.message.Message):
+ """The name of the uninterpreted option. Each string represents a segment in
+ a dot-separated name. is_extension is true iff a segment represents an
+ extension (denoted with parentheses in options specs in .proto files).
+ E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
+ "foo.(bar.baz).moo".
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ NAME_PART_FIELD_NUMBER: builtins.int
+ IS_EXTENSION_FIELD_NUMBER: builtins.int
+ name_part: builtins.str
+ is_extension: builtins.bool
+ def __init__(self, *, name_part: builtins.str | None = ..., is_extension: builtins.bool | None = ...) -> None: ...
+ def HasField(
+ self, field_name: typing.Literal["is_extension", b"is_extension", "name_part", b"name_part"]
+ ) -> builtins.bool: ...
+ def ClearField(self, field_name: typing.Literal["is_extension", b"is_extension", "name_part", b"name_part"]) -> None: ...
+
+ NAME_FIELD_NUMBER: builtins.int
+ IDENTIFIER_VALUE_FIELD_NUMBER: builtins.int
+ POSITIVE_INT_VALUE_FIELD_NUMBER: builtins.int
+ NEGATIVE_INT_VALUE_FIELD_NUMBER: builtins.int
+ DOUBLE_VALUE_FIELD_NUMBER: builtins.int
+ STRING_VALUE_FIELD_NUMBER: builtins.int
+ AGGREGATE_VALUE_FIELD_NUMBER: builtins.int
+ identifier_value: builtins.str
+ """The value of the uninterpreted option, in whatever type the tokenizer
+ identified it as during parsing. Exactly one of these should be set.
+ """
+ positive_int_value: builtins.int
+ negative_int_value: builtins.int
+ double_value: builtins.float
+ string_value: builtins.bytes
+ aggregate_value: builtins.str
+ @property
+ def name(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___UninterpretedOption.NamePart]: ...
+ def __init__(
+ self,
+ *,
+ name: collections.abc.Iterable[global___UninterpretedOption.NamePart] | None = ...,
+ identifier_value: builtins.str | None = ...,
+ positive_int_value: builtins.int | None = ...,
+ negative_int_value: builtins.int | None = ...,
+ double_value: builtins.float | None = ...,
+ string_value: builtins.bytes | None = ...,
+ aggregate_value: builtins.str | None = ...,
+ ) -> None: ...
+ def HasField(
+ self,
+ field_name: typing.Literal[
+ "aggregate_value",
+ b"aggregate_value",
+ "double_value",
+ b"double_value",
+ "identifier_value",
+ b"identifier_value",
+ "negative_int_value",
+ b"negative_int_value",
+ "positive_int_value",
+ b"positive_int_value",
+ "string_value",
+ b"string_value",
+ ],
+ ) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "aggregate_value",
+ b"aggregate_value",
+ "double_value",
+ b"double_value",
+ "identifier_value",
+ b"identifier_value",
+ "name",
+ b"name",
+ "negative_int_value",
+ b"negative_int_value",
+ "positive_int_value",
+ b"positive_int_value",
+ "string_value",
+ b"string_value",
+ ],
+ ) -> None: ...
+
+global___UninterpretedOption = UninterpretedOption
+
+class FeatureSet(google.protobuf.message.Message):
+ """===================================================================
+ Features
+
+ TODO Enums in C++ gencode (and potentially other languages) are
+ not well scoped. This means that each of the feature enums below can clash
+ with each other. The short names we've chosen maximize call-site
+ readability, but leave us very open to this scenario. A future feature will
+ be designed and implemented to handle this, hopefully before we ever hit a
+ conflict here.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ class _FieldPresence:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+ class _FieldPresenceEnumTypeWrapper(
+ google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[FeatureSet._FieldPresence.ValueType], builtins.type
+ ):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ FIELD_PRESENCE_UNKNOWN: FeatureSet._FieldPresence.ValueType # 0
+ EXPLICIT: FeatureSet._FieldPresence.ValueType # 1
+ IMPLICIT: FeatureSet._FieldPresence.ValueType # 2
+ LEGACY_REQUIRED: FeatureSet._FieldPresence.ValueType # 3
+
+ class FieldPresence(_FieldPresence, metaclass=_FieldPresenceEnumTypeWrapper): ...
+ FIELD_PRESENCE_UNKNOWN: FeatureSet.FieldPresence.ValueType # 0
+ EXPLICIT: FeatureSet.FieldPresence.ValueType # 1
+ IMPLICIT: FeatureSet.FieldPresence.ValueType # 2
+ LEGACY_REQUIRED: FeatureSet.FieldPresence.ValueType # 3
+
+ class _EnumType:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+ class _EnumTypeEnumTypeWrapper(
+ google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[FeatureSet._EnumType.ValueType], builtins.type
+ ):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ ENUM_TYPE_UNKNOWN: FeatureSet._EnumType.ValueType # 0
+ OPEN: FeatureSet._EnumType.ValueType # 1
+ CLOSED: FeatureSet._EnumType.ValueType # 2
+
+ class EnumType(_EnumType, metaclass=_EnumTypeEnumTypeWrapper): ...
+ ENUM_TYPE_UNKNOWN: FeatureSet.EnumType.ValueType # 0
+ OPEN: FeatureSet.EnumType.ValueType # 1
+ CLOSED: FeatureSet.EnumType.ValueType # 2
+
+ class _RepeatedFieldEncoding:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+ class _RepeatedFieldEncodingEnumTypeWrapper(
+ google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[FeatureSet._RepeatedFieldEncoding.ValueType], builtins.type
+ ):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ REPEATED_FIELD_ENCODING_UNKNOWN: FeatureSet._RepeatedFieldEncoding.ValueType # 0
+ PACKED: FeatureSet._RepeatedFieldEncoding.ValueType # 1
+ EXPANDED: FeatureSet._RepeatedFieldEncoding.ValueType # 2
+
+ class RepeatedFieldEncoding(_RepeatedFieldEncoding, metaclass=_RepeatedFieldEncodingEnumTypeWrapper): ...
+ REPEATED_FIELD_ENCODING_UNKNOWN: FeatureSet.RepeatedFieldEncoding.ValueType # 0
+ PACKED: FeatureSet.RepeatedFieldEncoding.ValueType # 1
+ EXPANDED: FeatureSet.RepeatedFieldEncoding.ValueType # 2
+
+ class _Utf8Validation:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+ class _Utf8ValidationEnumTypeWrapper(
+ google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[FeatureSet._Utf8Validation.ValueType], builtins.type
+ ):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ UTF8_VALIDATION_UNKNOWN: FeatureSet._Utf8Validation.ValueType # 0
+ VERIFY: FeatureSet._Utf8Validation.ValueType # 2
+ NONE: FeatureSet._Utf8Validation.ValueType # 3
+
+ class Utf8Validation(_Utf8Validation, metaclass=_Utf8ValidationEnumTypeWrapper): ...
+ UTF8_VALIDATION_UNKNOWN: FeatureSet.Utf8Validation.ValueType # 0
+ VERIFY: FeatureSet.Utf8Validation.ValueType # 2
+ NONE: FeatureSet.Utf8Validation.ValueType # 3
+
+ class _MessageEncoding:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+ class _MessageEncodingEnumTypeWrapper(
+ google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[FeatureSet._MessageEncoding.ValueType], builtins.type
+ ):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ MESSAGE_ENCODING_UNKNOWN: FeatureSet._MessageEncoding.ValueType # 0
+ LENGTH_PREFIXED: FeatureSet._MessageEncoding.ValueType # 1
+ DELIMITED: FeatureSet._MessageEncoding.ValueType # 2
+
+ class MessageEncoding(_MessageEncoding, metaclass=_MessageEncodingEnumTypeWrapper): ...
+ MESSAGE_ENCODING_UNKNOWN: FeatureSet.MessageEncoding.ValueType # 0
+ LENGTH_PREFIXED: FeatureSet.MessageEncoding.ValueType # 1
+ DELIMITED: FeatureSet.MessageEncoding.ValueType # 2
+
+ class _JsonFormat:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+ class _JsonFormatEnumTypeWrapper(
+ google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[FeatureSet._JsonFormat.ValueType], builtins.type
+ ):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ JSON_FORMAT_UNKNOWN: FeatureSet._JsonFormat.ValueType # 0
+ ALLOW: FeatureSet._JsonFormat.ValueType # 1
+ LEGACY_BEST_EFFORT: FeatureSet._JsonFormat.ValueType # 2
+
+ class JsonFormat(_JsonFormat, metaclass=_JsonFormatEnumTypeWrapper): ...
+ JSON_FORMAT_UNKNOWN: FeatureSet.JsonFormat.ValueType # 0
+ ALLOW: FeatureSet.JsonFormat.ValueType # 1
+ LEGACY_BEST_EFFORT: FeatureSet.JsonFormat.ValueType # 2
+
+ class _EnforceNamingStyle:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+ class _EnforceNamingStyleEnumTypeWrapper(
+ google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[FeatureSet._EnforceNamingStyle.ValueType], builtins.type
+ ):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ ENFORCE_NAMING_STYLE_UNKNOWN: FeatureSet._EnforceNamingStyle.ValueType # 0
+ STYLE2024: FeatureSet._EnforceNamingStyle.ValueType # 1
+ STYLE_LEGACY: FeatureSet._EnforceNamingStyle.ValueType # 2
+
+ class EnforceNamingStyle(_EnforceNamingStyle, metaclass=_EnforceNamingStyleEnumTypeWrapper): ...
+ ENFORCE_NAMING_STYLE_UNKNOWN: FeatureSet.EnforceNamingStyle.ValueType # 0
+ STYLE2024: FeatureSet.EnforceNamingStyle.ValueType # 1
+ STYLE_LEGACY: FeatureSet.EnforceNamingStyle.ValueType # 2
+
+ FIELD_PRESENCE_FIELD_NUMBER: builtins.int
+ ENUM_TYPE_FIELD_NUMBER: builtins.int
+ REPEATED_FIELD_ENCODING_FIELD_NUMBER: builtins.int
+ UTF8_VALIDATION_FIELD_NUMBER: builtins.int
+ MESSAGE_ENCODING_FIELD_NUMBER: builtins.int
+ JSON_FORMAT_FIELD_NUMBER: builtins.int
+ ENFORCE_NAMING_STYLE_FIELD_NUMBER: builtins.int
+ field_presence: global___FeatureSet.FieldPresence.ValueType
+ enum_type: global___FeatureSet.EnumType.ValueType
+ repeated_field_encoding: global___FeatureSet.RepeatedFieldEncoding.ValueType
+ utf8_validation: global___FeatureSet.Utf8Validation.ValueType
+ message_encoding: global___FeatureSet.MessageEncoding.ValueType
+ json_format: global___FeatureSet.JsonFormat.ValueType
+ enforce_naming_style: global___FeatureSet.EnforceNamingStyle.ValueType
+ def __init__(
+ self,
+ *,
+ field_presence: global___FeatureSet.FieldPresence.ValueType | None = ...,
+ enum_type: global___FeatureSet.EnumType.ValueType | None = ...,
+ repeated_field_encoding: global___FeatureSet.RepeatedFieldEncoding.ValueType | None = ...,
+ utf8_validation: global___FeatureSet.Utf8Validation.ValueType | None = ...,
+ message_encoding: global___FeatureSet.MessageEncoding.ValueType | None = ...,
+ json_format: global___FeatureSet.JsonFormat.ValueType | None = ...,
+ enforce_naming_style: global___FeatureSet.EnforceNamingStyle.ValueType | None = ...,
+ ) -> None: ...
+ def HasField(
+ self,
+ field_name: typing.Literal[
+ "enforce_naming_style",
+ b"enforce_naming_style",
+ "enum_type",
+ b"enum_type",
+ "field_presence",
+ b"field_presence",
+ "json_format",
+ b"json_format",
+ "message_encoding",
+ b"message_encoding",
+ "repeated_field_encoding",
+ b"repeated_field_encoding",
+ "utf8_validation",
+ b"utf8_validation",
+ ],
+ ) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "enforce_naming_style",
+ b"enforce_naming_style",
+ "enum_type",
+ b"enum_type",
+ "field_presence",
+ b"field_presence",
+ "json_format",
+ b"json_format",
+ "message_encoding",
+ b"message_encoding",
+ "repeated_field_encoding",
+ b"repeated_field_encoding",
+ "utf8_validation",
+ b"utf8_validation",
+ ],
+ ) -> None: ...
+
+global___FeatureSet = FeatureSet
+
+class FeatureSetDefaults(google.protobuf.message.Message):
+ """A compiled specification for the defaults of a set of features. These
+ messages are generated from FeatureSet extensions and can be used to seed
+ feature resolution. The resolution with this object becomes a simple search
+ for the closest matching edition, followed by proto merges.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ @typing.final
+ class FeatureSetEditionDefault(google.protobuf.message.Message):
+ """A map from every known edition with a unique set of defaults to its
+ defaults. Not all editions may be contained here. For a given edition,
+ the defaults at the closest matching edition ordered at or before it should
+ be used. This field must be in strict ascending order by edition.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ EDITION_FIELD_NUMBER: builtins.int
+ OVERRIDABLE_FEATURES_FIELD_NUMBER: builtins.int
+ FIXED_FEATURES_FIELD_NUMBER: builtins.int
+ edition: global___Edition.ValueType
+ @property
+ def overridable_features(self) -> global___FeatureSet:
+ """Defaults of features that can be overridden in this edition."""
+
+ @property
+ def fixed_features(self) -> global___FeatureSet:
+ """Defaults of features that can't be overridden in this edition."""
+
+ def __init__(
+ self,
+ *,
+ edition: global___Edition.ValueType | None = ...,
+ overridable_features: global___FeatureSet | None = ...,
+ fixed_features: global___FeatureSet | None = ...,
+ ) -> None: ...
+ def HasField(
+ self,
+ field_name: typing.Literal[
+ "edition", b"edition", "fixed_features", b"fixed_features", "overridable_features", b"overridable_features"
+ ],
+ ) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "edition", b"edition", "fixed_features", b"fixed_features", "overridable_features", b"overridable_features"
+ ],
+ ) -> None: ...
+
+ DEFAULTS_FIELD_NUMBER: builtins.int
+ MINIMUM_EDITION_FIELD_NUMBER: builtins.int
+ MAXIMUM_EDITION_FIELD_NUMBER: builtins.int
+ minimum_edition: global___Edition.ValueType
+ """The minimum supported edition (inclusive) when this was constructed.
+ Editions before this will not have defaults.
+ """
+ maximum_edition: global___Edition.ValueType
+ """The maximum known edition (inclusive) when this was constructed. Editions
+ after this will not have reliable defaults.
+ """
+ @property
+ def defaults(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[
+ global___FeatureSetDefaults.FeatureSetEditionDefault
+ ]: ...
+ def __init__(
+ self,
+ *,
+ defaults: collections.abc.Iterable[global___FeatureSetDefaults.FeatureSetEditionDefault] | None = ...,
+ minimum_edition: global___Edition.ValueType | None = ...,
+ maximum_edition: global___Edition.ValueType | None = ...,
+ ) -> None: ...
+ def HasField(
+ self, field_name: typing.Literal["maximum_edition", b"maximum_edition", "minimum_edition", b"minimum_edition"]
+ ) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "defaults", b"defaults", "maximum_edition", b"maximum_edition", "minimum_edition", b"minimum_edition"
+ ],
+ ) -> None: ...
+
+global___FeatureSetDefaults = FeatureSetDefaults
+
+class SourceCodeInfo(google.protobuf.message.Message):
+ """===================================================================
+ Optional source code info
+
+ Encapsulates information about the original source file from which a
+ FileDescriptorProto was generated.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ @typing.final
+ class Location(google.protobuf.message.Message):
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ PATH_FIELD_NUMBER: builtins.int
+ SPAN_FIELD_NUMBER: builtins.int
+ LEADING_COMMENTS_FIELD_NUMBER: builtins.int
+ TRAILING_COMMENTS_FIELD_NUMBER: builtins.int
+ LEADING_DETACHED_COMMENTS_FIELD_NUMBER: builtins.int
+ leading_comments: builtins.str
+ """If this SourceCodeInfo represents a complete declaration, these are any
+ comments appearing before and after the declaration which appear to be
+ attached to the declaration.
+
+ A series of line comments appearing on consecutive lines, with no other
+ tokens appearing on those lines, will be treated as a single comment.
+
+ leading_detached_comments will keep paragraphs of comments that appear
+ before (but not connected to) the current element. Each paragraph,
+ separated by empty lines, will be one comment element in the repeated
+ field.
+
+ Only the comment content is provided; comment markers (e.g. //) are
+ stripped out. For block comments, leading whitespace and an asterisk
+ will be stripped from the beginning of each line other than the first.
+ Newlines are included in the output.
+
+ Examples:
+
+ optional int32 foo = 1; // Comment attached to foo.
+ // Comment attached to bar.
+ optional int32 bar = 2;
+
+ optional string baz = 3;
+ // Comment attached to baz.
+ // Another line attached to baz.
+
+ // Comment attached to moo.
+ //
+ // Another line attached to moo.
+ optional double moo = 4;
+
+ // Detached comment for corge. This is not leading or trailing comments
+ // to moo or corge because there are blank lines separating it from
+ // both.
+
+ // Detached comment for corge paragraph 2.
+
+ optional string corge = 5;
+ /* Block comment attached
+ * to corge. Leading asterisks
+ * will be removed. */
+ /* Block comment attached to
+ * grault. */
+ optional int32 grault = 6;
+
+ // ignored detached comments.
+ """
+ trailing_comments: builtins.str
+ @property
+ def path(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
+ """Identifies which part of the FileDescriptorProto was defined at this
+ location.
+
+ Each element is a field number or an index. They form a path from
+ the root FileDescriptorProto to the place where the definition appears.
+ For example, this path:
+ [ 4, 3, 2, 7, 1 ]
+ refers to:
+ file.message_type(3) // 4, 3
+ .field(7) // 2, 7
+ .name() // 1
+ This is because FileDescriptorProto.message_type has field number 4:
+ repeated DescriptorProto message_type = 4;
+ and DescriptorProto.field has field number 2:
+ repeated FieldDescriptorProto field = 2;
+ and FieldDescriptorProto.name has field number 1:
+ optional string name = 1;
+
+ Thus, the above path gives the location of a field name. If we removed
+ the last element:
+ [ 4, 3, 2, 7 ]
+ this path refers to the whole field declaration (from the beginning
+ of the label to the terminating semicolon).
+ """
+
+ @property
+ def span(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
+ """Always has exactly three or four elements: start line, start column,
+ end line (optional, otherwise assumed same as start line), end column.
+ These are packed into a single field for efficiency. Note that line
+ and column numbers are zero-based -- typically you will want to add
+ 1 to each before displaying to a user.
+ """
+
+ @property
+ def leading_detached_comments(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
+ def __init__(
+ self,
+ *,
+ path: collections.abc.Iterable[builtins.int] | None = ...,
+ span: collections.abc.Iterable[builtins.int] | None = ...,
+ leading_comments: builtins.str | None = ...,
+ trailing_comments: builtins.str | None = ...,
+ leading_detached_comments: collections.abc.Iterable[builtins.str] | None = ...,
+ ) -> None: ...
+ def HasField(
+ self, field_name: typing.Literal["leading_comments", b"leading_comments", "trailing_comments", b"trailing_comments"]
+ ) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "leading_comments",
+ b"leading_comments",
+ "leading_detached_comments",
+ b"leading_detached_comments",
+ "path",
+ b"path",
+ "span",
+ b"span",
+ "trailing_comments",
+ b"trailing_comments",
+ ],
+ ) -> None: ...
+
+ LOCATION_FIELD_NUMBER: builtins.int
+ @property
+ def location(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SourceCodeInfo.Location]:
+ """A Location identifies a piece of source code in a .proto file which
+ corresponds to a particular definition. This information is intended
+ to be useful to IDEs, code indexers, documentation generators, and similar
+ tools.
+
+ For example, say we have a file like:
+ message Foo {
+ optional string foo = 1;
+ }
+ Let's look at just the field definition:
+ optional string foo = 1;
+ ^ ^^ ^^ ^ ^^^
+ a bc de f ghi
+ We have the following locations:
+ span path represents
+ [a,i) [ 4, 0, 2, 0 ] The whole field definition.
+ [a,b) [ 4, 0, 2, 0, 4 ] The label (optional).
+ [c,d) [ 4, 0, 2, 0, 5 ] The type (string).
+ [e,f) [ 4, 0, 2, 0, 1 ] The name (foo).
+ [g,h) [ 4, 0, 2, 0, 3 ] The number (1).
+
+ Notes:
+ - A location may refer to a repeated field itself (i.e. not to any
+ particular index within it). This is used whenever a set of elements are
+ logically enclosed in a single code segment. For example, an entire
+ extend block (possibly containing multiple extension definitions) will
+ have an outer location whose path refers to the "extensions" repeated
+ field without an index.
+ - Multiple locations may have the same path. This happens when a single
+ logical declaration is spread out across multiple places. The most
+ obvious example is the "extend" block again -- there may be multiple
+ extend blocks in the same scope, each of which will have the same path.
+ - A location's span is not always a subset of its parent's span. For
+ example, the "extendee" of an extension declaration appears at the
+ beginning of the "extend" block and is shared by all extensions within
+ the block.
+ - Just because a location's span is a subset of some other location's span
+ does not mean that it is a descendant. For example, a "group" defines
+ both a type and a field in a single declaration. Thus, the locations
+ corresponding to the type and field and their components will overlap.
+ - Code which tries to interpret locations should probably be designed to
+ ignore those that it doesn't understand, as more types of locations could
+ be recorded in the future.
+ """
+
+ def __init__(self, *, location: collections.abc.Iterable[global___SourceCodeInfo.Location] | None = ...) -> None: ...
+ def ClearField(self, field_name: typing.Literal["location", b"location"]) -> None: ...
+
+global___SourceCodeInfo = SourceCodeInfo
+
+class GeneratedCodeInfo(google.protobuf.message.Message):
+ """Describes the relationship between generated code and its original source
+ file. A GeneratedCodeInfo message is associated with only one generated
+ source file, but may contain references to different source .proto files.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ @typing.final
+ class Annotation(google.protobuf.message.Message):
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ class _Semantic:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+ class _SemanticEnumTypeWrapper(
+ google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[GeneratedCodeInfo.Annotation._Semantic.ValueType],
+ builtins.type,
+ ):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ NONE: GeneratedCodeInfo.Annotation._Semantic.ValueType # 0
+ """There is no effect or the effect is indescribable."""
+ SET: GeneratedCodeInfo.Annotation._Semantic.ValueType # 1
+ """The element is set or otherwise mutated."""
+ ALIAS: GeneratedCodeInfo.Annotation._Semantic.ValueType # 2
+ """An alias to the element is returned."""
+
+ class Semantic(_Semantic, metaclass=_SemanticEnumTypeWrapper):
+ """Represents the identified object's effect on the element in the original
+ .proto file.
+ """
+
+ NONE: GeneratedCodeInfo.Annotation.Semantic.ValueType # 0
+ """There is no effect or the effect is indescribable."""
+ SET: GeneratedCodeInfo.Annotation.Semantic.ValueType # 1
+ """The element is set or otherwise mutated."""
+ ALIAS: GeneratedCodeInfo.Annotation.Semantic.ValueType # 2
+ """An alias to the element is returned."""
+
+ PATH_FIELD_NUMBER: builtins.int
+ SOURCE_FILE_FIELD_NUMBER: builtins.int
+ BEGIN_FIELD_NUMBER: builtins.int
+ END_FIELD_NUMBER: builtins.int
+ SEMANTIC_FIELD_NUMBER: builtins.int
+ source_file: builtins.str
+ """Identifies the filesystem path to the original source .proto."""
+ begin: builtins.int
+ """Identifies the starting offset in bytes in the generated code
+ that relates to the identified object.
+ """
+ end: builtins.int
+ """Identifies the ending offset in bytes in the generated code that
+ relates to the identified object. The end offset should be one past
+ the last relevant byte (so the length of the text = end - begin).
+ """
+ semantic: global___GeneratedCodeInfo.Annotation.Semantic.ValueType
+ @property
+ def path(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.int]:
+ """Identifies the element in the original source .proto file. This field
+ is formatted the same as SourceCodeInfo.Location.path.
+ """
+
+ def __init__(
+ self,
+ *,
+ path: collections.abc.Iterable[builtins.int] | None = ...,
+ source_file: builtins.str | None = ...,
+ begin: builtins.int | None = ...,
+ end: builtins.int | None = ...,
+ semantic: global___GeneratedCodeInfo.Annotation.Semantic.ValueType | None = ...,
+ ) -> None: ...
+ def HasField(
+ self,
+ field_name: typing.Literal["begin", b"begin", "end", b"end", "semantic", b"semantic", "source_file", b"source_file"],
+ ) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "begin", b"begin", "end", b"end", "path", b"path", "semantic", b"semantic", "source_file", b"source_file"
+ ],
+ ) -> None: ...
+
+ ANNOTATION_FIELD_NUMBER: builtins.int
+ @property
+ def annotation(
+ self,
+ ) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___GeneratedCodeInfo.Annotation]:
+ """An Annotation connects some span of text in generated code to an element
+ of its generating .proto file.
+ """
+
+ def __init__(self, *, annotation: collections.abc.Iterable[global___GeneratedCodeInfo.Annotation] | None = ...) -> None: ...
+ def ClearField(self, field_name: typing.Literal["annotation", b"annotation"]) -> None: ...
+
+global___GeneratedCodeInfo = GeneratedCodeInfo
diff --git a/contrib/python/types-protobuf/google-stubs/protobuf/duration_pb2.pyi b/contrib/python/types-protobuf/google-stubs/protobuf/duration_pb2.pyi
new file mode 100644
index 00000000000..2cb846889f4
--- /dev/null
+++ b/contrib/python/types-protobuf/google-stubs/protobuf/duration_pb2.pyi
@@ -0,0 +1,126 @@
+"""
+@generated by mypy-protobuf. Do not edit manually!
+isort:skip_file
+Protocol Buffers - Google's data interchange format
+Copyright 2008 Google Inc. All rights reserved.
+https://developers.google.com/protocol-buffers/
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+"""
+
+import builtins
+import typing
+
+import google.protobuf.descriptor
+import google.protobuf.internal.well_known_types
+import google.protobuf.message
+
+DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
+
+class Duration(google.protobuf.message.Message, google.protobuf.internal.well_known_types.Duration):
+ """A Duration represents a signed, fixed-length span of time represented
+ as a count of seconds and fractions of seconds at nanosecond
+ resolution. It is independent of any calendar and concepts like "day"
+ or "month". It is related to Timestamp in that the difference between
+ two Timestamp values is a Duration and it can be added or subtracted
+ from a Timestamp. Range is approximately +-10,000 years.
+
+ # Examples
+
+ Example 1: Compute Duration from two Timestamps in pseudo code.
+
+ Timestamp start = ...;
+ Timestamp end = ...;
+ Duration duration = ...;
+
+ duration.seconds = end.seconds - start.seconds;
+ duration.nanos = end.nanos - start.nanos;
+
+ if (duration.seconds < 0 && duration.nanos > 0) {
+ duration.seconds += 1;
+ duration.nanos -= 1000000000;
+ } else if (duration.seconds > 0 && duration.nanos < 0) {
+ duration.seconds -= 1;
+ duration.nanos += 1000000000;
+ }
+
+ Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
+
+ Timestamp start = ...;
+ Duration duration = ...;
+ Timestamp end = ...;
+
+ end.seconds = start.seconds + duration.seconds;
+ end.nanos = start.nanos + duration.nanos;
+
+ if (end.nanos < 0) {
+ end.seconds -= 1;
+ end.nanos += 1000000000;
+ } else if (end.nanos >= 1000000000) {
+ end.seconds += 1;
+ end.nanos -= 1000000000;
+ }
+
+ Example 3: Compute Duration from datetime.timedelta in Python.
+
+ td = datetime.timedelta(days=3, minutes=10)
+ duration = Duration()
+ duration.FromTimedelta(td)
+
+ # JSON Mapping
+
+ In JSON format, the Duration type is encoded as a string rather than an
+ object, where the string ends in the suffix "s" (indicating seconds) and
+ is preceded by the number of seconds, with nanoseconds expressed as
+ fractional seconds. For example, 3 seconds with 0 nanoseconds should be
+ encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
+ be expressed in JSON format as "3.000000001s", and 3 seconds and 1
+ microsecond should be expressed in JSON format as "3.000001s".
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ SECONDS_FIELD_NUMBER: builtins.int
+ NANOS_FIELD_NUMBER: builtins.int
+ seconds: builtins.int
+ """Signed seconds of the span of time. Must be from -315,576,000,000
+ to +315,576,000,000 inclusive. Note: these bounds are computed from:
+ 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
+ """
+ nanos: builtins.int
+ """Signed fractions of a second at nanosecond resolution of the span
+ of time. Durations less than one second are represented with a 0
+ `seconds` field and a positive or negative `nanos` field. For durations
+ of one second or more, a non-zero value for the `nanos` field must be
+ of the same sign as the `seconds` field. Must be from -999,999,999
+ to +999,999,999 inclusive.
+ """
+ def __init__(self, *, seconds: builtins.int | None = ..., nanos: builtins.int | None = ...) -> None: ...
+ def ClearField(self, field_name: typing.Literal["nanos", b"nanos", "seconds", b"seconds"]) -> None: ...
+
+global___Duration = Duration
diff --git a/contrib/python/types-protobuf/google-stubs/protobuf/empty_pb2.pyi b/contrib/python/types-protobuf/google-stubs/protobuf/empty_pb2.pyi
new file mode 100644
index 00000000000..31797927954
--- /dev/null
+++ b/contrib/python/types-protobuf/google-stubs/protobuf/empty_pb2.pyi
@@ -0,0 +1,57 @@
+"""
+@generated by mypy-protobuf. Do not edit manually!
+isort:skip_file
+Protocol Buffers - Google's data interchange format
+Copyright 2008 Google Inc. All rights reserved.
+https://developers.google.com/protocol-buffers/
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+"""
+
+import typing
+
+import google.protobuf.descriptor
+import google.protobuf.message
+
+DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
+
+class Empty(google.protobuf.message.Message):
+ """A generic empty message that you can re-use to avoid defining duplicated
+ empty messages in your APIs. A typical example is to use it as the request
+ or the response type of an API method. For instance:
+
+ service Foo {
+ rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
+ }
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ def __init__(self) -> None: ...
+
+global___Empty = Empty
diff --git a/contrib/python/types-protobuf/google-stubs/protobuf/field_mask_pb2.pyi b/contrib/python/types-protobuf/google-stubs/protobuf/field_mask_pb2.pyi
new file mode 100644
index 00000000000..82dea7a11b5
--- /dev/null
+++ b/contrib/python/types-protobuf/google-stubs/protobuf/field_mask_pb2.pyi
@@ -0,0 +1,259 @@
+"""
+@generated by mypy-protobuf. Do not edit manually!
+isort:skip_file
+Protocol Buffers - Google's data interchange format
+Copyright 2008 Google Inc. All rights reserved.
+https://developers.google.com/protocol-buffers/
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+"""
+
+import builtins
+import collections.abc
+import typing
+
+import google.protobuf.descriptor
+import google.protobuf.internal.containers
+import google.protobuf.internal.well_known_types
+import google.protobuf.message
+
+DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
+
+class FieldMask(google.protobuf.message.Message, google.protobuf.internal.well_known_types.FieldMask):
+ """`FieldMask` represents a set of symbolic field paths, for example:
+
+ paths: "f.a"
+ paths: "f.b.d"
+
+ Here `f` represents a field in some root message, `a` and `b`
+ fields in the message found in `f`, and `d` a field found in the
+ message in `f.b`.
+
+ Field masks are used to specify a subset of fields that should be
+ returned by a get operation or modified by an update operation.
+ Field masks also have a custom JSON encoding (see below).
+
+ # Field Masks in Projections
+
+ When used in the context of a projection, a response message or
+ sub-message is filtered by the API to only contain those fields as
+ specified in the mask. For example, if the mask in the previous
+ example is applied to a response message as follows:
+
+ f {
+ a : 22
+ b {
+ d : 1
+ x : 2
+ }
+ y : 13
+ }
+ z: 8
+
+ The result will not contain specific values for fields x,y and z
+ (their value will be set to the default, and omitted in proto text
+ output):
+
+
+ f {
+ a : 22
+ b {
+ d : 1
+ }
+ }
+
+ A repeated field is not allowed except at the last position of a
+ paths string.
+
+ If a FieldMask object is not present in a get operation, the
+ operation applies to all fields (as if a FieldMask of all fields
+ had been specified).
+
+ Note that a field mask does not necessarily apply to the
+ top-level response message. In case of a REST get operation, the
+ field mask applies directly to the response, but in case of a REST
+ list operation, the mask instead applies to each individual message
+ in the returned resource list. In case of a REST custom method,
+ other definitions may be used. Where the mask applies will be
+ clearly documented together with its declaration in the API. In
+ any case, the effect on the returned resource/resources is required
+ behavior for APIs.
+
+ # Field Masks in Update Operations
+
+ A field mask in update operations specifies which fields of the
+ targeted resource are going to be updated. The API is required
+ to only change the values of the fields as specified in the mask
+ and leave the others untouched. If a resource is passed in to
+ describe the updated values, the API ignores the values of all
+ fields not covered by the mask.
+
+ If a repeated field is specified for an update operation, new values will
+ be appended to the existing repeated field in the target resource. Note that
+ a repeated field is only allowed in the last position of a `paths` string.
+
+ If a sub-message is specified in the last position of the field mask for an
+ update operation, then new value will be merged into the existing sub-message
+ in the target resource.
+
+ For example, given the target message:
+
+ f {
+ b {
+ d: 1
+ x: 2
+ }
+ c: [1]
+ }
+
+ And an update message:
+
+ f {
+ b {
+ d: 10
+ }
+ c: [2]
+ }
+
+ then if the field mask is:
+
+ paths: ["f.b", "f.c"]
+
+ then the result will be:
+
+ f {
+ b {
+ d: 10
+ x: 2
+ }
+ c: [1, 2]
+ }
+
+ An implementation may provide options to override this default behavior for
+ repeated and message fields.
+
+ In order to reset a field's value to the default, the field must
+ be in the mask and set to the default value in the provided resource.
+ Hence, in order to reset all fields of a resource, provide a default
+ instance of the resource and set all fields in the mask, or do
+ not provide a mask as described below.
+
+ If a field mask is not present on update, the operation applies to
+ all fields (as if a field mask of all fields has been specified).
+ Note that in the presence of schema evolution, this may mean that
+ fields the client does not know and has therefore not filled into
+ the request will be reset to their default. If this is unwanted
+ behavior, a specific service may require a client to always specify
+ a field mask, producing an error if not.
+
+ As with get operations, the location of the resource which
+ describes the updated values in the request message depends on the
+ operation kind. In any case, the effect of the field mask is
+ required to be honored by the API.
+
+ ## Considerations for HTTP REST
+
+ The HTTP kind of an update operation which uses a field mask must
+ be set to PATCH instead of PUT in order to satisfy HTTP semantics
+ (PUT must only be used for full updates).
+
+ # JSON Encoding of Field Masks
+
+ In JSON, a field mask is encoded as a single string where paths are
+ separated by a comma. Fields name in each path are converted
+ to/from lower-camel naming conventions.
+
+ As an example, consider the following message declarations:
+
+ message Profile {
+ User user = 1;
+ Photo photo = 2;
+ }
+ message User {
+ string display_name = 1;
+ string address = 2;
+ }
+
+ In proto a field mask for `Profile` may look as such:
+
+ mask {
+ paths: "user.display_name"
+ paths: "photo"
+ }
+
+ In JSON, the same mask is represented as below:
+
+ {
+ mask: "user.displayName,photo"
+ }
+
+ # Field Masks and Oneof Fields
+
+ Field masks treat fields in oneofs just as regular fields. Consider the
+ following message:
+
+ message SampleMessage {
+ oneof test_oneof {
+ string name = 4;
+ SubMessage sub_message = 9;
+ }
+ }
+
+ The field mask can be:
+
+ mask {
+ paths: "name"
+ }
+
+ Or:
+
+ mask {
+ paths: "sub_message"
+ }
+
+ Note that oneof type names ("test_oneof" in this case) cannot be used in
+ paths.
+
+ ## Field Mask Verification
+
+ The implementation of any API method which has a FieldMask type field in the
+ request should verify the included field paths, and return an
+ `INVALID_ARGUMENT` error if any path is unmappable.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ PATHS_FIELD_NUMBER: builtins.int
+ @property
+ def paths(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
+ """The set of field mask paths."""
+
+ def __init__(self, *, paths: collections.abc.Iterable[builtins.str] | None = ...) -> None: ...
+ def ClearField(self, field_name: typing.Literal["paths", b"paths"]) -> None: ...
+
+global___FieldMask = FieldMask
diff --git a/contrib/python/types-protobuf/google-stubs/protobuf/source_context_pb2.pyi b/contrib/python/types-protobuf/google-stubs/protobuf/source_context_pb2.pyi
new file mode 100644
index 00000000000..9d74fb3d592
--- /dev/null
+++ b/contrib/python/types-protobuf/google-stubs/protobuf/source_context_pb2.pyi
@@ -0,0 +1,59 @@
+"""
+@generated by mypy-protobuf. Do not edit manually!
+isort:skip_file
+Protocol Buffers - Google's data interchange format
+Copyright 2008 Google Inc. All rights reserved.
+https://developers.google.com/protocol-buffers/
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+"""
+
+import builtins
+import typing
+
+import google.protobuf.descriptor
+import google.protobuf.message
+
+DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
+
+class SourceContext(google.protobuf.message.Message):
+ """`SourceContext` represents information about the source of a
+ protobuf element, like the file in which it is defined.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ FILE_NAME_FIELD_NUMBER: builtins.int
+ file_name: builtins.str
+ """The path-qualified name of the .proto file that contained the associated
+ protobuf element. For example: `"google/protobuf/source_context.proto"`.
+ """
+ def __init__(self, *, file_name: builtins.str | None = ...) -> None: ...
+ def ClearField(self, field_name: typing.Literal["file_name", b"file_name"]) -> None: ...
+
+global___SourceContext = SourceContext
diff --git a/contrib/python/types-protobuf/google-stubs/protobuf/struct_pb2.pyi b/contrib/python/types-protobuf/google-stubs/protobuf/struct_pb2.pyi
new file mode 100644
index 00000000000..8e63dabfc2f
--- /dev/null
+++ b/contrib/python/types-protobuf/google-stubs/protobuf/struct_pb2.pyi
@@ -0,0 +1,215 @@
+"""
+@generated by mypy-protobuf. Do not edit manually!
+isort:skip_file
+Protocol Buffers - Google's data interchange format
+Copyright 2008 Google Inc. All rights reserved.
+https://developers.google.com/protocol-buffers/
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+"""
+
+import builtins
+import collections.abc
+import sys
+import typing
+
+import google.protobuf.descriptor
+import google.protobuf.internal.containers
+import google.protobuf.internal.enum_type_wrapper
+import google.protobuf.internal.well_known_types
+import google.protobuf.message
+
+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
+
+class Struct(google.protobuf.message.Message, google.protobuf.internal.well_known_types.Struct):
+ """`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 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 | None = ..., 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
+
+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 these
+ variants. Absence of any variant indicates an error.
+
+ The JSON representation for `Value` is JSON value.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ NULL_VALUE_FIELD_NUMBER: builtins.int
+ NUMBER_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."""
+ number_value: builtins.float
+ """Represents a double 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 | None = ...,
+ number_value: builtins.float | None = ...,
+ string_value: builtins.str | None = ...,
+ bool_value: builtins.bool | None = ...,
+ struct_value: global___Struct | None = ...,
+ list_value: global___ListValue | None = ...,
+ ) -> None: ...
+ def HasField(
+ self,
+ field_name: typing.Literal[
+ "bool_value",
+ b"bool_value",
+ "kind",
+ b"kind",
+ "list_value",
+ b"list_value",
+ "null_value",
+ b"null_value",
+ "number_value",
+ b"number_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",
+ "kind",
+ b"kind",
+ "list_value",
+ b"list_value",
+ "null_value",
+ b"null_value",
+ "number_value",
+ b"number_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", "number_value", "string_value", "bool_value", "struct_value", "list_value"] | None: ...
+
+global___Value = Value
+
+class ListValue(google.protobuf.message.Message, google.protobuf.internal.well_known_types.ListValue):
+ """`ListValue` is a wrapper around a repeated field of values.
+
+ The JSON representation for `ListValue` is 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
diff --git a/contrib/python/types-protobuf/google-stubs/protobuf/timestamp_pb2.pyi b/contrib/python/types-protobuf/google-stubs/protobuf/timestamp_pb2.pyi
new file mode 100644
index 00000000000..52daff363dd
--- /dev/null
+++ b/contrib/python/types-protobuf/google-stubs/protobuf/timestamp_pb2.pyi
@@ -0,0 +1,155 @@
+"""
+@generated by mypy-protobuf. Do not edit manually!
+isort:skip_file
+Protocol Buffers - Google's data interchange format
+Copyright 2008 Google Inc. All rights reserved.
+https://developers.google.com/protocol-buffers/
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+"""
+
+import builtins
+import typing
+
+import google.protobuf.descriptor
+import google.protobuf.internal.well_known_types
+import google.protobuf.message
+
+DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
+
+class Timestamp(google.protobuf.message.Message, google.protobuf.internal.well_known_types.Timestamp):
+ """A Timestamp represents a point in time independent of any time zone or local
+ calendar, encoded as a count of seconds and fractions of seconds at
+ nanosecond resolution. The count is relative to an epoch at UTC midnight on
+ January 1, 1970, in the proleptic Gregorian calendar which extends the
+ Gregorian calendar backwards to year one.
+
+ All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap
+ second table is needed for interpretation, using a [24-hour linear
+ smear](https://developers.google.com/time/smear).
+
+ The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By
+ restricting to that range, we ensure that we can convert to and from [RFC
+ 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.
+
+ # Examples
+
+ Example 1: Compute Timestamp from POSIX `time()`.
+
+ Timestamp timestamp;
+ timestamp.set_seconds(time(NULL));
+ timestamp.set_nanos(0);
+
+ Example 2: Compute Timestamp from POSIX `gettimeofday()`.
+
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+
+ Timestamp timestamp;
+ timestamp.set_seconds(tv.tv_sec);
+ timestamp.set_nanos(tv.tv_usec * 1000);
+
+ Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
+
+ FILETIME ft;
+ GetSystemTimeAsFileTime(&ft);
+ UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
+
+ // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
+ // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
+ Timestamp timestamp;
+ timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
+ timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
+
+ Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
+
+ long millis = System.currentTimeMillis();
+
+ Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
+ .setNanos((int) ((millis % 1000) * 1000000)).build();
+
+ Example 5: Compute Timestamp from Java `Instant.now()`.
+
+ Instant now = Instant.now();
+
+ Timestamp timestamp =
+ Timestamp.newBuilder().setSeconds(now.getEpochSecond())
+ .setNanos(now.getNano()).build();
+
+ Example 6: Compute Timestamp from current time in Python.
+
+ timestamp = Timestamp()
+ timestamp.GetCurrentTime()
+
+ # JSON Mapping
+
+ In JSON format, the Timestamp type is encoded as a string in the
+ [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the
+ format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z"
+ where {year} is always expressed using four digits while {month}, {day},
+ {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional
+ seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),
+ are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone
+ is required. A proto3 JSON serializer should always use UTC (as indicated by
+ "Z") when printing the Timestamp type and a proto3 JSON parser should be
+ able to accept both UTC and other timezones (as indicated by an offset).
+
+ For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past
+ 01:30 UTC on January 15, 2017.
+
+ In JavaScript, one can convert a Date object to this format using the
+ standard
+ [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString)
+ method. In Python, a standard `datetime.datetime` object can be converted
+ to this format using
+ [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with
+ the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use
+ the Joda Time's [`ISODateTimeFormat.dateTime()`](
+ http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime()
+ ) to obtain a formatter capable of generating timestamps in this format.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ SECONDS_FIELD_NUMBER: builtins.int
+ NANOS_FIELD_NUMBER: builtins.int
+ seconds: builtins.int
+ """Represents seconds of UTC time since Unix epoch
+ 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to
+ 9999-12-31T23:59:59Z inclusive.
+ """
+ nanos: builtins.int
+ """Non-negative fractions of a second at nanosecond resolution. Negative
+ second values with fractions must still have non-negative nanos values
+ that count forward in time. Must be from 0 to 999,999,999
+ inclusive.
+ """
+ def __init__(self, *, seconds: builtins.int | None = ..., nanos: builtins.int | None = ...) -> None: ...
+ def ClearField(self, field_name: typing.Literal["nanos", b"nanos", "seconds", b"seconds"]) -> None: ...
+
+global___Timestamp = Timestamp
diff --git a/contrib/python/types-protobuf/google-stubs/protobuf/type_pb2.pyi b/contrib/python/types-protobuf/google-stubs/protobuf/type_pb2.pyi
new file mode 100644
index 00000000000..4d3fc1cb657
--- /dev/null
+++ b/contrib/python/types-protobuf/google-stubs/protobuf/type_pb2.pyi
@@ -0,0 +1,464 @@
+"""
+@generated by mypy-protobuf. Do not edit manually!
+isort:skip_file
+Protocol Buffers - Google's data interchange format
+Copyright 2008 Google Inc. All rights reserved.
+https://developers.google.com/protocol-buffers/
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+"""
+
+import builtins
+import collections.abc
+import sys
+import typing
+
+import google.protobuf.any_pb2
+import google.protobuf.descriptor
+import google.protobuf.internal.containers
+import google.protobuf.internal.enum_type_wrapper
+import google.protobuf.message
+import google.protobuf.source_context_pb2
+
+if sys.version_info >= (3, 10):
+ import typing as typing_extensions
+else:
+ import typing_extensions
+
+DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
+
+class _Syntax:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+class _SyntaxEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[_Syntax.ValueType], builtins.type):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ SYNTAX_PROTO2: _Syntax.ValueType # 0
+ """Syntax `proto2`."""
+ SYNTAX_PROTO3: _Syntax.ValueType # 1
+ """Syntax `proto3`."""
+ SYNTAX_EDITIONS: _Syntax.ValueType # 2
+ """Syntax `editions`."""
+
+class Syntax(_Syntax, metaclass=_SyntaxEnumTypeWrapper):
+ """The syntax in which a protocol buffer element is defined."""
+
+SYNTAX_PROTO2: Syntax.ValueType # 0
+"""Syntax `proto2`."""
+SYNTAX_PROTO3: Syntax.ValueType # 1
+"""Syntax `proto3`."""
+SYNTAX_EDITIONS: Syntax.ValueType # 2
+"""Syntax `editions`."""
+global___Syntax = Syntax
+
+class Type(google.protobuf.message.Message):
+ """A protocol buffer message type."""
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ NAME_FIELD_NUMBER: builtins.int
+ FIELDS_FIELD_NUMBER: builtins.int
+ ONEOFS_FIELD_NUMBER: builtins.int
+ OPTIONS_FIELD_NUMBER: builtins.int
+ SOURCE_CONTEXT_FIELD_NUMBER: builtins.int
+ SYNTAX_FIELD_NUMBER: builtins.int
+ EDITION_FIELD_NUMBER: builtins.int
+ name: builtins.str
+ """The fully qualified message name."""
+ syntax: global___Syntax.ValueType
+ """The source syntax."""
+ edition: builtins.str
+ """The source edition string, only valid when syntax is SYNTAX_EDITIONS."""
+ @property
+ def fields(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Field]:
+ """The list of fields."""
+
+ @property
+ def oneofs(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
+ """The list of types appearing in `oneof` definitions in this type."""
+
+ @property
+ def options(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Option]:
+ """The protocol buffer options."""
+
+ @property
+ def source_context(self) -> google.protobuf.source_context_pb2.SourceContext:
+ """The source context."""
+
+ def __init__(
+ self,
+ *,
+ name: builtins.str | None = ...,
+ fields: collections.abc.Iterable[global___Field] | None = ...,
+ oneofs: collections.abc.Iterable[builtins.str] | None = ...,
+ options: collections.abc.Iterable[global___Option] | None = ...,
+ source_context: google.protobuf.source_context_pb2.SourceContext | None = ...,
+ syntax: global___Syntax.ValueType | None = ...,
+ edition: builtins.str | None = ...,
+ ) -> None: ...
+ def HasField(self, field_name: typing.Literal["source_context", b"source_context"]) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "edition",
+ b"edition",
+ "fields",
+ b"fields",
+ "name",
+ b"name",
+ "oneofs",
+ b"oneofs",
+ "options",
+ b"options",
+ "source_context",
+ b"source_context",
+ "syntax",
+ b"syntax",
+ ],
+ ) -> None: ...
+
+global___Type = Type
+
+class Field(google.protobuf.message.Message):
+ """A single field of a message type."""
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ class _Kind:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+ class _KindEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Field._Kind.ValueType], builtins.type):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ TYPE_UNKNOWN: Field._Kind.ValueType # 0
+ """Field type unknown."""
+ TYPE_DOUBLE: Field._Kind.ValueType # 1
+ """Field type double."""
+ TYPE_FLOAT: Field._Kind.ValueType # 2
+ """Field type float."""
+ TYPE_INT64: Field._Kind.ValueType # 3
+ """Field type int64."""
+ TYPE_UINT64: Field._Kind.ValueType # 4
+ """Field type uint64."""
+ TYPE_INT32: Field._Kind.ValueType # 5
+ """Field type int32."""
+ TYPE_FIXED64: Field._Kind.ValueType # 6
+ """Field type fixed64."""
+ TYPE_FIXED32: Field._Kind.ValueType # 7
+ """Field type fixed32."""
+ TYPE_BOOL: Field._Kind.ValueType # 8
+ """Field type bool."""
+ TYPE_STRING: Field._Kind.ValueType # 9
+ """Field type string."""
+ TYPE_GROUP: Field._Kind.ValueType # 10
+ """Field type group. Proto2 syntax only, and deprecated."""
+ TYPE_MESSAGE: Field._Kind.ValueType # 11
+ """Field type message."""
+ TYPE_BYTES: Field._Kind.ValueType # 12
+ """Field type bytes."""
+ TYPE_UINT32: Field._Kind.ValueType # 13
+ """Field type uint32."""
+ TYPE_ENUM: Field._Kind.ValueType # 14
+ """Field type enum."""
+ TYPE_SFIXED32: Field._Kind.ValueType # 15
+ """Field type sfixed32."""
+ TYPE_SFIXED64: Field._Kind.ValueType # 16
+ """Field type sfixed64."""
+ TYPE_SINT32: Field._Kind.ValueType # 17
+ """Field type sint32."""
+ TYPE_SINT64: Field._Kind.ValueType # 18
+ """Field type sint64."""
+
+ class Kind(_Kind, metaclass=_KindEnumTypeWrapper):
+ """Basic field types."""
+
+ TYPE_UNKNOWN: Field.Kind.ValueType # 0
+ """Field type unknown."""
+ TYPE_DOUBLE: Field.Kind.ValueType # 1
+ """Field type double."""
+ TYPE_FLOAT: Field.Kind.ValueType # 2
+ """Field type float."""
+ TYPE_INT64: Field.Kind.ValueType # 3
+ """Field type int64."""
+ TYPE_UINT64: Field.Kind.ValueType # 4
+ """Field type uint64."""
+ TYPE_INT32: Field.Kind.ValueType # 5
+ """Field type int32."""
+ TYPE_FIXED64: Field.Kind.ValueType # 6
+ """Field type fixed64."""
+ TYPE_FIXED32: Field.Kind.ValueType # 7
+ """Field type fixed32."""
+ TYPE_BOOL: Field.Kind.ValueType # 8
+ """Field type bool."""
+ TYPE_STRING: Field.Kind.ValueType # 9
+ """Field type string."""
+ TYPE_GROUP: Field.Kind.ValueType # 10
+ """Field type group. Proto2 syntax only, and deprecated."""
+ TYPE_MESSAGE: Field.Kind.ValueType # 11
+ """Field type message."""
+ TYPE_BYTES: Field.Kind.ValueType # 12
+ """Field type bytes."""
+ TYPE_UINT32: Field.Kind.ValueType # 13
+ """Field type uint32."""
+ TYPE_ENUM: Field.Kind.ValueType # 14
+ """Field type enum."""
+ TYPE_SFIXED32: Field.Kind.ValueType # 15
+ """Field type sfixed32."""
+ TYPE_SFIXED64: Field.Kind.ValueType # 16
+ """Field type sfixed64."""
+ TYPE_SINT32: Field.Kind.ValueType # 17
+ """Field type sint32."""
+ TYPE_SINT64: Field.Kind.ValueType # 18
+ """Field type sint64."""
+
+ class _Cardinality:
+ ValueType = typing.NewType("ValueType", builtins.int)
+ V: typing_extensions.TypeAlias = ValueType
+
+ class _CardinalityEnumTypeWrapper(
+ google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[Field._Cardinality.ValueType], builtins.type
+ ):
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
+ CARDINALITY_UNKNOWN: Field._Cardinality.ValueType # 0
+ """For fields with unknown cardinality."""
+ CARDINALITY_OPTIONAL: Field._Cardinality.ValueType # 1
+ """For optional fields."""
+ CARDINALITY_REQUIRED: Field._Cardinality.ValueType # 2
+ """For required fields. Proto2 syntax only."""
+ CARDINALITY_REPEATED: Field._Cardinality.ValueType # 3
+ """For repeated fields."""
+
+ class Cardinality(_Cardinality, metaclass=_CardinalityEnumTypeWrapper):
+ """Whether a field is optional, required, or repeated."""
+
+ CARDINALITY_UNKNOWN: Field.Cardinality.ValueType # 0
+ """For fields with unknown cardinality."""
+ CARDINALITY_OPTIONAL: Field.Cardinality.ValueType # 1
+ """For optional fields."""
+ CARDINALITY_REQUIRED: Field.Cardinality.ValueType # 2
+ """For required fields. Proto2 syntax only."""
+ CARDINALITY_REPEATED: Field.Cardinality.ValueType # 3
+ """For repeated fields."""
+
+ KIND_FIELD_NUMBER: builtins.int
+ CARDINALITY_FIELD_NUMBER: builtins.int
+ NUMBER_FIELD_NUMBER: builtins.int
+ NAME_FIELD_NUMBER: builtins.int
+ TYPE_URL_FIELD_NUMBER: builtins.int
+ ONEOF_INDEX_FIELD_NUMBER: builtins.int
+ PACKED_FIELD_NUMBER: builtins.int
+ OPTIONS_FIELD_NUMBER: builtins.int
+ JSON_NAME_FIELD_NUMBER: builtins.int
+ DEFAULT_VALUE_FIELD_NUMBER: builtins.int
+ kind: global___Field.Kind.ValueType
+ """The field type."""
+ cardinality: global___Field.Cardinality.ValueType
+ """The field cardinality."""
+ number: builtins.int
+ """The field number."""
+ name: builtins.str
+ """The field name."""
+ type_url: builtins.str
+ """The field type URL, without the scheme, for message or enumeration
+ types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
+ """
+ oneof_index: builtins.int
+ """The index of the field type in `Type.oneofs`, for message or enumeration
+ types. The first type has index 1; zero means the type is not in the list.
+ """
+ packed: builtins.bool
+ """Whether to use alternative packed wire representation."""
+ json_name: builtins.str
+ """The field JSON name."""
+ default_value: builtins.str
+ """The string value of the default value of this field. Proto2 syntax only."""
+ @property
+ def options(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Option]:
+ """The protocol buffer options."""
+
+ def __init__(
+ self,
+ *,
+ kind: global___Field.Kind.ValueType | None = ...,
+ cardinality: global___Field.Cardinality.ValueType | None = ...,
+ number: builtins.int | None = ...,
+ name: builtins.str | None = ...,
+ type_url: builtins.str | None = ...,
+ oneof_index: builtins.int | None = ...,
+ packed: builtins.bool | None = ...,
+ options: collections.abc.Iterable[global___Option] | None = ...,
+ json_name: builtins.str | None = ...,
+ default_value: builtins.str | None = ...,
+ ) -> None: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "cardinality",
+ b"cardinality",
+ "default_value",
+ b"default_value",
+ "json_name",
+ b"json_name",
+ "kind",
+ b"kind",
+ "name",
+ b"name",
+ "number",
+ b"number",
+ "oneof_index",
+ b"oneof_index",
+ "options",
+ b"options",
+ "packed",
+ b"packed",
+ "type_url",
+ b"type_url",
+ ],
+ ) -> None: ...
+
+global___Field = Field
+
+class Enum(google.protobuf.message.Message):
+ """Enum type definition."""
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ NAME_FIELD_NUMBER: builtins.int
+ ENUMVALUE_FIELD_NUMBER: builtins.int
+ OPTIONS_FIELD_NUMBER: builtins.int
+ SOURCE_CONTEXT_FIELD_NUMBER: builtins.int
+ SYNTAX_FIELD_NUMBER: builtins.int
+ EDITION_FIELD_NUMBER: builtins.int
+ name: builtins.str
+ """Enum type name."""
+ syntax: global___Syntax.ValueType
+ """The source syntax."""
+ edition: builtins.str
+ """The source edition string, only valid when syntax is SYNTAX_EDITIONS."""
+ @property
+ def enumvalue(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___EnumValue]:
+ """Enum value definitions."""
+
+ @property
+ def options(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Option]:
+ """Protocol buffer options."""
+
+ @property
+ def source_context(self) -> google.protobuf.source_context_pb2.SourceContext:
+ """The source context."""
+
+ def __init__(
+ self,
+ *,
+ name: builtins.str | None = ...,
+ enumvalue: collections.abc.Iterable[global___EnumValue] | None = ...,
+ options: collections.abc.Iterable[global___Option] | None = ...,
+ source_context: google.protobuf.source_context_pb2.SourceContext | None = ...,
+ syntax: global___Syntax.ValueType | None = ...,
+ edition: builtins.str | None = ...,
+ ) -> None: ...
+ def HasField(self, field_name: typing.Literal["source_context", b"source_context"]) -> builtins.bool: ...
+ def ClearField(
+ self,
+ field_name: typing.Literal[
+ "edition",
+ b"edition",
+ "enumvalue",
+ b"enumvalue",
+ "name",
+ b"name",
+ "options",
+ b"options",
+ "source_context",
+ b"source_context",
+ "syntax",
+ b"syntax",
+ ],
+ ) -> None: ...
+
+global___Enum = Enum
+
+class EnumValue(google.protobuf.message.Message):
+ """Enum value definition."""
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ NAME_FIELD_NUMBER: builtins.int
+ NUMBER_FIELD_NUMBER: builtins.int
+ OPTIONS_FIELD_NUMBER: builtins.int
+ name: builtins.str
+ """Enum value name."""
+ number: builtins.int
+ """Enum value number."""
+ @property
+ def options(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Option]:
+ """Protocol buffer options."""
+
+ def __init__(
+ self,
+ *,
+ name: builtins.str | None = ...,
+ number: builtins.int | None = ...,
+ options: collections.abc.Iterable[global___Option] | None = ...,
+ ) -> None: ...
+ def ClearField(self, field_name: typing.Literal["name", b"name", "number", b"number", "options", b"options"]) -> None: ...
+
+global___EnumValue = EnumValue
+
+class Option(google.protobuf.message.Message):
+ """A protocol buffer option, which can be attached to a message, field,
+ enumeration, etc.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ NAME_FIELD_NUMBER: builtins.int
+ VALUE_FIELD_NUMBER: builtins.int
+ name: builtins.str
+ """The option's name. For protobuf built-in options (options defined in
+ descriptor.proto), this is the short name. For example, `"map_entry"`.
+ For custom options, it should be the fully-qualified name. For example,
+ `"google.api.http"`.
+ """
+ @property
+ def value(self) -> google.protobuf.any_pb2.Any:
+ """The option's value packed in an Any message. If the value is a primitive,
+ the corresponding wrapper type defined in google/protobuf/wrappers.proto
+ should be used. If the value is an enum, it should be stored as an int32
+ value using the google.protobuf.Int32Value type.
+ """
+
+ def __init__(self, *, name: builtins.str | None = ..., value: google.protobuf.any_pb2.Any | None = ...) -> None: ...
+ def HasField(self, field_name: typing.Literal["value", b"value"]) -> builtins.bool: ...
+ def ClearField(self, field_name: typing.Literal["name", b"name", "value", b"value"]) -> None: ...
+
+global___Option = Option
diff --git a/contrib/python/types-protobuf/google-stubs/protobuf/wrappers_pb2.pyi b/contrib/python/types-protobuf/google-stubs/protobuf/wrappers_pb2.pyi
new file mode 100644
index 00000000000..b3d875bccf6
--- /dev/null
+++ b/contrib/python/types-protobuf/google-stubs/protobuf/wrappers_pb2.pyi
@@ -0,0 +1,238 @@
+"""
+@generated by mypy-protobuf. Do not edit manually!
+isort:skip_file
+Protocol Buffers - Google's data interchange format
+Copyright 2008 Google Inc. All rights reserved.
+https://developers.google.com/protocol-buffers/
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+ * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Wrappers for primitive (non-message) types. These types were needed
+for legacy reasons and are not recommended for use in new APIs.
+
+Historically these wrappers were useful to have presence on proto3 primitive
+fields, but proto3 syntax has been updated to support the `optional` keyword.
+Using that keyword is now the strongly preferred way to add presence to
+proto3 primitive fields.
+
+A secondary usecase was to embed primitives in the `google.protobuf.Any`
+type: it is now recommended that you embed your value in your own wrapper
+message which can be specifically documented.
+
+These wrappers have no meaningful use within repeated fields as they lack
+the ability to detect presence on individual elements.
+These wrappers have no meaningful use within a map or a oneof since
+individual entries of a map or fields of a oneof can already detect presence.
+"""
+
+import builtins
+import typing
+
+import google.protobuf.descriptor
+import google.protobuf.message
+
+DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
+
+class DoubleValue(google.protobuf.message.Message):
+ """Wrapper message for `double`.
+
+ The JSON representation for `DoubleValue` is JSON number.
+
+ Not recommended for use in new APIs, but still useful for legacy APIs and
+ has no plan to be removed.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ VALUE_FIELD_NUMBER: builtins.int
+ value: builtins.float
+ """The double value."""
+ def __init__(self, *, value: builtins.float | None = ...) -> None: ...
+ def ClearField(self, field_name: typing.Literal["value", b"value"]) -> None: ...
+
+global___DoubleValue = DoubleValue
+
+class FloatValue(google.protobuf.message.Message):
+ """Wrapper message for `float`.
+
+ The JSON representation for `FloatValue` is JSON number.
+
+ Not recommended for use in new APIs, but still useful for legacy APIs and
+ has no plan to be removed.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ VALUE_FIELD_NUMBER: builtins.int
+ value: builtins.float
+ """The float value."""
+ def __init__(self, *, value: builtins.float | None = ...) -> None: ...
+ def ClearField(self, field_name: typing.Literal["value", b"value"]) -> None: ...
+
+global___FloatValue = FloatValue
+
+class Int64Value(google.protobuf.message.Message):
+ """Wrapper message for `int64`.
+
+ The JSON representation for `Int64Value` is JSON string.
+
+ Not recommended for use in new APIs, but still useful for legacy APIs and
+ has no plan to be removed.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ VALUE_FIELD_NUMBER: builtins.int
+ value: builtins.int
+ """The int64 value."""
+ def __init__(self, *, value: builtins.int | None = ...) -> None: ...
+ def ClearField(self, field_name: typing.Literal["value", b"value"]) -> None: ...
+
+global___Int64Value = Int64Value
+
+class UInt64Value(google.protobuf.message.Message):
+ """Wrapper message for `uint64`.
+
+ The JSON representation for `UInt64Value` is JSON string.
+
+ Not recommended for use in new APIs, but still useful for legacy APIs and
+ has no plan to be removed.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ VALUE_FIELD_NUMBER: builtins.int
+ value: builtins.int
+ """The uint64 value."""
+ def __init__(self, *, value: builtins.int | None = ...) -> None: ...
+ def ClearField(self, field_name: typing.Literal["value", b"value"]) -> None: ...
+
+global___UInt64Value = UInt64Value
+
+class Int32Value(google.protobuf.message.Message):
+ """Wrapper message for `int32`.
+
+ The JSON representation for `Int32Value` is JSON number.
+
+ Not recommended for use in new APIs, but still useful for legacy APIs and
+ has no plan to be removed.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ VALUE_FIELD_NUMBER: builtins.int
+ value: builtins.int
+ """The int32 value."""
+ def __init__(self, *, value: builtins.int | None = ...) -> None: ...
+ def ClearField(self, field_name: typing.Literal["value", b"value"]) -> None: ...
+
+global___Int32Value = Int32Value
+
+class UInt32Value(google.protobuf.message.Message):
+ """Wrapper message for `uint32`.
+
+ The JSON representation for `UInt32Value` is JSON number.
+
+ Not recommended for use in new APIs, but still useful for legacy APIs and
+ has no plan to be removed.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ VALUE_FIELD_NUMBER: builtins.int
+ value: builtins.int
+ """The uint32 value."""
+ def __init__(self, *, value: builtins.int | None = ...) -> None: ...
+ def ClearField(self, field_name: typing.Literal["value", b"value"]) -> None: ...
+
+global___UInt32Value = UInt32Value
+
+class BoolValue(google.protobuf.message.Message):
+ """Wrapper message for `bool`.
+
+ The JSON representation for `BoolValue` is JSON `true` and `false`.
+
+ Not recommended for use in new APIs, but still useful for legacy APIs and
+ has no plan to be removed.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ VALUE_FIELD_NUMBER: builtins.int
+ value: builtins.bool
+ """The bool value."""
+ def __init__(self, *, value: builtins.bool | None = ...) -> None: ...
+ def ClearField(self, field_name: typing.Literal["value", b"value"]) -> None: ...
+
+global___BoolValue = BoolValue
+
+class StringValue(google.protobuf.message.Message):
+ """Wrapper message for `string`.
+
+ The JSON representation for `StringValue` is JSON string.
+
+ Not recommended for use in new APIs, but still useful for legacy APIs and
+ has no plan to be removed.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ VALUE_FIELD_NUMBER: builtins.int
+ value: builtins.str
+ """The string value."""
+ def __init__(self, *, value: builtins.str | None = ...) -> None: ...
+ def ClearField(self, field_name: typing.Literal["value", b"value"]) -> None: ...
+
+global___StringValue = StringValue
+
+class BytesValue(google.protobuf.message.Message):
+ """Wrapper message for `bytes`.
+
+ The JSON representation for `BytesValue` is JSON string.
+
+ Not recommended for use in new APIs, but still useful for legacy APIs and
+ has no plan to be removed.
+ """
+
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
+
+ VALUE_FIELD_NUMBER: builtins.int
+ value: builtins.bytes
+ """The bytes value."""
+ def __init__(self, *, value: builtins.bytes | None = ...) -> None: ...
+ def ClearField(self, field_name: typing.Literal["value", b"value"]) -> None: ...
+
+global___BytesValue = BytesValue
diff --git a/contrib/python/types-protobuf/ya.make b/contrib/python/types-protobuf/ya.make
index 19b981066d0..87df7faf0fa 100644
--- a/contrib/python/types-protobuf/ya.make
+++ b/contrib/python/types-protobuf/ya.make
@@ -12,10 +12,17 @@ PY_SRCS(
TOP_LEVEL
google-stubs/_upb/_message.pyi
google-stubs/protobuf/__init__.pyi
+ google-stubs/protobuf/any_pb2.pyi
+ google-stubs/protobuf/api_pb2.pyi
google-stubs/protobuf/compiler/__init__.pyi
+ google-stubs/protobuf/compiler/plugin_pb2.pyi
google-stubs/protobuf/descriptor.pyi
google-stubs/protobuf/descriptor_database.pyi
+ google-stubs/protobuf/descriptor_pb2.pyi
google-stubs/protobuf/descriptor_pool.pyi
+ google-stubs/protobuf/duration_pb2.pyi
+ google-stubs/protobuf/empty_pb2.pyi
+ google-stubs/protobuf/field_mask_pb2.pyi
google-stubs/protobuf/internal/__init__.pyi
google-stubs/protobuf/internal/api_implementation.pyi
google-stubs/protobuf/internal/builder.pyi
@@ -34,13 +41,19 @@ PY_SRCS(
google-stubs/protobuf/message_factory.pyi
google-stubs/protobuf/reflection.pyi
google-stubs/protobuf/runtime_version.pyi
+ google-stubs/protobuf/source_context_pb2.pyi
+ google-stubs/protobuf/struct_pb2.pyi
google-stubs/protobuf/symbol_database.pyi
google-stubs/protobuf/text_format.pyi
+ google-stubs/protobuf/timestamp_pb2.pyi
+ google-stubs/protobuf/type_pb2.pyi
google-stubs/protobuf/util/__init__.pyi
+ google-stubs/protobuf/wrappers_pb2.pyi
)
RESOURCE_FILES(
PREFIX contrib/python/types-protobuf/
+ .arcignore
.dist-info/METADATA
.dist-info/top_level.txt
google-stubs/METADATA.toml