• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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, 8981
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   [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")]
243   public sealed partial class FieldMask : pb::IMessage<FieldMask>
244   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
245       , pb::IBufferMessage
246   #endif
247   {
248     private static readonly pb::MessageParser<FieldMask> _parser = new pb::MessageParser<FieldMask>(() => new FieldMask());
249     private pb::UnknownFieldSet _unknownFields;
250     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
251     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
252     public static pb::MessageParser<FieldMask> Parser { get { return _parser; } }
253 
254     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
255     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
256     public static pbr::MessageDescriptor Descriptor {
257       get { return global::Google.Protobuf.WellKnownTypes.FieldMaskReflection.Descriptor.MessageTypes[0]; }
258     }
259 
260     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
261     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
262     pbr::MessageDescriptor pb::IMessage.Descriptor {
263       get { return Descriptor; }
264     }
265 
266     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
267     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
FieldMask()268     public FieldMask() {
269       OnConstruction();
270     }
271 
OnConstruction()272     partial void OnConstruction();
273 
274     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
275     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
FieldMask(FieldMask other)276     public FieldMask(FieldMask other) : this() {
277       paths_ = other.paths_.Clone();
278       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
279     }
280 
281     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
282     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Clone()283     public FieldMask Clone() {
284       return new FieldMask(this);
285     }
286 
287     /// <summary>Field number for the "paths" field.</summary>
288     public const int PathsFieldNumber = 1;
289     private static readonly pb::FieldCodec<string> _repeated_paths_codec
290         = pb::FieldCodec.ForString(10);
291     private readonly pbc::RepeatedField<string> paths_ = new pbc::RepeatedField<string>();
292     /// <summary>
293     /// The set of field mask paths.
294     /// </summary>
295     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
296     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
297     public pbc::RepeatedField<string> Paths {
298       get { return paths_; }
299     }
300 
301     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
302     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(object other)303     public override bool Equals(object other) {
304       return Equals(other as FieldMask);
305     }
306 
307     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
308     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
Equals(FieldMask other)309     public bool Equals(FieldMask other) {
310       if (ReferenceEquals(other, null)) {
311         return false;
312       }
313       if (ReferenceEquals(other, this)) {
314         return true;
315       }
316       if(!paths_.Equals(other.paths_)) return false;
317       return Equals(_unknownFields, other._unknownFields);
318     }
319 
320     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
321     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
GetHashCode()322     public override int GetHashCode() {
323       int hash = 1;
324       hash ^= paths_.GetHashCode();
325       if (_unknownFields != null) {
326         hash ^= _unknownFields.GetHashCode();
327       }
328       return hash;
329     }
330 
331     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
332     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
ToString()333     public override string ToString() {
334       return pb::JsonFormatter.ToDiagnosticString(this);
335     }
336 
337     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
338     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
WriteTo(pb::CodedOutputStream output)339     public void WriteTo(pb::CodedOutputStream output) {
340     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
341       output.WriteRawMessage(this);
342     #else
343       paths_.WriteTo(output, _repeated_paths_codec);
344       if (_unknownFields != null) {
345         _unknownFields.WriteTo(output);
346       }
347     #endif
348     }
349 
350     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
351     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
352     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)353     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
354       paths_.WriteTo(ref output, _repeated_paths_codec);
355       if (_unknownFields != null) {
356         _unknownFields.WriteTo(ref output);
357       }
358     }
359     #endif
360 
361     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
362     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
CalculateSize()363     public int CalculateSize() {
364       int size = 0;
365       size += paths_.CalculateSize(_repeated_paths_codec);
366       if (_unknownFields != null) {
367         size += _unknownFields.CalculateSize();
368       }
369       return size;
370     }
371 
372     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
373     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(FieldMask other)374     public void MergeFrom(FieldMask other) {
375       if (other == null) {
376         return;
377       }
378       paths_.Add(other.paths_);
379       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
380     }
381 
382     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
383     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
MergeFrom(pb::CodedInputStream input)384     public void MergeFrom(pb::CodedInputStream input) {
385     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
386       input.ReadRawMessage(this);
387     #else
388       uint tag;
389       while ((tag = input.ReadTag()) != 0) {
390       if ((tag & 7) == 4) {
391         // Abort on any end group tag.
392         return;
393       }
394       switch(tag) {
395           default:
396             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
397             break;
398           case 10: {
399             paths_.AddEntriesFrom(input, _repeated_paths_codec);
400             break;
401           }
402         }
403       }
404     #endif
405     }
406 
407     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
408     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
409     [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)410     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
411       uint tag;
412       while ((tag = input.ReadTag()) != 0) {
413       if ((tag & 7) == 4) {
414         // Abort on any end group tag.
415         return;
416       }
417       switch(tag) {
418           default:
419             _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
420             break;
421           case 10: {
422             paths_.AddEntriesFrom(ref input, _repeated_paths_codec);
423             break;
424           }
425         }
426       }
427     }
428     #endif
429 
430   }
431 
432   #endregion
433 
434 }
435 
436 #endregion Designer generated code
437