Api.pbobjc.h 9.1 KB

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