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