// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/protobuf/unittest_proto3.proto
#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 Google.Protobuf.TestProtos {
/// Holder for reflection information generated from google/protobuf/unittest_proto3.proto
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static partial class UnittestProto3Reflection {
#region Descriptor
/// File descriptor for google/protobuf/unittest_proto3.proto
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static UnittestProto3Reflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CiVnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfcHJvdG8zLnByb3RvEhFwcm90",
"b2J1Zl91bml0dGVzdBosZ29vZ2xlL3Byb3RvYnVmL3VuaXR0ZXN0X2ltcG9y",
"dF9wcm90bzMucHJvdG8i8A8KDFRlc3RBbGxUeXBlcxIUCgxzaW5nbGVfaW50",
"MzIYASABKAUSFAoMc2luZ2xlX2ludDY0GAIgASgDEhUKDXNpbmdsZV91aW50",
"MzIYAyABKA0SFQoNc2luZ2xlX3VpbnQ2NBgEIAEoBBIVCg1zaW5nbGVfc2lu",
"dDMyGAUgASgREhUKDXNpbmdsZV9zaW50NjQYBiABKBISFgoOc2luZ2xlX2Zp",
"eGVkMzIYByABKAcSFgoOc2luZ2xlX2ZpeGVkNjQYCCABKAYSFwoPc2luZ2xl",
"X3NmaXhlZDMyGAkgASgPEhcKD3NpbmdsZV9zZml4ZWQ2NBgKIAEoEBIUCgxz",
"aW5nbGVfZmxvYXQYCyABKAISFQoNc2luZ2xlX2RvdWJsZRgMIAEoARITCgtz",
"aW5nbGVfYm9vbBgNIAEoCBIVCg1zaW5nbGVfc3RyaW5nGA4gASgJEhQKDHNp",
"bmdsZV9ieXRlcxgPIAEoDBJMChVzaW5nbGVfbmVzdGVkX21lc3NhZ2UYEiAB",
"KAsyLS5wcm90b2J1Zl91bml0dGVzdC5UZXN0QWxsVHlwZXMuTmVzdGVkTWVz",
"c2FnZRJBChZzaW5nbGVfZm9yZWlnbl9tZXNzYWdlGBMgASgLMiEucHJvdG9i",
"dWZfdW5pdHRlc3QuRm9yZWlnbk1lc3NhZ2USRgoVc2luZ2xlX2ltcG9ydF9t",
"ZXNzYWdlGBQgASgLMicucHJvdG9idWZfdW5pdHRlc3RfaW1wb3J0LkltcG9y",
"dE1lc3NhZ2USRgoSc2luZ2xlX25lc3RlZF9lbnVtGBUgASgOMioucHJvdG9i",
"dWZfdW5pdHRlc3QuVGVzdEFsbFR5cGVzLk5lc3RlZEVudW0SOwoTc2luZ2xl",
"X2ZvcmVpZ25fZW51bRgWIAEoDjIeLnByb3RvYnVmX3VuaXR0ZXN0LkZvcmVp",
"Z25FbnVtEkAKEnNpbmdsZV9pbXBvcnRfZW51bRgXIAEoDjIkLnByb3RvYnVm",
"X3VuaXR0ZXN0X2ltcG9ydC5JbXBvcnRFbnVtElMKHHNpbmdsZV9wdWJsaWNf",
"aW1wb3J0X21lc3NhZ2UYGiABKAsyLS5wcm90b2J1Zl91bml0dGVzdF9pbXBv",
"cnQuUHVibGljSW1wb3J0TWVzc2FnZRIWCg5yZXBlYXRlZF9pbnQzMhgfIAMo",
"BRIWCg5yZXBlYXRlZF9pbnQ2NBggIAMoAxIXCg9yZXBlYXRlZF91aW50MzIY",
"ISADKA0SFwoPcmVwZWF0ZWRfdWludDY0GCIgAygEEhcKD3JlcGVhdGVkX3Np",
"bnQzMhgjIAMoERIXCg9yZXBlYXRlZF9zaW50NjQYJCADKBISGAoQcmVwZWF0",
"ZWRfZml4ZWQzMhglIAMoBxIYChByZXBlYXRlZF9maXhlZDY0GCYgAygGEhkK",
"EXJlcGVhdGVkX3NmaXhlZDMyGCcgAygPEhkKEXJlcGVhdGVkX3NmaXhlZDY0",
"GCggAygQEhYKDnJlcGVhdGVkX2Zsb2F0GCkgAygCEhcKD3JlcGVhdGVkX2Rv",
"dWJsZRgqIAMoARIVCg1yZXBlYXRlZF9ib29sGCsgAygIEhcKD3JlcGVhdGVk",
"X3N0cmluZxgsIAMoCRIWCg5yZXBlYXRlZF9ieXRlcxgtIAMoDBJOChdyZXBl",
"YXRlZF9uZXN0ZWRfbWVzc2FnZRgwIAMoCzItLnByb3RvYnVmX3VuaXR0ZXN0",
"LlRlc3RBbGxUeXBlcy5OZXN0ZWRNZXNzYWdlEkMKGHJlcGVhdGVkX2ZvcmVp",
"Z25fbWVzc2FnZRgxIAMoCzIhLnByb3RvYnVmX3VuaXR0ZXN0LkZvcmVpZ25N",
"ZXNzYWdlEkgKF3JlcGVhdGVkX2ltcG9ydF9tZXNzYWdlGDIgAygLMicucHJv",
"dG9idWZfdW5pdHRlc3RfaW1wb3J0LkltcG9ydE1lc3NhZ2USSAoUcmVwZWF0",
"ZWRfbmVzdGVkX2VudW0YMyADKA4yKi5wcm90b2J1Zl91bml0dGVzdC5UZXN0",
"QWxsVHlwZXMuTmVzdGVkRW51bRI9ChVyZXBlYXRlZF9mb3JlaWduX2VudW0Y",
"NCADKA4yHi5wcm90b2J1Zl91bml0dGVzdC5Gb3JlaWduRW51bRJCChRyZXBl",
"YXRlZF9pbXBvcnRfZW51bRg1IAMoDjIkLnByb3RvYnVmX3VuaXR0ZXN0X2lt",
"cG9ydC5JbXBvcnRFbnVtElUKHnJlcGVhdGVkX3B1YmxpY19pbXBvcnRfbWVz",
"c2FnZRg2IAMoCzItLnByb3RvYnVmX3VuaXR0ZXN0X2ltcG9ydC5QdWJsaWNJ",
"bXBvcnRNZXNzYWdlEhYKDG9uZW9mX3VpbnQzMhhvIAEoDUgAEk0KFG9uZW9m",
"X25lc3RlZF9tZXNzYWdlGHAgASgLMi0ucHJvdG9idWZfdW5pdHRlc3QuVGVz",
"dEFsbFR5cGVzLk5lc3RlZE1lc3NhZ2VIABIWCgxvbmVvZl9zdHJpbmcYcSAB",
"KAlIABIVCgtvbmVvZl9ieXRlcxhyIAEoDEgAGhsKDU5lc3RlZE1lc3NhZ2US",
"CgoCYmIYASABKAUiVgoKTmVzdGVkRW51bRIbChdORVNURURfRU5VTV9VTlNQ",
"RUNJRklFRBAAEgcKA0ZPTxABEgcKA0JBUhACEgcKA0JBWhADEhAKA05FRxD/",
"//////////8BQg0KC29uZW9mX2ZpZWxkIrsBChJOZXN0ZWRUZXN0QWxsVHlw",
"ZXMSNAoFY2hpbGQYASABKAsyJS5wcm90b2J1Zl91bml0dGVzdC5OZXN0ZWRU",
"ZXN0QWxsVHlwZXMSMAoHcGF5bG9hZBgCIAEoCzIfLnByb3RvYnVmX3VuaXR0",
"ZXN0LlRlc3RBbGxUeXBlcxI9Cg5yZXBlYXRlZF9jaGlsZBgDIAMoCzIlLnBy",
"b3RvYnVmX3VuaXR0ZXN0Lk5lc3RlZFRlc3RBbGxUeXBlcyI0ChRUZXN0RGVw",
"cmVjYXRlZEZpZWxkcxIcChBkZXByZWNhdGVkX2ludDMyGAEgASgFQgIYASIb",
"Cg5Gb3JlaWduTWVzc2FnZRIJCgFjGAEgASgFIjAKElRlc3RSZXNlcnZlZEZp",
"ZWxkc0oECAIQA0oECA8QEEoECAkQDFIDYmFyUgNiYXoiWgoRVGVzdEZvcmVp",
"Z25OZXN0ZWQSRQoOZm9yZWlnbl9uZXN0ZWQYASABKAsyLS5wcm90b2J1Zl91",
"bml0dGVzdC5UZXN0QWxsVHlwZXMuTmVzdGVkTWVzc2FnZSI0ChhUZXN0UmVh",
"bGx5TGFyZ2VUYWdOdW1iZXISCQoBYRgBIAEoBRINCgJiYhj///9/IAEoBSJV",
"ChRUZXN0UmVjdXJzaXZlTWVzc2FnZRIyCgFhGAEgASgLMicucHJvdG9idWZf",
"dW5pdHRlc3QuVGVzdFJlY3Vyc2l2ZU1lc3NhZ2USCQoBaRgCIAEoBSJLChRU",
"ZXN0TXV0dWFsUmVjdXJzaW9uQRIzCgJiYhgBIAEoCzInLnByb3RvYnVmX3Vu",
"aXR0ZXN0LlRlc3RNdXR1YWxSZWN1cnNpb25CImIKFFRlc3RNdXR1YWxSZWN1",
"cnNpb25CEjIKAWEYASABKAsyJy5wcm90b2J1Zl91bml0dGVzdC5UZXN0TXV0",
"dWFsUmVjdXJzaW9uQRIWCg5vcHRpb25hbF9pbnQzMhgCIAEoBSLrAgoXVGVz",
"dENhbWVsQ2FzZUZpZWxkTmFtZXMSFgoOUHJpbWl0aXZlRmllbGQYASABKAUS",
"EwoLU3RyaW5nRmllbGQYAiABKAkSMQoJRW51bUZpZWxkGAMgASgOMh4ucHJv",
"dG9idWZfdW5pdHRlc3QuRm9yZWlnbkVudW0SNwoMTWVzc2FnZUZpZWxkGAQg",
"ASgLMiEucHJvdG9idWZfdW5pdHRlc3QuRm9yZWlnbk1lc3NhZ2USHgoWUmVw",
"ZWF0ZWRQcmltaXRpdmVGaWVsZBgHIAMoBRIbChNSZXBlYXRlZFN0cmluZ0Zp",
"ZWxkGAggAygJEjkKEVJlcGVhdGVkRW51bUZpZWxkGAkgAygOMh4ucHJvdG9i",
"dWZfdW5pdHRlc3QuRm9yZWlnbkVudW0SPwoUUmVwZWF0ZWRNZXNzYWdlRmll",
"bGQYCiADKAsyIS5wcm90b2J1Zl91bml0dGVzdC5Gb3JlaWduTWVzc2FnZSLH",
"AQoSVGVzdEZpZWxkT3JkZXJpbmdzEhEKCW15X3N0cmluZxgLIAEoCRIOCgZt",
"eV9pbnQYASABKAMSEAoIbXlfZmxvYXQYZSABKAISUwoVc2luZ2xlX25lc3Rl",
"ZF9tZXNzYWdlGMgBIAEoCzIzLnByb3RvYnVmX3VuaXR0ZXN0LlRlc3RGaWVs",
"ZE9yZGVyaW5ncy5OZXN0ZWRNZXNzYWdlGicKDU5lc3RlZE1lc3NhZ2USCgoC",
"b28YAiABKAMSCgoCYmIYASABKAUiSwoRU3BhcnNlRW51bU1lc3NhZ2USNgoL",
"c3BhcnNlX2VudW0YASABKA4yIS5wcm90b2J1Zl91bml0dGVzdC5UZXN0U3Bh",
"cnNlRW51bSIZCglPbmVTdHJpbmcSDAoEZGF0YRgBIAEoCSIaCgpNb3JlU3Ry",
"aW5nEgwKBGRhdGEYASADKAkiGAoIT25lQnl0ZXMSDAoEZGF0YRgBIAEoDCIZ",
"CglNb3JlQnl0ZXMSDAoEZGF0YRgBIAEoDCIcCgxJbnQzMk1lc3NhZ2USDAoE",
"ZGF0YRgBIAEoBSIdCg1VaW50MzJNZXNzYWdlEgwKBGRhdGEYASABKA0iHAoM",
"SW50NjRNZXNzYWdlEgwKBGRhdGEYASABKAMiHQoNVWludDY0TWVzc2FnZRIM",
"CgRkYXRhGAEgASgEIhsKC0Jvb2xNZXNzYWdlEgwKBGRhdGEYASABKAgicwoJ",
"VGVzdE9uZW9mEhEKB2Zvb19pbnQYASABKAVIABIUCgpmb29fc3RyaW5nGAIg",
"ASgJSAASNgoLZm9vX21lc3NhZ2UYAyABKAsyHy5wcm90b2J1Zl91bml0dGVz",
"dC5UZXN0QWxsVHlwZXNIAEIFCgNmb28iqgMKD1Rlc3RQYWNrZWRUeXBlcxIY",
"CgxwYWNrZWRfaW50MzIYWiADKAVCAhABEhgKDHBhY2tlZF9pbnQ2NBhbIAMo",
"A0ICEAESGQoNcGFja2VkX3VpbnQzMhhcIAMoDUICEAESGQoNcGFja2VkX3Vp",
"bnQ2NBhdIAMoBEICEAESGQoNcGFja2VkX3NpbnQzMhheIAMoEUICEAESGQoN",
"cGFja2VkX3NpbnQ2NBhfIAMoEkICEAESGgoOcGFja2VkX2ZpeGVkMzIYYCAD",
"KAdCAhABEhoKDnBhY2tlZF9maXhlZDY0GGEgAygGQgIQARIbCg9wYWNrZWRf",
"c2ZpeGVkMzIYYiADKA9CAhABEhsKD3BhY2tlZF9zZml4ZWQ2NBhjIAMoEEIC",
"EAESGAoMcGFja2VkX2Zsb2F0GGQgAygCQgIQARIZCg1wYWNrZWRfZG91Ymxl",
"GGUgAygBQgIQARIXCgtwYWNrZWRfYm9vbBhmIAMoCEICEAESNwoLcGFja2Vk",
"X2VudW0YZyADKA4yHi5wcm90b2J1Zl91bml0dGVzdC5Gb3JlaWduRW51bUIC",
"EAEiyAMKEVRlc3RVbnBhY2tlZFR5cGVzEhoKDnVucGFja2VkX2ludDMyGFog",
"AygFQgIQABIaCg51bnBhY2tlZF9pbnQ2NBhbIAMoA0ICEAASGwoPdW5wYWNr",
"ZWRfdWludDMyGFwgAygNQgIQABIbCg91bnBhY2tlZF91aW50NjQYXSADKARC",
"AhAAEhsKD3VucGFja2VkX3NpbnQzMhheIAMoEUICEAASGwoPdW5wYWNrZWRf",
"c2ludDY0GF8gAygSQgIQABIcChB1bnBhY2tlZF9maXhlZDMyGGAgAygHQgIQ",
"ABIcChB1bnBhY2tlZF9maXhlZDY0GGEgAygGQgIQABIdChF1bnBhY2tlZF9z",
"Zml4ZWQzMhhiIAMoD0ICEAASHQoRdW5wYWNrZWRfc2ZpeGVkNjQYYyADKBBC",
"AhAAEhoKDnVucGFja2VkX2Zsb2F0GGQgAygCQgIQABIbCg91bnBhY2tlZF9k",
"b3VibGUYZSADKAFCAhAAEhkKDXVucGFja2VkX2Jvb2wYZiADKAhCAhAAEjkK",
"DXVucGFja2VkX2VudW0YZyADKA4yHi5wcm90b2J1Zl91bml0dGVzdC5Gb3Jl",
"aWduRW51bUICEAAiwAEKI1Rlc3RSZXBlYXRlZFNjYWxhckRpZmZlcmVudFRh",
"Z1NpemVzEhgKEHJlcGVhdGVkX2ZpeGVkMzIYDCADKAcSFgoOcmVwZWF0ZWRf",
"aW50MzIYDSADKAUSGQoQcmVwZWF0ZWRfZml4ZWQ2NBj+DyADKAYSFwoOcmVw",
"ZWF0ZWRfaW50NjQY/w8gAygDEhgKDnJlcGVhdGVkX2Zsb2F0GP7/DyADKAIS",
"GQoPcmVwZWF0ZWRfdWludDY0GP//DyADKAQiKAobVGVzdENvbW1lbnRJbmpl",
"Y3Rpb25NZXNzYWdlEgkKAWEYASABKAkiDAoKRm9vUmVxdWVzdCINCgtGb29S",
"ZXNwb25zZSISChBGb29DbGllbnRNZXNzYWdlIhIKEEZvb1NlcnZlck1lc3Nh",
"Z2UiDAoKQmFyUmVxdWVzdCINCgtCYXJSZXNwb25zZSpZCgtGb3JlaWduRW51",
"bRIXChNGT1JFSUdOX1VOU1BFQ0lGSUVEEAASDwoLRk9SRUlHTl9GT08QBBIP",
"CgtGT1JFSUdOX0JBUhAFEg8KC0ZPUkVJR05fQkFaEAYqdQoUVGVzdEVudW1X",
"aXRoRHVwVmFsdWUSKAokVEVTVF9FTlVNX1dJVEhfRFVQX1ZBTFVFX1VOU1BF",
"Q0lGSUVEEAASCAoERk9PMRABEggKBEJBUjEQAhIHCgNCQVoQAxIICgRGT08y",
"EAESCAoEQkFSMhACGgIQASqdAQoOVGVzdFNwYXJzZUVudW0SIAocVEVTVF9T",
"UEFSU0VfRU5VTV9VTlNQRUNJRklFRBAAEgwKCFNQQVJTRV9BEHsSDgoIU1BB",
"UlNFX0IQpucDEg8KCFNQQVJTRV9DELKxgAYSFQoIU1BBUlNFX0QQ8f//////",
"////ARIVCghTUEFSU0VfRRC03vz///////8BEgwKCFNQQVJTRV9HEAIymQEK",
"C1Rlc3RTZXJ2aWNlEkQKA0ZvbxIdLnByb3RvYnVmX3VuaXR0ZXN0LkZvb1Jl",
"cXVlc3QaHi5wcm90b2J1Zl91bml0dGVzdC5Gb29SZXNwb25zZRJECgNCYXIS",
"HS5wcm90b2J1Zl91bml0dGVzdC5CYXJSZXF1ZXN0Gh4ucHJvdG9idWZfdW5p",
"dHRlc3QuQmFyUmVzcG9uc2VCOkINVW5pdHRlc3RQcm90b0gBgAEBiAEBkAEB",
"+AEBqgIaR29vZ2xlLlByb3RvYnVmLlRlc3RQcm90b3NiBnByb3RvMw=="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::Google.Protobuf.TestProtos.UnittestImportProto3Reflection.Descriptor, },
new pbr::GeneratedCodeInfo(new[] {typeof(global::Google.Protobuf.TestProtos.ForeignEnum), typeof(global::Google.Protobuf.TestProtos.TestEnumWithDupValue), typeof(global::Google.Protobuf.TestProtos.TestSparseEnum), }, new pbr::GeneratedCodeInfo[] {
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestAllTypes), global::Google.Protobuf.TestProtos.TestAllTypes.Parser, new[]{ "SingleInt32", "SingleInt64", "SingleUint32", "SingleUint64", "SingleSint32", "SingleSint64", "SingleFixed32", "SingleFixed64", "SingleSfixed32", "SingleSfixed64", "SingleFloat", "SingleDouble", "SingleBool", "SingleString", "SingleBytes", "SingleNestedMessage", "SingleForeignMessage", "SingleImportMessage", "SingleNestedEnum", "SingleForeignEnum", "SingleImportEnum", "SinglePublicImportMessage", "RepeatedInt32", "RepeatedInt64", "RepeatedUint32", "RepeatedUint64", "RepeatedSint32", "RepeatedSint64", "RepeatedFixed32", "RepeatedFixed64", "RepeatedSfixed32", "RepeatedSfixed64", "RepeatedFloat", "RepeatedDouble", "RepeatedBool", "RepeatedString", "RepeatedBytes", "RepeatedNestedMessage", "RepeatedForeignMessage", "RepeatedImportMessage", "RepeatedNestedEnum", "RepeatedForeignEnum", "RepeatedImportEnum", "RepeatedPublicImportMessage", "OneofUint32", "OneofNestedMessage", "OneofString", "OneofBytes" }, new[]{ "OneofField" }, new[]{ typeof(global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum) }, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage), global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage.Parser, new[]{ "Bb" }, null, null, null)}),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.NestedTestAllTypes), global::Google.Protobuf.TestProtos.NestedTestAllTypes.Parser, new[]{ "Child", "Payload", "RepeatedChild" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestDeprecatedFields), global::Google.Protobuf.TestProtos.TestDeprecatedFields.Parser, new[]{ "DeprecatedInt32" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.ForeignMessage), global::Google.Protobuf.TestProtos.ForeignMessage.Parser, new[]{ "C" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestReservedFields), global::Google.Protobuf.TestProtos.TestReservedFields.Parser, null, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestForeignNested), global::Google.Protobuf.TestProtos.TestForeignNested.Parser, new[]{ "ForeignNested" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestReallyLargeTagNumber), global::Google.Protobuf.TestProtos.TestReallyLargeTagNumber.Parser, new[]{ "A", "Bb" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestRecursiveMessage), global::Google.Protobuf.TestProtos.TestRecursiveMessage.Parser, new[]{ "A", "I" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestMutualRecursionA), global::Google.Protobuf.TestProtos.TestMutualRecursionA.Parser, new[]{ "Bb" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestMutualRecursionB), global::Google.Protobuf.TestProtos.TestMutualRecursionB.Parser, new[]{ "A", "OptionalInt32" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestCamelCaseFieldNames), global::Google.Protobuf.TestProtos.TestCamelCaseFieldNames.Parser, new[]{ "PrimitiveField", "StringField", "EnumField", "MessageField", "RepeatedPrimitiveField", "RepeatedStringField", "RepeatedEnumField", "RepeatedMessageField" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestFieldOrderings), global::Google.Protobuf.TestProtos.TestFieldOrderings.Parser, new[]{ "MyString", "MyInt", "MyFloat", "SingleNestedMessage" }, null, null, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage), global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage.Parser, new[]{ "Oo", "Bb" }, null, null, null)}),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.SparseEnumMessage), global::Google.Protobuf.TestProtos.SparseEnumMessage.Parser, new[]{ "SparseEnum" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.OneString), global::Google.Protobuf.TestProtos.OneString.Parser, new[]{ "Data" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.MoreString), global::Google.Protobuf.TestProtos.MoreString.Parser, new[]{ "Data" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.OneBytes), global::Google.Protobuf.TestProtos.OneBytes.Parser, new[]{ "Data" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.MoreBytes), global::Google.Protobuf.TestProtos.MoreBytes.Parser, new[]{ "Data" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.Int32Message), global::Google.Protobuf.TestProtos.Int32Message.Parser, new[]{ "Data" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.Uint32Message), global::Google.Protobuf.TestProtos.Uint32Message.Parser, new[]{ "Data" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.Int64Message), global::Google.Protobuf.TestProtos.Int64Message.Parser, new[]{ "Data" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.Uint64Message), global::Google.Protobuf.TestProtos.Uint64Message.Parser, new[]{ "Data" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.BoolMessage), global::Google.Protobuf.TestProtos.BoolMessage.Parser, new[]{ "Data" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestOneof), global::Google.Protobuf.TestProtos.TestOneof.Parser, new[]{ "FooInt", "FooString", "FooMessage" }, new[]{ "Foo" }, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestPackedTypes), global::Google.Protobuf.TestProtos.TestPackedTypes.Parser, new[]{ "PackedInt32", "PackedInt64", "PackedUint32", "PackedUint64", "PackedSint32", "PackedSint64", "PackedFixed32", "PackedFixed64", "PackedSfixed32", "PackedSfixed64", "PackedFloat", "PackedDouble", "PackedBool", "PackedEnum" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestUnpackedTypes), global::Google.Protobuf.TestProtos.TestUnpackedTypes.Parser, new[]{ "UnpackedInt32", "UnpackedInt64", "UnpackedUint32", "UnpackedUint64", "UnpackedSint32", "UnpackedSint64", "UnpackedFixed32", "UnpackedFixed64", "UnpackedSfixed32", "UnpackedSfixed64", "UnpackedFloat", "UnpackedDouble", "UnpackedBool", "UnpackedEnum" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestRepeatedScalarDifferentTagSizes), global::Google.Protobuf.TestProtos.TestRepeatedScalarDifferentTagSizes.Parser, new[]{ "RepeatedFixed32", "RepeatedInt32", "RepeatedFixed64", "RepeatedInt64", "RepeatedFloat", "RepeatedUint64" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.TestCommentInjectionMessage), global::Google.Protobuf.TestProtos.TestCommentInjectionMessage.Parser, new[]{ "A" }, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.FooRequest), global::Google.Protobuf.TestProtos.FooRequest.Parser, null, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.FooResponse), global::Google.Protobuf.TestProtos.FooResponse.Parser, null, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.FooClientMessage), global::Google.Protobuf.TestProtos.FooClientMessage.Parser, null, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.FooServerMessage), global::Google.Protobuf.TestProtos.FooServerMessage.Parser, null, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.BarRequest), global::Google.Protobuf.TestProtos.BarRequest.Parser, null, null, null, null),
new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.TestProtos.BarResponse), global::Google.Protobuf.TestProtos.BarResponse.Parser, null, null, null, null)
}));
}
#endregion
}
#region Enums
public enum ForeignEnum {
FOREIGN_UNSPECIFIED = 0,
FOREIGN_FOO = 4,
FOREIGN_BAR = 5,
FOREIGN_BAZ = 6,
}
///
/// Test an enum that has multiple values with the same number.
///
public enum TestEnumWithDupValue {
TEST_ENUM_WITH_DUP_VALUE_UNSPECIFIED = 0,
FOO1 = 1,
BAR1 = 2,
BAZ = 3,
FOO2 = 1,
BAR2 = 2,
}
///
/// Test an enum with large, unordered values.
///
public enum TestSparseEnum {
TEST_SPARSE_ENUM_UNSPECIFIED = 0,
SPARSE_A = 123,
SPARSE_B = 62374,
SPARSE_C = 12589234,
SPARSE_D = -15,
SPARSE_E = -53452,
///
/// In proto3, value 0 must be the first one specified
/// SPARSE_F = 0;
///
SPARSE_G = 2,
}
#endregion
#region Messages
///
/// This proto includes every type of field in both singular and repeated
/// forms.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class TestAllTypes : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestAllTypes());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[0]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public TestAllTypes() {
OnConstruction();
}
partial void OnConstruction();
public TestAllTypes(TestAllTypes other) : this() {
singleInt32_ = other.singleInt32_;
singleInt64_ = other.singleInt64_;
singleUint32_ = other.singleUint32_;
singleUint64_ = other.singleUint64_;
singleSint32_ = other.singleSint32_;
singleSint64_ = other.singleSint64_;
singleFixed32_ = other.singleFixed32_;
singleFixed64_ = other.singleFixed64_;
singleSfixed32_ = other.singleSfixed32_;
singleSfixed64_ = other.singleSfixed64_;
singleFloat_ = other.singleFloat_;
singleDouble_ = other.singleDouble_;
singleBool_ = other.singleBool_;
singleString_ = other.singleString_;
singleBytes_ = other.singleBytes_;
SingleNestedMessage = other.singleNestedMessage_ != null ? other.SingleNestedMessage.Clone() : null;
SingleForeignMessage = other.singleForeignMessage_ != null ? other.SingleForeignMessage.Clone() : null;
SingleImportMessage = other.singleImportMessage_ != null ? other.SingleImportMessage.Clone() : null;
singleNestedEnum_ = other.singleNestedEnum_;
singleForeignEnum_ = other.singleForeignEnum_;
singleImportEnum_ = other.singleImportEnum_;
SinglePublicImportMessage = other.singlePublicImportMessage_ != null ? other.SinglePublicImportMessage.Clone() : null;
repeatedInt32_ = other.repeatedInt32_.Clone();
repeatedInt64_ = other.repeatedInt64_.Clone();
repeatedUint32_ = other.repeatedUint32_.Clone();
repeatedUint64_ = other.repeatedUint64_.Clone();
repeatedSint32_ = other.repeatedSint32_.Clone();
repeatedSint64_ = other.repeatedSint64_.Clone();
repeatedFixed32_ = other.repeatedFixed32_.Clone();
repeatedFixed64_ = other.repeatedFixed64_.Clone();
repeatedSfixed32_ = other.repeatedSfixed32_.Clone();
repeatedSfixed64_ = other.repeatedSfixed64_.Clone();
repeatedFloat_ = other.repeatedFloat_.Clone();
repeatedDouble_ = other.repeatedDouble_.Clone();
repeatedBool_ = other.repeatedBool_.Clone();
repeatedString_ = other.repeatedString_.Clone();
repeatedBytes_ = other.repeatedBytes_.Clone();
repeatedNestedMessage_ = other.repeatedNestedMessage_.Clone();
repeatedForeignMessage_ = other.repeatedForeignMessage_.Clone();
repeatedImportMessage_ = other.repeatedImportMessage_.Clone();
repeatedNestedEnum_ = other.repeatedNestedEnum_.Clone();
repeatedForeignEnum_ = other.repeatedForeignEnum_.Clone();
repeatedImportEnum_ = other.repeatedImportEnum_.Clone();
repeatedPublicImportMessage_ = other.repeatedPublicImportMessage_.Clone();
switch (other.OneofFieldCase) {
case OneofFieldOneofCase.OneofUint32:
OneofUint32 = other.OneofUint32;
break;
case OneofFieldOneofCase.OneofNestedMessage:
OneofNestedMessage = other.OneofNestedMessage.Clone();
break;
case OneofFieldOneofCase.OneofString:
OneofString = other.OneofString;
break;
case OneofFieldOneofCase.OneofBytes:
OneofBytes = other.OneofBytes;
break;
}
}
public TestAllTypes Clone() {
return new TestAllTypes(this);
}
/// Field number for the "single_int32" field.
public const int SingleInt32FieldNumber = 1;
private int singleInt32_;
///
/// Singular
///
public int SingleInt32 {
get { return singleInt32_; }
set {
singleInt32_ = value;
}
}
/// Field number for the "single_int64" field.
public const int SingleInt64FieldNumber = 2;
private long singleInt64_;
public long SingleInt64 {
get { return singleInt64_; }
set {
singleInt64_ = value;
}
}
/// Field number for the "single_uint32" field.
public const int SingleUint32FieldNumber = 3;
private uint singleUint32_;
public uint SingleUint32 {
get { return singleUint32_; }
set {
singleUint32_ = value;
}
}
/// Field number for the "single_uint64" field.
public const int SingleUint64FieldNumber = 4;
private ulong singleUint64_;
public ulong SingleUint64 {
get { return singleUint64_; }
set {
singleUint64_ = value;
}
}
/// Field number for the "single_sint32" field.
public const int SingleSint32FieldNumber = 5;
private int singleSint32_;
public int SingleSint32 {
get { return singleSint32_; }
set {
singleSint32_ = value;
}
}
/// Field number for the "single_sint64" field.
public const int SingleSint64FieldNumber = 6;
private long singleSint64_;
public long SingleSint64 {
get { return singleSint64_; }
set {
singleSint64_ = value;
}
}
/// Field number for the "single_fixed32" field.
public const int SingleFixed32FieldNumber = 7;
private uint singleFixed32_;
public uint SingleFixed32 {
get { return singleFixed32_; }
set {
singleFixed32_ = value;
}
}
/// Field number for the "single_fixed64" field.
public const int SingleFixed64FieldNumber = 8;
private ulong singleFixed64_;
public ulong SingleFixed64 {
get { return singleFixed64_; }
set {
singleFixed64_ = value;
}
}
/// Field number for the "single_sfixed32" field.
public const int SingleSfixed32FieldNumber = 9;
private int singleSfixed32_;
public int SingleSfixed32 {
get { return singleSfixed32_; }
set {
singleSfixed32_ = value;
}
}
/// Field number for the "single_sfixed64" field.
public const int SingleSfixed64FieldNumber = 10;
private long singleSfixed64_;
public long SingleSfixed64 {
get { return singleSfixed64_; }
set {
singleSfixed64_ = value;
}
}
/// Field number for the "single_float" field.
public const int SingleFloatFieldNumber = 11;
private float singleFloat_;
public float SingleFloat {
get { return singleFloat_; }
set {
singleFloat_ = value;
}
}
/// Field number for the "single_double" field.
public const int SingleDoubleFieldNumber = 12;
private double singleDouble_;
public double SingleDouble {
get { return singleDouble_; }
set {
singleDouble_ = value;
}
}
/// Field number for the "single_bool" field.
public const int SingleBoolFieldNumber = 13;
private bool singleBool_;
public bool SingleBool {
get { return singleBool_; }
set {
singleBool_ = value;
}
}
/// Field number for the "single_string" field.
public const int SingleStringFieldNumber = 14;
private string singleString_ = "";
public string SingleString {
get { return singleString_; }
set {
singleString_ = pb::Preconditions.CheckNotNull(value, "value");
}
}
/// Field number for the "single_bytes" field.
public const int SingleBytesFieldNumber = 15;
private pb::ByteString singleBytes_ = pb::ByteString.Empty;
public pb::ByteString SingleBytes {
get { return singleBytes_; }
set {
singleBytes_ = pb::Preconditions.CheckNotNull(value, "value");
}
}
/// Field number for the "single_nested_message" field.
public const int SingleNestedMessageFieldNumber = 18;
private global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage singleNestedMessage_;
public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage SingleNestedMessage {
get { return singleNestedMessage_; }
set {
singleNestedMessage_ = value;
}
}
/// Field number for the "single_foreign_message" field.
public const int SingleForeignMessageFieldNumber = 19;
private global::Google.Protobuf.TestProtos.ForeignMessage singleForeignMessage_;
public global::Google.Protobuf.TestProtos.ForeignMessage SingleForeignMessage {
get { return singleForeignMessage_; }
set {
singleForeignMessage_ = value;
}
}
/// Field number for the "single_import_message" field.
public const int SingleImportMessageFieldNumber = 20;
private global::Google.Protobuf.TestProtos.ImportMessage singleImportMessage_;
public global::Google.Protobuf.TestProtos.ImportMessage SingleImportMessage {
get { return singleImportMessage_; }
set {
singleImportMessage_ = value;
}
}
/// Field number for the "single_nested_enum" field.
public const int SingleNestedEnumFieldNumber = 21;
private global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum singleNestedEnum_ = global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum.NESTED_ENUM_UNSPECIFIED;
public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum SingleNestedEnum {
get { return singleNestedEnum_; }
set {
singleNestedEnum_ = value;
}
}
/// Field number for the "single_foreign_enum" field.
public const int SingleForeignEnumFieldNumber = 22;
private global::Google.Protobuf.TestProtos.ForeignEnum singleForeignEnum_ = global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED;
public global::Google.Protobuf.TestProtos.ForeignEnum SingleForeignEnum {
get { return singleForeignEnum_; }
set {
singleForeignEnum_ = value;
}
}
/// Field number for the "single_import_enum" field.
public const int SingleImportEnumFieldNumber = 23;
private global::Google.Protobuf.TestProtos.ImportEnum singleImportEnum_ = global::Google.Protobuf.TestProtos.ImportEnum.IMPORT_ENUM_UNSPECIFIED;
public global::Google.Protobuf.TestProtos.ImportEnum SingleImportEnum {
get { return singleImportEnum_; }
set {
singleImportEnum_ = value;
}
}
/// Field number for the "single_public_import_message" field.
public const int SinglePublicImportMessageFieldNumber = 26;
private global::Google.Protobuf.TestProtos.PublicImportMessage singlePublicImportMessage_;
///
/// Defined in unittest_import_public.proto
///
public global::Google.Protobuf.TestProtos.PublicImportMessage SinglePublicImportMessage {
get { return singlePublicImportMessage_; }
set {
singlePublicImportMessage_ = value;
}
}
/// Field number for the "repeated_int32" field.
public const int RepeatedInt32FieldNumber = 31;
private static readonly pb::FieldCodec _repeated_repeatedInt32_codec
= pb::FieldCodec.ForInt32(250);
private readonly pbc::RepeatedField repeatedInt32_ = new pbc::RepeatedField();
///
/// Repeated
///
public pbc::RepeatedField RepeatedInt32 {
get { return repeatedInt32_; }
}
/// Field number for the "repeated_int64" field.
public const int RepeatedInt64FieldNumber = 32;
private static readonly pb::FieldCodec _repeated_repeatedInt64_codec
= pb::FieldCodec.ForInt64(258);
private readonly pbc::RepeatedField repeatedInt64_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedInt64 {
get { return repeatedInt64_; }
}
/// Field number for the "repeated_uint32" field.
public const int RepeatedUint32FieldNumber = 33;
private static readonly pb::FieldCodec _repeated_repeatedUint32_codec
= pb::FieldCodec.ForUInt32(266);
private readonly pbc::RepeatedField repeatedUint32_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedUint32 {
get { return repeatedUint32_; }
}
/// Field number for the "repeated_uint64" field.
public const int RepeatedUint64FieldNumber = 34;
private static readonly pb::FieldCodec _repeated_repeatedUint64_codec
= pb::FieldCodec.ForUInt64(274);
private readonly pbc::RepeatedField repeatedUint64_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedUint64 {
get { return repeatedUint64_; }
}
/// Field number for the "repeated_sint32" field.
public const int RepeatedSint32FieldNumber = 35;
private static readonly pb::FieldCodec _repeated_repeatedSint32_codec
= pb::FieldCodec.ForSInt32(282);
private readonly pbc::RepeatedField repeatedSint32_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedSint32 {
get { return repeatedSint32_; }
}
/// Field number for the "repeated_sint64" field.
public const int RepeatedSint64FieldNumber = 36;
private static readonly pb::FieldCodec _repeated_repeatedSint64_codec
= pb::FieldCodec.ForSInt64(290);
private readonly pbc::RepeatedField repeatedSint64_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedSint64 {
get { return repeatedSint64_; }
}
/// Field number for the "repeated_fixed32" field.
public const int RepeatedFixed32FieldNumber = 37;
private static readonly pb::FieldCodec _repeated_repeatedFixed32_codec
= pb::FieldCodec.ForFixed32(298);
private readonly pbc::RepeatedField repeatedFixed32_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedFixed32 {
get { return repeatedFixed32_; }
}
/// Field number for the "repeated_fixed64" field.
public const int RepeatedFixed64FieldNumber = 38;
private static readonly pb::FieldCodec _repeated_repeatedFixed64_codec
= pb::FieldCodec.ForFixed64(306);
private readonly pbc::RepeatedField repeatedFixed64_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedFixed64 {
get { return repeatedFixed64_; }
}
/// Field number for the "repeated_sfixed32" field.
public const int RepeatedSfixed32FieldNumber = 39;
private static readonly pb::FieldCodec _repeated_repeatedSfixed32_codec
= pb::FieldCodec.ForSFixed32(314);
private readonly pbc::RepeatedField repeatedSfixed32_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedSfixed32 {
get { return repeatedSfixed32_; }
}
/// Field number for the "repeated_sfixed64" field.
public const int RepeatedSfixed64FieldNumber = 40;
private static readonly pb::FieldCodec _repeated_repeatedSfixed64_codec
= pb::FieldCodec.ForSFixed64(322);
private readonly pbc::RepeatedField repeatedSfixed64_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedSfixed64 {
get { return repeatedSfixed64_; }
}
/// Field number for the "repeated_float" field.
public const int RepeatedFloatFieldNumber = 41;
private static readonly pb::FieldCodec _repeated_repeatedFloat_codec
= pb::FieldCodec.ForFloat(330);
private readonly pbc::RepeatedField repeatedFloat_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedFloat {
get { return repeatedFloat_; }
}
/// Field number for the "repeated_double" field.
public const int RepeatedDoubleFieldNumber = 42;
private static readonly pb::FieldCodec _repeated_repeatedDouble_codec
= pb::FieldCodec.ForDouble(338);
private readonly pbc::RepeatedField repeatedDouble_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedDouble {
get { return repeatedDouble_; }
}
/// Field number for the "repeated_bool" field.
public const int RepeatedBoolFieldNumber = 43;
private static readonly pb::FieldCodec _repeated_repeatedBool_codec
= pb::FieldCodec.ForBool(346);
private readonly pbc::RepeatedField repeatedBool_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedBool {
get { return repeatedBool_; }
}
/// Field number for the "repeated_string" field.
public const int RepeatedStringFieldNumber = 44;
private static readonly pb::FieldCodec _repeated_repeatedString_codec
= pb::FieldCodec.ForString(354);
private readonly pbc::RepeatedField repeatedString_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedString {
get { return repeatedString_; }
}
/// Field number for the "repeated_bytes" field.
public const int RepeatedBytesFieldNumber = 45;
private static readonly pb::FieldCodec _repeated_repeatedBytes_codec
= pb::FieldCodec.ForBytes(362);
private readonly pbc::RepeatedField repeatedBytes_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedBytes {
get { return repeatedBytes_; }
}
/// Field number for the "repeated_nested_message" field.
public const int RepeatedNestedMessageFieldNumber = 48;
private static readonly pb::FieldCodec _repeated_repeatedNestedMessage_codec
= pb::FieldCodec.ForMessage(386, global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage.Parser);
private readonly pbc::RepeatedField repeatedNestedMessage_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedNestedMessage {
get { return repeatedNestedMessage_; }
}
/// Field number for the "repeated_foreign_message" field.
public const int RepeatedForeignMessageFieldNumber = 49;
private static readonly pb::FieldCodec _repeated_repeatedForeignMessage_codec
= pb::FieldCodec.ForMessage(394, global::Google.Protobuf.TestProtos.ForeignMessage.Parser);
private readonly pbc::RepeatedField repeatedForeignMessage_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedForeignMessage {
get { return repeatedForeignMessage_; }
}
/// Field number for the "repeated_import_message" field.
public const int RepeatedImportMessageFieldNumber = 50;
private static readonly pb::FieldCodec _repeated_repeatedImportMessage_codec
= pb::FieldCodec.ForMessage(402, global::Google.Protobuf.TestProtos.ImportMessage.Parser);
private readonly pbc::RepeatedField repeatedImportMessage_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedImportMessage {
get { return repeatedImportMessage_; }
}
/// Field number for the "repeated_nested_enum" field.
public const int RepeatedNestedEnumFieldNumber = 51;
private static readonly pb::FieldCodec _repeated_repeatedNestedEnum_codec
= pb::FieldCodec.ForEnum(410, x => (int) x, x => (global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum) x);
private readonly pbc::RepeatedField repeatedNestedEnum_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedNestedEnum {
get { return repeatedNestedEnum_; }
}
/// Field number for the "repeated_foreign_enum" field.
public const int RepeatedForeignEnumFieldNumber = 52;
private static readonly pb::FieldCodec _repeated_repeatedForeignEnum_codec
= pb::FieldCodec.ForEnum(418, x => (int) x, x => (global::Google.Protobuf.TestProtos.ForeignEnum) x);
private readonly pbc::RepeatedField repeatedForeignEnum_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedForeignEnum {
get { return repeatedForeignEnum_; }
}
/// Field number for the "repeated_import_enum" field.
public const int RepeatedImportEnumFieldNumber = 53;
private static readonly pb::FieldCodec _repeated_repeatedImportEnum_codec
= pb::FieldCodec.ForEnum(426, x => (int) x, x => (global::Google.Protobuf.TestProtos.ImportEnum) x);
private readonly pbc::RepeatedField repeatedImportEnum_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedImportEnum {
get { return repeatedImportEnum_; }
}
/// Field number for the "repeated_public_import_message" field.
public const int RepeatedPublicImportMessageFieldNumber = 54;
private static readonly pb::FieldCodec _repeated_repeatedPublicImportMessage_codec
= pb::FieldCodec.ForMessage(434, global::Google.Protobuf.TestProtos.PublicImportMessage.Parser);
private readonly pbc::RepeatedField repeatedPublicImportMessage_ = new pbc::RepeatedField();
///
/// Defined in unittest_import_public.proto
///
public pbc::RepeatedField RepeatedPublicImportMessage {
get { return repeatedPublicImportMessage_; }
}
/// Field number for the "oneof_uint32" field.
public const int OneofUint32FieldNumber = 111;
public uint OneofUint32 {
get { return oneofFieldCase_ == OneofFieldOneofCase.OneofUint32 ? (uint) oneofField_ : 0; }
set {
oneofField_ = value;
oneofFieldCase_ = OneofFieldOneofCase.OneofUint32;
}
}
/// Field number for the "oneof_nested_message" field.
public const int OneofNestedMessageFieldNumber = 112;
public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage OneofNestedMessage {
get { return oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage ? (global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage) oneofField_ : null; }
set {
oneofField_ = value;
oneofFieldCase_ = value == null ? OneofFieldOneofCase.None : OneofFieldOneofCase.OneofNestedMessage;
}
}
/// Field number for the "oneof_string" field.
public const int OneofStringFieldNumber = 113;
public string OneofString {
get { return oneofFieldCase_ == OneofFieldOneofCase.OneofString ? (string) oneofField_ : ""; }
set {
oneofField_ = pb::Preconditions.CheckNotNull(value, "value");
oneofFieldCase_ = OneofFieldOneofCase.OneofString;
}
}
/// Field number for the "oneof_bytes" field.
public const int OneofBytesFieldNumber = 114;
public pb::ByteString OneofBytes {
get { return oneofFieldCase_ == OneofFieldOneofCase.OneofBytes ? (pb::ByteString) oneofField_ : pb::ByteString.Empty; }
set {
oneofField_ = pb::Preconditions.CheckNotNull(value, "value");
oneofFieldCase_ = OneofFieldOneofCase.OneofBytes;
}
}
private object oneofField_;
/// Enum of possible cases for the "oneof_field" oneof.
public enum OneofFieldOneofCase {
None = 0,
OneofUint32 = 111,
OneofNestedMessage = 112,
OneofString = 113,
OneofBytes = 114,
}
private OneofFieldOneofCase oneofFieldCase_ = OneofFieldOneofCase.None;
public OneofFieldOneofCase OneofFieldCase {
get { return oneofFieldCase_; }
}
public void ClearOneofField() {
oneofFieldCase_ = OneofFieldOneofCase.None;
oneofField_ = null;
}
public override bool Equals(object other) {
return Equals(other as TestAllTypes);
}
public bool Equals(TestAllTypes other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (SingleInt32 != other.SingleInt32) return false;
if (SingleInt64 != other.SingleInt64) return false;
if (SingleUint32 != other.SingleUint32) return false;
if (SingleUint64 != other.SingleUint64) return false;
if (SingleSint32 != other.SingleSint32) return false;
if (SingleSint64 != other.SingleSint64) return false;
if (SingleFixed32 != other.SingleFixed32) return false;
if (SingleFixed64 != other.SingleFixed64) return false;
if (SingleSfixed32 != other.SingleSfixed32) return false;
if (SingleSfixed64 != other.SingleSfixed64) return false;
if (SingleFloat != other.SingleFloat) return false;
if (SingleDouble != other.SingleDouble) return false;
if (SingleBool != other.SingleBool) return false;
if (SingleString != other.SingleString) return false;
if (SingleBytes != other.SingleBytes) return false;
if (!object.Equals(SingleNestedMessage, other.SingleNestedMessage)) return false;
if (!object.Equals(SingleForeignMessage, other.SingleForeignMessage)) return false;
if (!object.Equals(SingleImportMessage, other.SingleImportMessage)) return false;
if (SingleNestedEnum != other.SingleNestedEnum) return false;
if (SingleForeignEnum != other.SingleForeignEnum) return false;
if (SingleImportEnum != other.SingleImportEnum) return false;
if (!object.Equals(SinglePublicImportMessage, other.SinglePublicImportMessage)) return false;
if(!repeatedInt32_.Equals(other.repeatedInt32_)) return false;
if(!repeatedInt64_.Equals(other.repeatedInt64_)) return false;
if(!repeatedUint32_.Equals(other.repeatedUint32_)) return false;
if(!repeatedUint64_.Equals(other.repeatedUint64_)) return false;
if(!repeatedSint32_.Equals(other.repeatedSint32_)) return false;
if(!repeatedSint64_.Equals(other.repeatedSint64_)) return false;
if(!repeatedFixed32_.Equals(other.repeatedFixed32_)) return false;
if(!repeatedFixed64_.Equals(other.repeatedFixed64_)) return false;
if(!repeatedSfixed32_.Equals(other.repeatedSfixed32_)) return false;
if(!repeatedSfixed64_.Equals(other.repeatedSfixed64_)) return false;
if(!repeatedFloat_.Equals(other.repeatedFloat_)) return false;
if(!repeatedDouble_.Equals(other.repeatedDouble_)) return false;
if(!repeatedBool_.Equals(other.repeatedBool_)) return false;
if(!repeatedString_.Equals(other.repeatedString_)) return false;
if(!repeatedBytes_.Equals(other.repeatedBytes_)) return false;
if(!repeatedNestedMessage_.Equals(other.repeatedNestedMessage_)) return false;
if(!repeatedForeignMessage_.Equals(other.repeatedForeignMessage_)) return false;
if(!repeatedImportMessage_.Equals(other.repeatedImportMessage_)) return false;
if(!repeatedNestedEnum_.Equals(other.repeatedNestedEnum_)) return false;
if(!repeatedForeignEnum_.Equals(other.repeatedForeignEnum_)) return false;
if(!repeatedImportEnum_.Equals(other.repeatedImportEnum_)) return false;
if(!repeatedPublicImportMessage_.Equals(other.repeatedPublicImportMessage_)) return false;
if (OneofUint32 != other.OneofUint32) return false;
if (!object.Equals(OneofNestedMessage, other.OneofNestedMessage)) return false;
if (OneofString != other.OneofString) return false;
if (OneofBytes != other.OneofBytes) return false;
if (OneofFieldCase != other.OneofFieldCase) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (SingleInt32 != 0) hash ^= SingleInt32.GetHashCode();
if (SingleInt64 != 0L) hash ^= SingleInt64.GetHashCode();
if (SingleUint32 != 0) hash ^= SingleUint32.GetHashCode();
if (SingleUint64 != 0UL) hash ^= SingleUint64.GetHashCode();
if (SingleSint32 != 0) hash ^= SingleSint32.GetHashCode();
if (SingleSint64 != 0L) hash ^= SingleSint64.GetHashCode();
if (SingleFixed32 != 0) hash ^= SingleFixed32.GetHashCode();
if (SingleFixed64 != 0UL) hash ^= SingleFixed64.GetHashCode();
if (SingleSfixed32 != 0) hash ^= SingleSfixed32.GetHashCode();
if (SingleSfixed64 != 0L) hash ^= SingleSfixed64.GetHashCode();
if (SingleFloat != 0F) hash ^= SingleFloat.GetHashCode();
if (SingleDouble != 0D) hash ^= SingleDouble.GetHashCode();
if (SingleBool != false) hash ^= SingleBool.GetHashCode();
if (SingleString.Length != 0) hash ^= SingleString.GetHashCode();
if (SingleBytes.Length != 0) hash ^= SingleBytes.GetHashCode();
if (singleNestedMessage_ != null) hash ^= SingleNestedMessage.GetHashCode();
if (singleForeignMessage_ != null) hash ^= SingleForeignMessage.GetHashCode();
if (singleImportMessage_ != null) hash ^= SingleImportMessage.GetHashCode();
if (SingleNestedEnum != global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum.NESTED_ENUM_UNSPECIFIED) hash ^= SingleNestedEnum.GetHashCode();
if (SingleForeignEnum != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) hash ^= SingleForeignEnum.GetHashCode();
if (SingleImportEnum != global::Google.Protobuf.TestProtos.ImportEnum.IMPORT_ENUM_UNSPECIFIED) hash ^= SingleImportEnum.GetHashCode();
if (singlePublicImportMessage_ != null) hash ^= SinglePublicImportMessage.GetHashCode();
hash ^= repeatedInt32_.GetHashCode();
hash ^= repeatedInt64_.GetHashCode();
hash ^= repeatedUint32_.GetHashCode();
hash ^= repeatedUint64_.GetHashCode();
hash ^= repeatedSint32_.GetHashCode();
hash ^= repeatedSint64_.GetHashCode();
hash ^= repeatedFixed32_.GetHashCode();
hash ^= repeatedFixed64_.GetHashCode();
hash ^= repeatedSfixed32_.GetHashCode();
hash ^= repeatedSfixed64_.GetHashCode();
hash ^= repeatedFloat_.GetHashCode();
hash ^= repeatedDouble_.GetHashCode();
hash ^= repeatedBool_.GetHashCode();
hash ^= repeatedString_.GetHashCode();
hash ^= repeatedBytes_.GetHashCode();
hash ^= repeatedNestedMessage_.GetHashCode();
hash ^= repeatedForeignMessage_.GetHashCode();
hash ^= repeatedImportMessage_.GetHashCode();
hash ^= repeatedNestedEnum_.GetHashCode();
hash ^= repeatedForeignEnum_.GetHashCode();
hash ^= repeatedImportEnum_.GetHashCode();
hash ^= repeatedPublicImportMessage_.GetHashCode();
if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) hash ^= OneofUint32.GetHashCode();
if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) hash ^= OneofNestedMessage.GetHashCode();
if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) hash ^= OneofString.GetHashCode();
if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) hash ^= OneofBytes.GetHashCode();
hash ^= (int) oneofFieldCase_;
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (SingleInt32 != 0) {
output.WriteRawTag(8);
output.WriteInt32(SingleInt32);
}
if (SingleInt64 != 0L) {
output.WriteRawTag(16);
output.WriteInt64(SingleInt64);
}
if (SingleUint32 != 0) {
output.WriteRawTag(24);
output.WriteUInt32(SingleUint32);
}
if (SingleUint64 != 0UL) {
output.WriteRawTag(32);
output.WriteUInt64(SingleUint64);
}
if (SingleSint32 != 0) {
output.WriteRawTag(40);
output.WriteSInt32(SingleSint32);
}
if (SingleSint64 != 0L) {
output.WriteRawTag(48);
output.WriteSInt64(SingleSint64);
}
if (SingleFixed32 != 0) {
output.WriteRawTag(61);
output.WriteFixed32(SingleFixed32);
}
if (SingleFixed64 != 0UL) {
output.WriteRawTag(65);
output.WriteFixed64(SingleFixed64);
}
if (SingleSfixed32 != 0) {
output.WriteRawTag(77);
output.WriteSFixed32(SingleSfixed32);
}
if (SingleSfixed64 != 0L) {
output.WriteRawTag(81);
output.WriteSFixed64(SingleSfixed64);
}
if (SingleFloat != 0F) {
output.WriteRawTag(93);
output.WriteFloat(SingleFloat);
}
if (SingleDouble != 0D) {
output.WriteRawTag(97);
output.WriteDouble(SingleDouble);
}
if (SingleBool != false) {
output.WriteRawTag(104);
output.WriteBool(SingleBool);
}
if (SingleString.Length != 0) {
output.WriteRawTag(114);
output.WriteString(SingleString);
}
if (SingleBytes.Length != 0) {
output.WriteRawTag(122);
output.WriteBytes(SingleBytes);
}
if (singleNestedMessage_ != null) {
output.WriteRawTag(146, 1);
output.WriteMessage(SingleNestedMessage);
}
if (singleForeignMessage_ != null) {
output.WriteRawTag(154, 1);
output.WriteMessage(SingleForeignMessage);
}
if (singleImportMessage_ != null) {
output.WriteRawTag(162, 1);
output.WriteMessage(SingleImportMessage);
}
if (SingleNestedEnum != global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum.NESTED_ENUM_UNSPECIFIED) {
output.WriteRawTag(168, 1);
output.WriteEnum((int) SingleNestedEnum);
}
if (SingleForeignEnum != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) {
output.WriteRawTag(176, 1);
output.WriteEnum((int) SingleForeignEnum);
}
if (SingleImportEnum != global::Google.Protobuf.TestProtos.ImportEnum.IMPORT_ENUM_UNSPECIFIED) {
output.WriteRawTag(184, 1);
output.WriteEnum((int) SingleImportEnum);
}
if (singlePublicImportMessage_ != null) {
output.WriteRawTag(210, 1);
output.WriteMessage(SinglePublicImportMessage);
}
repeatedInt32_.WriteTo(output, _repeated_repeatedInt32_codec);
repeatedInt64_.WriteTo(output, _repeated_repeatedInt64_codec);
repeatedUint32_.WriteTo(output, _repeated_repeatedUint32_codec);
repeatedUint64_.WriteTo(output, _repeated_repeatedUint64_codec);
repeatedSint32_.WriteTo(output, _repeated_repeatedSint32_codec);
repeatedSint64_.WriteTo(output, _repeated_repeatedSint64_codec);
repeatedFixed32_.WriteTo(output, _repeated_repeatedFixed32_codec);
repeatedFixed64_.WriteTo(output, _repeated_repeatedFixed64_codec);
repeatedSfixed32_.WriteTo(output, _repeated_repeatedSfixed32_codec);
repeatedSfixed64_.WriteTo(output, _repeated_repeatedSfixed64_codec);
repeatedFloat_.WriteTo(output, _repeated_repeatedFloat_codec);
repeatedDouble_.WriteTo(output, _repeated_repeatedDouble_codec);
repeatedBool_.WriteTo(output, _repeated_repeatedBool_codec);
repeatedString_.WriteTo(output, _repeated_repeatedString_codec);
repeatedBytes_.WriteTo(output, _repeated_repeatedBytes_codec);
repeatedNestedMessage_.WriteTo(output, _repeated_repeatedNestedMessage_codec);
repeatedForeignMessage_.WriteTo(output, _repeated_repeatedForeignMessage_codec);
repeatedImportMessage_.WriteTo(output, _repeated_repeatedImportMessage_codec);
repeatedNestedEnum_.WriteTo(output, _repeated_repeatedNestedEnum_codec);
repeatedForeignEnum_.WriteTo(output, _repeated_repeatedForeignEnum_codec);
repeatedImportEnum_.WriteTo(output, _repeated_repeatedImportEnum_codec);
repeatedPublicImportMessage_.WriteTo(output, _repeated_repeatedPublicImportMessage_codec);
if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) {
output.WriteRawTag(248, 6);
output.WriteUInt32(OneofUint32);
}
if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
output.WriteRawTag(130, 7);
output.WriteMessage(OneofNestedMessage);
}
if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) {
output.WriteRawTag(138, 7);
output.WriteString(OneofString);
}
if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) {
output.WriteRawTag(146, 7);
output.WriteBytes(OneofBytes);
}
}
public int CalculateSize() {
int size = 0;
if (SingleInt32 != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(SingleInt32);
}
if (SingleInt64 != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(SingleInt64);
}
if (SingleUint32 != 0) {
size += 1 + pb::CodedOutputStream.ComputeUInt32Size(SingleUint32);
}
if (SingleUint64 != 0UL) {
size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SingleUint64);
}
if (SingleSint32 != 0) {
size += 1 + pb::CodedOutputStream.ComputeSInt32Size(SingleSint32);
}
if (SingleSint64 != 0L) {
size += 1 + pb::CodedOutputStream.ComputeSInt64Size(SingleSint64);
}
if (SingleFixed32 != 0) {
size += 1 + 4;
}
if (SingleFixed64 != 0UL) {
size += 1 + 8;
}
if (SingleSfixed32 != 0) {
size += 1 + 4;
}
if (SingleSfixed64 != 0L) {
size += 1 + 8;
}
if (SingleFloat != 0F) {
size += 1 + 4;
}
if (SingleDouble != 0D) {
size += 1 + 8;
}
if (SingleBool != false) {
size += 1 + 1;
}
if (SingleString.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(SingleString);
}
if (SingleBytes.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeBytesSize(SingleBytes);
}
if (singleNestedMessage_ != null) {
size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleNestedMessage);
}
if (singleForeignMessage_ != null) {
size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleForeignMessage);
}
if (singleImportMessage_ != null) {
size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleImportMessage);
}
if (SingleNestedEnum != global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum.NESTED_ENUM_UNSPECIFIED) {
size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) SingleNestedEnum);
}
if (SingleForeignEnum != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) {
size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) SingleForeignEnum);
}
if (SingleImportEnum != global::Google.Protobuf.TestProtos.ImportEnum.IMPORT_ENUM_UNSPECIFIED) {
size += 2 + pb::CodedOutputStream.ComputeEnumSize((int) SingleImportEnum);
}
if (singlePublicImportMessage_ != null) {
size += 2 + pb::CodedOutputStream.ComputeMessageSize(SinglePublicImportMessage);
}
size += repeatedInt32_.CalculateSize(_repeated_repeatedInt32_codec);
size += repeatedInt64_.CalculateSize(_repeated_repeatedInt64_codec);
size += repeatedUint32_.CalculateSize(_repeated_repeatedUint32_codec);
size += repeatedUint64_.CalculateSize(_repeated_repeatedUint64_codec);
size += repeatedSint32_.CalculateSize(_repeated_repeatedSint32_codec);
size += repeatedSint64_.CalculateSize(_repeated_repeatedSint64_codec);
size += repeatedFixed32_.CalculateSize(_repeated_repeatedFixed32_codec);
size += repeatedFixed64_.CalculateSize(_repeated_repeatedFixed64_codec);
size += repeatedSfixed32_.CalculateSize(_repeated_repeatedSfixed32_codec);
size += repeatedSfixed64_.CalculateSize(_repeated_repeatedSfixed64_codec);
size += repeatedFloat_.CalculateSize(_repeated_repeatedFloat_codec);
size += repeatedDouble_.CalculateSize(_repeated_repeatedDouble_codec);
size += repeatedBool_.CalculateSize(_repeated_repeatedBool_codec);
size += repeatedString_.CalculateSize(_repeated_repeatedString_codec);
size += repeatedBytes_.CalculateSize(_repeated_repeatedBytes_codec);
size += repeatedNestedMessage_.CalculateSize(_repeated_repeatedNestedMessage_codec);
size += repeatedForeignMessage_.CalculateSize(_repeated_repeatedForeignMessage_codec);
size += repeatedImportMessage_.CalculateSize(_repeated_repeatedImportMessage_codec);
size += repeatedNestedEnum_.CalculateSize(_repeated_repeatedNestedEnum_codec);
size += repeatedForeignEnum_.CalculateSize(_repeated_repeatedForeignEnum_codec);
size += repeatedImportEnum_.CalculateSize(_repeated_repeatedImportEnum_codec);
size += repeatedPublicImportMessage_.CalculateSize(_repeated_repeatedPublicImportMessage_codec);
if (oneofFieldCase_ == OneofFieldOneofCase.OneofUint32) {
size += 2 + pb::CodedOutputStream.ComputeUInt32Size(OneofUint32);
}
if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
size += 2 + pb::CodedOutputStream.ComputeMessageSize(OneofNestedMessage);
}
if (oneofFieldCase_ == OneofFieldOneofCase.OneofString) {
size += 2 + pb::CodedOutputStream.ComputeStringSize(OneofString);
}
if (oneofFieldCase_ == OneofFieldOneofCase.OneofBytes) {
size += 2 + pb::CodedOutputStream.ComputeBytesSize(OneofBytes);
}
return size;
}
public void MergeFrom(TestAllTypes other) {
if (other == null) {
return;
}
if (other.SingleInt32 != 0) {
SingleInt32 = other.SingleInt32;
}
if (other.SingleInt64 != 0L) {
SingleInt64 = other.SingleInt64;
}
if (other.SingleUint32 != 0) {
SingleUint32 = other.SingleUint32;
}
if (other.SingleUint64 != 0UL) {
SingleUint64 = other.SingleUint64;
}
if (other.SingleSint32 != 0) {
SingleSint32 = other.SingleSint32;
}
if (other.SingleSint64 != 0L) {
SingleSint64 = other.SingleSint64;
}
if (other.SingleFixed32 != 0) {
SingleFixed32 = other.SingleFixed32;
}
if (other.SingleFixed64 != 0UL) {
SingleFixed64 = other.SingleFixed64;
}
if (other.SingleSfixed32 != 0) {
SingleSfixed32 = other.SingleSfixed32;
}
if (other.SingleSfixed64 != 0L) {
SingleSfixed64 = other.SingleSfixed64;
}
if (other.SingleFloat != 0F) {
SingleFloat = other.SingleFloat;
}
if (other.SingleDouble != 0D) {
SingleDouble = other.SingleDouble;
}
if (other.SingleBool != false) {
SingleBool = other.SingleBool;
}
if (other.SingleString.Length != 0) {
SingleString = other.SingleString;
}
if (other.SingleBytes.Length != 0) {
SingleBytes = other.SingleBytes;
}
if (other.singleNestedMessage_ != null) {
if (singleNestedMessage_ == null) {
singleNestedMessage_ = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
}
SingleNestedMessage.MergeFrom(other.SingleNestedMessage);
}
if (other.singleForeignMessage_ != null) {
if (singleForeignMessage_ == null) {
singleForeignMessage_ = new global::Google.Protobuf.TestProtos.ForeignMessage();
}
SingleForeignMessage.MergeFrom(other.SingleForeignMessage);
}
if (other.singleImportMessage_ != null) {
if (singleImportMessage_ == null) {
singleImportMessage_ = new global::Google.Protobuf.TestProtos.ImportMessage();
}
SingleImportMessage.MergeFrom(other.SingleImportMessage);
}
if (other.SingleNestedEnum != global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum.NESTED_ENUM_UNSPECIFIED) {
SingleNestedEnum = other.SingleNestedEnum;
}
if (other.SingleForeignEnum != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) {
SingleForeignEnum = other.SingleForeignEnum;
}
if (other.SingleImportEnum != global::Google.Protobuf.TestProtos.ImportEnum.IMPORT_ENUM_UNSPECIFIED) {
SingleImportEnum = other.SingleImportEnum;
}
if (other.singlePublicImportMessage_ != null) {
if (singlePublicImportMessage_ == null) {
singlePublicImportMessage_ = new global::Google.Protobuf.TestProtos.PublicImportMessage();
}
SinglePublicImportMessage.MergeFrom(other.SinglePublicImportMessage);
}
repeatedInt32_.Add(other.repeatedInt32_);
repeatedInt64_.Add(other.repeatedInt64_);
repeatedUint32_.Add(other.repeatedUint32_);
repeatedUint64_.Add(other.repeatedUint64_);
repeatedSint32_.Add(other.repeatedSint32_);
repeatedSint64_.Add(other.repeatedSint64_);
repeatedFixed32_.Add(other.repeatedFixed32_);
repeatedFixed64_.Add(other.repeatedFixed64_);
repeatedSfixed32_.Add(other.repeatedSfixed32_);
repeatedSfixed64_.Add(other.repeatedSfixed64_);
repeatedFloat_.Add(other.repeatedFloat_);
repeatedDouble_.Add(other.repeatedDouble_);
repeatedBool_.Add(other.repeatedBool_);
repeatedString_.Add(other.repeatedString_);
repeatedBytes_.Add(other.repeatedBytes_);
repeatedNestedMessage_.Add(other.repeatedNestedMessage_);
repeatedForeignMessage_.Add(other.repeatedForeignMessage_);
repeatedImportMessage_.Add(other.repeatedImportMessage_);
repeatedNestedEnum_.Add(other.repeatedNestedEnum_);
repeatedForeignEnum_.Add(other.repeatedForeignEnum_);
repeatedImportEnum_.Add(other.repeatedImportEnum_);
repeatedPublicImportMessage_.Add(other.repeatedPublicImportMessage_);
switch (other.OneofFieldCase) {
case OneofFieldOneofCase.OneofUint32:
OneofUint32 = other.OneofUint32;
break;
case OneofFieldOneofCase.OneofNestedMessage:
OneofNestedMessage = other.OneofNestedMessage;
break;
case OneofFieldOneofCase.OneofString:
OneofString = other.OneofString;
break;
case OneofFieldOneofCase.OneofBytes:
OneofBytes = other.OneofBytes;
break;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 8: {
SingleInt32 = input.ReadInt32();
break;
}
case 16: {
SingleInt64 = input.ReadInt64();
break;
}
case 24: {
SingleUint32 = input.ReadUInt32();
break;
}
case 32: {
SingleUint64 = input.ReadUInt64();
break;
}
case 40: {
SingleSint32 = input.ReadSInt32();
break;
}
case 48: {
SingleSint64 = input.ReadSInt64();
break;
}
case 61: {
SingleFixed32 = input.ReadFixed32();
break;
}
case 65: {
SingleFixed64 = input.ReadFixed64();
break;
}
case 77: {
SingleSfixed32 = input.ReadSFixed32();
break;
}
case 81: {
SingleSfixed64 = input.ReadSFixed64();
break;
}
case 93: {
SingleFloat = input.ReadFloat();
break;
}
case 97: {
SingleDouble = input.ReadDouble();
break;
}
case 104: {
SingleBool = input.ReadBool();
break;
}
case 114: {
SingleString = input.ReadString();
break;
}
case 122: {
SingleBytes = input.ReadBytes();
break;
}
case 146: {
if (singleNestedMessage_ == null) {
singleNestedMessage_ = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
}
input.ReadMessage(singleNestedMessage_);
break;
}
case 154: {
if (singleForeignMessage_ == null) {
singleForeignMessage_ = new global::Google.Protobuf.TestProtos.ForeignMessage();
}
input.ReadMessage(singleForeignMessage_);
break;
}
case 162: {
if (singleImportMessage_ == null) {
singleImportMessage_ = new global::Google.Protobuf.TestProtos.ImportMessage();
}
input.ReadMessage(singleImportMessage_);
break;
}
case 168: {
singleNestedEnum_ = (global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedEnum) input.ReadEnum();
break;
}
case 176: {
singleForeignEnum_ = (global::Google.Protobuf.TestProtos.ForeignEnum) input.ReadEnum();
break;
}
case 184: {
singleImportEnum_ = (global::Google.Protobuf.TestProtos.ImportEnum) input.ReadEnum();
break;
}
case 210: {
if (singlePublicImportMessage_ == null) {
singlePublicImportMessage_ = new global::Google.Protobuf.TestProtos.PublicImportMessage();
}
input.ReadMessage(singlePublicImportMessage_);
break;
}
case 250:
case 248: {
repeatedInt32_.AddEntriesFrom(input, _repeated_repeatedInt32_codec);
break;
}
case 258:
case 256: {
repeatedInt64_.AddEntriesFrom(input, _repeated_repeatedInt64_codec);
break;
}
case 266:
case 264: {
repeatedUint32_.AddEntriesFrom(input, _repeated_repeatedUint32_codec);
break;
}
case 274:
case 272: {
repeatedUint64_.AddEntriesFrom(input, _repeated_repeatedUint64_codec);
break;
}
case 282:
case 280: {
repeatedSint32_.AddEntriesFrom(input, _repeated_repeatedSint32_codec);
break;
}
case 290:
case 288: {
repeatedSint64_.AddEntriesFrom(input, _repeated_repeatedSint64_codec);
break;
}
case 298:
case 301: {
repeatedFixed32_.AddEntriesFrom(input, _repeated_repeatedFixed32_codec);
break;
}
case 306:
case 305: {
repeatedFixed64_.AddEntriesFrom(input, _repeated_repeatedFixed64_codec);
break;
}
case 314:
case 317: {
repeatedSfixed32_.AddEntriesFrom(input, _repeated_repeatedSfixed32_codec);
break;
}
case 322:
case 321: {
repeatedSfixed64_.AddEntriesFrom(input, _repeated_repeatedSfixed64_codec);
break;
}
case 330:
case 333: {
repeatedFloat_.AddEntriesFrom(input, _repeated_repeatedFloat_codec);
break;
}
case 338:
case 337: {
repeatedDouble_.AddEntriesFrom(input, _repeated_repeatedDouble_codec);
break;
}
case 346:
case 344: {
repeatedBool_.AddEntriesFrom(input, _repeated_repeatedBool_codec);
break;
}
case 354: {
repeatedString_.AddEntriesFrom(input, _repeated_repeatedString_codec);
break;
}
case 362: {
repeatedBytes_.AddEntriesFrom(input, _repeated_repeatedBytes_codec);
break;
}
case 386: {
repeatedNestedMessage_.AddEntriesFrom(input, _repeated_repeatedNestedMessage_codec);
break;
}
case 394: {
repeatedForeignMessage_.AddEntriesFrom(input, _repeated_repeatedForeignMessage_codec);
break;
}
case 402: {
repeatedImportMessage_.AddEntriesFrom(input, _repeated_repeatedImportMessage_codec);
break;
}
case 410:
case 408: {
repeatedNestedEnum_.AddEntriesFrom(input, _repeated_repeatedNestedEnum_codec);
break;
}
case 418:
case 416: {
repeatedForeignEnum_.AddEntriesFrom(input, _repeated_repeatedForeignEnum_codec);
break;
}
case 426:
case 424: {
repeatedImportEnum_.AddEntriesFrom(input, _repeated_repeatedImportEnum_codec);
break;
}
case 434: {
repeatedPublicImportMessage_.AddEntriesFrom(input, _repeated_repeatedPublicImportMessage_codec);
break;
}
case 888: {
OneofUint32 = input.ReadUInt32();
break;
}
case 898: {
global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage subBuilder = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
if (oneofFieldCase_ == OneofFieldOneofCase.OneofNestedMessage) {
subBuilder.MergeFrom(OneofNestedMessage);
}
input.ReadMessage(subBuilder);
OneofNestedMessage = subBuilder;
break;
}
case 906: {
OneofString = input.ReadString();
break;
}
case 914: {
OneofBytes = input.ReadBytes();
break;
}
}
}
}
#region Nested types
/// Container for nested types declared in the TestAllTypes message type.
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static partial class Types {
public enum NestedEnum {
NESTED_ENUM_UNSPECIFIED = 0,
FOO = 1,
BAR = 2,
BAZ = 3,
///
/// Intentionally negative.
///
NEG = -1,
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class NestedMessage : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NestedMessage());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.TestAllTypes.Descriptor.NestedTypes[0]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public NestedMessage() {
OnConstruction();
}
partial void OnConstruction();
public NestedMessage(NestedMessage other) : this() {
bb_ = other.bb_;
}
public NestedMessage Clone() {
return new NestedMessage(this);
}
/// Field number for the "bb" field.
public const int BbFieldNumber = 1;
private int bb_;
///
/// 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.
///
public int Bb {
get { return bb_; }
set {
bb_ = value;
}
}
public override bool Equals(object other) {
return Equals(other as NestedMessage);
}
public bool Equals(NestedMessage other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Bb != other.Bb) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (Bb != 0) hash ^= Bb.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (Bb != 0) {
output.WriteRawTag(8);
output.WriteInt32(Bb);
}
}
public int CalculateSize() {
int size = 0;
if (Bb != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Bb);
}
return size;
}
public void MergeFrom(NestedMessage other) {
if (other == null) {
return;
}
if (other.Bb != 0) {
Bb = other.Bb;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 8: {
Bb = input.ReadInt32();
break;
}
}
}
}
}
}
#endregion
}
///
/// This proto includes a recusively nested message.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class NestedTestAllTypes : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NestedTestAllTypes());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[1]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public NestedTestAllTypes() {
OnConstruction();
}
partial void OnConstruction();
public NestedTestAllTypes(NestedTestAllTypes other) : this() {
Child = other.child_ != null ? other.Child.Clone() : null;
Payload = other.payload_ != null ? other.Payload.Clone() : null;
repeatedChild_ = other.repeatedChild_.Clone();
}
public NestedTestAllTypes Clone() {
return new NestedTestAllTypes(this);
}
/// Field number for the "child" field.
public const int ChildFieldNumber = 1;
private global::Google.Protobuf.TestProtos.NestedTestAllTypes child_;
public global::Google.Protobuf.TestProtos.NestedTestAllTypes Child {
get { return child_; }
set {
child_ = value;
}
}
/// Field number for the "payload" field.
public const int PayloadFieldNumber = 2;
private global::Google.Protobuf.TestProtos.TestAllTypes payload_;
public global::Google.Protobuf.TestProtos.TestAllTypes Payload {
get { return payload_; }
set {
payload_ = value;
}
}
/// Field number for the "repeated_child" field.
public const int RepeatedChildFieldNumber = 3;
private static readonly pb::FieldCodec _repeated_repeatedChild_codec
= pb::FieldCodec.ForMessage(26, global::Google.Protobuf.TestProtos.NestedTestAllTypes.Parser);
private readonly pbc::RepeatedField repeatedChild_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedChild {
get { return repeatedChild_; }
}
public override bool Equals(object other) {
return Equals(other as NestedTestAllTypes);
}
public bool Equals(NestedTestAllTypes other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (!object.Equals(Child, other.Child)) return false;
if (!object.Equals(Payload, other.Payload)) return false;
if(!repeatedChild_.Equals(other.repeatedChild_)) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (child_ != null) hash ^= Child.GetHashCode();
if (payload_ != null) hash ^= Payload.GetHashCode();
hash ^= repeatedChild_.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (child_ != null) {
output.WriteRawTag(10);
output.WriteMessage(Child);
}
if (payload_ != null) {
output.WriteRawTag(18);
output.WriteMessage(Payload);
}
repeatedChild_.WriteTo(output, _repeated_repeatedChild_codec);
}
public int CalculateSize() {
int size = 0;
if (child_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Child);
}
if (payload_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Payload);
}
size += repeatedChild_.CalculateSize(_repeated_repeatedChild_codec);
return size;
}
public void MergeFrom(NestedTestAllTypes other) {
if (other == null) {
return;
}
if (other.child_ != null) {
if (child_ == null) {
child_ = new global::Google.Protobuf.TestProtos.NestedTestAllTypes();
}
Child.MergeFrom(other.Child);
}
if (other.payload_ != null) {
if (payload_ == null) {
payload_ = new global::Google.Protobuf.TestProtos.TestAllTypes();
}
Payload.MergeFrom(other.Payload);
}
repeatedChild_.Add(other.repeatedChild_);
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 10: {
if (child_ == null) {
child_ = new global::Google.Protobuf.TestProtos.NestedTestAllTypes();
}
input.ReadMessage(child_);
break;
}
case 18: {
if (payload_ == null) {
payload_ = new global::Google.Protobuf.TestProtos.TestAllTypes();
}
input.ReadMessage(payload_);
break;
}
case 26: {
repeatedChild_.AddEntriesFrom(input, _repeated_repeatedChild_codec);
break;
}
}
}
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class TestDeprecatedFields : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestDeprecatedFields());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[2]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public TestDeprecatedFields() {
OnConstruction();
}
partial void OnConstruction();
public TestDeprecatedFields(TestDeprecatedFields other) : this() {
deprecatedInt32_ = other.deprecatedInt32_;
}
public TestDeprecatedFields Clone() {
return new TestDeprecatedFields(this);
}
/// Field number for the "deprecated_int32" field.
public const int DeprecatedInt32FieldNumber = 1;
private int deprecatedInt32_;
[global::System.ObsoleteAttribute()]
public int DeprecatedInt32 {
get { return deprecatedInt32_; }
set {
deprecatedInt32_ = value;
}
}
public override bool Equals(object other) {
return Equals(other as TestDeprecatedFields);
}
public bool Equals(TestDeprecatedFields other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (DeprecatedInt32 != other.DeprecatedInt32) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (DeprecatedInt32 != 0) hash ^= DeprecatedInt32.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (DeprecatedInt32 != 0) {
output.WriteRawTag(8);
output.WriteInt32(DeprecatedInt32);
}
}
public int CalculateSize() {
int size = 0;
if (DeprecatedInt32 != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(DeprecatedInt32);
}
return size;
}
public void MergeFrom(TestDeprecatedFields other) {
if (other == null) {
return;
}
if (other.DeprecatedInt32 != 0) {
DeprecatedInt32 = other.DeprecatedInt32;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 8: {
DeprecatedInt32 = input.ReadInt32();
break;
}
}
}
}
}
///
/// Define these after TestAllTypes to make sure the compiler can handle
/// that.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class ForeignMessage : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ForeignMessage());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[3]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public ForeignMessage() {
OnConstruction();
}
partial void OnConstruction();
public ForeignMessage(ForeignMessage other) : this() {
c_ = other.c_;
}
public ForeignMessage Clone() {
return new ForeignMessage(this);
}
/// Field number for the "c" field.
public const int CFieldNumber = 1;
private int c_;
public int C {
get { return c_; }
set {
c_ = value;
}
}
public override bool Equals(object other) {
return Equals(other as ForeignMessage);
}
public bool Equals(ForeignMessage other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (C != other.C) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (C != 0) hash ^= C.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (C != 0) {
output.WriteRawTag(8);
output.WriteInt32(C);
}
}
public int CalculateSize() {
int size = 0;
if (C != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(C);
}
return size;
}
public void MergeFrom(ForeignMessage other) {
if (other == null) {
return;
}
if (other.C != 0) {
C = other.C;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 8: {
C = input.ReadInt32();
break;
}
}
}
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class TestReservedFields : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestReservedFields());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[4]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public TestReservedFields() {
OnConstruction();
}
partial void OnConstruction();
public TestReservedFields(TestReservedFields other) : this() {
}
public TestReservedFields Clone() {
return new TestReservedFields(this);
}
public override bool Equals(object other) {
return Equals(other as TestReservedFields);
}
public bool Equals(TestReservedFields other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
return true;
}
public override int GetHashCode() {
int hash = 1;
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
}
public int CalculateSize() {
int size = 0;
return size;
}
public void MergeFrom(TestReservedFields other) {
if (other == null) {
return;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
}
}
}
}
///
/// Test that we can use NestedMessage from outside TestAllTypes.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class TestForeignNested : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestForeignNested());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[5]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public TestForeignNested() {
OnConstruction();
}
partial void OnConstruction();
public TestForeignNested(TestForeignNested other) : this() {
ForeignNested = other.foreignNested_ != null ? other.ForeignNested.Clone() : null;
}
public TestForeignNested Clone() {
return new TestForeignNested(this);
}
/// Field number for the "foreign_nested" field.
public const int ForeignNestedFieldNumber = 1;
private global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage foreignNested_;
public global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage ForeignNested {
get { return foreignNested_; }
set {
foreignNested_ = value;
}
}
public override bool Equals(object other) {
return Equals(other as TestForeignNested);
}
public bool Equals(TestForeignNested other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (!object.Equals(ForeignNested, other.ForeignNested)) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (foreignNested_ != null) hash ^= ForeignNested.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (foreignNested_ != null) {
output.WriteRawTag(10);
output.WriteMessage(ForeignNested);
}
}
public int CalculateSize() {
int size = 0;
if (foreignNested_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(ForeignNested);
}
return size;
}
public void MergeFrom(TestForeignNested other) {
if (other == null) {
return;
}
if (other.foreignNested_ != null) {
if (foreignNested_ == null) {
foreignNested_ = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
}
ForeignNested.MergeFrom(other.ForeignNested);
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 10: {
if (foreignNested_ == null) {
foreignNested_ = new global::Google.Protobuf.TestProtos.TestAllTypes.Types.NestedMessage();
}
input.ReadMessage(foreignNested_);
break;
}
}
}
}
}
///
/// Test that really large tag numbers don't break anything.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class TestReallyLargeTagNumber : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestReallyLargeTagNumber());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[6]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public TestReallyLargeTagNumber() {
OnConstruction();
}
partial void OnConstruction();
public TestReallyLargeTagNumber(TestReallyLargeTagNumber other) : this() {
a_ = other.a_;
bb_ = other.bb_;
}
public TestReallyLargeTagNumber Clone() {
return new TestReallyLargeTagNumber(this);
}
/// Field number for the "a" field.
public const int AFieldNumber = 1;
private int a_;
///
/// The largest possible tag number is 2^28 - 1, since the wire format uses
/// three bits to communicate wire type.
///
public int A {
get { return a_; }
set {
a_ = value;
}
}
/// Field number for the "bb" field.
public const int BbFieldNumber = 268435455;
private int bb_;
public int Bb {
get { return bb_; }
set {
bb_ = value;
}
}
public override bool Equals(object other) {
return Equals(other as TestReallyLargeTagNumber);
}
public bool Equals(TestReallyLargeTagNumber other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (A != other.A) return false;
if (Bb != other.Bb) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (A != 0) hash ^= A.GetHashCode();
if (Bb != 0) hash ^= Bb.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (A != 0) {
output.WriteRawTag(8);
output.WriteInt32(A);
}
if (Bb != 0) {
output.WriteRawTag(248, 255, 255, 255, 7);
output.WriteInt32(Bb);
}
}
public int CalculateSize() {
int size = 0;
if (A != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(A);
}
if (Bb != 0) {
size += 5 + pb::CodedOutputStream.ComputeInt32Size(Bb);
}
return size;
}
public void MergeFrom(TestReallyLargeTagNumber other) {
if (other == null) {
return;
}
if (other.A != 0) {
A = other.A;
}
if (other.Bb != 0) {
Bb = other.Bb;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 8: {
A = input.ReadInt32();
break;
}
case 2147483640: {
Bb = input.ReadInt32();
break;
}
}
}
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class TestRecursiveMessage : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestRecursiveMessage());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[7]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public TestRecursiveMessage() {
OnConstruction();
}
partial void OnConstruction();
public TestRecursiveMessage(TestRecursiveMessage other) : this() {
A = other.a_ != null ? other.A.Clone() : null;
i_ = other.i_;
}
public TestRecursiveMessage Clone() {
return new TestRecursiveMessage(this);
}
/// Field number for the "a" field.
public const int AFieldNumber = 1;
private global::Google.Protobuf.TestProtos.TestRecursiveMessage a_;
public global::Google.Protobuf.TestProtos.TestRecursiveMessage A {
get { return a_; }
set {
a_ = value;
}
}
/// Field number for the "i" field.
public const int IFieldNumber = 2;
private int i_;
public int I {
get { return i_; }
set {
i_ = value;
}
}
public override bool Equals(object other) {
return Equals(other as TestRecursiveMessage);
}
public bool Equals(TestRecursiveMessage other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (!object.Equals(A, other.A)) return false;
if (I != other.I) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (a_ != null) hash ^= A.GetHashCode();
if (I != 0) hash ^= I.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (a_ != null) {
output.WriteRawTag(10);
output.WriteMessage(A);
}
if (I != 0) {
output.WriteRawTag(16);
output.WriteInt32(I);
}
}
public int CalculateSize() {
int size = 0;
if (a_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(A);
}
if (I != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(I);
}
return size;
}
public void MergeFrom(TestRecursiveMessage other) {
if (other == null) {
return;
}
if (other.a_ != null) {
if (a_ == null) {
a_ = new global::Google.Protobuf.TestProtos.TestRecursiveMessage();
}
A.MergeFrom(other.A);
}
if (other.I != 0) {
I = other.I;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 10: {
if (a_ == null) {
a_ = new global::Google.Protobuf.TestProtos.TestRecursiveMessage();
}
input.ReadMessage(a_);
break;
}
case 16: {
I = input.ReadInt32();
break;
}
}
}
}
}
///
/// Test that mutual recursion works.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class TestMutualRecursionA : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestMutualRecursionA());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[8]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public TestMutualRecursionA() {
OnConstruction();
}
partial void OnConstruction();
public TestMutualRecursionA(TestMutualRecursionA other) : this() {
Bb = other.bb_ != null ? other.Bb.Clone() : null;
}
public TestMutualRecursionA Clone() {
return new TestMutualRecursionA(this);
}
/// Field number for the "bb" field.
public const int BbFieldNumber = 1;
private global::Google.Protobuf.TestProtos.TestMutualRecursionB bb_;
public global::Google.Protobuf.TestProtos.TestMutualRecursionB Bb {
get { return bb_; }
set {
bb_ = value;
}
}
public override bool Equals(object other) {
return Equals(other as TestMutualRecursionA);
}
public bool Equals(TestMutualRecursionA other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (!object.Equals(Bb, other.Bb)) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (bb_ != null) hash ^= Bb.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (bb_ != null) {
output.WriteRawTag(10);
output.WriteMessage(Bb);
}
}
public int CalculateSize() {
int size = 0;
if (bb_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(Bb);
}
return size;
}
public void MergeFrom(TestMutualRecursionA other) {
if (other == null) {
return;
}
if (other.bb_ != null) {
if (bb_ == null) {
bb_ = new global::Google.Protobuf.TestProtos.TestMutualRecursionB();
}
Bb.MergeFrom(other.Bb);
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 10: {
if (bb_ == null) {
bb_ = new global::Google.Protobuf.TestProtos.TestMutualRecursionB();
}
input.ReadMessage(bb_);
break;
}
}
}
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class TestMutualRecursionB : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestMutualRecursionB());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[9]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public TestMutualRecursionB() {
OnConstruction();
}
partial void OnConstruction();
public TestMutualRecursionB(TestMutualRecursionB other) : this() {
A = other.a_ != null ? other.A.Clone() : null;
optionalInt32_ = other.optionalInt32_;
}
public TestMutualRecursionB Clone() {
return new TestMutualRecursionB(this);
}
/// Field number for the "a" field.
public const int AFieldNumber = 1;
private global::Google.Protobuf.TestProtos.TestMutualRecursionA a_;
public global::Google.Protobuf.TestProtos.TestMutualRecursionA A {
get { return a_; }
set {
a_ = value;
}
}
/// Field number for the "optional_int32" field.
public const int OptionalInt32FieldNumber = 2;
private int optionalInt32_;
public int OptionalInt32 {
get { return optionalInt32_; }
set {
optionalInt32_ = value;
}
}
public override bool Equals(object other) {
return Equals(other as TestMutualRecursionB);
}
public bool Equals(TestMutualRecursionB other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (!object.Equals(A, other.A)) return false;
if (OptionalInt32 != other.OptionalInt32) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (a_ != null) hash ^= A.GetHashCode();
if (OptionalInt32 != 0) hash ^= OptionalInt32.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (a_ != null) {
output.WriteRawTag(10);
output.WriteMessage(A);
}
if (OptionalInt32 != 0) {
output.WriteRawTag(16);
output.WriteInt32(OptionalInt32);
}
}
public int CalculateSize() {
int size = 0;
if (a_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(A);
}
if (OptionalInt32 != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(OptionalInt32);
}
return size;
}
public void MergeFrom(TestMutualRecursionB other) {
if (other == null) {
return;
}
if (other.a_ != null) {
if (a_ == null) {
a_ = new global::Google.Protobuf.TestProtos.TestMutualRecursionA();
}
A.MergeFrom(other.A);
}
if (other.OptionalInt32 != 0) {
OptionalInt32 = other.OptionalInt32;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 10: {
if (a_ == null) {
a_ = new global::Google.Protobuf.TestProtos.TestMutualRecursionA();
}
input.ReadMessage(a_);
break;
}
case 16: {
OptionalInt32 = input.ReadInt32();
break;
}
}
}
}
}
///
/// Test message with CamelCase field names. This violates Protocol Buffer
/// standard style.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class TestCamelCaseFieldNames : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestCamelCaseFieldNames());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[10]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public TestCamelCaseFieldNames() {
OnConstruction();
}
partial void OnConstruction();
public TestCamelCaseFieldNames(TestCamelCaseFieldNames other) : this() {
primitiveField_ = other.primitiveField_;
stringField_ = other.stringField_;
enumField_ = other.enumField_;
MessageField = other.messageField_ != null ? other.MessageField.Clone() : null;
repeatedPrimitiveField_ = other.repeatedPrimitiveField_.Clone();
repeatedStringField_ = other.repeatedStringField_.Clone();
repeatedEnumField_ = other.repeatedEnumField_.Clone();
repeatedMessageField_ = other.repeatedMessageField_.Clone();
}
public TestCamelCaseFieldNames Clone() {
return new TestCamelCaseFieldNames(this);
}
/// Field number for the "PrimitiveField" field.
public const int PrimitiveFieldFieldNumber = 1;
private int primitiveField_;
public int PrimitiveField {
get { return primitiveField_; }
set {
primitiveField_ = value;
}
}
/// Field number for the "StringField" field.
public const int StringFieldFieldNumber = 2;
private string stringField_ = "";
public string StringField {
get { return stringField_; }
set {
stringField_ = pb::Preconditions.CheckNotNull(value, "value");
}
}
/// Field number for the "EnumField" field.
public const int EnumFieldFieldNumber = 3;
private global::Google.Protobuf.TestProtos.ForeignEnum enumField_ = global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED;
public global::Google.Protobuf.TestProtos.ForeignEnum EnumField {
get { return enumField_; }
set {
enumField_ = value;
}
}
/// Field number for the "MessageField" field.
public const int MessageFieldFieldNumber = 4;
private global::Google.Protobuf.TestProtos.ForeignMessage messageField_;
public global::Google.Protobuf.TestProtos.ForeignMessage MessageField {
get { return messageField_; }
set {
messageField_ = value;
}
}
/// Field number for the "RepeatedPrimitiveField" field.
public const int RepeatedPrimitiveFieldFieldNumber = 7;
private static readonly pb::FieldCodec _repeated_repeatedPrimitiveField_codec
= pb::FieldCodec.ForInt32(58);
private readonly pbc::RepeatedField repeatedPrimitiveField_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedPrimitiveField {
get { return repeatedPrimitiveField_; }
}
/// Field number for the "RepeatedStringField" field.
public const int RepeatedStringFieldFieldNumber = 8;
private static readonly pb::FieldCodec _repeated_repeatedStringField_codec
= pb::FieldCodec.ForString(66);
private readonly pbc::RepeatedField repeatedStringField_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedStringField {
get { return repeatedStringField_; }
}
/// Field number for the "RepeatedEnumField" field.
public const int RepeatedEnumFieldFieldNumber = 9;
private static readonly pb::FieldCodec _repeated_repeatedEnumField_codec
= pb::FieldCodec.ForEnum(74, x => (int) x, x => (global::Google.Protobuf.TestProtos.ForeignEnum) x);
private readonly pbc::RepeatedField repeatedEnumField_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedEnumField {
get { return repeatedEnumField_; }
}
/// Field number for the "RepeatedMessageField" field.
public const int RepeatedMessageFieldFieldNumber = 10;
private static readonly pb::FieldCodec _repeated_repeatedMessageField_codec
= pb::FieldCodec.ForMessage(82, global::Google.Protobuf.TestProtos.ForeignMessage.Parser);
private readonly pbc::RepeatedField repeatedMessageField_ = new pbc::RepeatedField();
public pbc::RepeatedField RepeatedMessageField {
get { return repeatedMessageField_; }
}
public override bool Equals(object other) {
return Equals(other as TestCamelCaseFieldNames);
}
public bool Equals(TestCamelCaseFieldNames other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (PrimitiveField != other.PrimitiveField) return false;
if (StringField != other.StringField) return false;
if (EnumField != other.EnumField) return false;
if (!object.Equals(MessageField, other.MessageField)) return false;
if(!repeatedPrimitiveField_.Equals(other.repeatedPrimitiveField_)) return false;
if(!repeatedStringField_.Equals(other.repeatedStringField_)) return false;
if(!repeatedEnumField_.Equals(other.repeatedEnumField_)) return false;
if(!repeatedMessageField_.Equals(other.repeatedMessageField_)) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (PrimitiveField != 0) hash ^= PrimitiveField.GetHashCode();
if (StringField.Length != 0) hash ^= StringField.GetHashCode();
if (EnumField != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) hash ^= EnumField.GetHashCode();
if (messageField_ != null) hash ^= MessageField.GetHashCode();
hash ^= repeatedPrimitiveField_.GetHashCode();
hash ^= repeatedStringField_.GetHashCode();
hash ^= repeatedEnumField_.GetHashCode();
hash ^= repeatedMessageField_.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (PrimitiveField != 0) {
output.WriteRawTag(8);
output.WriteInt32(PrimitiveField);
}
if (StringField.Length != 0) {
output.WriteRawTag(18);
output.WriteString(StringField);
}
if (EnumField != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) {
output.WriteRawTag(24);
output.WriteEnum((int) EnumField);
}
if (messageField_ != null) {
output.WriteRawTag(34);
output.WriteMessage(MessageField);
}
repeatedPrimitiveField_.WriteTo(output, _repeated_repeatedPrimitiveField_codec);
repeatedStringField_.WriteTo(output, _repeated_repeatedStringField_codec);
repeatedEnumField_.WriteTo(output, _repeated_repeatedEnumField_codec);
repeatedMessageField_.WriteTo(output, _repeated_repeatedMessageField_codec);
}
public int CalculateSize() {
int size = 0;
if (PrimitiveField != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(PrimitiveField);
}
if (StringField.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(StringField);
}
if (EnumField != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EnumField);
}
if (messageField_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(MessageField);
}
size += repeatedPrimitiveField_.CalculateSize(_repeated_repeatedPrimitiveField_codec);
size += repeatedStringField_.CalculateSize(_repeated_repeatedStringField_codec);
size += repeatedEnumField_.CalculateSize(_repeated_repeatedEnumField_codec);
size += repeatedMessageField_.CalculateSize(_repeated_repeatedMessageField_codec);
return size;
}
public void MergeFrom(TestCamelCaseFieldNames other) {
if (other == null) {
return;
}
if (other.PrimitiveField != 0) {
PrimitiveField = other.PrimitiveField;
}
if (other.StringField.Length != 0) {
StringField = other.StringField;
}
if (other.EnumField != global::Google.Protobuf.TestProtos.ForeignEnum.FOREIGN_UNSPECIFIED) {
EnumField = other.EnumField;
}
if (other.messageField_ != null) {
if (messageField_ == null) {
messageField_ = new global::Google.Protobuf.TestProtos.ForeignMessage();
}
MessageField.MergeFrom(other.MessageField);
}
repeatedPrimitiveField_.Add(other.repeatedPrimitiveField_);
repeatedStringField_.Add(other.repeatedStringField_);
repeatedEnumField_.Add(other.repeatedEnumField_);
repeatedMessageField_.Add(other.repeatedMessageField_);
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 8: {
PrimitiveField = input.ReadInt32();
break;
}
case 18: {
StringField = input.ReadString();
break;
}
case 24: {
enumField_ = (global::Google.Protobuf.TestProtos.ForeignEnum) input.ReadEnum();
break;
}
case 34: {
if (messageField_ == null) {
messageField_ = new global::Google.Protobuf.TestProtos.ForeignMessage();
}
input.ReadMessage(messageField_);
break;
}
case 58:
case 56: {
repeatedPrimitiveField_.AddEntriesFrom(input, _repeated_repeatedPrimitiveField_codec);
break;
}
case 66: {
repeatedStringField_.AddEntriesFrom(input, _repeated_repeatedStringField_codec);
break;
}
case 74:
case 72: {
repeatedEnumField_.AddEntriesFrom(input, _repeated_repeatedEnumField_codec);
break;
}
case 82: {
repeatedMessageField_.AddEntriesFrom(input, _repeated_repeatedMessageField_codec);
break;
}
}
}
}
}
///
/// We list fields out of order, to ensure that we're using field number and not
/// field index to determine serialization order.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class TestFieldOrderings : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestFieldOrderings());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[11]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public TestFieldOrderings() {
OnConstruction();
}
partial void OnConstruction();
public TestFieldOrderings(TestFieldOrderings other) : this() {
myString_ = other.myString_;
myInt_ = other.myInt_;
myFloat_ = other.myFloat_;
SingleNestedMessage = other.singleNestedMessage_ != null ? other.SingleNestedMessage.Clone() : null;
}
public TestFieldOrderings Clone() {
return new TestFieldOrderings(this);
}
/// Field number for the "my_string" field.
public const int MyStringFieldNumber = 11;
private string myString_ = "";
public string MyString {
get { return myString_; }
set {
myString_ = pb::Preconditions.CheckNotNull(value, "value");
}
}
/// Field number for the "my_int" field.
public const int MyIntFieldNumber = 1;
private long myInt_;
public long MyInt {
get { return myInt_; }
set {
myInt_ = value;
}
}
/// Field number for the "my_float" field.
public const int MyFloatFieldNumber = 101;
private float myFloat_;
public float MyFloat {
get { return myFloat_; }
set {
myFloat_ = value;
}
}
/// Field number for the "single_nested_message" field.
public const int SingleNestedMessageFieldNumber = 200;
private global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage singleNestedMessage_;
public global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage SingleNestedMessage {
get { return singleNestedMessage_; }
set {
singleNestedMessage_ = value;
}
}
public override bool Equals(object other) {
return Equals(other as TestFieldOrderings);
}
public bool Equals(TestFieldOrderings other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (MyString != other.MyString) return false;
if (MyInt != other.MyInt) return false;
if (MyFloat != other.MyFloat) return false;
if (!object.Equals(SingleNestedMessage, other.SingleNestedMessage)) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (MyString.Length != 0) hash ^= MyString.GetHashCode();
if (MyInt != 0L) hash ^= MyInt.GetHashCode();
if (MyFloat != 0F) hash ^= MyFloat.GetHashCode();
if (singleNestedMessage_ != null) hash ^= SingleNestedMessage.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (MyInt != 0L) {
output.WriteRawTag(8);
output.WriteInt64(MyInt);
}
if (MyString.Length != 0) {
output.WriteRawTag(90);
output.WriteString(MyString);
}
if (MyFloat != 0F) {
output.WriteRawTag(173, 6);
output.WriteFloat(MyFloat);
}
if (singleNestedMessage_ != null) {
output.WriteRawTag(194, 12);
output.WriteMessage(SingleNestedMessage);
}
}
public int CalculateSize() {
int size = 0;
if (MyString.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(MyString);
}
if (MyInt != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(MyInt);
}
if (MyFloat != 0F) {
size += 2 + 4;
}
if (singleNestedMessage_ != null) {
size += 2 + pb::CodedOutputStream.ComputeMessageSize(SingleNestedMessage);
}
return size;
}
public void MergeFrom(TestFieldOrderings other) {
if (other == null) {
return;
}
if (other.MyString.Length != 0) {
MyString = other.MyString;
}
if (other.MyInt != 0L) {
MyInt = other.MyInt;
}
if (other.MyFloat != 0F) {
MyFloat = other.MyFloat;
}
if (other.singleNestedMessage_ != null) {
if (singleNestedMessage_ == null) {
singleNestedMessage_ = new global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage();
}
SingleNestedMessage.MergeFrom(other.SingleNestedMessage);
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 8: {
MyInt = input.ReadInt64();
break;
}
case 90: {
MyString = input.ReadString();
break;
}
case 813: {
MyFloat = input.ReadFloat();
break;
}
case 1602: {
if (singleNestedMessage_ == null) {
singleNestedMessage_ = new global::Google.Protobuf.TestProtos.TestFieldOrderings.Types.NestedMessage();
}
input.ReadMessage(singleNestedMessage_);
break;
}
}
}
}
#region Nested types
/// Container for nested types declared in the TestFieldOrderings message type.
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public static partial class Types {
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class NestedMessage : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NestedMessage());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.TestFieldOrderings.Descriptor.NestedTypes[0]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public NestedMessage() {
OnConstruction();
}
partial void OnConstruction();
public NestedMessage(NestedMessage other) : this() {
oo_ = other.oo_;
bb_ = other.bb_;
}
public NestedMessage Clone() {
return new NestedMessage(this);
}
/// Field number for the "oo" field.
public const int OoFieldNumber = 2;
private long oo_;
public long Oo {
get { return oo_; }
set {
oo_ = value;
}
}
/// Field number for the "bb" field.
public const int BbFieldNumber = 1;
private int bb_;
///
/// 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.
///
public int Bb {
get { return bb_; }
set {
bb_ = value;
}
}
public override bool Equals(object other) {
return Equals(other as NestedMessage);
}
public bool Equals(NestedMessage other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Oo != other.Oo) return false;
if (Bb != other.Bb) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (Oo != 0L) hash ^= Oo.GetHashCode();
if (Bb != 0) hash ^= Bb.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (Bb != 0) {
output.WriteRawTag(8);
output.WriteInt32(Bb);
}
if (Oo != 0L) {
output.WriteRawTag(16);
output.WriteInt64(Oo);
}
}
public int CalculateSize() {
int size = 0;
if (Oo != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Oo);
}
if (Bb != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Bb);
}
return size;
}
public void MergeFrom(NestedMessage other) {
if (other == null) {
return;
}
if (other.Oo != 0L) {
Oo = other.Oo;
}
if (other.Bb != 0) {
Bb = other.Bb;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 8: {
Bb = input.ReadInt32();
break;
}
case 16: {
Oo = input.ReadInt64();
break;
}
}
}
}
}
}
#endregion
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class SparseEnumMessage : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SparseEnumMessage());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[12]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public SparseEnumMessage() {
OnConstruction();
}
partial void OnConstruction();
public SparseEnumMessage(SparseEnumMessage other) : this() {
sparseEnum_ = other.sparseEnum_;
}
public SparseEnumMessage Clone() {
return new SparseEnumMessage(this);
}
/// Field number for the "sparse_enum" field.
public const int SparseEnumFieldNumber = 1;
private global::Google.Protobuf.TestProtos.TestSparseEnum sparseEnum_ = global::Google.Protobuf.TestProtos.TestSparseEnum.TEST_SPARSE_ENUM_UNSPECIFIED;
public global::Google.Protobuf.TestProtos.TestSparseEnum SparseEnum {
get { return sparseEnum_; }
set {
sparseEnum_ = value;
}
}
public override bool Equals(object other) {
return Equals(other as SparseEnumMessage);
}
public bool Equals(SparseEnumMessage other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (SparseEnum != other.SparseEnum) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (SparseEnum != global::Google.Protobuf.TestProtos.TestSparseEnum.TEST_SPARSE_ENUM_UNSPECIFIED) hash ^= SparseEnum.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (SparseEnum != global::Google.Protobuf.TestProtos.TestSparseEnum.TEST_SPARSE_ENUM_UNSPECIFIED) {
output.WriteRawTag(8);
output.WriteEnum((int) SparseEnum);
}
}
public int CalculateSize() {
int size = 0;
if (SparseEnum != global::Google.Protobuf.TestProtos.TestSparseEnum.TEST_SPARSE_ENUM_UNSPECIFIED) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SparseEnum);
}
return size;
}
public void MergeFrom(SparseEnumMessage other) {
if (other == null) {
return;
}
if (other.SparseEnum != global::Google.Protobuf.TestProtos.TestSparseEnum.TEST_SPARSE_ENUM_UNSPECIFIED) {
SparseEnum = other.SparseEnum;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 8: {
sparseEnum_ = (global::Google.Protobuf.TestProtos.TestSparseEnum) input.ReadEnum();
break;
}
}
}
}
}
///
/// Test String and Bytes: string is for valid UTF-8 strings
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class OneString : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OneString());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[13]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public OneString() {
OnConstruction();
}
partial void OnConstruction();
public OneString(OneString other) : this() {
data_ = other.data_;
}
public OneString Clone() {
return new OneString(this);
}
/// Field number for the "data" field.
public const int DataFieldNumber = 1;
private string data_ = "";
public string Data {
get { return data_; }
set {
data_ = pb::Preconditions.CheckNotNull(value, "value");
}
}
public override bool Equals(object other) {
return Equals(other as OneString);
}
public bool Equals(OneString other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Data != other.Data) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (Data.Length != 0) hash ^= Data.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (Data.Length != 0) {
output.WriteRawTag(10);
output.WriteString(Data);
}
}
public int CalculateSize() {
int size = 0;
if (Data.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Data);
}
return size;
}
public void MergeFrom(OneString other) {
if (other == null) {
return;
}
if (other.Data.Length != 0) {
Data = other.Data;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 10: {
Data = input.ReadString();
break;
}
}
}
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class MoreString : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MoreString());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[14]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public MoreString() {
OnConstruction();
}
partial void OnConstruction();
public MoreString(MoreString other) : this() {
data_ = other.data_.Clone();
}
public MoreString Clone() {
return new MoreString(this);
}
/// Field number for the "data" field.
public const int DataFieldNumber = 1;
private static readonly pb::FieldCodec _repeated_data_codec
= pb::FieldCodec.ForString(10);
private readonly pbc::RepeatedField data_ = new pbc::RepeatedField();
public pbc::RepeatedField Data {
get { return data_; }
}
public override bool Equals(object other) {
return Equals(other as MoreString);
}
public bool Equals(MoreString other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if(!data_.Equals(other.data_)) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
hash ^= data_.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
data_.WriteTo(output, _repeated_data_codec);
}
public int CalculateSize() {
int size = 0;
size += data_.CalculateSize(_repeated_data_codec);
return size;
}
public void MergeFrom(MoreString other) {
if (other == null) {
return;
}
data_.Add(other.data_);
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 10: {
data_.AddEntriesFrom(input, _repeated_data_codec);
break;
}
}
}
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class OneBytes : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OneBytes());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[15]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public OneBytes() {
OnConstruction();
}
partial void OnConstruction();
public OneBytes(OneBytes other) : this() {
data_ = other.data_;
}
public OneBytes Clone() {
return new OneBytes(this);
}
/// Field number for the "data" field.
public const int DataFieldNumber = 1;
private pb::ByteString data_ = pb::ByteString.Empty;
public pb::ByteString Data {
get { return data_; }
set {
data_ = pb::Preconditions.CheckNotNull(value, "value");
}
}
public override bool Equals(object other) {
return Equals(other as OneBytes);
}
public bool Equals(OneBytes other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Data != other.Data) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (Data.Length != 0) hash ^= Data.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (Data.Length != 0) {
output.WriteRawTag(10);
output.WriteBytes(Data);
}
}
public int CalculateSize() {
int size = 0;
if (Data.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data);
}
return size;
}
public void MergeFrom(OneBytes other) {
if (other == null) {
return;
}
if (other.Data.Length != 0) {
Data = other.Data;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 10: {
Data = input.ReadBytes();
break;
}
}
}
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class MoreBytes : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MoreBytes());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[16]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public MoreBytes() {
OnConstruction();
}
partial void OnConstruction();
public MoreBytes(MoreBytes other) : this() {
data_ = other.data_;
}
public MoreBytes Clone() {
return new MoreBytes(this);
}
/// Field number for the "data" field.
public const int DataFieldNumber = 1;
private pb::ByteString data_ = pb::ByteString.Empty;
public pb::ByteString Data {
get { return data_; }
set {
data_ = pb::Preconditions.CheckNotNull(value, "value");
}
}
public override bool Equals(object other) {
return Equals(other as MoreBytes);
}
public bool Equals(MoreBytes other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Data != other.Data) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (Data.Length != 0) hash ^= Data.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (Data.Length != 0) {
output.WriteRawTag(10);
output.WriteBytes(Data);
}
}
public int CalculateSize() {
int size = 0;
if (Data.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data);
}
return size;
}
public void MergeFrom(MoreBytes other) {
if (other == null) {
return;
}
if (other.Data.Length != 0) {
Data = other.Data;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 10: {
Data = input.ReadBytes();
break;
}
}
}
}
}
///
/// Test int32, uint32, int64, uint64, and bool are all compatible
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class Int32Message : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Int32Message());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[17]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public Int32Message() {
OnConstruction();
}
partial void OnConstruction();
public Int32Message(Int32Message other) : this() {
data_ = other.data_;
}
public Int32Message Clone() {
return new Int32Message(this);
}
/// Field number for the "data" field.
public const int DataFieldNumber = 1;
private int data_;
public int Data {
get { return data_; }
set {
data_ = value;
}
}
public override bool Equals(object other) {
return Equals(other as Int32Message);
}
public bool Equals(Int32Message other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Data != other.Data) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (Data != 0) hash ^= Data.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (Data != 0) {
output.WriteRawTag(8);
output.WriteInt32(Data);
}
}
public int CalculateSize() {
int size = 0;
if (Data != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Data);
}
return size;
}
public void MergeFrom(Int32Message other) {
if (other == null) {
return;
}
if (other.Data != 0) {
Data = other.Data;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 8: {
Data = input.ReadInt32();
break;
}
}
}
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class Uint32Message : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Uint32Message());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[18]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public Uint32Message() {
OnConstruction();
}
partial void OnConstruction();
public Uint32Message(Uint32Message other) : this() {
data_ = other.data_;
}
public Uint32Message Clone() {
return new Uint32Message(this);
}
/// Field number for the "data" field.
public const int DataFieldNumber = 1;
private uint data_;
public uint Data {
get { return data_; }
set {
data_ = value;
}
}
public override bool Equals(object other) {
return Equals(other as Uint32Message);
}
public bool Equals(Uint32Message other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Data != other.Data) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (Data != 0) hash ^= Data.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (Data != 0) {
output.WriteRawTag(8);
output.WriteUInt32(Data);
}
}
public int CalculateSize() {
int size = 0;
if (Data != 0) {
size += 1 + pb::CodedOutputStream.ComputeUInt32Size(Data);
}
return size;
}
public void MergeFrom(Uint32Message other) {
if (other == null) {
return;
}
if (other.Data != 0) {
Data = other.Data;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 8: {
Data = input.ReadUInt32();
break;
}
}
}
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class Int64Message : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Int64Message());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[19]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public Int64Message() {
OnConstruction();
}
partial void OnConstruction();
public Int64Message(Int64Message other) : this() {
data_ = other.data_;
}
public Int64Message Clone() {
return new Int64Message(this);
}
/// Field number for the "data" field.
public const int DataFieldNumber = 1;
private long data_;
public long Data {
get { return data_; }
set {
data_ = value;
}
}
public override bool Equals(object other) {
return Equals(other as Int64Message);
}
public bool Equals(Int64Message other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Data != other.Data) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (Data != 0L) hash ^= Data.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (Data != 0L) {
output.WriteRawTag(8);
output.WriteInt64(Data);
}
}
public int CalculateSize() {
int size = 0;
if (Data != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(Data);
}
return size;
}
public void MergeFrom(Int64Message other) {
if (other == null) {
return;
}
if (other.Data != 0L) {
Data = other.Data;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 8: {
Data = input.ReadInt64();
break;
}
}
}
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class Uint64Message : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Uint64Message());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[20]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public Uint64Message() {
OnConstruction();
}
partial void OnConstruction();
public Uint64Message(Uint64Message other) : this() {
data_ = other.data_;
}
public Uint64Message Clone() {
return new Uint64Message(this);
}
/// Field number for the "data" field.
public const int DataFieldNumber = 1;
private ulong data_;
public ulong Data {
get { return data_; }
set {
data_ = value;
}
}
public override bool Equals(object other) {
return Equals(other as Uint64Message);
}
public bool Equals(Uint64Message other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Data != other.Data) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (Data != 0UL) hash ^= Data.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (Data != 0UL) {
output.WriteRawTag(8);
output.WriteUInt64(Data);
}
}
public int CalculateSize() {
int size = 0;
if (Data != 0UL) {
size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Data);
}
return size;
}
public void MergeFrom(Uint64Message other) {
if (other == null) {
return;
}
if (other.Data != 0UL) {
Data = other.Data;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 8: {
Data = input.ReadUInt64();
break;
}
}
}
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class BoolMessage : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BoolMessage());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[21]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public BoolMessage() {
OnConstruction();
}
partial void OnConstruction();
public BoolMessage(BoolMessage other) : this() {
data_ = other.data_;
}
public BoolMessage Clone() {
return new BoolMessage(this);
}
/// Field number for the "data" field.
public const int DataFieldNumber = 1;
private bool data_;
public bool Data {
get { return data_; }
set {
data_ = value;
}
}
public override bool Equals(object other) {
return Equals(other as BoolMessage);
}
public bool Equals(BoolMessage other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Data != other.Data) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (Data != false) hash ^= Data.GetHashCode();
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (Data != false) {
output.WriteRawTag(8);
output.WriteBool(Data);
}
}
public int CalculateSize() {
int size = 0;
if (Data != false) {
size += 1 + 1;
}
return size;
}
public void MergeFrom(BoolMessage other) {
if (other == null) {
return;
}
if (other.Data != false) {
Data = other.Data;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 8: {
Data = input.ReadBool();
break;
}
}
}
}
}
///
/// Test oneofs.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class TestOneof : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestOneof());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[22]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public TestOneof() {
OnConstruction();
}
partial void OnConstruction();
public TestOneof(TestOneof other) : this() {
switch (other.FooCase) {
case FooOneofCase.FooInt:
FooInt = other.FooInt;
break;
case FooOneofCase.FooString:
FooString = other.FooString;
break;
case FooOneofCase.FooMessage:
FooMessage = other.FooMessage.Clone();
break;
}
}
public TestOneof Clone() {
return new TestOneof(this);
}
/// Field number for the "foo_int" field.
public const int FooIntFieldNumber = 1;
public int FooInt {
get { return fooCase_ == FooOneofCase.FooInt ? (int) foo_ : 0; }
set {
foo_ = value;
fooCase_ = FooOneofCase.FooInt;
}
}
/// Field number for the "foo_string" field.
public const int FooStringFieldNumber = 2;
public string FooString {
get { return fooCase_ == FooOneofCase.FooString ? (string) foo_ : ""; }
set {
foo_ = pb::Preconditions.CheckNotNull(value, "value");
fooCase_ = FooOneofCase.FooString;
}
}
/// Field number for the "foo_message" field.
public const int FooMessageFieldNumber = 3;
public global::Google.Protobuf.TestProtos.TestAllTypes FooMessage {
get { return fooCase_ == FooOneofCase.FooMessage ? (global::Google.Protobuf.TestProtos.TestAllTypes) foo_ : null; }
set {
foo_ = value;
fooCase_ = value == null ? FooOneofCase.None : FooOneofCase.FooMessage;
}
}
private object foo_;
/// Enum of possible cases for the "foo" oneof.
public enum FooOneofCase {
None = 0,
FooInt = 1,
FooString = 2,
FooMessage = 3,
}
private FooOneofCase fooCase_ = FooOneofCase.None;
public FooOneofCase FooCase {
get { return fooCase_; }
}
public void ClearFoo() {
fooCase_ = FooOneofCase.None;
foo_ = null;
}
public override bool Equals(object other) {
return Equals(other as TestOneof);
}
public bool Equals(TestOneof other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (FooInt != other.FooInt) return false;
if (FooString != other.FooString) return false;
if (!object.Equals(FooMessage, other.FooMessage)) return false;
if (FooCase != other.FooCase) return false;
return true;
}
public override int GetHashCode() {
int hash = 1;
if (fooCase_ == FooOneofCase.FooInt) hash ^= FooInt.GetHashCode();
if (fooCase_ == FooOneofCase.FooString) hash ^= FooString.GetHashCode();
if (fooCase_ == FooOneofCase.FooMessage) hash ^= FooMessage.GetHashCode();
hash ^= (int) fooCase_;
return hash;
}
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
public void WriteTo(pb::CodedOutputStream output) {
if (fooCase_ == FooOneofCase.FooInt) {
output.WriteRawTag(8);
output.WriteInt32(FooInt);
}
if (fooCase_ == FooOneofCase.FooString) {
output.WriteRawTag(18);
output.WriteString(FooString);
}
if (fooCase_ == FooOneofCase.FooMessage) {
output.WriteRawTag(26);
output.WriteMessage(FooMessage);
}
}
public int CalculateSize() {
int size = 0;
if (fooCase_ == FooOneofCase.FooInt) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(FooInt);
}
if (fooCase_ == FooOneofCase.FooString) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(FooString);
}
if (fooCase_ == FooOneofCase.FooMessage) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(FooMessage);
}
return size;
}
public void MergeFrom(TestOneof other) {
if (other == null) {
return;
}
switch (other.FooCase) {
case FooOneofCase.FooInt:
FooInt = other.FooInt;
break;
case FooOneofCase.FooString:
FooString = other.FooString;
break;
case FooOneofCase.FooMessage:
FooMessage = other.FooMessage;
break;
}
}
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
input.SkipLastField();
break;
case 8: {
FooInt = input.ReadInt32();
break;
}
case 18: {
FooString = input.ReadString();
break;
}
case 26: {
global::Google.Protobuf.TestProtos.TestAllTypes subBuilder = new global::Google.Protobuf.TestProtos.TestAllTypes();
if (fooCase_ == FooOneofCase.FooMessage) {
subBuilder.MergeFrom(FooMessage);
}
input.ReadMessage(subBuilder);
FooMessage = subBuilder;
break;
}
}
}
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
public sealed partial class TestPackedTypes : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TestPackedTypes());
public static pb::MessageParser Parser { get { return _parser; } }
public static pbr::MessageDescriptor Descriptor {
get { return global::Google.Protobuf.TestProtos.UnittestProto3Reflection.Descriptor.MessageTypes[23]; }
}
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
public TestPackedTypes() {
OnConstruction();
}
partial void OnConstruction();
public TestPackedTypes(TestPackedTypes other) : this() {
packedInt32_ = other.packedInt32_.Clone();
packedInt64_ = other.packedInt64_.Clone();
packedUint32_ = other.packedUint32_.Clone();
packedUint64_ = other.packedUint64_.Clone();
packedSint32_ = other.packedSint32_.Clone();
packedSint64_ = other.packedSint64_.Clone();
packedFixed32_ = other.packedFixed32_.Clone();
packedFixed64_ = other.packedFixed64_.Clone();
packedSfixed32_ = other.packedSfixed32_.Clone();
packedSfixed64_ = other.packedSfixed64_.Clone();
packedFloat_ = other.packedFloat_.Clone();
packedDouble_ = other.packedDouble_.Clone();
packedBool_ = other.packedBool_.Clone();
packedEnum_ = other.packedEnum_.Clone();
}
public TestPackedTypes Clone() {
return new TestPackedTypes(this);
}
/// Field number for the "packed_int32" field.
public const int PackedInt32FieldNumber = 90;
private static readonly pb::FieldCodec _repeated_packedInt32_codec
= pb::FieldCodec.ForInt32(722);
private readonly pbc::RepeatedField packedInt32_ = new pbc::RepeatedField();
public pbc::RepeatedField PackedInt32 {
get { return packedInt32_; }
}
/// Field number for the "packed_int64" field.
public const int PackedInt64FieldNumber = 91;
private static readonly pb::FieldCodec _repeated_packedInt64_codec
= pb::FieldCodec.ForInt64(730);
private readonly pbc::RepeatedField packedInt64_ = new pbc::RepeatedField();
public pbc::RepeatedField PackedInt64 {
get { return packedInt64_; }
}
/// Field number for the "packed_uint32" field.
public const int PackedUint32FieldNumber = 92;
private static readonly pb::FieldCodec _repeated_packedUint32_codec
= pb::FieldCodec.ForUInt32(738);
private readonly pbc::RepeatedField packedUint32_ = new pbc::RepeatedField();
public pbc::RepeatedField PackedUint32 {
get { return packedUint32_; }
}
/// Field number for the "packed_uint64" field.
public const int PackedUint64FieldNumber = 93;
private static readonly pb::FieldCodec _repeated_packedUint64_codec
= pb::FieldCodec.ForUInt64(746);
private readonly pbc::RepeatedField packedUint64_ = new pbc::RepeatedField();
public pbc::RepeatedField PackedUint64 {
get { return packedUint64_; }
}
/// Field number for the "packed_sint32" field.
public const int PackedSint32FieldNumber = 94;
private static readonly pb::FieldCodec _repeated_packedSint32_codec
= pb::FieldCodec.ForSInt32(754);
private readonly pbc::RepeatedField packedSint32_ = new pbc::RepeatedField();
public pbc::RepeatedField PackedSint32 {
get { return packedSint32_; }
}
/// Field number for the "packed_sint64" field.
public const int PackedSint64FieldNumber = 95;
private static readonly pb::FieldCodec _repeated_packedSint64_codec
= pb::FieldCodec.ForSInt64(762);
private readonly pbc::RepeatedField packedSint64_ = new pbc::RepeatedField();
public pbc::RepeatedField PackedSint64 {
get { return packedSint64_; }
}
/// Field number for the "packed_fixed32" field.
public const int PackedFixed32FieldNumber = 96;
private static readonly pb::FieldCodec _repeated_packedFixed32_codec
= pb::FieldCodec.ForFixed32(770);
private readonly pbc::RepeatedField packedFixed32_ = new pbc::RepeatedField();
public pbc::RepeatedField PackedFixed32 {
get { return packedFixed32_; }
}
/// Field number for the "packed_fixed64" field.
public const int PackedFixed64FieldNumber = 97;
private static readonly pb::FieldCodec _repeated_packedFixed64_codec
= pb::FieldCodec.ForFixed64(778);
private readonly pbc::RepeatedField packedFixed64_ = new pbc::RepeatedField();
public pbc::RepeatedField PackedFixed64 {
get { return packedFixed64_; }
}
/// Field number for the "packed_sfixed32" field.
public const int PackedSfixed32FieldNumber = 98;
private static readonly pb::FieldCodec _repeated_packedSfixed32_codec
= pb::FieldCodec.ForSFixed32(786);
private readonly pbc::RepeatedField packedSfixed32_ = new pbc::RepeatedField();
public pbc::RepeatedField PackedSfixed32 {
get { return packedSfixed32_; }
}
/// Field number for the "packed_sfixed64" field.
public const int PackedSfixed64FieldNumber = 99;
private static readonly pb::FieldCodec _repeated_packedSfixed64_codec
= pb::FieldCodec.ForSFixed64(794);
private readonly pbc::RepeatedField packedSfixed64_ = new pbc::RepeatedField