blob: d66df6293da0a29a67c41f5ead05f558dcaf488e [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
Thomas Van Lentene664aa62016-04-19 13:13:04 -040012#pragma clang diagnostic push
13#pragma clang diagnostic ignored "-Wdeprecated-declarations"
14
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040015CF_EXTERN_C_BEGIN
16
Thomas Van Lenten2480acb2015-11-30 14:38:04 -050017@class GPBMethod;
18@class GPBMixin;
19@class GPBOption;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040020@class GPBSourceContext;
TeBoringaca5a602015-08-26 14:02:44 -070021GPB_ENUM_FWD_DECLARE(GPBSyntax);
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040022
Thomas Van Lenten8c889572015-06-16 16:45:14 -040023NS_ASSUME_NONNULL_BEGIN
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040024
25#pragma mark - GPBApiRoot
26
Thomas Van Lenten36650a02016-03-07 12:07:03 -050027/// Exposes the extension registry for this file.
28///
29/// The base class provides:
30/// @code
31/// + (GPBExtensionRegistry *)extensionRegistry;
32/// @endcode
33/// which is a @c GPBExtensionRegistry that includes all the extensions defined by
34/// this file and all files that it depends on.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040035@interface GPBApiRoot : GPBRootObject
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040036@end
37
38#pragma mark - GPBApi
39
40typedef GPB_ENUM(GPBApi_FieldNumber) {
41 GPBApi_FieldNumber_Name = 1,
42 GPBApi_FieldNumber_MethodsArray = 2,
43 GPBApi_FieldNumber_OptionsArray = 3,
44 GPBApi_FieldNumber_Version = 4,
45 GPBApi_FieldNumber_SourceContext = 5,
TeBoringaca5a602015-08-26 14:02:44 -070046 GPBApi_FieldNumber_MixinsArray = 6,
47 GPBApi_FieldNumber_Syntax = 7,
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040048};
49
Thomas Van Lenten36650a02016-03-07 12:07:03 -050050/// Api is a light-weight descriptor for a protocol buffer service.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040051@interface GPBApi : GPBMessage
52
Thomas Van Lenten36650a02016-03-07 12:07:03 -050053/// The fully qualified name of this api, including package name
54/// followed by the api's simple name.
Thomas Van Lenten8c889572015-06-16 16:45:14 -040055@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040056
Thomas Van Lenten36650a02016-03-07 12:07:03 -050057/// The methods of this api, in unspecified order.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -050058@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBMethod*> *methodsArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -050059/// The number of items in @c methodsArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -040060@property(nonatomic, readonly) NSUInteger methodsArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040061
Thomas Van Lenten36650a02016-03-07 12:07:03 -050062/// Any metadata attached to the API.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -050063@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -050064/// The number of items in @c optionsArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -040065@property(nonatomic, readonly) NSUInteger optionsArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040066
Thomas Van Lenten36650a02016-03-07 12:07:03 -050067/// A version string for this api. If specified, must have the form
68/// `major-version.minor-version`, as in `1.10`. If the minor version
69/// is omitted, it defaults to zero. If the entire version field is
70/// empty, the major version is derived from the package name, as
71/// outlined below. If the field is not empty, the version in the
72/// package name will be verified to be consistent with what is
73/// provided here.
74///
75/// The versioning schema uses [semantic
76/// versioning](http://semver.org) where the major version number
77/// indicates a breaking change and the minor version an additive,
78/// non-breaking change. Both version numbers are signals to users
79/// what to expect from different versions, and should be carefully
80/// chosen based on the product plan.
81///
82/// The major version is also reflected in the package name of the
83/// API, which must end in `v<major-version>`, as in
84/// `google.feature.v1`. For major versions 0 and 1, the suffix can
85/// be omitted. Zero major versions must only be used for
86/// experimental, none-GA apis.
Thomas Van Lenten8c889572015-06-16 16:45:14 -040087@property(nonatomic, readwrite, copy, null_resettable) NSString *version;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040088
Thomas Van Lenten36650a02016-03-07 12:07:03 -050089/// Source context for the protocol buffer service represented by this
90/// message.
Thomas Van Lenten8c889572015-06-16 16:45:14 -040091@property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext;
Thomas Van Lenten36650a02016-03-07 12:07:03 -050092/// Test to see if @c sourceContext has been set.
93@property(nonatomic, readwrite) BOOL hasSourceContext;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040094
Thomas Van Lenten36650a02016-03-07 12:07:03 -050095/// Included APIs. See [Mixin][].
Thomas Van Lenten2480acb2015-11-30 14:38:04 -050096@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBMixin*> *mixinsArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -050097/// The number of items in @c mixinsArray without causing the array to be created.
TeBoringaca5a602015-08-26 14:02:44 -070098@property(nonatomic, readonly) NSUInteger mixinsArray_Count;
99
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500100/// The source syntax of the service.
TeBoringaca5a602015-08-26 14:02:44 -0700101@property(nonatomic, readwrite) enum GPBSyntax syntax;
102
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400103@end
104
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500105/// Fetches the raw value of a @c GPBApi's @c syntax property, even
106/// if the value was not defined by the enum at the time the code was generated.
TeBoringaca5a602015-08-26 14:02:44 -0700107int32_t GPBApi_Syntax_RawValue(GPBApi *message);
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500108/// Sets the raw value of an @c GPBApi's @c syntax property, allowing
109/// it to be set to a value that was not defined by the enum at the time the code
110/// was generated.
TeBoringaca5a602015-08-26 14:02:44 -0700111void SetGPBApi_Syntax_RawValue(GPBApi *message, int32_t value);
112
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400113#pragma mark - GPBMethod
114
115typedef GPB_ENUM(GPBMethod_FieldNumber) {
116 GPBMethod_FieldNumber_Name = 1,
117 GPBMethod_FieldNumber_RequestTypeURL = 2,
118 GPBMethod_FieldNumber_RequestStreaming = 3,
119 GPBMethod_FieldNumber_ResponseTypeURL = 4,
120 GPBMethod_FieldNumber_ResponseStreaming = 5,
121 GPBMethod_FieldNumber_OptionsArray = 6,
TeBoringaca5a602015-08-26 14:02:44 -0700122 GPBMethod_FieldNumber_Syntax = 7,
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400123};
124
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500125/// Method represents a method of an api.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400126@interface GPBMethod : GPBMessage
127
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500128/// The simple name of this method.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400129@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400130
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500131/// A URL of the input message type.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400132@property(nonatomic, readwrite, copy, null_resettable) NSString *requestTypeURL;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400133
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500134/// If true, the request is streamed.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400135@property(nonatomic, readwrite) BOOL requestStreaming;
136
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500137/// The URL of the output message type.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400138@property(nonatomic, readwrite, copy, null_resettable) NSString *responseTypeURL;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400139
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500140/// If true, the response is streamed.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400141@property(nonatomic, readwrite) BOOL responseStreaming;
142
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500143/// Any metadata attached to the method.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -0500144@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500145/// The number of items in @c optionsArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400146@property(nonatomic, readonly) NSUInteger optionsArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400147
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500148/// The source syntax of this method.
TeBoringaca5a602015-08-26 14:02:44 -0700149@property(nonatomic, readwrite) enum GPBSyntax syntax;
150
151@end
152
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500153/// Fetches the raw value of a @c GPBMethod's @c syntax property, even
154/// if the value was not defined by the enum at the time the code was generated.
TeBoringaca5a602015-08-26 14:02:44 -0700155int32_t GPBMethod_Syntax_RawValue(GPBMethod *message);
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500156/// Sets the raw value of an @c GPBMethod's @c syntax property, allowing
157/// it to be set to a value that was not defined by the enum at the time the code
158/// was generated.
TeBoringaca5a602015-08-26 14:02:44 -0700159void SetGPBMethod_Syntax_RawValue(GPBMethod *message, int32_t value);
160
161#pragma mark - GPBMixin
162
163typedef GPB_ENUM(GPBMixin_FieldNumber) {
164 GPBMixin_FieldNumber_Name = 1,
165 GPBMixin_FieldNumber_Root = 2,
166};
167
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500168/// Declares an API to be included in this API. The including API must
169/// redeclare all the methods from the included API, but documentation
170/// and options are inherited as follows:
171///
172/// - If after comment and whitespace stripping, the documentation
173/// string of the redeclared method is empty, it will be inherited
174/// from the original method.
175///
176/// - Each annotation belonging to the service config (http,
177/// visibility) which is not set in the redeclared method will be
178/// inherited.
179///
180/// - If an http annotation is inherited, the path pattern will be
181/// modified as follows. Any version prefix will be replaced by the
182/// version of the including API plus the [root][] path if specified.
183///
184/// Example of a simple mixin:
185///
186/// package google.acl.v1;
187/// service AccessControl {
188/// // Get the underlying ACL object.
189/// rpc GetAcl(GetAclRequest) returns (Acl) {
190/// option (google.api.http).get = "/v1/{resource=**}:getAcl";
191/// }
192/// }
193///
194/// package google.storage.v2;
195/// service Storage {
196/// rpc GetAcl(GetAclRequest) returns (Acl);
197///
198/// // Get a data record.
199/// rpc GetData(GetDataRequest) returns (Data) {
200/// option (google.api.http).get = "/v2/{resource=**}";
201/// }
202/// }
203///
204/// Example of a mixin configuration:
205///
206/// apis:
207/// - name: google.storage.v2.Storage
208/// mixins:
209/// - name: google.acl.v1.AccessControl
210///
211/// The mixin construct implies that all methods in `AccessControl` are
212/// also declared with same name and request/response types in
213/// `Storage`. A documentation generator or annotation processor will
214/// see the effective `Storage.GetAcl` method after inherting
215/// documentation and annotations as follows:
216///
217/// service Storage {
218/// // Get the underlying ACL object.
219/// rpc GetAcl(GetAclRequest) returns (Acl) {
220/// option (google.api.http).get = "/v2/{resource=**}:getAcl";
221/// }
222/// ...
223/// }
224///
225/// Note how the version in the path pattern changed from `v1` to `v2`.
226///
227/// If the `root` field in the mixin is specified, it should be a
228/// relative path under which inherited HTTP paths are placed. Example:
229///
230/// apis:
231/// - name: google.storage.v2.Storage
232/// mixins:
233/// - name: google.acl.v1.AccessControl
234/// root: acls
235///
236/// This implies the following inherited HTTP annotation:
237///
238/// service Storage {
239/// // Get the underlying ACL object.
240/// rpc GetAcl(GetAclRequest) returns (Acl) {
241/// option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
242/// }
243/// ...
244/// }
TeBoringaca5a602015-08-26 14:02:44 -0700245@interface GPBMixin : GPBMessage
246
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500247/// The fully qualified name of the API which is included.
TeBoringaca5a602015-08-26 14:02:44 -0700248@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
249
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500250/// If non-empty specifies a path under which inherited HTTP paths
251/// are rooted.
TeBoringaca5a602015-08-26 14:02:44 -0700252@property(nonatomic, readwrite, copy, null_resettable) NSString *root;
253
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400254@end
255
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400256NS_ASSUME_NONNULL_END
257
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400258CF_EXTERN_C_END
259
Thomas Van Lentene664aa62016-04-19 13:13:04 -0400260#pragma clang diagnostic pop
261
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400262// @@protoc_insertion_point(global_scope)