2 @generated by mypy-protobuf. Do not edit manually!
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
12 import typing_extensions
14 DESCRIPTOR: google.protobuf.descriptor.FileDescriptor = ...
16 class Api(google.protobuf.message.Message):
17 """Api is a light-weight descriptor for an API Interface.
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
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.
41 def methods(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Method]:
42 """The methods of this interface, in unspecified order."""
45 def options(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[google.protobuf.type_pb2.Option]:
46 """Any metadata attached to the interface."""
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.
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.
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.
71 def source_context(self) -> google.protobuf.source_context_pb2.SourceContext:
72 """Source context for the protocol buffer service represented by this
77 def mixins(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Mixin]:
78 """Included interfaces. See [Mixin][]."""
80 syntax: google.protobuf.type_pb2.Syntax.V = ...
81 """The source syntax of the service."""
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 = ...,
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: ...
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."""
110 request_type_url: typing.Text = ...
111 """A URL of the input message type."""
113 request_streaming: builtins.bool = ...
114 """If true, the request is streamed."""
116 response_type_url: typing.Text = ...
117 """The URL of the output message type."""
119 response_streaming: builtins.bool = ...
120 """If true, the response is streamed."""
123 def options(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[google.protobuf.type_pb2.Option]:
124 """Any metadata attached to the method."""
126 syntax: google.protobuf.type_pb2.Syntax.V = ...
127 """The source syntax of this method."""
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 = ...,
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
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:
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.
151 - Each annotation belonging to the service config (http,
152 visibility) which is not set in the redeclared method will be
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
160 Example of a simple mixin:
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";
170 package google.storage.v2;
172 rpc GetAcl(GetAclRequest) returns (Acl);
174 // Get a data record.
175 rpc GetData(GetDataRequest) returns (Data) {
176 option (google.api.http).get = "/v2/{resource=**}";
180 Example of a mixin configuration:
183 - name: google.storage.v2.Storage
185 - name: google.acl.v1.AccessControl
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:
194 // Get the underlying ACL object.
195 rpc GetAcl(GetAclRequest) returns (Acl) {
196 option (google.api.http).get = "/v2/{resource=**}:getAcl";
201 Note how the version in the path pattern changed from `v1` to `v2`.
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:
207 - name: google.storage.v2.Storage
209 - name: google.acl.v1.AccessControl
212 This implies the following inherited HTTP annotation:
215 // Get the underlying ACL object.
216 rpc GetAcl(GetAclRequest) returns (Acl) {
217 option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
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."""
228 root: typing.Text = ...
229 """If non-empty specifies a path under which inherited HTTP paths
235 name : typing.Text = ...,
236 root : typing.Text = ...,
238 def ClearField(self, field_name: typing_extensions.Literal["name",b"name","root",b"root"]) -> None: ...
239 global___Mixin = Mixin