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