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