GPBApi.pbobjc.h 10 KB

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