Jan Tattermusch | dd013bd | 2020-04-30 17:07:42 +0200 | [diff] [blame] | 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 | |
| 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 |
Jan Tattermusch | 7cb5597 | 2020-06-02 09:26:25 +0200 | [diff] [blame^] | 66 | public sealed partial class FooOptions : pb::IExtendableMessage<FooOptions> |
| 67 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE |
| 68 | , pb::IBufferMessage |
| 69 | #endif |
| 70 | { |
Jan Tattermusch | dd013bd | 2020-04-30 17:07:42 +0200 | [diff] [blame] | 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] |
| 90 | public FooOptions() { |
| 91 | OnConstruction(); |
| 92 | } |
| 93 | |
| 94 | partial void OnConstruction(); |
| 95 | |
| 96 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 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] |
| 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] |
| 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] |
| 160 | public void ClearFoo() { |
| 161 | _hasBits0 &= ~2; |
| 162 | } |
| 163 | |
| 164 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 165 | public override bool Equals(object other) { |
| 166 | return Equals(other as FooOptions); |
| 167 | } |
| 168 | |
| 169 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 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] |
| 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] |
| 200 | public override string ToString() { |
| 201 | return pb::JsonFormatter.ToDiagnosticString(this); |
| 202 | } |
| 203 | |
| 204 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 205 | public void WriteTo(pb::CodedOutputStream output) { |
| 206 | if (HasIntOpt) { |
| 207 | output.WriteRawTag(8); |
| 208 | output.WriteInt32(IntOpt); |
| 209 | } |
| 210 | if (HasFoo) { |
| 211 | output.WriteRawTag(16); |
| 212 | output.WriteInt32(Foo); |
| 213 | } |
| 214 | if (_extensions != null) { |
| 215 | _extensions.WriteTo(output); |
| 216 | } |
| 217 | if (_unknownFields != null) { |
| 218 | _unknownFields.WriteTo(output); |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 223 | public int CalculateSize() { |
| 224 | int size = 0; |
| 225 | if (HasIntOpt) { |
| 226 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(IntOpt); |
| 227 | } |
| 228 | if (HasFoo) { |
| 229 | size += 1 + pb::CodedOutputStream.ComputeInt32Size(Foo); |
| 230 | } |
| 231 | if (_extensions != null) { |
| 232 | size += _extensions.CalculateSize(); |
| 233 | } |
| 234 | if (_unknownFields != null) { |
| 235 | size += _unknownFields.CalculateSize(); |
| 236 | } |
| 237 | return size; |
| 238 | } |
| 239 | |
| 240 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 241 | public void MergeFrom(FooOptions other) { |
| 242 | if (other == null) { |
| 243 | return; |
| 244 | } |
| 245 | if (other.HasIntOpt) { |
| 246 | IntOpt = other.IntOpt; |
| 247 | } |
| 248 | if (other.HasFoo) { |
| 249 | Foo = other.Foo; |
| 250 | } |
| 251 | pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions); |
| 252 | _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); |
| 253 | } |
| 254 | |
| 255 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 256 | public void MergeFrom(pb::CodedInputStream input) { |
Jan Tattermusch | 7cb5597 | 2020-06-02 09:26:25 +0200 | [diff] [blame^] | 257 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE |
Jan Tattermusch | dd013bd | 2020-04-30 17:07:42 +0200 | [diff] [blame] | 258 | input.ReadRawMessage(this); |
Jan Tattermusch | 7cb5597 | 2020-06-02 09:26:25 +0200 | [diff] [blame^] | 259 | #else |
| 260 | uint tag; |
| 261 | while ((tag = input.ReadTag()) != 0) { |
| 262 | switch(tag) { |
| 263 | default: |
| 264 | if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) { |
| 265 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); |
| 266 | } |
| 267 | break; |
| 268 | case 8: { |
| 269 | IntOpt = input.ReadInt32(); |
| 270 | break; |
| 271 | } |
| 272 | case 16: { |
| 273 | Foo = input.ReadInt32(); |
| 274 | break; |
| 275 | } |
| 276 | } |
| 277 | } |
| 278 | #endif |
Jan Tattermusch | dd013bd | 2020-04-30 17:07:42 +0200 | [diff] [blame] | 279 | } |
| 280 | |
Jan Tattermusch | 7cb5597 | 2020-06-02 09:26:25 +0200 | [diff] [blame^] | 281 | #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE |
Jan Tattermusch | dd013bd | 2020-04-30 17:07:42 +0200 | [diff] [blame] | 282 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute] |
| 283 | void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { |
| 284 | uint tag; |
| 285 | while ((tag = input.ReadTag()) != 0) { |
| 286 | switch(tag) { |
| 287 | default: |
| 288 | if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, ref input)) { |
| 289 | _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref 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 | } |
Jan Tattermusch | 7cb5597 | 2020-06-02 09:26:25 +0200 | [diff] [blame^] | 303 | #endif |
Jan Tattermusch | dd013bd | 2020-04-30 17:07:42 +0200 | [diff] [blame] | 304 | |
| 305 | public TValue GetExtension<TValue>(pb::Extension<FooOptions, TValue> extension) { |
| 306 | return pb::ExtensionSet.Get(ref _extensions, extension); |
| 307 | } |
| 308 | public pbc::RepeatedField<TValue> GetExtension<TValue>(pb::RepeatedExtension<FooOptions, TValue> extension) { |
| 309 | return pb::ExtensionSet.Get(ref _extensions, extension); |
| 310 | } |
| 311 | public pbc::RepeatedField<TValue> GetOrInitializeExtension<TValue>(pb::RepeatedExtension<FooOptions, TValue> extension) { |
| 312 | return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); |
| 313 | } |
| 314 | public void SetExtension<TValue>(pb::Extension<FooOptions, TValue> extension, TValue value) { |
| 315 | pb::ExtensionSet.Set(ref _extensions, extension, value); |
| 316 | } |
| 317 | public bool HasExtension<TValue>(pb::Extension<FooOptions, TValue> extension) { |
| 318 | return pb::ExtensionSet.Has(ref _extensions, extension); |
| 319 | } |
| 320 | public void ClearExtension<TValue>(pb::Extension<FooOptions, TValue> extension) { |
| 321 | pb::ExtensionSet.Clear(ref _extensions, extension); |
| 322 | } |
| 323 | public void ClearExtension<TValue>(pb::RepeatedExtension<FooOptions, TValue> extension) { |
| 324 | pb::ExtensionSet.Clear(ref _extensions, extension); |
| 325 | } |
| 326 | |
| 327 | } |
| 328 | |
| 329 | #endregion |
| 330 | |
| 331 | } |
| 332 | |
| 333 | #endregion Designer generated code |