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