blob: c93f3f15d7bffdf19f004ddcaca1b84262dd5a80 [file] [log] [blame]
Brian Silverman9c614bc2016-02-15 20:20:02 -05001// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: google/protobuf/api.proto
3
Austin Schuh40c16522018-10-28 20:27:54 -07004// This CPP symbol can be defined to use imports that match up to the framework
5// imports needed when using CocoaPods.
6#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
7 #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
8#endif
Brian Silverman9c614bc2016-02-15 20:20:02 -05009
Austin Schuh40c16522018-10-28 20:27:54 -070010#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
11 #import <Protobuf/GPBDescriptor.h>
12 #import <Protobuf/GPBMessage.h>
13 #import <Protobuf/GPBRootObject.h>
14#else
15 #import "GPBDescriptor.h"
16 #import "GPBMessage.h"
17 #import "GPBRootObject.h"
18#endif
19
20#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
21#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
22#endif
23#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
24#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
Brian Silverman9c614bc2016-02-15 20:20:02 -050025#endif
26
27// @@protoc_insertion_point(imports)
28
Austin Schuh40c16522018-10-28 20:27:54 -070029#pragma clang diagnostic push
30#pragma clang diagnostic ignored "-Wdeprecated-declarations"
31
Brian Silverman9c614bc2016-02-15 20:20:02 -050032CF_EXTERN_C_BEGIN
33
Austin Schuh40c16522018-10-28 20:27:54 -070034@class GPBMethod;
35@class GPBMixin;
36@class GPBOption;
Brian Silverman9c614bc2016-02-15 20:20:02 -050037@class GPBSourceContext;
38GPB_ENUM_FWD_DECLARE(GPBSyntax);
39
40NS_ASSUME_NONNULL_BEGIN
41
42#pragma mark - GPBApiRoot
43
Austin Schuh40c16522018-10-28 20:27:54 -070044/**
45 * Exposes the extension registry for this file.
46 *
47 * The base class provides:
48 * @code
49 * + (GPBExtensionRegistry *)extensionRegistry;
50 * @endcode
51 * which is a @c GPBExtensionRegistry that includes all the extensions defined by
52 * this file and all files that it depends on.
53 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -050054@interface GPBApiRoot : GPBRootObject
Brian Silverman9c614bc2016-02-15 20:20:02 -050055@end
56
57#pragma mark - GPBApi
58
59typedef GPB_ENUM(GPBApi_FieldNumber) {
60 GPBApi_FieldNumber_Name = 1,
61 GPBApi_FieldNumber_MethodsArray = 2,
62 GPBApi_FieldNumber_OptionsArray = 3,
63 GPBApi_FieldNumber_Version = 4,
64 GPBApi_FieldNumber_SourceContext = 5,
65 GPBApi_FieldNumber_MixinsArray = 6,
66 GPBApi_FieldNumber_Syntax = 7,
67};
68
Austin Schuh40c16522018-10-28 20:27:54 -070069/**
70 * Api is a light-weight descriptor for an API Interface.
71 *
72 * Interfaces are also described as "protocol buffer services" in some contexts,
73 * such as by the "service" keyword in a .proto file, but they are different
74 * from API Services, which represent a concrete implementation of an interface
75 * as opposed to simply a description of methods and bindings. They are also
76 * sometimes simply referred to as "APIs" in other contexts, such as the name of
77 * this message itself. See https://cloud.google.com/apis/design/glossary for
78 * detailed terminology.
79 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -050080@interface GPBApi : GPBMessage
81
Austin Schuh40c16522018-10-28 20:27:54 -070082/**
83 * The fully qualified name of this interface, including package name
84 * followed by the interface's simple name.
85 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -050086@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
87
Austin Schuh40c16522018-10-28 20:27:54 -070088/** The methods of this interface, in unspecified order. */
89@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBMethod*> *methodsArray;
90/** The number of items in @c methodsArray without causing the array to be created. */
Brian Silverman9c614bc2016-02-15 20:20:02 -050091@property(nonatomic, readonly) NSUInteger methodsArray_Count;
92
Austin Schuh40c16522018-10-28 20:27:54 -070093/** Any metadata attached to the interface. */
94@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
95/** The number of items in @c optionsArray without causing the array to be created. */
Brian Silverman9c614bc2016-02-15 20:20:02 -050096@property(nonatomic, readonly) NSUInteger optionsArray_Count;
97
Austin Schuh40c16522018-10-28 20:27:54 -070098/**
99 * A version string for this interface. If specified, must have the form
100 * `major-version.minor-version`, as in `1.10`. If the minor version is
101 * omitted, it defaults to zero. If the entire version field is empty, the
102 * major version is derived from the package name, as outlined below. If the
103 * field is not empty, the version in the package name will be verified to be
104 * consistent with what is provided here.
105 *
106 * The versioning schema uses [semantic
107 * versioning](http://semver.org) where the major version number
108 * indicates a breaking change and the minor version an additive,
109 * non-breaking change. Both version numbers are signals to users
110 * what to expect from different versions, and should be carefully
111 * chosen based on the product plan.
112 *
113 * The major version is also reflected in the package name of the
114 * interface, which must end in `v<major-version>`, as in
115 * `google.feature.v1`. For major versions 0 and 1, the suffix can
116 * be omitted. Zero major versions must only be used for
117 * experimental, non-GA interfaces.
118 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -0500119@property(nonatomic, readwrite, copy, null_resettable) NSString *version;
120
Austin Schuh40c16522018-10-28 20:27:54 -0700121/**
122 * Source context for the protocol buffer service represented by this
123 * message.
124 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -0500125@property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext;
Austin Schuh40c16522018-10-28 20:27:54 -0700126/** Test to see if @c sourceContext has been set. */
127@property(nonatomic, readwrite) BOOL hasSourceContext;
Brian Silverman9c614bc2016-02-15 20:20:02 -0500128
Austin Schuh40c16522018-10-28 20:27:54 -0700129/** Included interfaces. See [Mixin][]. */
130@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBMixin*> *mixinsArray;
131/** The number of items in @c mixinsArray without causing the array to be created. */
Brian Silverman9c614bc2016-02-15 20:20:02 -0500132@property(nonatomic, readonly) NSUInteger mixinsArray_Count;
133
Austin Schuh40c16522018-10-28 20:27:54 -0700134/** The source syntax of the service. */
Brian Silverman9c614bc2016-02-15 20:20:02 -0500135@property(nonatomic, readwrite) enum GPBSyntax syntax;
136
137@end
138
Austin Schuh40c16522018-10-28 20:27:54 -0700139/**
140 * Fetches the raw value of a @c GPBApi's @c syntax property, even
141 * if the value was not defined by the enum at the time the code was generated.
142 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -0500143int32_t GPBApi_Syntax_RawValue(GPBApi *message);
Austin Schuh40c16522018-10-28 20:27:54 -0700144/**
145 * Sets the raw value of an @c GPBApi's @c syntax property, allowing
146 * it to be set to a value that was not defined by the enum at the time the code
147 * was generated.
148 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -0500149void SetGPBApi_Syntax_RawValue(GPBApi *message, int32_t value);
150
151#pragma mark - GPBMethod
152
153typedef GPB_ENUM(GPBMethod_FieldNumber) {
154 GPBMethod_FieldNumber_Name = 1,
155 GPBMethod_FieldNumber_RequestTypeURL = 2,
156 GPBMethod_FieldNumber_RequestStreaming = 3,
157 GPBMethod_FieldNumber_ResponseTypeURL = 4,
158 GPBMethod_FieldNumber_ResponseStreaming = 5,
159 GPBMethod_FieldNumber_OptionsArray = 6,
160 GPBMethod_FieldNumber_Syntax = 7,
161};
162
Austin Schuh40c16522018-10-28 20:27:54 -0700163/**
164 * Method represents a method of an API interface.
165 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -0500166@interface GPBMethod : GPBMessage
167
Austin Schuh40c16522018-10-28 20:27:54 -0700168/** The simple name of this method. */
Brian Silverman9c614bc2016-02-15 20:20:02 -0500169@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
170
Austin Schuh40c16522018-10-28 20:27:54 -0700171/** A URL of the input message type. */
Brian Silverman9c614bc2016-02-15 20:20:02 -0500172@property(nonatomic, readwrite, copy, null_resettable) NSString *requestTypeURL;
173
Austin Schuh40c16522018-10-28 20:27:54 -0700174/** If true, the request is streamed. */
Brian Silverman9c614bc2016-02-15 20:20:02 -0500175@property(nonatomic, readwrite) BOOL requestStreaming;
176
Austin Schuh40c16522018-10-28 20:27:54 -0700177/** The URL of the output message type. */
Brian Silverman9c614bc2016-02-15 20:20:02 -0500178@property(nonatomic, readwrite, copy, null_resettable) NSString *responseTypeURL;
179
Austin Schuh40c16522018-10-28 20:27:54 -0700180/** If true, the response is streamed. */
Brian Silverman9c614bc2016-02-15 20:20:02 -0500181@property(nonatomic, readwrite) BOOL responseStreaming;
182
Austin Schuh40c16522018-10-28 20:27:54 -0700183/** Any metadata attached to the method. */
184@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
185/** The number of items in @c optionsArray without causing the array to be created. */
Brian Silverman9c614bc2016-02-15 20:20:02 -0500186@property(nonatomic, readonly) NSUInteger optionsArray_Count;
187
Austin Schuh40c16522018-10-28 20:27:54 -0700188/** The source syntax of this method. */
Brian Silverman9c614bc2016-02-15 20:20:02 -0500189@property(nonatomic, readwrite) enum GPBSyntax syntax;
190
191@end
192
Austin Schuh40c16522018-10-28 20:27:54 -0700193/**
194 * Fetches the raw value of a @c GPBMethod's @c syntax property, even
195 * if the value was not defined by the enum at the time the code was generated.
196 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -0500197int32_t GPBMethod_Syntax_RawValue(GPBMethod *message);
Austin Schuh40c16522018-10-28 20:27:54 -0700198/**
199 * Sets the raw value of an @c GPBMethod's @c syntax property, allowing
200 * it to be set to a value that was not defined by the enum at the time the code
201 * was generated.
202 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -0500203void SetGPBMethod_Syntax_RawValue(GPBMethod *message, int32_t value);
204
205#pragma mark - GPBMixin
206
207typedef GPB_ENUM(GPBMixin_FieldNumber) {
208 GPBMixin_FieldNumber_Name = 1,
209 GPBMixin_FieldNumber_Root = 2,
210};
211
Austin Schuh40c16522018-10-28 20:27:54 -0700212/**
213 * Declares an API Interface to be included in this interface. The including
214 * interface must redeclare all the methods from the included interface, but
215 * documentation and options are inherited as follows:
216 *
217 * - If after comment and whitespace stripping, the documentation
218 * string of the redeclared method is empty, it will be inherited
219 * from the original method.
220 *
221 * - Each annotation belonging to the service config (http,
222 * visibility) which is not set in the redeclared method will be
223 * inherited.
224 *
225 * - If an http annotation is inherited, the path pattern will be
226 * modified as follows. Any version prefix will be replaced by the
227 * version of the including interface plus the [root][] path if
228 * specified.
229 *
230 * Example of a simple mixin:
231 *
232 * package google.acl.v1;
233 * service AccessControl {
234 * // Get the underlying ACL object.
235 * rpc GetAcl(GetAclRequest) returns (Acl) {
236 * option (google.api.http).get = "/v1/{resource=**}:getAcl";
237 * }
238 * }
239 *
240 * package google.storage.v2;
241 * service Storage {
242 * rpc GetAcl(GetAclRequest) returns (Acl);
243 *
244 * // Get a data record.
245 * rpc GetData(GetDataRequest) returns (Data) {
246 * option (google.api.http).get = "/v2/{resource=**}";
247 * }
248 * }
249 *
250 * Example of a mixin configuration:
251 *
252 * apis:
253 * - name: google.storage.v2.Storage
254 * mixins:
255 * - name: google.acl.v1.AccessControl
256 *
257 * The mixin construct implies that all methods in `AccessControl` are
258 * also declared with same name and request/response types in
259 * `Storage`. A documentation generator or annotation processor will
260 * see the effective `Storage.GetAcl` method after inherting
261 * documentation and annotations as follows:
262 *
263 * service Storage {
264 * // Get the underlying ACL object.
265 * rpc GetAcl(GetAclRequest) returns (Acl) {
266 * option (google.api.http).get = "/v2/{resource=**}:getAcl";
267 * }
268 * ...
269 * }
270 *
271 * Note how the version in the path pattern changed from `v1` to `v2`.
272 *
273 * If the `root` field in the mixin is specified, it should be a
274 * relative path under which inherited HTTP paths are placed. Example:
275 *
276 * apis:
277 * - name: google.storage.v2.Storage
278 * mixins:
279 * - name: google.acl.v1.AccessControl
280 * root: acls
281 *
282 * This implies the following inherited HTTP annotation:
283 *
284 * service Storage {
285 * // Get the underlying ACL object.
286 * rpc GetAcl(GetAclRequest) returns (Acl) {
287 * option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
288 * }
289 * ...
290 * }
291 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -0500292@interface GPBMixin : GPBMessage
293
Austin Schuh40c16522018-10-28 20:27:54 -0700294/** The fully qualified name of the interface which is included. */
Brian Silverman9c614bc2016-02-15 20:20:02 -0500295@property(nonatomic, readwrite, copy, null_resettable) NSString *name;
296
Austin Schuh40c16522018-10-28 20:27:54 -0700297/**
298 * If non-empty specifies a path under which inherited HTTP paths
299 * are rooted.
300 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -0500301@property(nonatomic, readwrite, copy, null_resettable) NSString *root;
302
303@end
304
305NS_ASSUME_NONNULL_END
306
307CF_EXTERN_C_END
308
Austin Schuh40c16522018-10-28 20:27:54 -0700309#pragma clang diagnostic pop
310
Brian Silverman9c614bc2016-02-15 20:20:02 -0500311// @@protoc_insertion_point(global_scope)