• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // <auto-generated>
2 //     Generated by the protocol buffer compiler.  DO NOT EDIT!
3 //     source: unittest_selfreferential_options.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 UnitTest.Issues.TestProtos.SelfreferentialOptions {
13 
14   /// <summary>Holder for reflection information generated from unittest_selfreferential_options.proto</summary>
15   public static partial class UnittestSelfreferentialOptionsReflection {
16 
17     #region Descriptor
18     /// <summary>File descriptor for unittest_selfreferential_options.proto</summary>
19     public static pbr::FileDescriptor Descriptor {
20       get { return descriptor; }
21     }
22     private static pbr::FileDescriptor descriptor;
23 
UnittestSelfreferentialOptionsReflection()24     static UnittestSelfreferentialOptionsReflection() {
25       byte[] descriptorData = global::System.Convert.FromBase64String(
26           string.Concat(
27             "CiZ1bml0dGVzdF9zZWxmcmVmZXJlbnRpYWxfb3B0aW9ucy5wcm90bxIpcHJv",
28             "dG9idWZfdW5pdHRlc3Rfc2VsZnJlZmVyZW50aWFsX29wdGlvbnMaIGdvb2ds",
29             "ZS9wcm90b2J1Zi9kZXNjcmlwdG9yLnByb3RvIkwKCkZvb09wdGlvbnMSHgoH",
30             "aW50X29wdBgBIAEoBUINyj4KCAHAPgLKPgIIAxITCgNmb28YAiABKAVCBso+",
31             "AxDSCSoJCOgHEICAgIACOjkKC2Jhcl9vcHRpb25zEh0uZ29vZ2xlLnByb3Rv",
32             "YnVmLkZpZWxkT3B0aW9ucxjoByABKAVCBMA+0gk6agoLZm9vX29wdGlvbnMS",
33             "HS5nb29nbGUucHJvdG9idWYuRmllbGRPcHRpb25zGOkHIAEoCzI1LnByb3Rv",
34             "YnVmX3VuaXR0ZXN0X3NlbGZyZWZlcmVudGlhbF9vcHRpb25zLkZvb09wdGlv",
35             "bnM6SwoLZm9vX2ludF9vcHQSNS5wcm90b2J1Zl91bml0dGVzdF9zZWxmcmVm",
36             "ZXJlbnRpYWxfb3B0aW9ucy5Gb29PcHRpb25zGOgHIAEoBTqCAQoLZm9vX2Zv",
37             "b19vcHQSNS5wcm90b2J1Zl91bml0dGVzdF9zZWxmcmVmZXJlbnRpYWxfb3B0",
38             "aW9ucy5Gb29PcHRpb25zGOkHIAEoCzI1LnByb3RvYnVmX3VuaXR0ZXN0X3Nl",
39             "bGZyZWZlcmVudGlhbF9vcHRpb25zLkZvb09wdGlvbnNCNKoCMVVuaXRUZXN0",
40             "Lklzc3Vlcy5UZXN0UHJvdG9zLlNlbGZyZWZlcmVudGlhbE9wdGlvbnM="));
41       descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
42           new pbr::FileDescriptor[] { global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor, },
43           new pbr::GeneratedClrTypeInfo(null, new pb::Extension[] { UnittestSelfreferentialOptionsExtensions.BarOptions, UnittestSelfreferentialOptionsExtensions.FooOptions, UnittestSelfreferentialOptionsExtensions.FooIntOpt, UnittestSelfreferentialOptionsExtensions.FooFooOpt }, new pbr::GeneratedClrTypeInfo[] {
44             new pbr::GeneratedClrTypeInfo(typeof(global::UnitTest.Issues.TestProtos.SelfreferentialOptions.FooOptions), global::UnitTest.Issues.TestProtos.SelfreferentialOptions.FooOptions.Parser, new[]{ "IntOpt", "Foo" }, null, null, null, null)
45           }));
46     }
47     #endregion
48 
49   }
50   /// <summary>Holder for extension identifiers generated from the top level of unittest_selfreferential_options.proto</summary>
51   public static partial class UnittestSelfreferentialOptionsExtensions {
52     /// <summary>
53     /// Custom field option used on the definition of that field option.
54     /// </summary>
55     public static readonly pb::Extension<global::Google.Protobuf.Reflection.FieldOptions, int> BarOptions =
56       new pb::Extension<global::Google.Protobuf.Reflection.FieldOptions, int>(1000, pb::FieldCodec.ForInt32(8000, 0));
57     public static readonly pb::Extension<global::Google.Protobuf.Reflection.FieldOptions, global::UnitTest.Issues.TestProtos.SelfreferentialOptions.FooOptions> FooOptions =
58       new pb::Extension<global::Google.Protobuf.Reflection.FieldOptions, global::UnitTest.Issues.TestProtos.SelfreferentialOptions.FooOptions>(1001, pb::FieldCodec.ForMessage(8010, global::UnitTest.Issues.TestProtos.SelfreferentialOptions.FooOptions.Parser));
59     public static readonly pb::Extension<global::UnitTest.Issues.TestProtos.SelfreferentialOptions.FooOptions, int> FooIntOpt =
60       new pb::Extension<global::UnitTest.Issues.TestProtos.SelfreferentialOptions.FooOptions, int>(1000, pb::FieldCodec.ForInt32(8000, 0));
61     public static readonly pb::Extension<global::UnitTest.Issues.TestProtos.SelfreferentialOptions.FooOptions, global::UnitTest.Issues.TestProtos.SelfreferentialOptions.FooOptions> FooFooOpt =
62       new pb::Extension<global::UnitTest.Issues.TestProtos.SelfreferentialOptions.FooOptions, global::UnitTest.Issues.TestProtos.SelfreferentialOptions.FooOptions>(1001, pb::FieldCodec.ForMessage(8010, global::UnitTest.Issues.TestProtos.SelfreferentialOptions.FooOptions.Parser));
63   }
64 
65   #region Messages
66   public sealed partial class FooOptions : pb::IExtendableMessage<FooOptions>
67   #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
68       , pb::IBufferMessage
69   #endif
70   {
71     private static readonly pb::MessageParser<FooOptions> _parser = new pb::MessageParser<FooOptions>(() => new FooOptions());
72     private pb::UnknownFieldSet _unknownFields;
73     private pb::ExtensionSet<FooOptions> _extensions;
74     private pb::ExtensionSet<FooOptions> _Extensions { get { return _extensions; } }
75     private int _hasBits0;
76     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
77     public static pb::MessageParser<FooOptions> Parser { get { return _parser; } }
78 
79     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
80     public static pbr::MessageDescriptor Descriptor {
81       get { return global::UnitTest.Issues.TestProtos.SelfreferentialOptions.UnittestSelfreferentialOptionsReflection.Descriptor.MessageTypes[0]; }
82     }
83 
84     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
85     pbr::MessageDescriptor pb::IMessage.Descriptor {
86       get { return Descriptor; }
87     }
88 
89     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
FooOptions()90     public FooOptions() {
91       OnConstruction();
92     }
93 
OnConstruction()94     partial void OnConstruction();
95 
96     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
FooOptions(FooOptions other)97     public FooOptions(FooOptions other) : this() {
98       _hasBits0 = other._hasBits0;
99       intOpt_ = other.intOpt_;
100       foo_ = other.foo_;
101       _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
102       _extensions = pb::ExtensionSet.Clone(other._extensions);
103     }
104 
105     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Clone()106     public FooOptions Clone() {
107       return new FooOptions(this);
108     }
109 
110     /// <summary>Field number for the "int_opt" field.</summary>
111     public const int IntOptFieldNumber = 1;
112     private readonly static int IntOptDefaultValue = 0;
113 
114     private int intOpt_;
115     /// <summary>
116     /// Custom field option used in definition of the extension message.
117     /// </summary>
118     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
119     public int IntOpt {
120       get { if ((_hasBits0 & 1) != 0) { return intOpt_; } else { return IntOptDefaultValue; } }
121       set {
122         _hasBits0 |= 1;
123         intOpt_ = value;
124       }
125     }
126     /// <summary>Gets whether the "int_opt" field is set</summary>
127     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
128     public bool HasIntOpt {
129       get { return (_hasBits0 & 1) != 0; }
130     }
131     /// <summary>Clears the value of the "int_opt" field</summary>
132     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ClearIntOpt()133     public void ClearIntOpt() {
134       _hasBits0 &= ~1;
135     }
136 
137     /// <summary>Field number for the "foo" field.</summary>
138     public const int FooFieldNumber = 2;
139     private readonly static int FooDefaultValue = 0;
140 
141     private int foo_;
142     /// <summary>
143     /// Custom field option used in definition of the custom option's message.
144     /// </summary>
145     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
146     public int Foo {
147       get { if ((_hasBits0 & 2) != 0) { return foo_; } else { return FooDefaultValue; } }
148       set {
149         _hasBits0 |= 2;
150         foo_ = value;
151       }
152     }
153     /// <summary>Gets whether the "foo" field is set</summary>
154     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
155     public bool HasFoo {
156       get { return (_hasBits0 & 2) != 0; }
157     }
158     /// <summary>Clears the value of the "foo" field</summary>
159     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ClearFoo()160     public void ClearFoo() {
161       _hasBits0 &= ~2;
162     }
163 
164     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(object other)165     public override bool Equals(object other) {
166       return Equals(other as FooOptions);
167     }
168 
169     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
Equals(FooOptions other)170     public bool Equals(FooOptions other) {
171       if (ReferenceEquals(other, null)) {
172         return false;
173       }
174       if (ReferenceEquals(other, this)) {
175         return true;
176       }
177       if (IntOpt != other.IntOpt) return false;
178       if (Foo != other.Foo) return false;
179       if (!Equals(_extensions, other._extensions)) {
180         return false;
181       }
182       return Equals(_unknownFields, other._unknownFields);
183     }
184 
185     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
GetHashCode()186     public override int GetHashCode() {
187       int hash = 1;
188       if (HasIntOpt) hash ^= IntOpt.GetHashCode();
189       if (HasFoo) hash ^= Foo.GetHashCode();
190       if (_extensions != null) {
191         hash ^= _extensions.GetHashCode();
192       }
193       if (_unknownFields != null) {
194         hash ^= _unknownFields.GetHashCode();
195       }
196       return hash;
197     }
198 
199     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
ToString()200     public override string ToString() {
201       return pb::JsonFormatter.ToDiagnosticString(this);
202     }
203 
204     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
WriteTo(pb::CodedOutputStream output)205     public void WriteTo(pb::CodedOutputStream output) {
206     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
207       output.WriteRawMessage(this);
208     #else
209       if (HasIntOpt) {
210         output.WriteRawTag(8);
211         output.WriteInt32(IntOpt);
212       }
213       if (HasFoo) {
214         output.WriteRawTag(16);
215         output.WriteInt32(Foo);
216       }
217       if (_extensions != null) {
218         _extensions.WriteTo(output);
219       }
220       if (_unknownFields != null) {
221         _unknownFields.WriteTo(output);
222       }
223     #endif
224     }
225 
226     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
227     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalWriteTo(ref pb::WriteContext output)228     void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
229       if (HasIntOpt) {
230         output.WriteRawTag(8);
231         output.WriteInt32(IntOpt);
232       }
233       if (HasFoo) {
234         output.WriteRawTag(16);
235         output.WriteInt32(Foo);
236       }
237       if (_extensions != null) {
238         _extensions.WriteTo(ref output);
239       }
240       if (_unknownFields != null) {
241         _unknownFields.WriteTo(ref output);
242       }
243     }
244     #endif
245 
246     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
CalculateSize()247     public int CalculateSize() {
248       int size = 0;
249       if (HasIntOpt) {
250         size += 1 + pb::CodedOutputStream.ComputeInt32Size(IntOpt);
251       }
252       if (HasFoo) {
253         size += 1 + pb::CodedOutputStream.ComputeInt32Size(Foo);
254       }
255       if (_extensions != null) {
256         size += _extensions.CalculateSize();
257       }
258       if (_unknownFields != null) {
259         size += _unknownFields.CalculateSize();
260       }
261       return size;
262     }
263 
264     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(FooOptions other)265     public void MergeFrom(FooOptions other) {
266       if (other == null) {
267         return;
268       }
269       if (other.HasIntOpt) {
270         IntOpt = other.IntOpt;
271       }
272       if (other.HasFoo) {
273         Foo = other.Foo;
274       }
275       pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions);
276       _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
277     }
278 
279     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
MergeFrom(pb::CodedInputStream input)280     public void MergeFrom(pb::CodedInputStream input) {
281     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
282       input.ReadRawMessage(this);
283     #else
284       uint tag;
285       while ((tag = input.ReadTag()) != 0) {
286         switch(tag) {
287           default:
288             if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) {
289               _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
290             }
291             break;
292           case 8: {
293             IntOpt = input.ReadInt32();
294             break;
295           }
296           case 16: {
297             Foo = input.ReadInt32();
298             break;
299           }
300         }
301       }
302     #endif
303     }
304 
305     #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
306     [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)307     void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
308       uint tag;
309       while ((tag = input.ReadTag()) != 0) {
310         switch(tag) {
311           default:
312             if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, ref input)) {
313               _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
314             }
315             break;
316           case 8: {
317             IntOpt = input.ReadInt32();
318             break;
319           }
320           case 16: {
321             Foo = input.ReadInt32();
322             break;
323           }
324         }
325       }
326     }
327     #endif
328 
GetExtension(pb::Extension<FooOptions, TValue> extension)329     public TValue GetExtension<TValue>(pb::Extension<FooOptions, TValue> extension) {
330       return pb::ExtensionSet.Get(ref _extensions, extension);
331     }
GetExtension(pb::RepeatedExtension<FooOptions, TValue> extension)332     public pbc::RepeatedField<TValue> GetExtension<TValue>(pb::RepeatedExtension<FooOptions, TValue> extension) {
333       return pb::ExtensionSet.Get(ref _extensions, extension);
334     }
GetOrInitializeExtension(pb::RepeatedExtension<FooOptions, TValue> extension)335     public pbc::RepeatedField<TValue> GetOrInitializeExtension<TValue>(pb::RepeatedExtension<FooOptions, TValue> extension) {
336       return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension);
337     }
SetExtension(pb::Extension<FooOptions, TValue> extension, TValue value)338     public void SetExtension<TValue>(pb::Extension<FooOptions, TValue> extension, TValue value) {
339       pb::ExtensionSet.Set(ref _extensions, extension, value);
340     }
HasExtension(pb::Extension<FooOptions, TValue> extension)341     public bool HasExtension<TValue>(pb::Extension<FooOptions, TValue> extension) {
342       return pb::ExtensionSet.Has(ref _extensions, extension);
343     }
ClearExtension(pb::Extension<FooOptions, TValue> extension)344     public void ClearExtension<TValue>(pb::Extension<FooOptions, TValue> extension) {
345       pb::ExtensionSet.Clear(ref _extensions, extension);
346     }
ClearExtension(pb::RepeatedExtension<FooOptions, TValue> extension)347     public void ClearExtension<TValue>(pb::RepeatedExtension<FooOptions, TValue> extension) {
348       pb::ExtensionSet.Clear(ref _extensions, extension);
349     }
350 
351   }
352 
353   #endregion
354 
355 }
356 
357 #endregion Designer generated code
358