GPBApi.pbobjc.h 10 KB

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