Api.pbobjc.h 9.7 KB

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