1ffe3c632Sopenharmony_ci// Generated by the protocol buffer compiler. DO NOT EDIT! 2ffe3c632Sopenharmony_ci// source: google/protobuf/field_mask.proto 3ffe3c632Sopenharmony_ci 4ffe3c632Sopenharmony_ci// This CPP symbol can be defined to use imports that match up to the framework 5ffe3c632Sopenharmony_ci// imports needed when using CocoaPods. 6ffe3c632Sopenharmony_ci#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS) 7ffe3c632Sopenharmony_ci #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0 8ffe3c632Sopenharmony_ci#endif 9ffe3c632Sopenharmony_ci 10ffe3c632Sopenharmony_ci#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 11ffe3c632Sopenharmony_ci #import <Protobuf/GPBDescriptor.h> 12ffe3c632Sopenharmony_ci #import <Protobuf/GPBMessage.h> 13ffe3c632Sopenharmony_ci #import <Protobuf/GPBRootObject.h> 14ffe3c632Sopenharmony_ci#else 15ffe3c632Sopenharmony_ci #import "GPBDescriptor.h" 16ffe3c632Sopenharmony_ci #import "GPBMessage.h" 17ffe3c632Sopenharmony_ci #import "GPBRootObject.h" 18ffe3c632Sopenharmony_ci#endif 19ffe3c632Sopenharmony_ci 20ffe3c632Sopenharmony_ci#if GOOGLE_PROTOBUF_OBJC_VERSION < 30004 21ffe3c632Sopenharmony_ci#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources. 22ffe3c632Sopenharmony_ci#endif 23ffe3c632Sopenharmony_ci#if 30004 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION 24ffe3c632Sopenharmony_ci#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources. 25ffe3c632Sopenharmony_ci#endif 26ffe3c632Sopenharmony_ci 27ffe3c632Sopenharmony_ci// @@protoc_insertion_point(imports) 28ffe3c632Sopenharmony_ci 29ffe3c632Sopenharmony_ci#pragma clang diagnostic push 30ffe3c632Sopenharmony_ci#pragma clang diagnostic ignored "-Wdeprecated-declarations" 31ffe3c632Sopenharmony_ci 32ffe3c632Sopenharmony_ciCF_EXTERN_C_BEGIN 33ffe3c632Sopenharmony_ci 34ffe3c632Sopenharmony_ciNS_ASSUME_NONNULL_BEGIN 35ffe3c632Sopenharmony_ci 36ffe3c632Sopenharmony_ci#pragma mark - GPBFieldMaskRoot 37ffe3c632Sopenharmony_ci 38ffe3c632Sopenharmony_ci/** 39ffe3c632Sopenharmony_ci * Exposes the extension registry for this file. 40ffe3c632Sopenharmony_ci * 41ffe3c632Sopenharmony_ci * The base class provides: 42ffe3c632Sopenharmony_ci * @code 43ffe3c632Sopenharmony_ci * + (GPBExtensionRegistry *)extensionRegistry; 44ffe3c632Sopenharmony_ci * @endcode 45ffe3c632Sopenharmony_ci * which is a @c GPBExtensionRegistry that includes all the extensions defined by 46ffe3c632Sopenharmony_ci * this file and all files that it depends on. 47ffe3c632Sopenharmony_ci **/ 48ffe3c632Sopenharmony_ciGPB_FINAL @interface GPBFieldMaskRoot : GPBRootObject 49ffe3c632Sopenharmony_ci@end 50ffe3c632Sopenharmony_ci 51ffe3c632Sopenharmony_ci#pragma mark - GPBFieldMask 52ffe3c632Sopenharmony_ci 53ffe3c632Sopenharmony_citypedef GPB_ENUM(GPBFieldMask_FieldNumber) { 54ffe3c632Sopenharmony_ci GPBFieldMask_FieldNumber_PathsArray = 1, 55ffe3c632Sopenharmony_ci}; 56ffe3c632Sopenharmony_ci 57ffe3c632Sopenharmony_ci/** 58ffe3c632Sopenharmony_ci * `FieldMask` represents a set of symbolic field paths, for example: 59ffe3c632Sopenharmony_ci * 60ffe3c632Sopenharmony_ci * paths: "f.a" 61ffe3c632Sopenharmony_ci * paths: "f.b.d" 62ffe3c632Sopenharmony_ci * 63ffe3c632Sopenharmony_ci * Here `f` represents a field in some root message, `a` and `b` 64ffe3c632Sopenharmony_ci * fields in the message found in `f`, and `d` a field found in the 65ffe3c632Sopenharmony_ci * message in `f.b`. 66ffe3c632Sopenharmony_ci * 67ffe3c632Sopenharmony_ci * Field masks are used to specify a subset of fields that should be 68ffe3c632Sopenharmony_ci * returned by a get operation or modified by an update operation. 69ffe3c632Sopenharmony_ci * Field masks also have a custom JSON encoding (see below). 70ffe3c632Sopenharmony_ci * 71ffe3c632Sopenharmony_ci * # Field Masks in Projections 72ffe3c632Sopenharmony_ci * 73ffe3c632Sopenharmony_ci * When used in the context of a projection, a response message or 74ffe3c632Sopenharmony_ci * sub-message is filtered by the API to only contain those fields as 75ffe3c632Sopenharmony_ci * specified in the mask. For example, if the mask in the previous 76ffe3c632Sopenharmony_ci * example is applied to a response message as follows: 77ffe3c632Sopenharmony_ci * 78ffe3c632Sopenharmony_ci * f { 79ffe3c632Sopenharmony_ci * a : 22 80ffe3c632Sopenharmony_ci * b { 81ffe3c632Sopenharmony_ci * d : 1 82ffe3c632Sopenharmony_ci * x : 2 83ffe3c632Sopenharmony_ci * } 84ffe3c632Sopenharmony_ci * y : 13 85ffe3c632Sopenharmony_ci * } 86ffe3c632Sopenharmony_ci * z: 8 87ffe3c632Sopenharmony_ci * 88ffe3c632Sopenharmony_ci * The result will not contain specific values for fields x,y and z 89ffe3c632Sopenharmony_ci * (their value will be set to the default, and omitted in proto text 90ffe3c632Sopenharmony_ci * output): 91ffe3c632Sopenharmony_ci * 92ffe3c632Sopenharmony_ci * 93ffe3c632Sopenharmony_ci * f { 94ffe3c632Sopenharmony_ci * a : 22 95ffe3c632Sopenharmony_ci * b { 96ffe3c632Sopenharmony_ci * d : 1 97ffe3c632Sopenharmony_ci * } 98ffe3c632Sopenharmony_ci * } 99ffe3c632Sopenharmony_ci * 100ffe3c632Sopenharmony_ci * A repeated field is not allowed except at the last position of a 101ffe3c632Sopenharmony_ci * paths string. 102ffe3c632Sopenharmony_ci * 103ffe3c632Sopenharmony_ci * If a FieldMask object is not present in a get operation, the 104ffe3c632Sopenharmony_ci * operation applies to all fields (as if a FieldMask of all fields 105ffe3c632Sopenharmony_ci * had been specified). 106ffe3c632Sopenharmony_ci * 107ffe3c632Sopenharmony_ci * Note that a field mask does not necessarily apply to the 108ffe3c632Sopenharmony_ci * top-level response message. In case of a REST get operation, the 109ffe3c632Sopenharmony_ci * field mask applies directly to the response, but in case of a REST 110ffe3c632Sopenharmony_ci * list operation, the mask instead applies to each individual message 111ffe3c632Sopenharmony_ci * in the returned resource list. In case of a REST custom method, 112ffe3c632Sopenharmony_ci * other definitions may be used. Where the mask applies will be 113ffe3c632Sopenharmony_ci * clearly documented together with its declaration in the API. In 114ffe3c632Sopenharmony_ci * any case, the effect on the returned resource/resources is required 115ffe3c632Sopenharmony_ci * behavior for APIs. 116ffe3c632Sopenharmony_ci * 117ffe3c632Sopenharmony_ci * # Field Masks in Update Operations 118ffe3c632Sopenharmony_ci * 119ffe3c632Sopenharmony_ci * A field mask in update operations specifies which fields of the 120ffe3c632Sopenharmony_ci * targeted resource are going to be updated. The API is required 121ffe3c632Sopenharmony_ci * to only change the values of the fields as specified in the mask 122ffe3c632Sopenharmony_ci * and leave the others untouched. If a resource is passed in to 123ffe3c632Sopenharmony_ci * describe the updated values, the API ignores the values of all 124ffe3c632Sopenharmony_ci * fields not covered by the mask. 125ffe3c632Sopenharmony_ci * 126ffe3c632Sopenharmony_ci * If a repeated field is specified for an update operation, new values will 127ffe3c632Sopenharmony_ci * be appended to the existing repeated field in the target resource. Note that 128ffe3c632Sopenharmony_ci * a repeated field is only allowed in the last position of a `paths` string. 129ffe3c632Sopenharmony_ci * 130ffe3c632Sopenharmony_ci * If a sub-message is specified in the last position of the field mask for an 131ffe3c632Sopenharmony_ci * update operation, then new value will be merged into the existing sub-message 132ffe3c632Sopenharmony_ci * in the target resource. 133ffe3c632Sopenharmony_ci * 134ffe3c632Sopenharmony_ci * For example, given the target message: 135ffe3c632Sopenharmony_ci * 136ffe3c632Sopenharmony_ci * f { 137ffe3c632Sopenharmony_ci * b { 138ffe3c632Sopenharmony_ci * d: 1 139ffe3c632Sopenharmony_ci * x: 2 140ffe3c632Sopenharmony_ci * } 141ffe3c632Sopenharmony_ci * c: [1] 142ffe3c632Sopenharmony_ci * } 143ffe3c632Sopenharmony_ci * 144ffe3c632Sopenharmony_ci * And an update message: 145ffe3c632Sopenharmony_ci * 146ffe3c632Sopenharmony_ci * f { 147ffe3c632Sopenharmony_ci * b { 148ffe3c632Sopenharmony_ci * d: 10 149ffe3c632Sopenharmony_ci * } 150ffe3c632Sopenharmony_ci * c: [2] 151ffe3c632Sopenharmony_ci * } 152ffe3c632Sopenharmony_ci * 153ffe3c632Sopenharmony_ci * then if the field mask is: 154ffe3c632Sopenharmony_ci * 155ffe3c632Sopenharmony_ci * paths: ["f.b", "f.c"] 156ffe3c632Sopenharmony_ci * 157ffe3c632Sopenharmony_ci * then the result will be: 158ffe3c632Sopenharmony_ci * 159ffe3c632Sopenharmony_ci * f { 160ffe3c632Sopenharmony_ci * b { 161ffe3c632Sopenharmony_ci * d: 10 162ffe3c632Sopenharmony_ci * x: 2 163ffe3c632Sopenharmony_ci * } 164ffe3c632Sopenharmony_ci * c: [1, 2] 165ffe3c632Sopenharmony_ci * } 166ffe3c632Sopenharmony_ci * 167ffe3c632Sopenharmony_ci * An implementation may provide options to override this default behavior for 168ffe3c632Sopenharmony_ci * repeated and message fields. 169ffe3c632Sopenharmony_ci * 170ffe3c632Sopenharmony_ci * In order to reset a field's value to the default, the field must 171ffe3c632Sopenharmony_ci * be in the mask and set to the default value in the provided resource. 172ffe3c632Sopenharmony_ci * Hence, in order to reset all fields of a resource, provide a default 173ffe3c632Sopenharmony_ci * instance of the resource and set all fields in the mask, or do 174ffe3c632Sopenharmony_ci * not provide a mask as described below. 175ffe3c632Sopenharmony_ci * 176ffe3c632Sopenharmony_ci * If a field mask is not present on update, the operation applies to 177ffe3c632Sopenharmony_ci * all fields (as if a field mask of all fields has been specified). 178ffe3c632Sopenharmony_ci * Note that in the presence of schema evolution, this may mean that 179ffe3c632Sopenharmony_ci * fields the client does not know and has therefore not filled into 180ffe3c632Sopenharmony_ci * the request will be reset to their default. If this is unwanted 181ffe3c632Sopenharmony_ci * behavior, a specific service may require a client to always specify 182ffe3c632Sopenharmony_ci * a field mask, producing an error if not. 183ffe3c632Sopenharmony_ci * 184ffe3c632Sopenharmony_ci * As with get operations, the location of the resource which 185ffe3c632Sopenharmony_ci * describes the updated values in the request message depends on the 186ffe3c632Sopenharmony_ci * operation kind. In any case, the effect of the field mask is 187ffe3c632Sopenharmony_ci * required to be honored by the API. 188ffe3c632Sopenharmony_ci * 189ffe3c632Sopenharmony_ci * ## Considerations for HTTP REST 190ffe3c632Sopenharmony_ci * 191ffe3c632Sopenharmony_ci * The HTTP kind of an update operation which uses a field mask must 192ffe3c632Sopenharmony_ci * be set to PATCH instead of PUT in order to satisfy HTTP semantics 193ffe3c632Sopenharmony_ci * (PUT must only be used for full updates). 194ffe3c632Sopenharmony_ci * 195ffe3c632Sopenharmony_ci * # JSON Encoding of Field Masks 196ffe3c632Sopenharmony_ci * 197ffe3c632Sopenharmony_ci * In JSON, a field mask is encoded as a single string where paths are 198ffe3c632Sopenharmony_ci * separated by a comma. Fields name in each path are converted 199ffe3c632Sopenharmony_ci * to/from lower-camel naming conventions. 200ffe3c632Sopenharmony_ci * 201ffe3c632Sopenharmony_ci * As an example, consider the following message declarations: 202ffe3c632Sopenharmony_ci * 203ffe3c632Sopenharmony_ci * message Profile { 204ffe3c632Sopenharmony_ci * User user = 1; 205ffe3c632Sopenharmony_ci * Photo photo = 2; 206ffe3c632Sopenharmony_ci * } 207ffe3c632Sopenharmony_ci * message User { 208ffe3c632Sopenharmony_ci * string display_name = 1; 209ffe3c632Sopenharmony_ci * string address = 2; 210ffe3c632Sopenharmony_ci * } 211ffe3c632Sopenharmony_ci * 212ffe3c632Sopenharmony_ci * In proto a field mask for `Profile` may look as such: 213ffe3c632Sopenharmony_ci * 214ffe3c632Sopenharmony_ci * mask { 215ffe3c632Sopenharmony_ci * paths: "user.display_name" 216ffe3c632Sopenharmony_ci * paths: "photo" 217ffe3c632Sopenharmony_ci * } 218ffe3c632Sopenharmony_ci * 219ffe3c632Sopenharmony_ci * In JSON, the same mask is represented as below: 220ffe3c632Sopenharmony_ci * 221ffe3c632Sopenharmony_ci * { 222ffe3c632Sopenharmony_ci * mask: "user.displayName,photo" 223ffe3c632Sopenharmony_ci * } 224ffe3c632Sopenharmony_ci * 225ffe3c632Sopenharmony_ci * # Field Masks and Oneof Fields 226ffe3c632Sopenharmony_ci * 227ffe3c632Sopenharmony_ci * Field masks treat fields in oneofs just as regular fields. Consider the 228ffe3c632Sopenharmony_ci * following message: 229ffe3c632Sopenharmony_ci * 230ffe3c632Sopenharmony_ci * message SampleMessage { 231ffe3c632Sopenharmony_ci * oneof test_oneof { 232ffe3c632Sopenharmony_ci * string name = 4; 233ffe3c632Sopenharmony_ci * SubMessage sub_message = 9; 234ffe3c632Sopenharmony_ci * } 235ffe3c632Sopenharmony_ci * } 236ffe3c632Sopenharmony_ci * 237ffe3c632Sopenharmony_ci * The field mask can be: 238ffe3c632Sopenharmony_ci * 239ffe3c632Sopenharmony_ci * mask { 240ffe3c632Sopenharmony_ci * paths: "name" 241ffe3c632Sopenharmony_ci * } 242ffe3c632Sopenharmony_ci * 243ffe3c632Sopenharmony_ci * Or: 244ffe3c632Sopenharmony_ci * 245ffe3c632Sopenharmony_ci * mask { 246ffe3c632Sopenharmony_ci * paths: "sub_message" 247ffe3c632Sopenharmony_ci * } 248ffe3c632Sopenharmony_ci * 249ffe3c632Sopenharmony_ci * Note that oneof type names ("test_oneof" in this case) cannot be used in 250ffe3c632Sopenharmony_ci * paths. 251ffe3c632Sopenharmony_ci * 252ffe3c632Sopenharmony_ci * ## Field Mask Verification 253ffe3c632Sopenharmony_ci * 254ffe3c632Sopenharmony_ci * The implementation of any API method which has a FieldMask type field in the 255ffe3c632Sopenharmony_ci * request should verify the included field paths, and return an 256ffe3c632Sopenharmony_ci * `INVALID_ARGUMENT` error if any path is unmappable. 257ffe3c632Sopenharmony_ci **/ 258ffe3c632Sopenharmony_ciGPB_FINAL @interface GPBFieldMask : GPBMessage 259ffe3c632Sopenharmony_ci 260ffe3c632Sopenharmony_ci/** The set of field mask paths. */ 261ffe3c632Sopenharmony_ci@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *pathsArray; 262ffe3c632Sopenharmony_ci/** The number of items in @c pathsArray without causing the array to be created. */ 263ffe3c632Sopenharmony_ci@property(nonatomic, readonly) NSUInteger pathsArray_Count; 264ffe3c632Sopenharmony_ci 265ffe3c632Sopenharmony_ci@end 266ffe3c632Sopenharmony_ci 267ffe3c632Sopenharmony_ciNS_ASSUME_NONNULL_END 268ffe3c632Sopenharmony_ci 269ffe3c632Sopenharmony_ciCF_EXTERN_C_END 270ffe3c632Sopenharmony_ci 271ffe3c632Sopenharmony_ci#pragma clang diagnostic pop 272ffe3c632Sopenharmony_ci 273ffe3c632Sopenharmony_ci// @@protoc_insertion_point(global_scope) 274