massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / protobuf / google / protobuf / api_pb2.pyi
1 """
2 @generated by mypy-protobuf.  Do not edit manually!
3 isort:skip_file
4 """
5 import builtins
6 import google.protobuf.descriptor
7 import google.protobuf.internal.containers
8 import google.protobuf.message
9 import google.protobuf.source_context_pb2
10 import google.protobuf.type_pb2
11 import typing
12 import typing_extensions
13
14 DESCRIPTOR: google.protobuf.descriptor.FileDescriptor = ...
15
16 class Api(google.protobuf.message.Message):
17     """Api is a light-weight descriptor for an API Interface.
18
19     Interfaces are also described as "protocol buffer services" in some contexts,
20     such as by the "service" keyword in a .proto file, but they are different
21     from API Services, which represent a concrete implementation of an interface
22     as opposed to simply a description of methods and bindings. They are also
23     sometimes simply referred to as "APIs" in other contexts, such as the name of
24     this message itself. See https://cloud.google.com/apis/design/glossary for
25     detailed terminology.
26     """
27     DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
28     NAME_FIELD_NUMBER: builtins.int
29     METHODS_FIELD_NUMBER: builtins.int
30     OPTIONS_FIELD_NUMBER: builtins.int
31     VERSION_FIELD_NUMBER: builtins.int
32     SOURCE_CONTEXT_FIELD_NUMBER: builtins.int
33     MIXINS_FIELD_NUMBER: builtins.int
34     SYNTAX_FIELD_NUMBER: builtins.int
35     name: typing.Text = ...
36     """The fully qualified name of this interface, including package name
37     followed by the interface's simple name.
38     """
39
40     @property
41     def methods(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Method]:
42         """The methods of this interface, in unspecified order."""
43         pass
44     @property
45     def options(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[google.protobuf.type_pb2.Option]:
46         """Any metadata attached to the interface."""
47         pass
48     version: typing.Text = ...
49     """A version string for this interface. If specified, must have the form
50     `major-version.minor-version`, as in `1.10`. If the minor version is
51     omitted, it defaults to zero. If the entire version field is empty, the
52     major version is derived from the package name, as outlined below. If the
53     field is not empty, the version in the package name will be verified to be
54     consistent with what is provided here.
55
56     The versioning schema uses [semantic
57     versioning](http://semver.org) where the major version number
58     indicates a breaking change and the minor version an additive,
59     non-breaking change. Both version numbers are signals to users
60     what to expect from different versions, and should be carefully
61     chosen based on the product plan.
62
63     The major version is also reflected in the package name of the
64     interface, which must end in `v<major-version>`, as in
65     `google.feature.v1`. For major versions 0 and 1, the suffix can
66     be omitted. Zero major versions must only be used for
67     experimental, non-GA interfaces.
68     """
69
70     @property
71     def source_context(self) -> google.protobuf.source_context_pb2.SourceContext:
72         """Source context for the protocol buffer service represented by this
73         message.
74         """
75         pass
76     @property
77     def mixins(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Mixin]:
78         """Included interfaces. See [Mixin][]."""
79         pass
80     syntax: google.protobuf.type_pb2.Syntax.V = ...
81     """The source syntax of the service."""
82
83     def __init__(self,
84         *,
85         name : typing.Text = ...,
86         methods : typing.Optional[typing.Iterable[global___Method]] = ...,
87         options : typing.Optional[typing.Iterable[google.protobuf.type_pb2.Option]] = ...,
88         version : typing.Text = ...,
89         source_context : typing.Optional[google.protobuf.source_context_pb2.SourceContext] = ...,
90         mixins : typing.Optional[typing.Iterable[global___Mixin]] = ...,
91         syntax : google.protobuf.type_pb2.Syntax.V = ...,
92         ) -> None: ...
93     def HasField(self, field_name: typing_extensions.Literal["source_context",b"source_context"]) -> builtins.bool: ...
94     def ClearField(self, field_name: typing_extensions.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: ...
95 global___Api = Api
96
97 class Method(google.protobuf.message.Message):
98     """Method represents a method of an API interface."""
99     DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
100     NAME_FIELD_NUMBER: builtins.int
101     REQUEST_TYPE_URL_FIELD_NUMBER: builtins.int
102     REQUEST_STREAMING_FIELD_NUMBER: builtins.int
103     RESPONSE_TYPE_URL_FIELD_NUMBER: builtins.int
104     RESPONSE_STREAMING_FIELD_NUMBER: builtins.int
105     OPTIONS_FIELD_NUMBER: builtins.int
106     SYNTAX_FIELD_NUMBER: builtins.int
107     name: typing.Text = ...
108     """The simple name of this method."""
109
110     request_type_url: typing.Text = ...
111     """A URL of the input message type."""
112
113     request_streaming: builtins.bool = ...
114     """If true, the request is streamed."""
115
116     response_type_url: typing.Text = ...
117     """The URL of the output message type."""
118
119     response_streaming: builtins.bool = ...
120     """If true, the response is streamed."""
121
122     @property
123     def options(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[google.protobuf.type_pb2.Option]:
124         """Any metadata attached to the method."""
125         pass
126     syntax: google.protobuf.type_pb2.Syntax.V = ...
127     """The source syntax of this method."""
128
129     def __init__(self,
130         *,
131         name : typing.Text = ...,
132         request_type_url : typing.Text = ...,
133         request_streaming : builtins.bool = ...,
134         response_type_url : typing.Text = ...,
135         response_streaming : builtins.bool = ...,
136         options : typing.Optional[typing.Iterable[google.protobuf.type_pb2.Option]] = ...,
137         syntax : google.protobuf.type_pb2.Syntax.V = ...,
138         ) -> None: ...
139     def ClearField(self, field_name: typing_extensions.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: ...
140 global___Method = Method
141
142 class Mixin(google.protobuf.message.Message):
143     """Declares an API Interface to be included in this interface. The including
144     interface must redeclare all the methods from the included interface, but
145     documentation and options are inherited as follows:
146
147     - If after comment and whitespace stripping, the documentation
148       string of the redeclared method is empty, it will be inherited
149       from the original method.
150
151     - Each annotation belonging to the service config (http,
152       visibility) which is not set in the redeclared method will be
153       inherited.
154
155     - If an http annotation is inherited, the path pattern will be
156       modified as follows. Any version prefix will be replaced by the
157       version of the including interface plus the [root][] path if
158       specified.
159
160     Example of a simple mixin:
161
162         package google.acl.v1;
163         service AccessControl {
164           // Get the underlying ACL object.
165           rpc GetAcl(GetAclRequest) returns (Acl) {
166             option (google.api.http).get = "/v1/{resource=**}:getAcl";
167           }
168         }
169
170         package google.storage.v2;
171         service Storage {
172           rpc GetAcl(GetAclRequest) returns (Acl);
173
174           // Get a data record.
175           rpc GetData(GetDataRequest) returns (Data) {
176             option (google.api.http).get = "/v2/{resource=**}";
177           }
178         }
179
180     Example of a mixin configuration:
181
182         apis:
183         - name: google.storage.v2.Storage
184           mixins:
185           - name: google.acl.v1.AccessControl
186
187     The mixin construct implies that all methods in `AccessControl` are
188     also declared with same name and request/response types in
189     `Storage`. A documentation generator or annotation processor will
190     see the effective `Storage.GetAcl` method after inheriting
191     documentation and annotations as follows:
192
193         service Storage {
194           // Get the underlying ACL object.
195           rpc GetAcl(GetAclRequest) returns (Acl) {
196             option (google.api.http).get = "/v2/{resource=**}:getAcl";
197           }
198           ...
199         }
200
201     Note how the version in the path pattern changed from `v1` to `v2`.
202
203     If the `root` field in the mixin is specified, it should be a
204     relative path under which inherited HTTP paths are placed. Example:
205
206         apis:
207         - name: google.storage.v2.Storage
208           mixins:
209           - name: google.acl.v1.AccessControl
210             root: acls
211
212     This implies the following inherited HTTP annotation:
213
214         service Storage {
215           // Get the underlying ACL object.
216           rpc GetAcl(GetAclRequest) returns (Acl) {
217             option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
218           }
219           ...
220         }
221     """
222     DESCRIPTOR: google.protobuf.descriptor.Descriptor = ...
223     NAME_FIELD_NUMBER: builtins.int
224     ROOT_FIELD_NUMBER: builtins.int
225     name: typing.Text = ...
226     """The fully qualified name of the interface which is included."""
227
228     root: typing.Text = ...
229     """If non-empty specifies a path under which inherited HTTP paths
230     are rooted.
231     """
232
233     def __init__(self,
234         *,
235         name : typing.Text = ...,
236         root : typing.Text = ...,
237         ) -> None: ...
238     def ClearField(self, field_name: typing_extensions.Literal["name",b"name","root",b"root"]) -> None: ...
239 global___Mixin = Mixin