You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

307 lines
10 KiB

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