Api.pbobjc.h 7.9 KB

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