1 // <auto-generated> 2 // Generated by the protocol buffer compiler. DO NOT EDIT! 3 // source: google/protobuf/field_mask.proto 4 // </auto-generated> 5 #pragma warning disable 1591, 0612, 3021 6 #region Designer generated code 7 8 using pb = global::Google.Protobuf; 9 using pbc = global::Google.Protobuf.Collections; 10 using pbr = global::Google.Protobuf.Reflection; 11 using scg = global::System.Collections.Generic; 12 namespace Google.Protobuf.WellKnownTypes { 13 14 /// <summary>Holder for reflection information generated from google/protobuf/field_mask.proto</summary> 15 public static partial class FieldMaskReflection { 16 17 #region Descriptor 18 /// <summary>File descriptor for google/protobuf/field_mask.proto</summary> 19 public static pbr::FileDescriptor Descriptor { 20 get { return descriptor; } 21 } 22 private static pbr::FileDescriptor descriptor; 23 FieldMaskReflection()24 static FieldMaskReflection() { 25 byte[] descriptorData = global::System.Convert.FromBase64String( 26 string.Concat( 27 "CiBnb29nbGUvcHJvdG9idWYvZmllbGRfbWFzay5wcm90bxIPZ29vZ2xlLnBy", 28 "b3RvYnVmIhoKCUZpZWxkTWFzaxINCgVwYXRocxgBIAMoCUKFAQoTY29tLmdv", 29 "b2dsZS5wcm90b2J1ZkIORmllbGRNYXNrUHJvdG9QAVoyZ29vZ2xlLmdvbGFu", 30 "Zy5vcmcvcHJvdG9idWYvdHlwZXMva25vd24vZmllbGRtYXNrcGL4AQGiAgNH", 31 "UEKqAh5Hb29nbGUuUHJvdG9idWYuV2VsbEtub3duVHlwZXNiBnByb3RvMw==")); 32 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 33 new pbr::FileDescriptor[] { }, 34 new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { 35 new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.WellKnownTypes.FieldMask), global::Google.Protobuf.WellKnownTypes.FieldMask.Parser, new[]{ "Paths" }, null, null, null, null) 36 })); 37 } 38 #endregion 39 40 } 41 #region Messages 42 /// <summary> 43 /// `FieldMask` represents a set of symbolic field paths, for example: 44 /// 45 /// paths: "f.a" 46 /// paths: "f.b.d" 47 /// 48 /// Here `f` represents a field in some root message, `a` and `b` 49 /// fields in the message found in `f`, and `d` a field found in the 50 /// message in `f.b`. 51 /// 52 /// Field masks are used to specify a subset of fields that should be 53 /// returned by a get operation or modified by an update operation. 54 /// Field masks also have a custom JSON encoding (see below). 55 /// 56 /// # Field Masks in Projections 57 /// 58 /// When used in the context of a projection, a response message or 59 /// sub-message is filtered by the API to only contain those fields as 60 /// specified in the mask. For example, if the mask in the previous 61 /// example is applied to a response message as follows: 62 /// 63 /// f { 64 /// a : 22 65 /// b { 66 /// d : 1 67 /// x : 2 68 /// } 69 /// y : 13 70 /// } 71 /// z: 8 72 /// 73 /// The result will not contain specific values for fields x,y and z 74 /// (their value will be set to the default, and omitted in proto text 75 /// output): 76 /// 77 /// f { 78 /// a : 22 79 /// b { 80 /// d : 1 81 /// } 82 /// } 83 /// 84 /// A repeated field is not allowed except at the last position of a 85 /// paths string. 86 /// 87 /// If a FieldMask object is not present in a get operation, the 88 /// operation applies to all fields (as if a FieldMask of all fields 89 /// had been specified). 90 /// 91 /// Note that a field mask does not necessarily apply to the 92 /// top-level response message. In case of a REST get operation, the 93 /// field mask applies directly to the response, but in case of a REST 94 /// list operation, the mask instead applies to each individual message 95 /// in the returned resource list. In case of a REST custom method, 96 /// other definitions may be used. Where the mask applies will be 97 /// clearly documented together with its declaration in the API. In 98 /// any case, the effect on the returned resource/resources is required 99 /// behavior for APIs. 100 /// 101 /// # Field Masks in Update Operations 102 /// 103 /// A field mask in update operations specifies which fields of the 104 /// targeted resource are going to be updated. The API is required 105 /// to only change the values of the fields as specified in the mask 106 /// and leave the others untouched. If a resource is passed in to 107 /// describe the updated values, the API ignores the values of all 108 /// fields not covered by the mask. 109 /// 110 /// If a repeated field is specified for an update operation, new values will 111 /// be appended to the existing repeated field in the target resource. Note that 112 /// a repeated field is only allowed in the last position of a `paths` string. 113 /// 114 /// If a sub-message is specified in the last position of the field mask for an 115 /// update operation, then new value will be merged into the existing sub-message 116 /// in the target resource. 117 /// 118 /// For example, given the target message: 119 /// 120 /// f { 121 /// b { 122 /// d: 1 123 /// x: 2 124 /// } 125 /// c: [1] 126 /// } 127 /// 128 /// And an update message: 129 /// 130 /// f { 131 /// b { 132 /// d: 10 133 /// } 134 /// c: [2] 135 /// } 136 /// 137 /// then if the field mask is: 138 /// 139 /// paths: ["f.b", "f.c"] 140 /// 141 /// then the result will be: 142 /// 143 /// f { 144 /// b { 145 /// d: 10 146 /// x: 2 147 /// } 148 /// c: [1, 2] 149 /// } 150 /// 151 /// An implementation may provide options to override this default behavior for 152 /// repeated and message fields. 153 /// 154 /// In order to reset a field's value to the default, the field must 155 /// be in the mask and set to the default value in the provided resource. 156 /// Hence, in order to reset all fields of a resource, provide a default 157 /// instance of the resource and set all fields in the mask, or do 158 /// not provide a mask as described below. 159 /// 160 /// If a field mask is not present on update, the operation applies to 161 /// all fields (as if a field mask of all fields has been specified). 162 /// Note that in the presence of schema evolution, this may mean that 163 /// fields the client does not know and has therefore not filled into 164 /// the request will be reset to their default. If this is unwanted 165 /// behavior, a specific service may require a client to always specify 166 /// a field mask, producing an error if not. 167 /// 168 /// As with get operations, the location of the resource which 169 /// describes the updated values in the request message depends on the 170 /// operation kind. In any case, the effect of the field mask is 171 /// required to be honored by the API. 172 /// 173 /// ## Considerations for HTTP REST 174 /// 175 /// The HTTP kind of an update operation which uses a field mask must 176 /// be set to PATCH instead of PUT in order to satisfy HTTP semantics 177 /// (PUT must only be used for full updates). 178 /// 179 /// # JSON Encoding of Field Masks 180 /// 181 /// In JSON, a field mask is encoded as a single string where paths are 182 /// separated by a comma. Fields name in each path are converted 183 /// to/from lower-camel naming conventions. 184 /// 185 /// As an example, consider the following message declarations: 186 /// 187 /// message Profile { 188 /// User user = 1; 189 /// Photo photo = 2; 190 /// } 191 /// message User { 192 /// string display_name = 1; 193 /// string address = 2; 194 /// } 195 /// 196 /// In proto a field mask for `Profile` may look as such: 197 /// 198 /// mask { 199 /// paths: "user.display_name" 200 /// paths: "photo" 201 /// } 202 /// 203 /// In JSON, the same mask is represented as below: 204 /// 205 /// { 206 /// mask: "user.displayName,photo" 207 /// } 208 /// 209 /// # Field Masks and Oneof Fields 210 /// 211 /// Field masks treat fields in oneofs just as regular fields. Consider the 212 /// following message: 213 /// 214 /// message SampleMessage { 215 /// oneof test_oneof { 216 /// string name = 4; 217 /// SubMessage sub_message = 9; 218 /// } 219 /// } 220 /// 221 /// The field mask can be: 222 /// 223 /// mask { 224 /// paths: "name" 225 /// } 226 /// 227 /// Or: 228 /// 229 /// mask { 230 /// paths: "sub_message" 231 /// } 232 /// 233 /// Note that oneof type names ("test_oneof" in this case) cannot be used in 234 /// paths. 235 /// 236 /// ## Field Mask Verification 237 /// 238 /// The implementation of any API method which has a FieldMask type field in the 239 /// request should verify the included field paths, and return an 240 /// `INVALID_ARGUMENT` error if any path is unmappable. 241 /// </summary> 242 public sealed partial class FieldMask : pb::IMessage<FieldMask> 243 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 244 , pb::IBufferMessage 245 #endif 246 { 247 private static readonly pb::MessageParser<FieldMask> _parser = new pb::MessageParser<FieldMask>(() => new FieldMask()); 248 private pb::UnknownFieldSet _unknownFields; 249 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 250 public static pb::MessageParser<FieldMask> Parser { get { return _parser; } } 251 252 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 253 public static pbr::MessageDescriptor Descriptor { 254 get { return global::Google.Protobuf.WellKnownTypes.FieldMaskReflection.Descriptor.MessageTypes[0]; } 255 } 256 257 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 258 pbr::MessageDescriptor pb::IMessage.Descriptor { 259 get { return Descriptor; } 260 } 261 262 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] FieldMask()263 public FieldMask() { 264 OnConstruction(); 265 } 266 OnConstruction()267 partial void OnConstruction(); 268 269 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] FieldMask(FieldMask other)270 public FieldMask(FieldMask other) : this() { 271 paths_ = other.paths_.Clone(); 272 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 273 } 274 275 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Clone()276 public FieldMask Clone() { 277 return new FieldMask(this); 278 } 279 280 /// <summary>Field number for the "paths" field.</summary> 281 public const int PathsFieldNumber = 1; 282 private static readonly pb::FieldCodec<string> _repeated_paths_codec 283 = pb::FieldCodec.ForString(10); 284 private readonly pbc::RepeatedField<string> paths_ = new pbc::RepeatedField<string>(); 285 /// <summary> 286 /// The set of field mask paths. 287 /// </summary> 288 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 289 public pbc::RepeatedField<string> Paths { 290 get { return paths_; } 291 } 292 293 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(object other)294 public override bool Equals(object other) { 295 return Equals(other as FieldMask); 296 } 297 298 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] Equals(FieldMask other)299 public bool Equals(FieldMask other) { 300 if (ReferenceEquals(other, null)) { 301 return false; 302 } 303 if (ReferenceEquals(other, this)) { 304 return true; 305 } 306 if(!paths_.Equals(other.paths_)) return false; 307 return Equals(_unknownFields, other._unknownFields); 308 } 309 310 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] GetHashCode()311 public override int GetHashCode() { 312 int hash = 1; 313 hash ^= paths_.GetHashCode(); 314 if (_unknownFields != null) { 315 hash ^= _unknownFields.GetHashCode(); 316 } 317 return hash; 318 } 319 320 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] ToString()321 public override string ToString() { 322 return pb::JsonFormatter.ToDiagnosticString(this); 323 } 324 325 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] WriteTo(pb::CodedOutputStream output)326 public void WriteTo(pb::CodedOutputStream output) { 327 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 328 output.WriteRawMessage(this); 329 #else 330 paths_.WriteTo(output, _repeated_paths_codec); 331 if (_unknownFields != null) { 332 _unknownFields.WriteTo(output); 333 } 334 #endif 335 } 336 337 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 338 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)339 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 340 paths_.WriteTo(ref output, _repeated_paths_codec); 341 if (_unknownFields != null) { 342 _unknownFields.WriteTo(ref output); 343 } 344 } 345 #endif 346 347 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] CalculateSize()348 public int CalculateSize() { 349 int size = 0; 350 size += paths_.CalculateSize(_repeated_paths_codec); 351 if (_unknownFields != null) { 352 size += _unknownFields.CalculateSize(); 353 } 354 return size; 355 } 356 357 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(FieldMask other)358 public void MergeFrom(FieldMask other) { 359 if (other == null) { 360 return; 361 } 362 paths_.Add(other.paths_); 363 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 364 } 365 366 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] MergeFrom(pb::CodedInputStream input)367 public void MergeFrom(pb::CodedInputStream input) { 368 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 369 input.ReadRawMessage(this); 370 #else 371 uint tag; 372 while ((tag = input.ReadTag()) != 0) { 373 switch(tag) { 374 default: 375 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 376 break; 377 case 10: { 378 paths_.AddEntriesFrom(input, _repeated_paths_codec); 379 break; 380 } 381 } 382 } 383 #endif 384 } 385 386 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 387 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)388 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 389 uint tag; 390 while ((tag = input.ReadTag()) != 0) { 391 switch(tag) { 392 default: 393 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 394 break; 395 case 10: { 396 paths_.AddEntriesFrom(ref input, _repeated_paths_codec); 397 break; 398 } 399 } 400 } 401 } 402 #endif 403 404 } 405 406 #endregion 407 408 } 409 410 #endregion Designer generated code 411