Api.pbobjc.h 7.9 KB

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