Api.pbobjc.h 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  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_GEN_VERSION != 30001
  14. #error This file was generated by a different version of protoc which is incompatible with your Protocol Buffer library sources.
  15. #endif
  16. // @@protoc_insertion_point(imports)
  17. #pragma clang diagnostic push
  18. #pragma clang diagnostic ignored "-Wdeprecated-declarations"
  19. CF_EXTERN_C_BEGIN
  20. @class GPBMethod;
  21. @class GPBMixin;
  22. @class GPBOption;
  23. @class GPBSourceContext;
  24. GPB_ENUM_FWD_DECLARE(GPBSyntax);
  25. NS_ASSUME_NONNULL_BEGIN
  26. #pragma mark - GPBApiRoot
  27. /**
  28. * Exposes the extension registry for this file.
  29. *
  30. * The base class provides:
  31. * @code
  32. * + (GPBExtensionRegistry *)extensionRegistry;
  33. * @endcode
  34. * which is a @c GPBExtensionRegistry that includes all the extensions defined by
  35. * this file and all files that it depends on.
  36. **/
  37. @interface GPBApiRoot : GPBRootObject
  38. @end
  39. #pragma mark - GPBApi
  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. **/
  52. @interface GPBApi : GPBMessage
  53. /**
  54. * The fully qualified name of this api, including package name
  55. * followed by the api's simple name.
  56. **/
  57. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  58. /** The methods of this api, in unspecified order. */
  59. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBMethod*> *methodsArray;
  60. /** The number of items in @c methodsArray without causing the array to be created. */
  61. @property(nonatomic, readonly) NSUInteger methodsArray_Count;
  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. **/
  88. @property(nonatomic, readwrite, copy, null_resettable) NSString *version;
  89. /**
  90. * Source context for the protocol buffer service represented by this
  91. * message.
  92. **/
  93. @property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext;
  94. /** Test to see if @c sourceContext has been set. */
  95. @property(nonatomic, readwrite) BOOL hasSourceContext;
  96. /** Included APIs. See [Mixin][]. */
  97. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBMixin*> *mixinsArray;
  98. /** The number of items in @c mixinsArray without causing the array to be created. */
  99. @property(nonatomic, readonly) NSUInteger mixinsArray_Count;
  100. /** The source syntax of the service. */
  101. @property(nonatomic, readwrite) enum GPBSyntax syntax;
  102. @end
  103. /**
  104. * Fetches the raw value of a @c GPBApi's @c syntax property, even
  105. * if the value was not defined by the enum at the time the code was generated.
  106. **/
  107. int32_t GPBApi_Syntax_RawValue(GPBApi *message);
  108. /**
  109. * Sets the raw value of an @c GPBApi's @c syntax property, allowing
  110. * it to be set to a value that was not defined by the enum at the time the code
  111. * was generated.
  112. **/
  113. void SetGPBApi_Syntax_RawValue(GPBApi *message, int32_t value);
  114. #pragma mark - GPBMethod
  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. **/
  127. @interface GPBMethod : GPBMessage
  128. /** The simple name of this method. */
  129. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  130. /** A URL of the input message type. */
  131. @property(nonatomic, readwrite, copy, null_resettable) NSString *requestTypeURL;
  132. /** If true, the request is streamed. */
  133. @property(nonatomic, readwrite) BOOL requestStreaming;
  134. /** The URL of the output message type. */
  135. @property(nonatomic, readwrite, copy, null_resettable) NSString *responseTypeURL;
  136. /** If true, the response is streamed. */
  137. @property(nonatomic, readwrite) BOOL responseStreaming;
  138. /** Any metadata attached to the method. */
  139. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
  140. /** The number of items in @c optionsArray without causing the array to be created. */
  141. @property(nonatomic, readonly) NSUInteger optionsArray_Count;
  142. /** The source syntax of this method. */
  143. @property(nonatomic, readwrite) enum GPBSyntax syntax;
  144. @end
  145. /**
  146. * Fetches the raw value of a @c GPBMethod's @c syntax property, even
  147. * if the value was not defined by the enum at the time the code was generated.
  148. **/
  149. int32_t GPBMethod_Syntax_RawValue(GPBMethod *message);
  150. /**
  151. * Sets the raw value of an @c GPBMethod's @c syntax property, allowing
  152. * it to be set to a value that was not defined by the enum at the time the code
  153. * was generated.
  154. **/
  155. void SetGPBMethod_Syntax_RawValue(GPBMethod *message, int32_t value);
  156. #pragma mark - GPBMixin
  157. typedef GPB_ENUM(GPBMixin_FieldNumber) {
  158. GPBMixin_FieldNumber_Name = 1,
  159. GPBMixin_FieldNumber_Root = 2,
  160. };
  161. /**
  162. * Declares an API to be included in this API. The including API must
  163. * redeclare all the methods from the included API, but documentation
  164. * and options are inherited as follows:
  165. *
  166. * - If after comment and whitespace stripping, the documentation
  167. * string of the redeclared method is empty, it will be inherited
  168. * from the original method.
  169. *
  170. * - Each annotation belonging to the service config (http,
  171. * visibility) which is not set in the redeclared method will be
  172. * inherited.
  173. *
  174. * - If an http annotation is inherited, the path pattern will be
  175. * modified as follows. Any version prefix will be replaced by the
  176. * version of the including API plus the [root][] path if specified.
  177. *
  178. * Example of a simple mixin:
  179. *
  180. * package google.acl.v1;
  181. * service AccessControl {
  182. * // Get the underlying ACL object.
  183. * rpc GetAcl(GetAclRequest) returns (Acl) {
  184. * option (google.api.http).get = "/v1/{resource=**}:getAcl";
  185. * }
  186. * }
  187. *
  188. * package google.storage.v2;
  189. * service Storage {
  190. * rpc GetAcl(GetAclRequest) returns (Acl);
  191. *
  192. * // Get a data record.
  193. * rpc GetData(GetDataRequest) returns (Data) {
  194. * option (google.api.http).get = "/v2/{resource=**}";
  195. * }
  196. * }
  197. *
  198. * Example of a mixin configuration:
  199. *
  200. * apis:
  201. * - name: google.storage.v2.Storage
  202. * mixins:
  203. * - name: google.acl.v1.AccessControl
  204. *
  205. * The mixin construct implies that all methods in `AccessControl` are
  206. * also declared with same name and request/response types in
  207. * `Storage`. A documentation generator or annotation processor will
  208. * see the effective `Storage.GetAcl` method after inherting
  209. * documentation and annotations as follows:
  210. *
  211. * service Storage {
  212. * // Get the underlying ACL object.
  213. * rpc GetAcl(GetAclRequest) returns (Acl) {
  214. * option (google.api.http).get = "/v2/{resource=**}:getAcl";
  215. * }
  216. * ...
  217. * }
  218. *
  219. * Note how the version in the path pattern changed from `v1` to `v2`.
  220. *
  221. * If the `root` field in the mixin is specified, it should be a
  222. * relative path under which inherited HTTP paths are placed. Example:
  223. *
  224. * apis:
  225. * - name: google.storage.v2.Storage
  226. * mixins:
  227. * - name: google.acl.v1.AccessControl
  228. * root: acls
  229. *
  230. * This implies the following inherited HTTP annotation:
  231. *
  232. * service Storage {
  233. * // Get the underlying ACL object.
  234. * rpc GetAcl(GetAclRequest) returns (Acl) {
  235. * option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
  236. * }
  237. * ...
  238. * }
  239. **/
  240. @interface GPBMixin : GPBMessage
  241. /** The fully qualified name of the API which is included. */
  242. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  243. /**
  244. * If non-empty specifies a path under which inherited HTTP paths
  245. * are rooted.
  246. **/
  247. @property(nonatomic, readwrite, copy, null_resettable) NSString *root;
  248. @end
  249. NS_ASSUME_NONNULL_END
  250. CF_EXTERN_C_END
  251. #pragma clang diagnostic pop
  252. // @@protoc_insertion_point(global_scope)