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, 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 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 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 78 public static pb::MessageParser<FooOptions> Parser { get { return _parser; } } 79 80 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 81 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 82 public static pbr::MessageDescriptor Descriptor { 83 get { return global::UnitTest.Issues.TestProtos.SelfreferentialOptions.UnittestSelfreferentialOptionsReflection.Descriptor.MessageTypes[0]; } 84 } 85 86 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 87 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 88 pbr::MessageDescriptor pb::IMessage.Descriptor { 89 get { return Descriptor; } 90 } 91 92 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 93 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] FooOptions()94 public FooOptions() { 95 OnConstruction(); 96 } 97 OnConstruction()98 partial void OnConstruction(); 99 100 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 101 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] FooOptions(FooOptions other)102 public FooOptions(FooOptions other) : this() { 103 _hasBits0 = other._hasBits0; 104 intOpt_ = other.intOpt_; 105 foo_ = other.foo_; 106 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 107 _extensions = pb::ExtensionSet.Clone(other._extensions); 108 } 109 110 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 111 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Clone()112 public FooOptions Clone() { 113 return new FooOptions(this); 114 } 115 116 /// <summary>Field number for the "int_opt" field.</summary> 117 public const int IntOptFieldNumber = 1; 118 private readonly static int IntOptDefaultValue = 0; 119 120 private int intOpt_; 121 /// <summary> 122 /// Custom field option used in definition of the extension message. 123 /// </summary> 124 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 125 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 126 public int IntOpt { 127 get { if ((_hasBits0 & 1) != 0) { return intOpt_; } else { return IntOptDefaultValue; } } 128 set { 129 _hasBits0 |= 1; 130 intOpt_ = value; 131 } 132 } 133 /// <summary>Gets whether the "int_opt" field is set</summary> 134 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 135 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 136 public bool HasIntOpt { 137 get { return (_hasBits0 & 1) != 0; } 138 } 139 /// <summary>Clears the value of the "int_opt" field</summary> 140 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 141 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearIntOpt()142 public void ClearIntOpt() { 143 _hasBits0 &= ~1; 144 } 145 146 /// <summary>Field number for the "foo" field.</summary> 147 public const int FooFieldNumber = 2; 148 private readonly static int FooDefaultValue = 0; 149 150 private int foo_; 151 /// <summary> 152 /// Custom field option used in definition of the custom option's message. 153 /// </summary> 154 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 155 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 156 public int Foo { 157 get { if ((_hasBits0 & 2) != 0) { return foo_; } else { return FooDefaultValue; } } 158 set { 159 _hasBits0 |= 2; 160 foo_ = value; 161 } 162 } 163 /// <summary>Gets whether the "foo" field is set</summary> 164 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 165 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 166 public bool HasFoo { 167 get { return (_hasBits0 & 2) != 0; } 168 } 169 /// <summary>Clears the value of the "foo" field</summary> 170 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 171 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearFoo()172 public void ClearFoo() { 173 _hasBits0 &= ~2; 174 } 175 176 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 177 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(object other)178 public override bool Equals(object other) { 179 return Equals(other as FooOptions); 180 } 181 182 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 183 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(FooOptions other)184 public bool Equals(FooOptions other) { 185 if (ReferenceEquals(other, null)) { 186 return false; 187 } 188 if (ReferenceEquals(other, this)) { 189 return true; 190 } 191 if (IntOpt != other.IntOpt) return false; 192 if (Foo != other.Foo) return false; 193 if (!Equals(_extensions, other._extensions)) { 194 return false; 195 } 196 return Equals(_unknownFields, other._unknownFields); 197 } 198 199 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 200 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] GetHashCode()201 public override int GetHashCode() { 202 int hash = 1; 203 if (HasIntOpt) hash ^= IntOpt.GetHashCode(); 204 if (HasFoo) hash ^= Foo.GetHashCode(); 205 if (_extensions != null) { 206 hash ^= _extensions.GetHashCode(); 207 } 208 if (_unknownFields != null) { 209 hash ^= _unknownFields.GetHashCode(); 210 } 211 return hash; 212 } 213 214 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 215 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ToString()216 public override string ToString() { 217 return pb::JsonFormatter.ToDiagnosticString(this); 218 } 219 220 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 221 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] WriteTo(pb::CodedOutputStream output)222 public void WriteTo(pb::CodedOutputStream output) { 223 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 224 output.WriteRawMessage(this); 225 #else 226 if (HasIntOpt) { 227 output.WriteRawTag(8); 228 output.WriteInt32(IntOpt); 229 } 230 if (HasFoo) { 231 output.WriteRawTag(16); 232 output.WriteInt32(Foo); 233 } 234 if (_extensions != null) { 235 _extensions.WriteTo(output); 236 } 237 if (_unknownFields != null) { 238 _unknownFields.WriteTo(output); 239 } 240 #endif 241 } 242 243 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 244 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 245 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)246 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 247 if (HasIntOpt) { 248 output.WriteRawTag(8); 249 output.WriteInt32(IntOpt); 250 } 251 if (HasFoo) { 252 output.WriteRawTag(16); 253 output.WriteInt32(Foo); 254 } 255 if (_extensions != null) { 256 _extensions.WriteTo(ref output); 257 } 258 if (_unknownFields != null) { 259 _unknownFields.WriteTo(ref output); 260 } 261 } 262 #endif 263 264 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 265 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] CalculateSize()266 public int CalculateSize() { 267 int size = 0; 268 if (HasIntOpt) { 269 size += 1 + pb::CodedOutputStream.ComputeInt32Size(IntOpt); 270 } 271 if (HasFoo) { 272 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Foo); 273 } 274 if (_extensions != null) { 275 size += _extensions.CalculateSize(); 276 } 277 if (_unknownFields != null) { 278 size += _unknownFields.CalculateSize(); 279 } 280 return size; 281 } 282 283 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 284 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(FooOptions other)285 public void MergeFrom(FooOptions other) { 286 if (other == null) { 287 return; 288 } 289 if (other.HasIntOpt) { 290 IntOpt = other.IntOpt; 291 } 292 if (other.HasFoo) { 293 Foo = other.Foo; 294 } 295 pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions); 296 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 297 } 298 299 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 300 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(pb::CodedInputStream input)301 public void MergeFrom(pb::CodedInputStream input) { 302 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 303 input.ReadRawMessage(this); 304 #else 305 uint tag; 306 while ((tag = input.ReadTag()) != 0) { 307 switch(tag) { 308 default: 309 if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) { 310 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 311 } 312 break; 313 case 8: { 314 IntOpt = input.ReadInt32(); 315 break; 316 } 317 case 16: { 318 Foo = input.ReadInt32(); 319 break; 320 } 321 } 322 } 323 #endif 324 } 325 326 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 327 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 328 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)329 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 330 uint tag; 331 while ((tag = input.ReadTag()) != 0) { 332 switch(tag) { 333 default: 334 if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, ref input)) { 335 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 336 } 337 break; 338 case 8: { 339 IntOpt = input.ReadInt32(); 340 break; 341 } 342 case 16: { 343 Foo = input.ReadInt32(); 344 break; 345 } 346 } 347 } 348 } 349 #endif 350 GetExtension(pb::Extension<FooOptions, TValue> extension)351 public TValue GetExtension<TValue>(pb::Extension<FooOptions, TValue> extension) { 352 return pb::ExtensionSet.Get(ref _extensions, extension); 353 } GetExtension(pb::RepeatedExtension<FooOptions, TValue> extension)354 public pbc::RepeatedField<TValue> GetExtension<TValue>(pb::RepeatedExtension<FooOptions, TValue> extension) { 355 return pb::ExtensionSet.Get(ref _extensions, extension); 356 } GetOrInitializeExtension(pb::RepeatedExtension<FooOptions, TValue> extension)357 public pbc::RepeatedField<TValue> GetOrInitializeExtension<TValue>(pb::RepeatedExtension<FooOptions, TValue> extension) { 358 return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); 359 } SetExtension(pb::Extension<FooOptions, TValue> extension, TValue value)360 public void SetExtension<TValue>(pb::Extension<FooOptions, TValue> extension, TValue value) { 361 pb::ExtensionSet.Set(ref _extensions, extension, value); 362 } HasExtension(pb::Extension<FooOptions, TValue> extension)363 public bool HasExtension<TValue>(pb::Extension<FooOptions, TValue> extension) { 364 return pb::ExtensionSet.Has(ref _extensions, extension); 365 } ClearExtension(pb::Extension<FooOptions, TValue> extension)366 public void ClearExtension<TValue>(pb::Extension<FooOptions, TValue> extension) { 367 pb::ExtensionSet.Clear(ref _extensions, extension); 368 } ClearExtension(pb::RepeatedExtension<FooOptions, TValue> extension)369 public void ClearExtension<TValue>(pb::RepeatedExtension<FooOptions, TValue> extension) { 370 pb::ExtensionSet.Clear(ref _extensions, extension); 371 } 372 373 } 374 375 #endregion 376 377 } 378 379 #endregion Designer generated code 380