GPBApi.pbobjc.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/api.proto
  3. #import "GPBDescriptor.h"
  4. #import "GPBMessage.h"
  5. #import "GPBRootObject.h"
  6. #import "GPBSourceContext.pbobjc.h"
  7. #import "GPBType.pbobjc.h"
  8. #if GOOGLE_PROTOBUF_OBJC_VERSION < 30004
  9. #error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
  10. #endif
  11. #if 30004 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
  12. #error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
  13. #endif
  14. // @@protoc_insertion_point(imports)
  15. #pragma clang diagnostic push
  16. #pragma clang diagnostic ignored "-Wdeprecated-declarations"
  17. CF_EXTERN_C_BEGIN
  18. @class GPBMethod;
  19. @class GPBMixin;
  20. NS_ASSUME_NONNULL_BEGIN
  21. #pragma mark - GPBApiRoot
  22. /**
  23. * Exposes the extension registry for this file.
  24. *
  25. * The base class provides:
  26. * @code
  27. * + (GPBExtensionRegistry *)extensionRegistry;
  28. * @endcode
  29. * which is a @c GPBExtensionRegistry that includes all the extensions defined by
  30. * this file and all files that it depends on.
  31. **/
  32. GPB_FINAL @interface GPBApiRoot : GPBRootObject
  33. @end
  34. #pragma mark - GPBApi
  35. typedef GPB_ENUM(GPBApi_FieldNumber) {
  36. GPBApi_FieldNumber_Name = 1,
  37. GPBApi_FieldNumber_MethodsArray = 2,
  38. GPBApi_FieldNumber_OptionsArray = 3,
  39. GPBApi_FieldNumber_Version = 4,
  40. GPBApi_FieldNumber_SourceContext = 5,
  41. GPBApi_FieldNumber_MixinsArray = 6,
  42. GPBApi_FieldNumber_Syntax = 7,
  43. };
  44. /**
  45. * Api is a light-weight descriptor for an API Interface.
  46. *
  47. * Interfaces are also described as "protocol buffer services" in some contexts,
  48. * such as by the "service" keyword in a .proto file, but they are different
  49. * from API Services, which represent a concrete implementation of an interface
  50. * as opposed to simply a description of methods and bindings. They are also
  51. * sometimes simply referred to as "APIs" in other contexts, such as the name of
  52. * this message itself. See https://cloud.google.com/apis/design/glossary for
  53. * detailed terminology.
  54. **/
  55. GPB_FINAL @interface GPBApi : GPBMessage
  56. /**
  57. * The fully qualified name of this interface, including package name
  58. * followed by the interface's simple name.
  59. **/
  60. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  61. /** The methods of this interface, 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 interface. */
  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 interface. If specified, must have the form
  71. * `major-version.minor-version`, as in `1.10`. If the minor version is
  72. * omitted, it defaults to zero. If the entire version field is empty, the
  73. * major version is derived from the package name, as outlined below. If the
  74. * field is not empty, the version in the package name will be verified to be
  75. * consistent with what is provided here.
  76. *
  77. * The versioning schema uses [semantic
  78. * versioning](http://semver.org) where the major version number
  79. * indicates a breaking change and the minor version an additive,
  80. * non-breaking change. Both version numbers are signals to users
  81. * what to expect from different versions, and should be carefully
  82. * chosen based on the product plan.
  83. *
  84. * The major version is also reflected in the package name of the
  85. * interface, which must end in `v<major-version>`, as in
  86. * `google.feature.v1`. For major versions 0 and 1, the suffix can
  87. * be omitted. Zero major versions must only be used for
  88. * experimental, non-GA interfaces.
  89. **/
  90. @property(nonatomic, readwrite, copy, null_resettable) NSString *version;
  91. /**
  92. * Source context for the protocol buffer service represented by this
  93. * message.
  94. **/
  95. @property(nonatomic, readwrite, strong, null_resettable) GPBSourceContext *sourceContext;
  96. /** Test to see if @c sourceContext has been set. */
  97. @property(nonatomic, readwrite) BOOL hasSourceContext;
  98. /** Included interfaces. See [Mixin][]. */
  99. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBMixin*> *mixinsArray;
  100. /** The number of items in @c mixinsArray without causing the array to be created. */
  101. @property(nonatomic, readonly) NSUInteger mixinsArray_Count;
  102. /** The source syntax of the service. */
  103. @property(nonatomic, readwrite) enum GPBSyntax syntax;
  104. @end
  105. /**
  106. * Fetches the raw value of a @c GPBApi's @c syntax property, even
  107. * if the value was not defined by the enum at the time the code was generated.
  108. **/
  109. int32_t GPBApi_Syntax_RawValue(GPBApi *message);
  110. /**
  111. * Sets the raw value of an @c GPBApi's @c syntax property, allowing
  112. * it to be set to a value that was not defined by the enum at the time the code
  113. * was generated.
  114. **/
  115. void SetGPBApi_Syntax_RawValue(GPBApi *message, int32_t value);
  116. #pragma mark - GPBMethod
  117. typedef GPB_ENUM(GPBMethod_FieldNumber) {
  118. GPBMethod_FieldNumber_Name = 1,
  119. GPBMethod_FieldNumber_RequestTypeURL = 2,
  120. GPBMethod_FieldNumber_RequestStreaming = 3,
  121. GPBMethod_FieldNumber_ResponseTypeURL = 4,
  122. GPBMethod_FieldNumber_ResponseStreaming = 5,
  123. GPBMethod_FieldNumber_OptionsArray = 6,
  124. GPBMethod_FieldNumber_Syntax = 7,
  125. };
  126. /**
  127. * Method represents a method of an API interface.
  128. **/
  129. GPB_FINAL @interface GPBMethod : GPBMessage
  130. /** The simple name of this method. */
  131. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  132. /** A URL of the input message type. */
  133. @property(nonatomic, readwrite, copy, null_resettable) NSString *requestTypeURL;
  134. /** If true, the request is streamed. */
  135. @property(nonatomic, readwrite) BOOL requestStreaming;
  136. /** The URL of the output message type. */
  137. @property(nonatomic, readwrite, copy, null_resettable) NSString *responseTypeURL;
  138. /** If true, the response is streamed. */
  139. @property(nonatomic, readwrite) BOOL responseStreaming;
  140. /** Any metadata attached to the method. */
  141. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
  142. /** The number of items in @c optionsArray without causing the array to be created. */
  143. @property(nonatomic, readonly) NSUInteger optionsArray_Count;
  144. /** The source syntax of this method. */
  145. @property(nonatomic, readwrite) enum GPBSyntax syntax;
  146. @end
  147. /**
  148. * Fetches the raw value of a @c GPBMethod's @c syntax property, even
  149. * if the value was not defined by the enum at the time the code was generated.
  150. **/
  151. int32_t GPBMethod_Syntax_RawValue(GPBMethod *message);
  152. /**
  153. * Sets the raw value of an @c GPBMethod's @c syntax property, allowing
  154. * it to be set to a value that was not defined by the enum at the time the code
  155. * was generated.
  156. **/
  157. void SetGPBMethod_Syntax_RawValue(GPBMethod *message, int32_t value);
  158. #pragma mark - GPBMixin
  159. typedef GPB_ENUM(GPBMixin_FieldNumber) {
  160. GPBMixin_FieldNumber_Name = 1,
  161. GPBMixin_FieldNumber_Root = 2,
  162. };
  163. /**
  164. * Declares an API Interface to be included in this interface. The including
  165. * interface must redeclare all the methods from the included interface, but
  166. * documentation and options are inherited as follows:
  167. *
  168. * - If after comment and whitespace stripping, the documentation
  169. * string of the redeclared method is empty, it will be inherited
  170. * from the original method.
  171. *
  172. * - Each annotation belonging to the service config (http,
  173. * visibility) which is not set in the redeclared method will be
  174. * inherited.
  175. *
  176. * - If an http annotation is inherited, the path pattern will be
  177. * modified as follows. Any version prefix will be replaced by the
  178. * version of the including interface plus the [root][] path if
  179. * 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 inheriting
  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. GPB_FINAL @interface GPBMixin : GPBMessage
  244. /** The fully qualified name of the interface 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)