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