blob: 3f7e99c6380fa0c2665f75f54e790018bf2f0c20 [file] [log] [blame]
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -04001// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: google/protobuf/api.proto
3
4#import "GPBProtocolBuffers.h"
5
Thomas Van Lenten79a23c42016-03-17 10:04:21 -04006#if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30001
Thomas Van Lenten536059e2015-12-02 14:43:05 -05007#error This file was generated by a different version of protoc which is incompatible with your Protocol Buffer library sources.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -04008#endif
9
10// @@protoc_insertion_point(imports)
11
12CF_EXTERN_C_BEGIN
13
Thomas Van Lenten2480acb2015-11-30 14:38:04 -050014@class GPBMethod;
15@class GPBMixin;
16@class GPBOption;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040017@class GPBSourceContext;
TeBoringaca5a602015-08-26 14:02:44 -070018GPB_ENUM_FWD_DECLARE(GPBSyntax);
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040019
Thomas Van Lenten8c889572015-06-16 16:45:14 -040020NS_ASSUME_NONNULL_BEGIN
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040021
22#pragma mark - GPBApiRoot
23
Thomas Van Lenten36650a02016-03-07 12:07:03 -050024/// Exposes the extension registry for this file.
25///
26/// The base class provides:
27/// @code
28/// + (GPBExtensionRegistry *)extensionRegistry;
29/// @endcode
30/// which is a @c GPBExtensionRegistry that includes all the extensions defined by
31/// this file and all files that it depends on.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040032@interface GPBApiRoot : GPBRootObject
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040033@end
34
35#pragma mark - GPBApi
36
37typedef GPB_ENUM(GPBApi_FieldNumber) {
38 GPBApi_FieldNumber_Name = 1,
39 GPBApi_FieldNumber_MethodsArray = 2,
40 GPBApi_FieldNumber_OptionsArray = 3,
41 GPBApi_FieldNumber_Version = 4,
42 GPBApi_FieldNumber_SourceContext = 5,
TeBoringaca5a602015-08-26 14:02:44 -070043 GPBApi_FieldNumber_MixinsArray = 6,
44 GPBApi_FieldNumber_Syntax = 7,
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040045};
46
Thomas Van Lenten36650a02016-03-07 12:07:03 -050047/// Api is a light-weight descriptor for a protocol buffer service.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040048@interface GPBApi : GPBMessage
49
Thomas Van Lenten36650a02016-03-07 12:07:03 -050050/// The fully qualified name of this api, including package name
51/// followed by the api's simple name.
Thomas Van Lenten8c889572015-06-16 16:45:14 -040052@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040053
Thomas Van Lenten36650a02016-03-07 12:07:03 -050054/// The methods of this api, in unspecified order.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -050055@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBMethod*> *methodsArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -050056/// The number of items in @c methodsArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -040057@property(nonatomic, readonly) NSUInteger methodsArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040058
Thomas Van Lenten36650a02016-03-07 12:07:03 -050059/// Any metadata attached to the API.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -050060@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -050061/// The number of items in @c optionsArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -040062@property(nonatomic, readonly) NSUInteger optionsArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040063
Thomas Van Lenten36650a02016-03-07 12:07:03 -050064/// A version string for this api. If specified, must have the form
65/// `major-version.minor-version`, as in `1.10`. If the minor version
66/// is omitted, it defaults to zero. If the entire version field is
67/// empty, the major version is derived from the package name, as
68/// outlined below. If the field is not empty, the version in the
69/// package name will be verified to be consistent with what is
70/// provided here.
71///
72/// The versioning schema uses [semantic
73/// versioning](http://semver.org) where the major version number
74/// indicates a breaking change and the minor version an additive,
75/// non-breaking change. Both version numbers are signals to users
76/// what to expect from different versions, and should be carefully
77/// chosen based on the product plan.
78///
79/// The major version is also reflected in the package name of the
80/// API, which must end in `v<major-version>`, as in
81/// `google.feature.v1`. For major versions 0 and 1, the suffix can
82/// be omitted. Zero major versions must only be used for
83/// experimental, none-GA apis.
Thomas Van Lenten8c889572015-06-16 16:45:14 -040084@property(nonatomic, readwrite, copy, null_resettable) NSString *version;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040085
Thomas Van Lenten36650a02016-03-07 12:07:03 -050086/// Source context for the protocol buffer service represented by this
87/// message.
Thomas Van Lenten8c889572015-06-16 16:45:14 -040088@property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext;
Thomas Van Lenten36650a02016-03-07 12:07:03 -050089/// Test to see if @c sourceContext has been set.
90@property(nonatomic, readwrite) BOOL hasSourceContext;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040091
Thomas Van Lenten36650a02016-03-07 12:07:03 -050092/// Included APIs. See [Mixin][].
Thomas Van Lenten2480acb2015-11-30 14:38:04 -050093@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBMixin*> *mixinsArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -050094/// The number of items in @c mixinsArray without causing the array to be created.
TeBoringaca5a602015-08-26 14:02:44 -070095@property(nonatomic, readonly) NSUInteger mixinsArray_Count;
96
Thomas Van Lenten36650a02016-03-07 12:07:03 -050097/// The source syntax of the service.
TeBoringaca5a602015-08-26 14:02:44 -070098@property(nonatomic, readwrite) enum GPBSyntax syntax;
99
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400100@end
101
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500102/// Fetches the raw value of a @c GPBApi's @c syntax property, even
103/// if the value was not defined by the enum at the time the code was generated.
TeBoringaca5a602015-08-26 14:02:44 -0700104int32_t GPBApi_Syntax_RawValue(GPBApi *message);
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500105/// Sets the raw value of an @c GPBApi's @c syntax property, allowing
106/// it to be set to a value that was not defined by the enum at the time the code
107/// was generated.
TeBoringaca5a602015-08-26 14:02:44 -0700108void SetGPBApi_Syntax_RawValue(GPBApi *message, int32_t value);
109
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400110#pragma mark - GPBMethod
111
112typedef GPB_ENUM(GPBMethod_FieldNumber) {
113 GPBMethod_FieldNumber_Name = 1,
114 GPBMethod_FieldNumber_RequestTypeURL = 2,
115 GPBMethod_FieldNumber_RequestStreaming = 3,
116 GPBMethod_FieldNumber_ResponseTypeURL = 4,
117 GPBMethod_FieldNumber_ResponseStreaming = 5,
118 GPBMethod_FieldNumber_OptionsArray = 6,
TeBoringaca5a602015-08-26 14:02:44 -0700119 GPBMethod_FieldNumber_Syntax = 7,
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400120};
121
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500122/// Method represents a method of an api.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400123@interface GPBMethod : GPBMessage
124
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500125/// The simple name of this method.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400126@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400127
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500128/// A URL of the input message type.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400129@property(nonatomic, readwrite, copy, null_resettable) NSString *requestTypeURL;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400130
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500131/// If true, the request is streamed.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400132@property(nonatomic, readwrite) BOOL requestStreaming;
133
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500134/// The URL of the output message type.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400135@property(nonatomic, readwrite, copy, null_resettable) NSString *responseTypeURL;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400136
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500137/// If true, the response is streamed.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400138@property(nonatomic, readwrite) BOOL responseStreaming;
139
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500140/// Any metadata attached to the method.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -0500141@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500142/// The number of items in @c optionsArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400143@property(nonatomic, readonly) NSUInteger optionsArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400144
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500145/// The source syntax of this method.
TeBoringaca5a602015-08-26 14:02:44 -0700146@property(nonatomic, readwrite) enum GPBSyntax syntax;
147
148@end
149
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500150/// Fetches the raw value of a @c GPBMethod's @c syntax property, even
151/// if the value was not defined by the enum at the time the code was generated.
TeBoringaca5a602015-08-26 14:02:44 -0700152int32_t GPBMethod_Syntax_RawValue(GPBMethod *message);
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500153/// Sets the raw value of an @c GPBMethod's @c syntax property, allowing
154/// it to be set to a value that was not defined by the enum at the time the code
155/// was generated.
TeBoringaca5a602015-08-26 14:02:44 -0700156void SetGPBMethod_Syntax_RawValue(GPBMethod *message, int32_t value);
157
158#pragma mark - GPBMixin
159
160typedef GPB_ENUM(GPBMixin_FieldNumber) {
161 GPBMixin_FieldNumber_Name = 1,
162 GPBMixin_FieldNumber_Root = 2,
163};
164
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500165/// Declares an API to be included in this API. The including API must
166/// redeclare all the methods from the included API, but documentation
167/// and options are inherited as follows:
168///
169/// - If after comment and whitespace stripping, the documentation
170/// string of the redeclared method is empty, it will be inherited
171/// from the original method.
172///
173/// - Each annotation belonging to the service config (http,
174/// visibility) which is not set in the redeclared method will be
175/// inherited.
176///
177/// - If an http annotation is inherited, the path pattern will be
178/// modified as follows. Any version prefix will be replaced by the
179/// version of the including API plus the [root][] path if specified.
180///
181/// Example of a simple mixin:
182///
183/// package google.acl.v1;
184/// service AccessControl {
185/// // Get the underlying ACL object.
186/// rpc GetAcl(GetAclRequest) returns (Acl) {
187/// option (google.api.http).get = "/v1/{resource=**}:getAcl";
188/// }
189/// }
190///
191/// package google.storage.v2;
192/// service Storage {
193/// rpc GetAcl(GetAclRequest) returns (Acl);
194///
195/// // Get a data record.
196/// rpc GetData(GetDataRequest) returns (Data) {
197/// option (google.api.http).get = "/v2/{resource=**}";
198/// }
199/// }
200///
201/// Example of a mixin configuration:
202///
203/// apis:
204/// - name: google.storage.v2.Storage
205/// mixins:
206/// - name: google.acl.v1.AccessControl
207///
208/// The mixin construct implies that all methods in `AccessControl` are
209/// also declared with same name and request/response types in
210/// `Storage`. A documentation generator or annotation processor will
211/// see the effective `Storage.GetAcl` method after inherting
212/// documentation and annotations as follows:
213///
214/// service Storage {
215/// // Get the underlying ACL object.
216/// rpc GetAcl(GetAclRequest) returns (Acl) {
217/// option (google.api.http).get = "/v2/{resource=**}:getAcl";
218/// }
219/// ...
220/// }
221///
222/// Note how the version in the path pattern changed from `v1` to `v2`.
223///
224/// If the `root` field in the mixin is specified, it should be a
225/// relative path under which inherited HTTP paths are placed. Example:
226///
227/// apis:
228/// - name: google.storage.v2.Storage
229/// mixins:
230/// - name: google.acl.v1.AccessControl
231/// root: acls
232///
233/// This implies the following inherited HTTP annotation:
234///
235/// service Storage {
236/// // Get the underlying ACL object.
237/// rpc GetAcl(GetAclRequest) returns (Acl) {
238/// option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
239/// }
240/// ...
241/// }
TeBoringaca5a602015-08-26 14:02:44 -0700242@interface GPBMixin : GPBMessage
243
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500244/// The fully qualified name of the API which is included.
TeBoringaca5a602015-08-26 14:02:44 -0700245@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
246
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500247/// If non-empty specifies a path under which inherited HTTP paths
248/// are rooted.
TeBoringaca5a602015-08-26 14:02:44 -0700249@property(nonatomic, readwrite, copy, null_resettable) NSString *root;
250
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400251@end
252
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400253NS_ASSUME_NONNULL_END
254
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400255CF_EXTERN_C_END
256
257// @@protoc_insertion_point(global_scope)