GPBApi.pbobjc.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // clang-format off
  3. // source: google/protobuf/api.proto
  4. #import "GPBDescriptor.h"
  5. #import "GPBMessage.h"
  6. #import "GPBRootObject.h"
  7. #import "GPBSourceContext.pbobjc.h"
  8. #import "GPBType.pbobjc.h"
  9. #if GOOGLE_PROTOBUF_OBJC_VERSION < 30007
  10. #error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
  11. #endif
  12. #if 30007 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
  13. #error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
  14. #endif
  15. // @@protoc_insertion_point(imports)
  16. #pragma clang diagnostic push
  17. #pragma clang diagnostic ignored "-Wdeprecated-declarations"
  18. CF_EXTERN_C_BEGIN
  19. @class GPBMethod;
  20. @class GPBMixin;
  21. NS_ASSUME_NONNULL_BEGIN
  22. #pragma mark - GPBApiRoot
  23. /**
  24. * Exposes the extension registry for this file.
  25. *
  26. * The base class provides:
  27. * @code
  28. * + (GPBExtensionRegistry *)extensionRegistry;
  29. * @endcode
  30. * which is a @c GPBExtensionRegistry that includes all the extensions defined by
  31. * this file and all files that it depends on.
  32. **/
  33. GPB_FINAL @interface GPBApiRoot : GPBRootObject
  34. @end
  35. #pragma mark - GPBApi
  36. typedef GPB_ENUM(GPBApi_FieldNumber) {
  37. GPBApi_FieldNumber_Name = 1,
  38. GPBApi_FieldNumber_MethodsArray = 2,
  39. GPBApi_FieldNumber_OptionsArray = 3,
  40. GPBApi_FieldNumber_Version = 4,
  41. GPBApi_FieldNumber_SourceContext = 5,
  42. GPBApi_FieldNumber_MixinsArray = 6,
  43. GPBApi_FieldNumber_Syntax = 7,
  44. };
  45. /**
  46. * Api is a light-weight descriptor for an API Interface.
  47. *
  48. * Interfaces are also described as "protocol buffer services" in some contexts,
  49. * such as by the "service" keyword in a .proto file, but they are different
  50. * from API Services, which represent a concrete implementation of an interface
  51. * as opposed to simply a description of methods and bindings. They are also
  52. * sometimes simply referred to as "APIs" in other contexts, such as the name of
  53. * this message itself. See https://cloud.google.com/apis/design/glossary for
  54. * detailed terminology.
  55. **/
  56. GPB_FINAL @interface GPBApi : GPBMessage
  57. /**
  58. * The fully qualified name of this interface, including package name
  59. * followed by the interface's simple name.
  60. **/
  61. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  62. /** The methods of this interface, in unspecified order. */
  63. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBMethod*> *methodsArray;
  64. /** The number of items in @c methodsArray without causing the container to be created. */
  65. @property(nonatomic, readonly) NSUInteger methodsArray_Count;
  66. /** Any metadata attached to the interface. */
  67. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBOption*> *optionsArray;
  68. /** The number of items in @c optionsArray without causing the container to be created. */
  69. @property(nonatomic, readonly) NSUInteger optionsArray_Count;
  70. /**
  71. * A version string for this interface. If specified, must have the form
  72. * `major-version.minor-version`, as in `1.10`. If the minor version is
  73. * omitted, it defaults to zero. If the entire version field is empty, the
  74. * major version is derived from the package name, as outlined below. If the
  75. * field is not empty, the version in the package name will be verified to be
  76. * consistent with what is 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. * interface, 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, non-GA interfaces.
  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 interfaces. See [Mixin][]. */
  100. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBMixin*> *mixinsArray;
  101. /** The number of items in @c mixinsArray without causing the container to be created. */
  102. @property(nonatomic, readonly) NSUInteger mixinsArray_Count;
  103. /** The source syntax of the service. */
  104. @property(nonatomic, readwrite) 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 interface.
  129. **/
  130. GPB_FINAL @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 container to be created. */
  144. @property(nonatomic, readonly) NSUInteger optionsArray_Count;
  145. /** The source syntax of this method. */
  146. @property(nonatomic, readwrite) 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 Interface to be included in this interface. The including
  166. * interface must redeclare all the methods from the included interface, but
  167. * documentation 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 interface plus the [root][] path if
  180. * specified.
  181. *
  182. * Example of a simple mixin:
  183. *
  184. * package google.acl.v1;
  185. * service AccessControl {
  186. * // Get the underlying ACL object.
  187. * rpc GetAcl(GetAclRequest) returns (Acl) {
  188. * option (google.api.http).get = "/v1/{resource=**}:getAcl";
  189. * }
  190. * }
  191. *
  192. * package google.storage.v2;
  193. * service Storage {
  194. * rpc GetAcl(GetAclRequest) returns (Acl);
  195. *
  196. * // Get a data record.
  197. * rpc GetData(GetDataRequest) returns (Data) {
  198. * option (google.api.http).get = "/v2/{resource=**}";
  199. * }
  200. * }
  201. *
  202. * Example of a mixin configuration:
  203. *
  204. * apis:
  205. * - name: google.storage.v2.Storage
  206. * mixins:
  207. * - name: google.acl.v1.AccessControl
  208. *
  209. * The mixin construct implies that all methods in `AccessControl` are
  210. * also declared with same name and request/response types in
  211. * `Storage`. A documentation generator or annotation processor will
  212. * see the effective `Storage.GetAcl` method after inherting
  213. * documentation and annotations as follows:
  214. *
  215. * service Storage {
  216. * // Get the underlying ACL object.
  217. * rpc GetAcl(GetAclRequest) returns (Acl) {
  218. * option (google.api.http).get = "/v2/{resource=**}:getAcl";
  219. * }
  220. * ...
  221. * }
  222. *
  223. * Note how the version in the path pattern changed from `v1` to `v2`.
  224. *
  225. * If the `root` field in the mixin is specified, it should be a
  226. * relative path under which inherited HTTP paths are placed. Example:
  227. *
  228. * apis:
  229. * - name: google.storage.v2.Storage
  230. * mixins:
  231. * - name: google.acl.v1.AccessControl
  232. * root: acls
  233. *
  234. * This implies the following inherited HTTP annotation:
  235. *
  236. * service Storage {
  237. * // Get the underlying ACL object.
  238. * rpc GetAcl(GetAclRequest) returns (Acl) {
  239. * option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
  240. * }
  241. * ...
  242. * }
  243. **/
  244. GPB_FINAL @interface GPBMixin : GPBMessage
  245. /** The fully qualified name of the interface which is included. */
  246. @property(nonatomic, readwrite, copy, null_resettable) NSString *name;
  247. /**
  248. * If non-empty specifies a path under which inherited HTTP paths
  249. * are rooted.
  250. **/
  251. @property(nonatomic, readwrite, copy, null_resettable) NSString *root;
  252. @end
  253. NS_ASSUME_NONNULL_END
  254. CF_EXTERN_C_END
  255. #pragma clang diagnostic pop
  256. // @@protoc_insertion_point(global_scope)
  257. // clang-format on