1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948 |
- // <auto-generated>
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: google/protobuf/unittest_proto3_optional.proto
- // </auto-generated>
- #pragma warning disable 1591, 0612, 3021
- #region Designer generated code
- using pb = global::Google.Protobuf;
- using pbc = global::Google.Protobuf.Collections;
- using pbr = global::Google.Protobuf.Reflection;
- using scg = global::System.Collections.Generic;
- namespace ProtobufUnittest {
- /// <summary>Holder for reflection information generated from google/protobuf/unittest_proto3_optional.proto</summary>
- public static partial class UnittestProto3OptionalReflection {
- #region Descriptor
- /// <summary>File descriptor for google/protobuf/unittest_proto3_optional.proto</summary>
- public static pbr::FileDescriptor Descriptor {
- get { return descriptor; }
- }
- private static pbr::FileDescriptor descriptor;
- static UnittestProto3OptionalReflection() {
- byte[] descriptorData = global::System.Convert.FromBase64String(
- string.Concat(
- "Ci5nb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfcHJvdG8zX29wdGlvbmFsLnBy",
- "b3RvEhFwcm90b2J1Zl91bml0dGVzdBogZ29vZ2xlL3Byb3RvYnVmL2Rlc2Ny",
- "aXB0b3IucHJvdG8isQoKElRlc3RQcm90bzNPcHRpb25hbBIbCg5vcHRpb25h",
- "bF9pbnQzMhgBIAEoBUgAiAEBEhsKDm9wdGlvbmFsX2ludDY0GAIgASgDSAGI",
- "AQESHAoPb3B0aW9uYWxfdWludDMyGAMgASgNSAKIAQESHAoPb3B0aW9uYWxf",
- "dWludDY0GAQgASgESAOIAQESHAoPb3B0aW9uYWxfc2ludDMyGAUgASgRSASI",
- "AQESHAoPb3B0aW9uYWxfc2ludDY0GAYgASgSSAWIAQESHQoQb3B0aW9uYWxf",
- "Zml4ZWQzMhgHIAEoB0gGiAEBEh0KEG9wdGlvbmFsX2ZpeGVkNjQYCCABKAZI",
- "B4gBARIeChFvcHRpb25hbF9zZml4ZWQzMhgJIAEoD0gIiAEBEh4KEW9wdGlv",
- "bmFsX3NmaXhlZDY0GAogASgQSAmIAQESGwoOb3B0aW9uYWxfZmxvYXQYCyAB",
- "KAJICogBARIcCg9vcHRpb25hbF9kb3VibGUYDCABKAFIC4gBARIaCg1vcHRp",
- "b25hbF9ib29sGA0gASgISAyIAQESHAoPb3B0aW9uYWxfc3RyaW5nGA4gASgJ",
- "SA2IAQESGwoOb3B0aW9uYWxfYnl0ZXMYDyABKAxIDogBARIeCg1vcHRpb25h",
- "bF9jb3JkGBAgASgJQgIIAUgPiAEBElkKF29wdGlvbmFsX25lc3RlZF9tZXNz",
- "YWdlGBIgASgLMjMucHJvdG9idWZfdW5pdHRlc3QuVGVzdFByb3RvM09wdGlv",
- "bmFsLk5lc3RlZE1lc3NhZ2VIEIgBARJZChNsYXp5X25lc3RlZF9tZXNzYWdl",
- "GBMgASgLMjMucHJvdG9idWZfdW5pdHRlc3QuVGVzdFByb3RvM09wdGlvbmFs",
- "Lk5lc3RlZE1lc3NhZ2VCAigBSBGIAQESUwoUb3B0aW9uYWxfbmVzdGVkX2Vu",
- "dW0YFSABKA4yMC5wcm90b2J1Zl91bml0dGVzdC5UZXN0UHJvdG8zT3B0aW9u",
- "YWwuTmVzdGVkRW51bUgSiAEBEhYKDnNpbmd1bGFyX2ludDMyGBYgASgFEhYK",
- "DnNpbmd1bGFyX2ludDY0GBcgASgDGicKDU5lc3RlZE1lc3NhZ2USDwoCYmIY",
- "ASABKAVIAIgBAUIFCgNfYmIiSgoKTmVzdGVkRW51bRIPCgtVTlNQRUNJRklF",
- "RBAAEgcKA0ZPTxABEgcKA0JBUhACEgcKA0JBWhADEhAKA05FRxD/////////",
- "//8BQhEKD19vcHRpb25hbF9pbnQzMkIRCg9fb3B0aW9uYWxfaW50NjRCEgoQ",
- "X29wdGlvbmFsX3VpbnQzMkISChBfb3B0aW9uYWxfdWludDY0QhIKEF9vcHRp",
- "b25hbF9zaW50MzJCEgoQX29wdGlvbmFsX3NpbnQ2NEITChFfb3B0aW9uYWxf",
- "Zml4ZWQzMkITChFfb3B0aW9uYWxfZml4ZWQ2NEIUChJfb3B0aW9uYWxfc2Zp",
- "eGVkMzJCFAoSX29wdGlvbmFsX3NmaXhlZDY0QhEKD19vcHRpb25hbF9mbG9h",
- "dEISChBfb3B0aW9uYWxfZG91YmxlQhAKDl9vcHRpb25hbF9ib29sQhIKEF9v",
- "cHRpb25hbF9zdHJpbmdCEQoPX29wdGlvbmFsX2J5dGVzQhAKDl9vcHRpb25h",
- "bF9jb3JkQhoKGF9vcHRpb25hbF9uZXN0ZWRfbWVzc2FnZUIWChRfbGF6eV9u",
- "ZXN0ZWRfbWVzc2FnZUIXChVfb3B0aW9uYWxfbmVzdGVkX2VudW0iiQIKGVRl",
- "c3RQcm90bzNPcHRpb25hbE1lc3NhZ2USUgoObmVzdGVkX21lc3NhZ2UYASAB",
- "KAsyOi5wcm90b2J1Zl91bml0dGVzdC5UZXN0UHJvdG8zT3B0aW9uYWxNZXNz",
- "YWdlLk5lc3RlZE1lc3NhZ2USYAoXb3B0aW9uYWxfbmVzdGVkX21lc3NhZ2UY",
- "AiABKAsyOi5wcm90b2J1Zl91bml0dGVzdC5UZXN0UHJvdG8zT3B0aW9uYWxN",
- "ZXNzYWdlLk5lc3RlZE1lc3NhZ2VIAIgBARoaCg1OZXN0ZWRNZXNzYWdlEgkK",
- "AXMYASABKAlCGgoYX29wdGlvbmFsX25lc3RlZF9tZXNzYWdlIqkBChhQcm90",
- "bzNPcHRpb25hbEV4dGVuc2lvbnMyPAoPZXh0X25vX29wdGlvbmFsEh8uZ29v",
- "Z2xlLnByb3RvYnVmLk1lc3NhZ2VPcHRpb25zGIjN2akBIAEoBTJBChFleHRf",
- "d2l0aF9vcHRpb25hbBIfLmdvb2dsZS5wcm90b2J1Zi5NZXNzYWdlT3B0aW9u",
- "cxiJzdmpASABKAWIAQE6DMDozM0KCMjozM0KEEIlCiFjb20uZ29vZ2xlLnBy",
- "b3RvYnVmLnRlc3RpbmcucHJvdG9QAWIGcHJvdG8z"));
- descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
- new pbr::FileDescriptor[] { global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor, },
- new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
- new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufUnittest.TestProto3Optional), global::ProtobufUnittest.TestProto3Optional.Parser, new[]{ "OptionalInt32", "OptionalInt64", "OptionalUint32", "OptionalUint64", "OptionalSint32", "OptionalSint64", "OptionalFixed32", "OptionalFixed64", "OptionalSfixed32", "OptionalSfixed64", "OptionalFloat", "OptionalDouble", "OptionalBool", "OptionalString", "OptionalBytes", "OptionalCord", "OptionalNestedMessage", "LazyNestedMessage", "OptionalNestedEnum", "SingularInt32", "SingularInt64" }, new[]{ "OptionalInt32", "OptionalInt64", "OptionalUint32", "OptionalUint64", "OptionalSint32", "OptionalSint64", "OptionalFixed32", "OptionalFixed64", "OptionalSfixed32", "OptionalSfixed64", "OptionalFloat", "OptionalDouble", "OptionalBool", "OptionalString", "OptionalBytes", "OptionalCord", "OptionalNestedMessage", "LazyNestedMessage", "OptionalNestedEnum" }, new[]{ typeof(global::ProtobufUnittest.TestProto3Optional.Types.NestedEnum) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage), global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage.Parser, new[]{ "Bb" }, new[]{ "Bb" }, null, null, null)}),
- new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufUnittest.TestProto3OptionalMessage), global::ProtobufUnittest.TestProto3OptionalMessage.Parser, new[]{ "NestedMessage", "OptionalNestedMessage" }, new[]{ "OptionalNestedMessage" }, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage), global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage.Parser, new[]{ "S" }, null, null, null, null)}),
- new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufUnittest.Proto3OptionalExtensions), global::ProtobufUnittest.Proto3OptionalExtensions.Parser, null, null, null, new pb::Extension[] { global::ProtobufUnittest.Proto3OptionalExtensions.Extensions.ExtNoOptional, global::ProtobufUnittest.Proto3OptionalExtensions.Extensions.ExtWithOptional }, null)
- }));
- }
- #endregion
- }
- #region Messages
- public sealed partial class TestProto3Optional : pb::IMessage<TestProto3Optional>
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- , pb::IBufferMessage
- #endif
- {
- private static readonly pb::MessageParser<TestProto3Optional> _parser = new pb::MessageParser<TestProto3Optional>(() => new TestProto3Optional());
- private pb::UnknownFieldSet _unknownFields;
- private int _hasBits0;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pb::MessageParser<TestProto3Optional> Parser { get { return _parser; } }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pbr::MessageDescriptor Descriptor {
- get { return global::ProtobufUnittest.UnittestProto3OptionalReflection.Descriptor.MessageTypes[0]; }
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- pbr::MessageDescriptor pb::IMessage.Descriptor {
- get { return Descriptor; }
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public TestProto3Optional() {
- OnConstruction();
- }
- partial void OnConstruction();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public TestProto3Optional(TestProto3Optional other) : this() {
- _hasBits0 = other._hasBits0;
- optionalInt32_ = other.optionalInt32_;
- optionalInt64_ = other.optionalInt64_;
- optionalUint32_ = other.optionalUint32_;
- optionalUint64_ = other.optionalUint64_;
- optionalSint32_ = other.optionalSint32_;
- optionalSint64_ = other.optionalSint64_;
- optionalFixed32_ = other.optionalFixed32_;
- optionalFixed64_ = other.optionalFixed64_;
- optionalSfixed32_ = other.optionalSfixed32_;
- optionalSfixed64_ = other.optionalSfixed64_;
- optionalFloat_ = other.optionalFloat_;
- optionalDouble_ = other.optionalDouble_;
- optionalBool_ = other.optionalBool_;
- optionalString_ = other.optionalString_;
- optionalBytes_ = other.optionalBytes_;
- optionalCord_ = other.optionalCord_;
- optionalNestedMessage_ = other.optionalNestedMessage_ != null ? other.optionalNestedMessage_.Clone() : null;
- lazyNestedMessage_ = other.lazyNestedMessage_ != null ? other.lazyNestedMessage_.Clone() : null;
- optionalNestedEnum_ = other.optionalNestedEnum_;
- singularInt32_ = other.singularInt32_;
- singularInt64_ = other.singularInt64_;
- _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public TestProto3Optional Clone() {
- return new TestProto3Optional(this);
- }
- /// <summary>Field number for the "optional_int32" field.</summary>
- public const int OptionalInt32FieldNumber = 1;
- private int optionalInt32_;
- /// <summary>
- /// Singular
- /// </summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int OptionalInt32 {
- get { if ((_hasBits0 & 1) != 0) { return optionalInt32_; } else { return 0; } }
- set {
- _hasBits0 |= 1;
- optionalInt32_ = value;
- }
- }
- /// <summary>Gets whether the "optional_int32" field is set</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool HasOptionalInt32 {
- get { return (_hasBits0 & 1) != 0; }
- }
- /// <summary>Clears the value of the "optional_int32" field</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void ClearOptionalInt32() {
- _hasBits0 &= ~1;
- }
- /// <summary>Field number for the "optional_int64" field.</summary>
- public const int OptionalInt64FieldNumber = 2;
- private long optionalInt64_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public long OptionalInt64 {
- get { if ((_hasBits0 & 2) != 0) { return optionalInt64_; } else { return 0L; } }
- set {
- _hasBits0 |= 2;
- optionalInt64_ = value;
- }
- }
- /// <summary>Gets whether the "optional_int64" field is set</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool HasOptionalInt64 {
- get { return (_hasBits0 & 2) != 0; }
- }
- /// <summary>Clears the value of the "optional_int64" field</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void ClearOptionalInt64() {
- _hasBits0 &= ~2;
- }
- /// <summary>Field number for the "optional_uint32" field.</summary>
- public const int OptionalUint32FieldNumber = 3;
- private uint optionalUint32_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint OptionalUint32 {
- get { if ((_hasBits0 & 4) != 0) { return optionalUint32_; } else { return 0; } }
- set {
- _hasBits0 |= 4;
- optionalUint32_ = value;
- }
- }
- /// <summary>Gets whether the "optional_uint32" field is set</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool HasOptionalUint32 {
- get { return (_hasBits0 & 4) != 0; }
- }
- /// <summary>Clears the value of the "optional_uint32" field</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void ClearOptionalUint32() {
- _hasBits0 &= ~4;
- }
- /// <summary>Field number for the "optional_uint64" field.</summary>
- public const int OptionalUint64FieldNumber = 4;
- private ulong optionalUint64_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public ulong OptionalUint64 {
- get { if ((_hasBits0 & 8) != 0) { return optionalUint64_; } else { return 0UL; } }
- set {
- _hasBits0 |= 8;
- optionalUint64_ = value;
- }
- }
- /// <summary>Gets whether the "optional_uint64" field is set</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool HasOptionalUint64 {
- get { return (_hasBits0 & 8) != 0; }
- }
- /// <summary>Clears the value of the "optional_uint64" field</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void ClearOptionalUint64() {
- _hasBits0 &= ~8;
- }
- /// <summary>Field number for the "optional_sint32" field.</summary>
- public const int OptionalSint32FieldNumber = 5;
- private int optionalSint32_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int OptionalSint32 {
- get { if ((_hasBits0 & 16) != 0) { return optionalSint32_; } else { return 0; } }
- set {
- _hasBits0 |= 16;
- optionalSint32_ = value;
- }
- }
- /// <summary>Gets whether the "optional_sint32" field is set</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool HasOptionalSint32 {
- get { return (_hasBits0 & 16) != 0; }
- }
- /// <summary>Clears the value of the "optional_sint32" field</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void ClearOptionalSint32() {
- _hasBits0 &= ~16;
- }
- /// <summary>Field number for the "optional_sint64" field.</summary>
- public const int OptionalSint64FieldNumber = 6;
- private long optionalSint64_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public long OptionalSint64 {
- get { if ((_hasBits0 & 32) != 0) { return optionalSint64_; } else { return 0L; } }
- set {
- _hasBits0 |= 32;
- optionalSint64_ = value;
- }
- }
- /// <summary>Gets whether the "optional_sint64" field is set</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool HasOptionalSint64 {
- get { return (_hasBits0 & 32) != 0; }
- }
- /// <summary>Clears the value of the "optional_sint64" field</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void ClearOptionalSint64() {
- _hasBits0 &= ~32;
- }
- /// <summary>Field number for the "optional_fixed32" field.</summary>
- public const int OptionalFixed32FieldNumber = 7;
- private uint optionalFixed32_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public uint OptionalFixed32 {
- get { if ((_hasBits0 & 64) != 0) { return optionalFixed32_; } else { return 0; } }
- set {
- _hasBits0 |= 64;
- optionalFixed32_ = value;
- }
- }
- /// <summary>Gets whether the "optional_fixed32" field is set</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool HasOptionalFixed32 {
- get { return (_hasBits0 & 64) != 0; }
- }
- /// <summary>Clears the value of the "optional_fixed32" field</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void ClearOptionalFixed32() {
- _hasBits0 &= ~64;
- }
- /// <summary>Field number for the "optional_fixed64" field.</summary>
- public const int OptionalFixed64FieldNumber = 8;
- private ulong optionalFixed64_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public ulong OptionalFixed64 {
- get { if ((_hasBits0 & 128) != 0) { return optionalFixed64_; } else { return 0UL; } }
- set {
- _hasBits0 |= 128;
- optionalFixed64_ = value;
- }
- }
- /// <summary>Gets whether the "optional_fixed64" field is set</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool HasOptionalFixed64 {
- get { return (_hasBits0 & 128) != 0; }
- }
- /// <summary>Clears the value of the "optional_fixed64" field</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void ClearOptionalFixed64() {
- _hasBits0 &= ~128;
- }
- /// <summary>Field number for the "optional_sfixed32" field.</summary>
- public const int OptionalSfixed32FieldNumber = 9;
- private int optionalSfixed32_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int OptionalSfixed32 {
- get { if ((_hasBits0 & 256) != 0) { return optionalSfixed32_; } else { return 0; } }
- set {
- _hasBits0 |= 256;
- optionalSfixed32_ = value;
- }
- }
- /// <summary>Gets whether the "optional_sfixed32" field is set</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool HasOptionalSfixed32 {
- get { return (_hasBits0 & 256) != 0; }
- }
- /// <summary>Clears the value of the "optional_sfixed32" field</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void ClearOptionalSfixed32() {
- _hasBits0 &= ~256;
- }
- /// <summary>Field number for the "optional_sfixed64" field.</summary>
- public const int OptionalSfixed64FieldNumber = 10;
- private long optionalSfixed64_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public long OptionalSfixed64 {
- get { if ((_hasBits0 & 512) != 0) { return optionalSfixed64_; } else { return 0L; } }
- set {
- _hasBits0 |= 512;
- optionalSfixed64_ = value;
- }
- }
- /// <summary>Gets whether the "optional_sfixed64" field is set</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool HasOptionalSfixed64 {
- get { return (_hasBits0 & 512) != 0; }
- }
- /// <summary>Clears the value of the "optional_sfixed64" field</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void ClearOptionalSfixed64() {
- _hasBits0 &= ~512;
- }
- /// <summary>Field number for the "optional_float" field.</summary>
- public const int OptionalFloatFieldNumber = 11;
- private float optionalFloat_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public float OptionalFloat {
- get { if ((_hasBits0 & 1024) != 0) { return optionalFloat_; } else { return 0F; } }
- set {
- _hasBits0 |= 1024;
- optionalFloat_ = value;
- }
- }
- /// <summary>Gets whether the "optional_float" field is set</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool HasOptionalFloat {
- get { return (_hasBits0 & 1024) != 0; }
- }
- /// <summary>Clears the value of the "optional_float" field</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void ClearOptionalFloat() {
- _hasBits0 &= ~1024;
- }
- /// <summary>Field number for the "optional_double" field.</summary>
- public const int OptionalDoubleFieldNumber = 12;
- private double optionalDouble_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public double OptionalDouble {
- get { if ((_hasBits0 & 2048) != 0) { return optionalDouble_; } else { return 0D; } }
- set {
- _hasBits0 |= 2048;
- optionalDouble_ = value;
- }
- }
- /// <summary>Gets whether the "optional_double" field is set</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool HasOptionalDouble {
- get { return (_hasBits0 & 2048) != 0; }
- }
- /// <summary>Clears the value of the "optional_double" field</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void ClearOptionalDouble() {
- _hasBits0 &= ~2048;
- }
- /// <summary>Field number for the "optional_bool" field.</summary>
- public const int OptionalBoolFieldNumber = 13;
- private bool optionalBool_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool OptionalBool {
- get { if ((_hasBits0 & 4096) != 0) { return optionalBool_; } else { return false; } }
- set {
- _hasBits0 |= 4096;
- optionalBool_ = value;
- }
- }
- /// <summary>Gets whether the "optional_bool" field is set</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool HasOptionalBool {
- get { return (_hasBits0 & 4096) != 0; }
- }
- /// <summary>Clears the value of the "optional_bool" field</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void ClearOptionalBool() {
- _hasBits0 &= ~4096;
- }
- /// <summary>Field number for the "optional_string" field.</summary>
- public const int OptionalStringFieldNumber = 14;
- private string optionalString_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public string OptionalString {
- get { return optionalString_ ?? ""; }
- set {
- optionalString_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
- }
- }
- /// <summary>Gets whether the "optional_string" field is set</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool HasOptionalString {
- get { return optionalString_ != null; }
- }
- /// <summary>Clears the value of the "optional_string" field</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void ClearOptionalString() {
- optionalString_ = null;
- }
- /// <summary>Field number for the "optional_bytes" field.</summary>
- public const int OptionalBytesFieldNumber = 15;
- private pb::ByteString optionalBytes_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public pb::ByteString OptionalBytes {
- get { return optionalBytes_ ?? pb::ByteString.Empty; }
- set {
- optionalBytes_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
- }
- }
- /// <summary>Gets whether the "optional_bytes" field is set</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool HasOptionalBytes {
- get { return optionalBytes_ != null; }
- }
- /// <summary>Clears the value of the "optional_bytes" field</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void ClearOptionalBytes() {
- optionalBytes_ = null;
- }
- /// <summary>Field number for the "optional_cord" field.</summary>
- public const int OptionalCordFieldNumber = 16;
- private string optionalCord_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public string OptionalCord {
- get { return optionalCord_ ?? ""; }
- set {
- optionalCord_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
- }
- }
- /// <summary>Gets whether the "optional_cord" field is set</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool HasOptionalCord {
- get { return optionalCord_ != null; }
- }
- /// <summary>Clears the value of the "optional_cord" field</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void ClearOptionalCord() {
- optionalCord_ = null;
- }
- /// <summary>Field number for the "optional_nested_message" field.</summary>
- public const int OptionalNestedMessageFieldNumber = 18;
- private global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage optionalNestedMessage_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage OptionalNestedMessage {
- get { return optionalNestedMessage_; }
- set {
- optionalNestedMessage_ = value;
- }
- }
- /// <summary>Field number for the "lazy_nested_message" field.</summary>
- public const int LazyNestedMessageFieldNumber = 19;
- private global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage lazyNestedMessage_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage LazyNestedMessage {
- get { return lazyNestedMessage_; }
- set {
- lazyNestedMessage_ = value;
- }
- }
- /// <summary>Field number for the "optional_nested_enum" field.</summary>
- public const int OptionalNestedEnumFieldNumber = 21;
- private global::ProtobufUnittest.TestProto3Optional.Types.NestedEnum optionalNestedEnum_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public global::ProtobufUnittest.TestProto3Optional.Types.NestedEnum OptionalNestedEnum {
- get { if ((_hasBits0 & 8192) != 0) { return optionalNestedEnum_; } else { return global::ProtobufUnittest.TestProto3Optional.Types.NestedEnum.Unspecified; } }
- set {
- _hasBits0 |= 8192;
- optionalNestedEnum_ = value;
- }
- }
- /// <summary>Gets whether the "optional_nested_enum" field is set</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool HasOptionalNestedEnum {
- get { return (_hasBits0 & 8192) != 0; }
- }
- /// <summary>Clears the value of the "optional_nested_enum" field</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void ClearOptionalNestedEnum() {
- _hasBits0 &= ~8192;
- }
- /// <summary>Field number for the "singular_int32" field.</summary>
- public const int SingularInt32FieldNumber = 22;
- private int singularInt32_;
- /// <summary>
- /// Add some non-optional fields to verify we can mix them.
- /// </summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int SingularInt32 {
- get { return singularInt32_; }
- set {
- singularInt32_ = value;
- }
- }
- /// <summary>Field number for the "singular_int64" field.</summary>
- public const int SingularInt64FieldNumber = 23;
- private long singularInt64_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public long SingularInt64 {
- get { return singularInt64_; }
- set {
- singularInt64_ = value;
- }
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override bool Equals(object other) {
- return Equals(other as TestProto3Optional);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool Equals(TestProto3Optional other) {
- if (ReferenceEquals(other, null)) {
- return false;
- }
- if (ReferenceEquals(other, this)) {
- return true;
- }
- if (OptionalInt32 != other.OptionalInt32) return false;
- if (OptionalInt64 != other.OptionalInt64) return false;
- if (OptionalUint32 != other.OptionalUint32) return false;
- if (OptionalUint64 != other.OptionalUint64) return false;
- if (OptionalSint32 != other.OptionalSint32) return false;
- if (OptionalSint64 != other.OptionalSint64) return false;
- if (OptionalFixed32 != other.OptionalFixed32) return false;
- if (OptionalFixed64 != other.OptionalFixed64) return false;
- if (OptionalSfixed32 != other.OptionalSfixed32) return false;
- if (OptionalSfixed64 != other.OptionalSfixed64) return false;
- if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(OptionalFloat, other.OptionalFloat)) return false;
- if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(OptionalDouble, other.OptionalDouble)) return false;
- if (OptionalBool != other.OptionalBool) return false;
- if (OptionalString != other.OptionalString) return false;
- if (OptionalBytes != other.OptionalBytes) return false;
- if (OptionalCord != other.OptionalCord) return false;
- if (!object.Equals(OptionalNestedMessage, other.OptionalNestedMessage)) return false;
- if (!object.Equals(LazyNestedMessage, other.LazyNestedMessage)) return false;
- if (OptionalNestedEnum != other.OptionalNestedEnum) return false;
- if (SingularInt32 != other.SingularInt32) return false;
- if (SingularInt64 != other.SingularInt64) return false;
- return Equals(_unknownFields, other._unknownFields);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override int GetHashCode() {
- int hash = 1;
- if (HasOptionalInt32) hash ^= OptionalInt32.GetHashCode();
- if (HasOptionalInt64) hash ^= OptionalInt64.GetHashCode();
- if (HasOptionalUint32) hash ^= OptionalUint32.GetHashCode();
- if (HasOptionalUint64) hash ^= OptionalUint64.GetHashCode();
- if (HasOptionalSint32) hash ^= OptionalSint32.GetHashCode();
- if (HasOptionalSint64) hash ^= OptionalSint64.GetHashCode();
- if (HasOptionalFixed32) hash ^= OptionalFixed32.GetHashCode();
- if (HasOptionalFixed64) hash ^= OptionalFixed64.GetHashCode();
- if (HasOptionalSfixed32) hash ^= OptionalSfixed32.GetHashCode();
- if (HasOptionalSfixed64) hash ^= OptionalSfixed64.GetHashCode();
- if (HasOptionalFloat) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(OptionalFloat);
- if (HasOptionalDouble) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(OptionalDouble);
- if (HasOptionalBool) hash ^= OptionalBool.GetHashCode();
- if (HasOptionalString) hash ^= OptionalString.GetHashCode();
- if (HasOptionalBytes) hash ^= OptionalBytes.GetHashCode();
- if (HasOptionalCord) hash ^= OptionalCord.GetHashCode();
- if (optionalNestedMessage_ != null) hash ^= OptionalNestedMessage.GetHashCode();
- if (lazyNestedMessage_ != null) hash ^= LazyNestedMessage.GetHashCode();
- if (HasOptionalNestedEnum) hash ^= OptionalNestedEnum.GetHashCode();
- if (SingularInt32 != 0) hash ^= SingularInt32.GetHashCode();
- if (SingularInt64 != 0L) hash ^= SingularInt64.GetHashCode();
- if (_unknownFields != null) {
- hash ^= _unknownFields.GetHashCode();
- }
- return hash;
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override string ToString() {
- return pb::JsonFormatter.ToDiagnosticString(this);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void WriteTo(pb::CodedOutputStream output) {
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- output.WriteRawMessage(this);
- #else
- if (HasOptionalInt32) {
- output.WriteRawTag(8);
- output.WriteInt32(OptionalInt32);
- }
- if (HasOptionalInt64) {
- output.WriteRawTag(16);
- output.WriteInt64(OptionalInt64);
- }
- if (HasOptionalUint32) {
- output.WriteRawTag(24);
- output.WriteUInt32(OptionalUint32);
- }
- if (HasOptionalUint64) {
- output.WriteRawTag(32);
- output.WriteUInt64(OptionalUint64);
- }
- if (HasOptionalSint32) {
- output.WriteRawTag(40);
- output.WriteSInt32(OptionalSint32);
- }
- if (HasOptionalSint64) {
- output.WriteRawTag(48);
- output.WriteSInt64(OptionalSint64);
- }
- if (HasOptionalFixed32) {
- output.WriteRawTag(61);
- output.WriteFixed32(OptionalFixed32);
- }
- if (HasOptionalFixed64) {
- output.WriteRawTag(65);
- output.WriteFixed64(OptionalFixed64);
- }
- if (HasOptionalSfixed32) {
- output.WriteRawTag(77);
- output.WriteSFixed32(OptionalSfixed32);
- }
- if (HasOptionalSfixed64) {
- output.WriteRawTag(81);
- output.WriteSFixed64(OptionalSfixed64);
- }
- if (HasOptionalFloat) {
- output.WriteRawTag(93);
- output.WriteFloat(OptionalFloat);
- }
- if (HasOptionalDouble) {
- output.WriteRawTag(97);
- output.WriteDouble(OptionalDouble);
- }
- if (HasOptionalBool) {
- output.WriteRawTag(104);
- output.WriteBool(OptionalBool);
- }
- if (HasOptionalString) {
- output.WriteRawTag(114);
- output.WriteString(OptionalString);
- }
- if (HasOptionalBytes) {
- output.WriteRawTag(122);
- output.WriteBytes(OptionalBytes);
- }
- if (HasOptionalCord) {
- output.WriteRawTag(130, 1);
- output.WriteString(OptionalCord);
- }
- if (optionalNestedMessage_ != null) {
- output.WriteRawTag(146, 1);
- output.WriteMessage(OptionalNestedMessage);
- }
- if (lazyNestedMessage_ != null) {
- output.WriteRawTag(154, 1);
- output.WriteMessage(LazyNestedMessage);
- }
- if (HasOptionalNestedEnum) {
- output.WriteRawTag(168, 1);
- output.WriteEnum((int) OptionalNestedEnum);
- }
- if (SingularInt32 != 0) {
- output.WriteRawTag(176, 1);
- output.WriteInt32(SingularInt32);
- }
- if (SingularInt64 != 0L) {
- output.WriteRawTag(184, 1);
- output.WriteInt64(SingularInt64);
- }
- if (_unknownFields != null) {
- _unknownFields.WriteTo(output);
- }
- #endif
- }
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
- if (HasOptionalInt32) {
- output.WriteRawTag(8);
- output.WriteInt32(OptionalInt32);
- }
- if (HasOptionalInt64) {
- output.WriteRawTag(16);
- output.WriteInt64(OptionalInt64);
- }
- if (HasOptionalUint32) {
- output.WriteRawTag(24);
- output.WriteUInt32(OptionalUint32);
- }
- if (HasOptionalUint64) {
- output.WriteRawTag(32);
- output.WriteUInt64(OptionalUint64);
- }
- if (HasOptionalSint32) {
- output.WriteRawTag(40);
- output.WriteSInt32(OptionalSint32);
- }
- if (HasOptionalSint64) {
- output.WriteRawTag(48);
- output.WriteSInt64(OptionalSint64);
- }
- if (HasOptionalFixed32) {
- output.WriteRawTag(61);
- output.WriteFixed32(OptionalFixed32);
- }
- if (HasOptionalFixed64) {
- output.WriteRawTag(65);
- output.WriteFixed64(OptionalFixed64);
- }
- if (HasOptionalSfixed32) {
- output.WriteRawTag(77);
- output.WriteSFixed32(OptionalSfixed32);
- }
- if (HasOptionalSfixed64) {
- output.WriteRawTag(81);
- output.WriteSFixed64(OptionalSfixed64);
- }
- if (HasOptionalFloat) {
- output.WriteRawTag(93);
- output.WriteFloat(OptionalFloat);
- }
- if (HasOptionalDouble) {
- output.WriteRawTag(97);
- output.WriteDouble(OptionalDouble);
- }
- if (HasOptionalBool) {
- output.WriteRawTag(104);
- output.WriteBool(OptionalBool);
- }
- if (HasOptionalString) {
- output.WriteRawTag(114);
- output.WriteString(OptionalString);
- }
- if (HasOptionalBytes) {
- output.WriteRawTag(122);
- output.WriteBytes(OptionalBytes);
- }
- if (HasOptionalCord) {
- output.WriteRawTag(130, 1);
- output.WriteString(OptionalCord);
- }
- if (optionalNestedMessage_ != null) {
- output.WriteRawTag(146, 1);
- output.WriteMessage(OptionalNestedMessage);
- }
- if (lazyNestedMessage_ != null) {
- output.WriteRawTag(154, 1);
- output.WriteMessage(LazyNestedMessage);
- }
- if (HasOptionalNestedEnum) {
- output.WriteRawTag(168, 1);
- output.WriteEnum((int) OptionalNestedEnum);
- }
- if (SingularInt32 != 0) {
- output.WriteRawTag(176, 1);
- output.WriteInt32(SingularInt32);
- }
- if (SingularInt64 != 0L) {
- output.WriteRawTag(184, 1);
- output.WriteInt64(SingularInt64);
- }
- if (_unknownFields != null) {
- _unknownFields.WriteTo(ref output);
- }
- }
- #endif
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int CalculateSize() {
- int size = 0;
- if (HasOptionalInt32) {
- size += 1 + pb::CodedOutputStream.ComputeInt32Size(OptionalInt32);
- }
- if (HasOptionalInt64) {
- size += 1 + pb::CodedOutputStream.ComputeInt64Size(OptionalInt64);
- }
- if (HasOptionalUint32) {
- size += 1 + pb::CodedOutputStream.ComputeUInt32Size(OptionalUint32);
- }
- if (HasOptionalUint64) {
- size += 1 + pb::CodedOutputStream.ComputeUInt64Size(OptionalUint64);
- }
- if (HasOptionalSint32) {
- size += 1 + pb::CodedOutputStream.ComputeSInt32Size(OptionalSint32);
- }
- if (HasOptionalSint64) {
- size += 1 + pb::CodedOutputStream.ComputeSInt64Size(OptionalSint64);
- }
- if (HasOptionalFixed32) {
- size += 1 + 4;
- }
- if (HasOptionalFixed64) {
- size += 1 + 8;
- }
- if (HasOptionalSfixed32) {
- size += 1 + 4;
- }
- if (HasOptionalSfixed64) {
- size += 1 + 8;
- }
- if (HasOptionalFloat) {
- size += 1 + 4;
- }
- if (HasOptionalDouble) {
- size += 1 + 8;
- }
- if (HasOptionalBool) {
- size += 1 + 1;
- }
- if (HasOptionalString) {
- size += 1 + pb::CodedOutputStream.ComputeStringSize(OptionalString);
- }
- if (HasOptionalBytes) {
- size += 1 + pb::CodedOutputStream.ComputeBytesSize(OptionalBytes);
- }
- if (HasOptionalCord) {
- size += 2 + pb::CodedOutputStream.ComputeStringSize(OptionalCord);
- }
- if (optionalNestedMessage_ != null) {
- size += 2 + pb::CodedOutputStream.ComputeMessageSize(OptionalNestedMessage);
- }
- if (lazyNestedMessage_ != null) {
- size += 2 + pb::CodedOutputStream.ComputeMessageSize(LazyNestedMessage);
- }
- if (HasOptionalNestedEnum) {
- size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) OptionalNestedEnum);
- }
- if (SingularInt32 != 0) {
- size += 2 + pb::CodedOutputStream.ComputeInt32Size(SingularInt32);
- }
- if (SingularInt64 != 0L) {
- size += 2 + pb::CodedOutputStream.ComputeInt64Size(SingularInt64);
- }
- if (_unknownFields != null) {
- size += _unknownFields.CalculateSize();
- }
- return size;
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void MergeFrom(TestProto3Optional other) {
- if (other == null) {
- return;
- }
- if (other.HasOptionalInt32) {
- OptionalInt32 = other.OptionalInt32;
- }
- if (other.HasOptionalInt64) {
- OptionalInt64 = other.OptionalInt64;
- }
- if (other.HasOptionalUint32) {
- OptionalUint32 = other.OptionalUint32;
- }
- if (other.HasOptionalUint64) {
- OptionalUint64 = other.OptionalUint64;
- }
- if (other.HasOptionalSint32) {
- OptionalSint32 = other.OptionalSint32;
- }
- if (other.HasOptionalSint64) {
- OptionalSint64 = other.OptionalSint64;
- }
- if (other.HasOptionalFixed32) {
- OptionalFixed32 = other.OptionalFixed32;
- }
- if (other.HasOptionalFixed64) {
- OptionalFixed64 = other.OptionalFixed64;
- }
- if (other.HasOptionalSfixed32) {
- OptionalSfixed32 = other.OptionalSfixed32;
- }
- if (other.HasOptionalSfixed64) {
- OptionalSfixed64 = other.OptionalSfixed64;
- }
- if (other.HasOptionalFloat) {
- OptionalFloat = other.OptionalFloat;
- }
- if (other.HasOptionalDouble) {
- OptionalDouble = other.OptionalDouble;
- }
- if (other.HasOptionalBool) {
- OptionalBool = other.OptionalBool;
- }
- if (other.HasOptionalString) {
- OptionalString = other.OptionalString;
- }
- if (other.HasOptionalBytes) {
- OptionalBytes = other.OptionalBytes;
- }
- if (other.HasOptionalCord) {
- OptionalCord = other.OptionalCord;
- }
- if (other.optionalNestedMessage_ != null) {
- if (optionalNestedMessage_ == null) {
- OptionalNestedMessage = new global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage();
- }
- OptionalNestedMessage.MergeFrom(other.OptionalNestedMessage);
- }
- if (other.lazyNestedMessage_ != null) {
- if (lazyNestedMessage_ == null) {
- LazyNestedMessage = new global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage();
- }
- LazyNestedMessage.MergeFrom(other.LazyNestedMessage);
- }
- if (other.HasOptionalNestedEnum) {
- OptionalNestedEnum = other.OptionalNestedEnum;
- }
- if (other.SingularInt32 != 0) {
- SingularInt32 = other.SingularInt32;
- }
- if (other.SingularInt64 != 0L) {
- SingularInt64 = other.SingularInt64;
- }
- _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void MergeFrom(pb::CodedInputStream input) {
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- input.ReadRawMessage(this);
- #else
- uint tag;
- while ((tag = input.ReadTag()) != 0) {
- switch(tag) {
- default:
- _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
- break;
- case 8: {
- OptionalInt32 = input.ReadInt32();
- break;
- }
- case 16: {
- OptionalInt64 = input.ReadInt64();
- break;
- }
- case 24: {
- OptionalUint32 = input.ReadUInt32();
- break;
- }
- case 32: {
- OptionalUint64 = input.ReadUInt64();
- break;
- }
- case 40: {
- OptionalSint32 = input.ReadSInt32();
- break;
- }
- case 48: {
- OptionalSint64 = input.ReadSInt64();
- break;
- }
- case 61: {
- OptionalFixed32 = input.ReadFixed32();
- break;
- }
- case 65: {
- OptionalFixed64 = input.ReadFixed64();
- break;
- }
- case 77: {
- OptionalSfixed32 = input.ReadSFixed32();
- break;
- }
- case 81: {
- OptionalSfixed64 = input.ReadSFixed64();
- break;
- }
- case 93: {
- OptionalFloat = input.ReadFloat();
- break;
- }
- case 97: {
- OptionalDouble = input.ReadDouble();
- break;
- }
- case 104: {
- OptionalBool = input.ReadBool();
- break;
- }
- case 114: {
- OptionalString = input.ReadString();
- break;
- }
- case 122: {
- OptionalBytes = input.ReadBytes();
- break;
- }
- case 130: {
- OptionalCord = input.ReadString();
- break;
- }
- case 146: {
- if (optionalNestedMessage_ == null) {
- OptionalNestedMessage = new global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage();
- }
- input.ReadMessage(OptionalNestedMessage);
- break;
- }
- case 154: {
- if (lazyNestedMessage_ == null) {
- LazyNestedMessage = new global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage();
- }
- input.ReadMessage(LazyNestedMessage);
- break;
- }
- case 168: {
- OptionalNestedEnum = (global::ProtobufUnittest.TestProto3Optional.Types.NestedEnum) input.ReadEnum();
- break;
- }
- case 176: {
- SingularInt32 = input.ReadInt32();
- break;
- }
- case 184: {
- SingularInt64 = input.ReadInt64();
- break;
- }
- }
- }
- #endif
- }
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
- uint tag;
- while ((tag = input.ReadTag()) != 0) {
- switch(tag) {
- default:
- _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
- break;
- case 8: {
- OptionalInt32 = input.ReadInt32();
- break;
- }
- case 16: {
- OptionalInt64 = input.ReadInt64();
- break;
- }
- case 24: {
- OptionalUint32 = input.ReadUInt32();
- break;
- }
- case 32: {
- OptionalUint64 = input.ReadUInt64();
- break;
- }
- case 40: {
- OptionalSint32 = input.ReadSInt32();
- break;
- }
- case 48: {
- OptionalSint64 = input.ReadSInt64();
- break;
- }
- case 61: {
- OptionalFixed32 = input.ReadFixed32();
- break;
- }
- case 65: {
- OptionalFixed64 = input.ReadFixed64();
- break;
- }
- case 77: {
- OptionalSfixed32 = input.ReadSFixed32();
- break;
- }
- case 81: {
- OptionalSfixed64 = input.ReadSFixed64();
- break;
- }
- case 93: {
- OptionalFloat = input.ReadFloat();
- break;
- }
- case 97: {
- OptionalDouble = input.ReadDouble();
- break;
- }
- case 104: {
- OptionalBool = input.ReadBool();
- break;
- }
- case 114: {
- OptionalString = input.ReadString();
- break;
- }
- case 122: {
- OptionalBytes = input.ReadBytes();
- break;
- }
- case 130: {
- OptionalCord = input.ReadString();
- break;
- }
- case 146: {
- if (optionalNestedMessage_ == null) {
- OptionalNestedMessage = new global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage();
- }
- input.ReadMessage(OptionalNestedMessage);
- break;
- }
- case 154: {
- if (lazyNestedMessage_ == null) {
- LazyNestedMessage = new global::ProtobufUnittest.TestProto3Optional.Types.NestedMessage();
- }
- input.ReadMessage(LazyNestedMessage);
- break;
- }
- case 168: {
- OptionalNestedEnum = (global::ProtobufUnittest.TestProto3Optional.Types.NestedEnum) input.ReadEnum();
- break;
- }
- case 176: {
- SingularInt32 = input.ReadInt32();
- break;
- }
- case 184: {
- SingularInt64 = input.ReadInt64();
- break;
- }
- }
- }
- }
- #endif
- #region Nested types
- /// <summary>Container for nested types declared in the TestProto3Optional message type.</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static partial class Types {
- public enum NestedEnum {
- [pbr::OriginalName("UNSPECIFIED")] Unspecified = 0,
- [pbr::OriginalName("FOO")] Foo = 1,
- [pbr::OriginalName("BAR")] Bar = 2,
- [pbr::OriginalName("BAZ")] Baz = 3,
- /// <summary>
- /// Intentionally negative.
- /// </summary>
- [pbr::OriginalName("NEG")] Neg = -1,
- }
- public sealed partial class NestedMessage : pb::IMessage<NestedMessage>
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- , pb::IBufferMessage
- #endif
- {
- private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage());
- private pb::UnknownFieldSet _unknownFields;
- private int _hasBits0;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pbr::MessageDescriptor Descriptor {
- get { return global::ProtobufUnittest.TestProto3Optional.Descriptor.NestedTypes[0]; }
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- pbr::MessageDescriptor pb::IMessage.Descriptor {
- get { return Descriptor; }
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public NestedMessage() {
- OnConstruction();
- }
- partial void OnConstruction();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public NestedMessage(NestedMessage other) : this() {
- _hasBits0 = other._hasBits0;
- bb_ = other.bb_;
- _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public NestedMessage Clone() {
- return new NestedMessage(this);
- }
- /// <summary>Field number for the "bb" field.</summary>
- public const int BbFieldNumber = 1;
- private int bb_;
- /// <summary>
- /// The field name "b" fails to compile in proto1 because it conflicts with
- /// a local variable named "b" in one of the generated methods. Doh.
- /// This file needs to compile in proto1 to test backwards-compatibility.
- /// </summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int Bb {
- get { if ((_hasBits0 & 1) != 0) { return bb_; } else { return 0; } }
- set {
- _hasBits0 |= 1;
- bb_ = value;
- }
- }
- /// <summary>Gets whether the "bb" field is set</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool HasBb {
- get { return (_hasBits0 & 1) != 0; }
- }
- /// <summary>Clears the value of the "bb" field</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void ClearBb() {
- _hasBits0 &= ~1;
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override bool Equals(object other) {
- return Equals(other as NestedMessage);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool Equals(NestedMessage other) {
- if (ReferenceEquals(other, null)) {
- return false;
- }
- if (ReferenceEquals(other, this)) {
- return true;
- }
- if (Bb != other.Bb) return false;
- return Equals(_unknownFields, other._unknownFields);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override int GetHashCode() {
- int hash = 1;
- if (HasBb) hash ^= Bb.GetHashCode();
- if (_unknownFields != null) {
- hash ^= _unknownFields.GetHashCode();
- }
- return hash;
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override string ToString() {
- return pb::JsonFormatter.ToDiagnosticString(this);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void WriteTo(pb::CodedOutputStream output) {
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- output.WriteRawMessage(this);
- #else
- if (HasBb) {
- output.WriteRawTag(8);
- output.WriteInt32(Bb);
- }
- if (_unknownFields != null) {
- _unknownFields.WriteTo(output);
- }
- #endif
- }
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
- if (HasBb) {
- output.WriteRawTag(8);
- output.WriteInt32(Bb);
- }
- if (_unknownFields != null) {
- _unknownFields.WriteTo(ref output);
- }
- }
- #endif
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int CalculateSize() {
- int size = 0;
- if (HasBb) {
- size += 1 + pb::CodedOutputStream.ComputeInt32Size(Bb);
- }
- if (_unknownFields != null) {
- size += _unknownFields.CalculateSize();
- }
- return size;
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void MergeFrom(NestedMessage other) {
- if (other == null) {
- return;
- }
- if (other.HasBb) {
- Bb = other.Bb;
- }
- _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void MergeFrom(pb::CodedInputStream input) {
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- input.ReadRawMessage(this);
- #else
- uint tag;
- while ((tag = input.ReadTag()) != 0) {
- switch(tag) {
- default:
- _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
- break;
- case 8: {
- Bb = input.ReadInt32();
- break;
- }
- }
- }
- #endif
- }
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
- uint tag;
- while ((tag = input.ReadTag()) != 0) {
- switch(tag) {
- default:
- _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
- break;
- case 8: {
- Bb = input.ReadInt32();
- break;
- }
- }
- }
- }
- #endif
- }
- }
- #endregion
- }
- public sealed partial class TestProto3OptionalMessage : pb::IMessage<TestProto3OptionalMessage>
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- , pb::IBufferMessage
- #endif
- {
- private static readonly pb::MessageParser<TestProto3OptionalMessage> _parser = new pb::MessageParser<TestProto3OptionalMessage>(() => new TestProto3OptionalMessage());
- private pb::UnknownFieldSet _unknownFields;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pb::MessageParser<TestProto3OptionalMessage> Parser { get { return _parser; } }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pbr::MessageDescriptor Descriptor {
- get { return global::ProtobufUnittest.UnittestProto3OptionalReflection.Descriptor.MessageTypes[1]; }
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- pbr::MessageDescriptor pb::IMessage.Descriptor {
- get { return Descriptor; }
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public TestProto3OptionalMessage() {
- OnConstruction();
- }
- partial void OnConstruction();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public TestProto3OptionalMessage(TestProto3OptionalMessage other) : this() {
- nestedMessage_ = other.nestedMessage_ != null ? other.nestedMessage_.Clone() : null;
- optionalNestedMessage_ = other.optionalNestedMessage_ != null ? other.optionalNestedMessage_.Clone() : null;
- _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public TestProto3OptionalMessage Clone() {
- return new TestProto3OptionalMessage(this);
- }
- /// <summary>Field number for the "nested_message" field.</summary>
- public const int NestedMessageFieldNumber = 1;
- private global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage nestedMessage_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage NestedMessage {
- get { return nestedMessage_; }
- set {
- nestedMessage_ = value;
- }
- }
- /// <summary>Field number for the "optional_nested_message" field.</summary>
- public const int OptionalNestedMessageFieldNumber = 2;
- private global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage optionalNestedMessage_;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage OptionalNestedMessage {
- get { return optionalNestedMessage_; }
- set {
- optionalNestedMessage_ = value;
- }
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override bool Equals(object other) {
- return Equals(other as TestProto3OptionalMessage);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool Equals(TestProto3OptionalMessage other) {
- if (ReferenceEquals(other, null)) {
- return false;
- }
- if (ReferenceEquals(other, this)) {
- return true;
- }
- if (!object.Equals(NestedMessage, other.NestedMessage)) return false;
- if (!object.Equals(OptionalNestedMessage, other.OptionalNestedMessage)) return false;
- return Equals(_unknownFields, other._unknownFields);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override int GetHashCode() {
- int hash = 1;
- if (nestedMessage_ != null) hash ^= NestedMessage.GetHashCode();
- if (optionalNestedMessage_ != null) hash ^= OptionalNestedMessage.GetHashCode();
- if (_unknownFields != null) {
- hash ^= _unknownFields.GetHashCode();
- }
- return hash;
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override string ToString() {
- return pb::JsonFormatter.ToDiagnosticString(this);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void WriteTo(pb::CodedOutputStream output) {
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- output.WriteRawMessage(this);
- #else
- if (nestedMessage_ != null) {
- output.WriteRawTag(10);
- output.WriteMessage(NestedMessage);
- }
- if (optionalNestedMessage_ != null) {
- output.WriteRawTag(18);
- output.WriteMessage(OptionalNestedMessage);
- }
- if (_unknownFields != null) {
- _unknownFields.WriteTo(output);
- }
- #endif
- }
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
- if (nestedMessage_ != null) {
- output.WriteRawTag(10);
- output.WriteMessage(NestedMessage);
- }
- if (optionalNestedMessage_ != null) {
- output.WriteRawTag(18);
- output.WriteMessage(OptionalNestedMessage);
- }
- if (_unknownFields != null) {
- _unknownFields.WriteTo(ref output);
- }
- }
- #endif
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int CalculateSize() {
- int size = 0;
- if (nestedMessage_ != null) {
- size += 1 + pb::CodedOutputStream.ComputeMessageSize(NestedMessage);
- }
- if (optionalNestedMessage_ != null) {
- size += 1 + pb::CodedOutputStream.ComputeMessageSize(OptionalNestedMessage);
- }
- if (_unknownFields != null) {
- size += _unknownFields.CalculateSize();
- }
- return size;
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void MergeFrom(TestProto3OptionalMessage other) {
- if (other == null) {
- return;
- }
- if (other.nestedMessage_ != null) {
- if (nestedMessage_ == null) {
- NestedMessage = new global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage();
- }
- NestedMessage.MergeFrom(other.NestedMessage);
- }
- if (other.optionalNestedMessage_ != null) {
- if (optionalNestedMessage_ == null) {
- OptionalNestedMessage = new global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage();
- }
- OptionalNestedMessage.MergeFrom(other.OptionalNestedMessage);
- }
- _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void MergeFrom(pb::CodedInputStream input) {
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- input.ReadRawMessage(this);
- #else
- uint tag;
- while ((tag = input.ReadTag()) != 0) {
- switch(tag) {
- default:
- _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
- break;
- case 10: {
- if (nestedMessage_ == null) {
- NestedMessage = new global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage();
- }
- input.ReadMessage(NestedMessage);
- break;
- }
- case 18: {
- if (optionalNestedMessage_ == null) {
- OptionalNestedMessage = new global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage();
- }
- input.ReadMessage(OptionalNestedMessage);
- break;
- }
- }
- }
- #endif
- }
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
- uint tag;
- while ((tag = input.ReadTag()) != 0) {
- switch(tag) {
- default:
- _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
- break;
- case 10: {
- if (nestedMessage_ == null) {
- NestedMessage = new global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage();
- }
- input.ReadMessage(NestedMessage);
- break;
- }
- case 18: {
- if (optionalNestedMessage_ == null) {
- OptionalNestedMessage = new global::ProtobufUnittest.TestProto3OptionalMessage.Types.NestedMessage();
- }
- input.ReadMessage(OptionalNestedMessage);
- break;
- }
- }
- }
- }
- #endif
- #region Nested types
- /// <summary>Container for nested types declared in the TestProto3OptionalMessage message type.</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static partial class Types {
- public sealed partial class NestedMessage : pb::IMessage<NestedMessage>
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- , pb::IBufferMessage
- #endif
- {
- private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage());
- private pb::UnknownFieldSet _unknownFields;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pbr::MessageDescriptor Descriptor {
- get { return global::ProtobufUnittest.TestProto3OptionalMessage.Descriptor.NestedTypes[0]; }
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- pbr::MessageDescriptor pb::IMessage.Descriptor {
- get { return Descriptor; }
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public NestedMessage() {
- OnConstruction();
- }
- partial void OnConstruction();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public NestedMessage(NestedMessage other) : this() {
- s_ = other.s_;
- _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public NestedMessage Clone() {
- return new NestedMessage(this);
- }
- /// <summary>Field number for the "s" field.</summary>
- public const int SFieldNumber = 1;
- private string s_ = "";
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public string S {
- get { return s_; }
- set {
- s_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
- }
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override bool Equals(object other) {
- return Equals(other as NestedMessage);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool Equals(NestedMessage other) {
- if (ReferenceEquals(other, null)) {
- return false;
- }
- if (ReferenceEquals(other, this)) {
- return true;
- }
- if (S != other.S) return false;
- return Equals(_unknownFields, other._unknownFields);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override int GetHashCode() {
- int hash = 1;
- if (S.Length != 0) hash ^= S.GetHashCode();
- if (_unknownFields != null) {
- hash ^= _unknownFields.GetHashCode();
- }
- return hash;
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override string ToString() {
- return pb::JsonFormatter.ToDiagnosticString(this);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void WriteTo(pb::CodedOutputStream output) {
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- output.WriteRawMessage(this);
- #else
- if (S.Length != 0) {
- output.WriteRawTag(10);
- output.WriteString(S);
- }
- if (_unknownFields != null) {
- _unknownFields.WriteTo(output);
- }
- #endif
- }
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
- if (S.Length != 0) {
- output.WriteRawTag(10);
- output.WriteString(S);
- }
- if (_unknownFields != null) {
- _unknownFields.WriteTo(ref output);
- }
- }
- #endif
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int CalculateSize() {
- int size = 0;
- if (S.Length != 0) {
- size += 1 + pb::CodedOutputStream.ComputeStringSize(S);
- }
- if (_unknownFields != null) {
- size += _unknownFields.CalculateSize();
- }
- return size;
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void MergeFrom(NestedMessage other) {
- if (other == null) {
- return;
- }
- if (other.S.Length != 0) {
- S = other.S;
- }
- _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void MergeFrom(pb::CodedInputStream input) {
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- input.ReadRawMessage(this);
- #else
- uint tag;
- while ((tag = input.ReadTag()) != 0) {
- switch(tag) {
- default:
- _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
- break;
- case 10: {
- S = input.ReadString();
- break;
- }
- }
- }
- #endif
- }
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
- uint tag;
- while ((tag = input.ReadTag()) != 0) {
- switch(tag) {
- default:
- _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
- break;
- case 10: {
- S = input.ReadString();
- break;
- }
- }
- }
- }
- #endif
- }
- }
- #endregion
- }
- public sealed partial class Proto3OptionalExtensions : pb::IMessage<Proto3OptionalExtensions>
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- , pb::IBufferMessage
- #endif
- {
- private static readonly pb::MessageParser<Proto3OptionalExtensions> _parser = new pb::MessageParser<Proto3OptionalExtensions>(() => new Proto3OptionalExtensions());
- private pb::UnknownFieldSet _unknownFields;
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pb::MessageParser<Proto3OptionalExtensions> Parser { get { return _parser; } }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static pbr::MessageDescriptor Descriptor {
- get { return global::ProtobufUnittest.UnittestProto3OptionalReflection.Descriptor.MessageTypes[2]; }
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- pbr::MessageDescriptor pb::IMessage.Descriptor {
- get { return Descriptor; }
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public Proto3OptionalExtensions() {
- OnConstruction();
- }
- partial void OnConstruction();
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public Proto3OptionalExtensions(Proto3OptionalExtensions other) : this() {
- _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public Proto3OptionalExtensions Clone() {
- return new Proto3OptionalExtensions(this);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override bool Equals(object other) {
- return Equals(other as Proto3OptionalExtensions);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public bool Equals(Proto3OptionalExtensions other) {
- if (ReferenceEquals(other, null)) {
- return false;
- }
- if (ReferenceEquals(other, this)) {
- return true;
- }
- return Equals(_unknownFields, other._unknownFields);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override int GetHashCode() {
- int hash = 1;
- if (_unknownFields != null) {
- hash ^= _unknownFields.GetHashCode();
- }
- return hash;
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public override string ToString() {
- return pb::JsonFormatter.ToDiagnosticString(this);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void WriteTo(pb::CodedOutputStream output) {
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- output.WriteRawMessage(this);
- #else
- if (_unknownFields != null) {
- _unknownFields.WriteTo(output);
- }
- #endif
- }
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
- if (_unknownFields != null) {
- _unknownFields.WriteTo(ref output);
- }
- }
- #endif
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public int CalculateSize() {
- int size = 0;
- if (_unknownFields != null) {
- size += _unknownFields.CalculateSize();
- }
- return size;
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void MergeFrom(Proto3OptionalExtensions other) {
- if (other == null) {
- return;
- }
- _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
- }
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public void MergeFrom(pb::CodedInputStream input) {
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- input.ReadRawMessage(this);
- #else
- uint tag;
- while ((tag = input.ReadTag()) != 0) {
- switch(tag) {
- default:
- _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
- break;
- }
- }
- #endif
- }
- #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
- uint tag;
- while ((tag = input.ReadTag()) != 0) {
- switch(tag) {
- default:
- _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
- break;
- }
- }
- }
- #endif
- #region Extensions
- /// <summary>Container for extensions for other messages declared in the Proto3OptionalExtensions message type.</summary>
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
- public static partial class Extensions {
- public static readonly pb::Extension<global::Google.Protobuf.Reflection.MessageOptions, int> ExtNoOptional =
- new pb::Extension<global::Google.Protobuf.Reflection.MessageOptions, int>(355886728, pb::FieldCodec.ForInt32(2847093824, 0));
- public static readonly pb::Extension<global::Google.Protobuf.Reflection.MessageOptions, int> ExtWithOptional =
- new pb::Extension<global::Google.Protobuf.Reflection.MessageOptions, int>(355886729, pb::FieldCodec.ForInt32(2847093832, 0));
- }
- #endregion
- }
- #endregion
- }
- #endregion Designer generated code
|