• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: google/protobuf/api.proto
3 
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
8 #endif
9 
10 #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
11  #import <Protobuf/GPBProtocolBuffers.h>
12 #else
13  #import "GPBProtocolBuffers.h"
14 #endif
15 
16 #if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30001
17 #error This file was generated by a different version of protoc which is incompatible with your Protocol Buffer library sources.
18 #endif
19 
20 // @@protoc_insertion_point(imports)
21 
22 #pragma clang diagnostic push
23 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
24 
25 CF_EXTERN_C_BEGIN
26 
27 @class GPBMethod;
28 @class GPBMixin;
29 @class GPBOption;
30 @class GPBSourceContext;
31 GPB_ENUM_FWD_DECLARE(GPBSyntax);
32 
33 NS_ASSUME_NONNULL_BEGIN
34 
35 #pragma mark - GPBApiRoot
36 
37 /// Exposes the extension registry for this file.
38 ///
39 /// The base class provides:
40 /// @code
41 ///   + (GPBExtensionRegistry *)extensionRegistry;
42 /// @endcode
43 /// which is a @c GPBExtensionRegistry that includes all the extensions defined by
44 /// this file and all files that it depends on.
45 @interface GPBApiRoot : GPBRootObject
46 @end
47 
48 #pragma mark - GPBApi
49 
50 typedef GPB_ENUM(GPBApi_FieldNumber) {
51   GPBApi_FieldNumber_Name = 1,
52   GPBApi_FieldNumber_MethodsArray = 2,
53   GPBApi_FieldNumber_OptionsArray = 3,
54   GPBApi_FieldNumber_Version = 4,
55   GPBApi_FieldNumber_SourceContext = 5,
56   GPBApi_FieldNumber_MixinsArray = 6,
57   GPBApi_FieldNumber_Syntax = 7,
58 };
59 
60 /// Api is a light-weight descriptor for a protocol buffer service.
61 @interface GPBApi : GPBMessage
62 
63 /// The fully qualified name of this api, including package name
64 /// followed by the api's simple name.
65 @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
66 
67 /// The methods of this api, in unspecified order.
68 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBMethod*> *methodsArray;
69 /// The number of items in @c methodsArray without causing the array to be created.
70 @property(nonatomic, readonly) NSUInteger methodsArray_Count;
71 
72 /// Any metadata attached to the API.
73 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
74 /// The number of items in @c optionsArray without causing the array to be created.
75 @property(nonatomic, readonly) NSUInteger optionsArray_Count;
76 
77 /// A version string for this api. If specified, must have the form
78 /// `major-version.minor-version`, as in `1.10`. If the minor version
79 /// is omitted, it defaults to zero. If the entire version field is
80 /// empty, the major version is derived from the package name, as
81 /// outlined below. If the field is not empty, the version in the
82 /// package name will be verified to be consistent with what is
83 /// provided here.
84 ///
85 /// The versioning schema uses [semantic
86 /// versioning](http://semver.org) where the major version number
87 /// indicates a breaking change and the minor version an additive,
88 /// non-breaking change. Both version numbers are signals to users
89 /// what to expect from different versions, and should be carefully
90 /// chosen based on the product plan.
91 ///
92 /// The major version is also reflected in the package name of the
93 /// API, which must end in `v<major-version>`, as in
94 /// `google.feature.v1`. For major versions 0 and 1, the suffix can
95 /// be omitted. Zero major versions must only be used for
96 /// experimental, none-GA apis.
97 @property(nonatomic, readwrite, copy, null_resettable) NSString *version;
98 
99 /// Source context for the protocol buffer service represented by this
100 /// message.
101 @property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext;
102 /// Test to see if @c sourceContext has been set.
103 @property(nonatomic, readwrite) BOOL hasSourceContext;
104 
105 /// Included APIs. See [Mixin][].
106 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBMixin*> *mixinsArray;
107 /// The number of items in @c mixinsArray without causing the array to be created.
108 @property(nonatomic, readonly) NSUInteger mixinsArray_Count;
109 
110 /// The source syntax of the service.
111 @property(nonatomic, readwrite) enum GPBSyntax syntax;
112 
113 @end
114 
115 /// Fetches the raw value of a @c GPBApi's @c syntax property, even
116 /// if the value was not defined by the enum at the time the code was generated.
117 int32_t GPBApi_Syntax_RawValue(GPBApi *message);
118 /// Sets the raw value of an @c GPBApi's @c syntax property, allowing
119 /// it to be set to a value that was not defined by the enum at the time the code
120 /// was generated.
121 void SetGPBApi_Syntax_RawValue(GPBApi *message, int32_t value);
122 
123 #pragma mark - GPBMethod
124 
125 typedef GPB_ENUM(GPBMethod_FieldNumber) {
126   GPBMethod_FieldNumber_Name = 1,
127   GPBMethod_FieldNumber_RequestTypeURL = 2,
128   GPBMethod_FieldNumber_RequestStreaming = 3,
129   GPBMethod_FieldNumber_ResponseTypeURL = 4,
130   GPBMethod_FieldNumber_ResponseStreaming = 5,
131   GPBMethod_FieldNumber_OptionsArray = 6,
132   GPBMethod_FieldNumber_Syntax = 7,
133 };
134 
135 /// Method represents a method of an api.
136 @interface GPBMethod : GPBMessage
137 
138 /// The simple name of this method.
139 @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
140 
141 /// A URL of the input message type.
142 @property(nonatomic, readwrite, copy, null_resettable) NSString *requestTypeURL;
143 
144 /// If true, the request is streamed.
145 @property(nonatomic, readwrite) BOOL requestStreaming;
146 
147 /// The URL of the output message type.
148 @property(nonatomic, readwrite, copy, null_resettable) NSString *responseTypeURL;
149 
150 /// If true, the response is streamed.
151 @property(nonatomic, readwrite) BOOL responseStreaming;
152 
153 /// Any metadata attached to the method.
154 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
155 /// The number of items in @c optionsArray without causing the array to be created.
156 @property(nonatomic, readonly) NSUInteger optionsArray_Count;
157 
158 /// The source syntax of this method.
159 @property(nonatomic, readwrite) enum GPBSyntax syntax;
160 
161 @end
162 
163 /// Fetches the raw value of a @c GPBMethod's @c syntax property, even
164 /// if the value was not defined by the enum at the time the code was generated.
165 int32_t GPBMethod_Syntax_RawValue(GPBMethod *message);
166 /// Sets the raw value of an @c GPBMethod's @c syntax property, allowing
167 /// it to be set to a value that was not defined by the enum at the time the code
168 /// was generated.
169 void SetGPBMethod_Syntax_RawValue(GPBMethod *message, int32_t value);
170 
171 #pragma mark - GPBMixin
172 
173 typedef GPB_ENUM(GPBMixin_FieldNumber) {
174   GPBMixin_FieldNumber_Name = 1,
175   GPBMixin_FieldNumber_Root = 2,
176 };
177 
178 /// Declares an API to be included in this API. The including API must
179 /// redeclare all the methods from the included API, but documentation
180 /// and options are inherited as follows:
181 ///
182 /// - If after comment and whitespace stripping, the documentation
183 ///   string of the redeclared method is empty, it will be inherited
184 ///   from the original method.
185 ///
186 /// - Each annotation belonging to the service config (http,
187 ///   visibility) which is not set in the redeclared method will be
188 ///   inherited.
189 ///
190 /// - If an http annotation is inherited, the path pattern will be
191 ///   modified as follows. Any version prefix will be replaced by the
192 ///   version of the including API plus the [root][] path if specified.
193 ///
194 /// Example of a simple mixin:
195 ///
196 ///     package google.acl.v1;
197 ///     service AccessControl {
198 ///       // Get the underlying ACL object.
199 ///       rpc GetAcl(GetAclRequest) returns (Acl) {
200 ///         option (google.api.http).get = "/v1/{resource=**}:getAcl";
201 ///       }
202 ///     }
203 ///
204 ///     package google.storage.v2;
205 ///     service Storage {
206 ///       rpc GetAcl(GetAclRequest) returns (Acl);
207 ///
208 ///       // Get a data record.
209 ///       rpc GetData(GetDataRequest) returns (Data) {
210 ///         option (google.api.http).get = "/v2/{resource=**}";
211 ///       }
212 ///     }
213 ///
214 /// Example of a mixin configuration:
215 ///
216 ///     apis:
217 ///     - name: google.storage.v2.Storage
218 ///       mixins:
219 ///       - name: google.acl.v1.AccessControl
220 ///
221 /// The mixin construct implies that all methods in `AccessControl` are
222 /// also declared with same name and request/response types in
223 /// `Storage`. A documentation generator or annotation processor will
224 /// see the effective `Storage.GetAcl` method after inherting
225 /// documentation and annotations as follows:
226 ///
227 ///     service Storage {
228 ///       // Get the underlying ACL object.
229 ///       rpc GetAcl(GetAclRequest) returns (Acl) {
230 ///         option (google.api.http).get = "/v2/{resource=**}:getAcl";
231 ///       }
232 ///       ...
233 ///     }
234 ///
235 /// Note how the version in the path pattern changed from `v1` to `v2`.
236 ///
237 /// If the `root` field in the mixin is specified, it should be a
238 /// relative path under which inherited HTTP paths are placed. Example:
239 ///
240 ///     apis:
241 ///     - name: google.storage.v2.Storage
242 ///       mixins:
243 ///       - name: google.acl.v1.AccessControl
244 ///         root: acls
245 ///
246 /// This implies the following inherited HTTP annotation:
247 ///
248 ///     service Storage {
249 ///       // Get the underlying ACL object.
250 ///       rpc GetAcl(GetAclRequest) returns (Acl) {
251 ///         option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
252 ///       }
253 ///       ...
254 ///     }
255 @interface GPBMixin : GPBMessage
256 
257 /// The fully qualified name of the API which is included.
258 @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
259 
260 /// If non-empty specifies a path under which inherited HTTP paths
261 /// are rooted.
262 @property(nonatomic, readwrite, copy, null_resettable) NSString *root;
263 
264 @end
265 
266 NS_ASSUME_NONNULL_END
267 
268 CF_EXTERN_C_END
269 
270 #pragma clang diagnostic pop
271 
272 // @@protoc_insertion_point(global_scope)
273