1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/api.proto
4 // 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
10 #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
11 #import <Protobuf/GPBDescriptor.h>
12 #import <Protobuf/GPBMessage.h>
13 #import <Protobuf/GPBRootObject.h>
15 #import "GPBDescriptor.h"
16 #import "GPBMessage.h"
17 #import "GPBRootObject.h"
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.
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.
27 // @@protoc_insertion_point(imports)
29 #pragma clang diagnostic push
30 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
37 @class GPBSourceContext;
38 GPB_ENUM_FWD_DECLARE(GPBSyntax);
40 NS_ASSUME_NONNULL_BEGIN
42 #pragma mark - GPBApiRoot
45 * Exposes the extension registry for this file.
47 * The base class provides:
49 * + (GPBExtensionRegistry *)extensionRegistry;
51 * which is a @c GPBExtensionRegistry that includes all the extensions defined by
52 * this file and all files that it depends on.
54 @interface GPBApiRoot : GPBRootObject
59 typedef 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,
70 * Api is a light-weight descriptor for an API Interface.
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.
80 @interface GPBApi : GPBMessage
83 * The fully qualified name of this interface, including package name
84 * followed by the interface's simple name.
86 @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
88 /** 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. */
91 @property(nonatomic, readonly) NSUInteger methodsArray_Count;
93 /** 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. */
96 @property(nonatomic, readonly) NSUInteger optionsArray_Count;
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.
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.
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.
119 @property(nonatomic, readwrite, copy, null_resettable) NSString *version;
122 * Source context for the protocol buffer service represented by this
125 @property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext;
126 /** Test to see if @c sourceContext has been set. */
127 @property(nonatomic, readwrite) BOOL hasSourceContext;
129 /** 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. */
132 @property(nonatomic, readonly) NSUInteger mixinsArray_Count;
134 /** The source syntax of the service. */
135 @property(nonatomic, readwrite) enum GPBSyntax syntax;
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.
143 int32_t GPBApi_Syntax_RawValue(GPBApi *message);
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
149 void SetGPBApi_Syntax_RawValue(GPBApi *message, int32_t value);
151 #pragma mark - GPBMethod
153 typedef 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,
164 * Method represents a method of an API interface.
166 @interface GPBMethod : GPBMessage
168 /** The simple name of this method. */
169 @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
171 /** A URL of the input message type. */
172 @property(nonatomic, readwrite, copy, null_resettable) NSString *requestTypeURL;
174 /** If true, the request is streamed. */
175 @property(nonatomic, readwrite) BOOL requestStreaming;
177 /** The URL of the output message type. */
178 @property(nonatomic, readwrite, copy, null_resettable) NSString *responseTypeURL;
180 /** If true, the response is streamed. */
181 @property(nonatomic, readwrite) BOOL responseStreaming;
183 /** 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. */
186 @property(nonatomic, readonly) NSUInteger optionsArray_Count;
188 /** The source syntax of this method. */
189 @property(nonatomic, readwrite) enum GPBSyntax syntax;
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.
197 int32_t GPBMethod_Syntax_RawValue(GPBMethod *message);
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
203 void SetGPBMethod_Syntax_RawValue(GPBMethod *message, int32_t value);
205 #pragma mark - GPBMixin
207 typedef GPB_ENUM(GPBMixin_FieldNumber) {
208 GPBMixin_FieldNumber_Name = 1,
209 GPBMixin_FieldNumber_Root = 2,
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:
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.
221 * - Each annotation belonging to the service config (http,
222 * visibility) which is not set in the redeclared method will be
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
230 * Example of a simple mixin:
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";
240 * package google.storage.v2;
242 * rpc GetAcl(GetAclRequest) returns (Acl);
244 * // Get a data record.
245 * rpc GetData(GetDataRequest) returns (Data) {
246 * option (google.api.http).get = "/v2/{resource=**}";
250 * Example of a mixin configuration:
253 * - name: google.storage.v2.Storage
255 * - name: google.acl.v1.AccessControl
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:
264 * // Get the underlying ACL object.
265 * rpc GetAcl(GetAclRequest) returns (Acl) {
266 * option (google.api.http).get = "/v2/{resource=**}:getAcl";
271 * Note how the version in the path pattern changed from `v1` to `v2`.
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:
277 * - name: google.storage.v2.Storage
279 * - name: google.acl.v1.AccessControl
282 * This implies the following inherited HTTP annotation:
285 * // Get the underlying ACL object.
286 * rpc GetAcl(GetAclRequest) returns (Acl) {
287 * option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
292 @interface GPBMixin : GPBMessage
294 /** The fully qualified name of the interface which is included. */
295 @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
298 * If non-empty specifies a path under which inherited HTTP paths
301 @property(nonatomic, readwrite, copy, null_resettable) NSString *root;
305 NS_ASSUME_NONNULL_END
309 #pragma clang diagnostic pop
311 // @@protoc_insertion_point(global_scope)