• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: google/protobuf/api.proto
3 
4 #import "GPBProtocolBuffers.h"
5 
6 #if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30001
7 #error This file was generated by a different version of protoc which is incompatible with your Protocol Buffer library sources.
8 #endif
9 
10 // @@protoc_insertion_point(imports)
11 
12 #pragma clang diagnostic push
13 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
14 
15 CF_EXTERN_C_BEGIN
16 
17 @class GPBMethod;
18 @class GPBMixin;
19 @class GPBOption;
20 @class GPBSourceContext;
21 GPB_ENUM_FWD_DECLARE(GPBSyntax);
22 
23 NS_ASSUME_NONNULL_BEGIN
24 
25 #pragma mark - GPBApiRoot
26 
27 /// 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.
35 @interface GPBApiRoot : GPBRootObject
36 @end
37 
38 #pragma mark - GPBApi
39 
40 typedef 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,
46   GPBApi_FieldNumber_MixinsArray = 6,
47   GPBApi_FieldNumber_Syntax = 7,
48 };
49 
50 /// Api is a light-weight descriptor for a protocol buffer service.
51 @interface GPBApi : GPBMessage
52 
53 /// The fully qualified name of this api, including package name
54 /// followed by the api's simple name.
55 @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
56 
57 /// The methods of this api, in unspecified order.
58 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBMethod*> *methodsArray;
59 /// The number of items in @c methodsArray without causing the array to be created.
60 @property(nonatomic, readonly) NSUInteger methodsArray_Count;
61 
62 /// Any metadata attached to the API.
63 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
64 /// The number of items in @c optionsArray without causing the array to be created.
65 @property(nonatomic, readonly) NSUInteger optionsArray_Count;
66 
67 /// 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.
87 @property(nonatomic, readwrite, copy, null_resettable) NSString *version;
88 
89 /// Source context for the protocol buffer service represented by this
90 /// message.
91 @property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext;
92 /// Test to see if @c sourceContext has been set.
93 @property(nonatomic, readwrite) BOOL hasSourceContext;
94 
95 /// Included APIs. See [Mixin][].
96 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBMixin*> *mixinsArray;
97 /// The number of items in @c mixinsArray without causing the array to be created.
98 @property(nonatomic, readonly) NSUInteger mixinsArray_Count;
99 
100 /// The source syntax of the service.
101 @property(nonatomic, readwrite) enum GPBSyntax syntax;
102 
103 @end
104 
105 /// 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.
107 int32_t GPBApi_Syntax_RawValue(GPBApi *message);
108 /// 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.
111 void SetGPBApi_Syntax_RawValue(GPBApi *message, int32_t value);
112 
113 #pragma mark - GPBMethod
114 
115 typedef 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,
122   GPBMethod_FieldNumber_Syntax = 7,
123 };
124 
125 /// Method represents a method of an api.
126 @interface GPBMethod : GPBMessage
127 
128 /// The simple name of this method.
129 @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
130 
131 /// A URL of the input message type.
132 @property(nonatomic, readwrite, copy, null_resettable) NSString *requestTypeURL;
133 
134 /// If true, the request is streamed.
135 @property(nonatomic, readwrite) BOOL requestStreaming;
136 
137 /// The URL of the output message type.
138 @property(nonatomic, readwrite, copy, null_resettable) NSString *responseTypeURL;
139 
140 /// If true, the response is streamed.
141 @property(nonatomic, readwrite) BOOL responseStreaming;
142 
143 /// Any metadata attached to the method.
144 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
145 /// The number of items in @c optionsArray without causing the array to be created.
146 @property(nonatomic, readonly) NSUInteger optionsArray_Count;
147 
148 /// The source syntax of this method.
149 @property(nonatomic, readwrite) enum GPBSyntax syntax;
150 
151 @end
152 
153 /// 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.
155 int32_t GPBMethod_Syntax_RawValue(GPBMethod *message);
156 /// 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.
159 void SetGPBMethod_Syntax_RawValue(GPBMethod *message, int32_t value);
160 
161 #pragma mark - GPBMixin
162 
163 typedef GPB_ENUM(GPBMixin_FieldNumber) {
164   GPBMixin_FieldNumber_Name = 1,
165   GPBMixin_FieldNumber_Root = 2,
166 };
167 
168 /// 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 ///     }
245 @interface GPBMixin : GPBMessage
246 
247 /// The fully qualified name of the API which is included.
248 @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
249 
250 /// If non-empty specifies a path under which inherited HTTP paths
251 /// are rooted.
252 @property(nonatomic, readwrite, copy, null_resettable) NSString *root;
253 
254 @end
255 
256 NS_ASSUME_NONNULL_END
257 
258 CF_EXTERN_C_END
259 
260 #pragma clang diagnostic pop
261 
262 // @@protoc_insertion_point(global_scope)
263