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