OLD | NEW |
(Empty) | |
| 1 // Generated by the protocol buffer compiler. DO NOT EDIT! |
| 2 // source: google/protobuf/descriptor.proto |
| 3 #pragma warning disable 1591, 0612, 3021 |
| 4 #region Designer generated code |
| 5 |
| 6 using pb = global::Google.Protobuf; |
| 7 using pbc = global::Google.Protobuf.Collections; |
| 8 using pbr = global::Google.Protobuf.Reflection; |
| 9 using scg = global::System.Collections.Generic; |
| 10 namespace Google.Protobuf.Reflection { |
| 11 |
| 12 /// <summary>Holder for reflection information generated from google/protobuf/
descriptor.proto</summary> |
| 13 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 14 internal static partial class DescriptorReflection { |
| 15 |
| 16 #region Descriptor |
| 17 /// <summary>File descriptor for google/protobuf/descriptor.proto</summary> |
| 18 public static pbr::FileDescriptor Descriptor { |
| 19 get { return descriptor; } |
| 20 } |
| 21 private static pbr::FileDescriptor descriptor; |
| 22 |
| 23 static DescriptorReflection() { |
| 24 byte[] descriptorData = global::System.Convert.FromBase64String( |
| 25 string.Concat( |
| 26 "CiBnb29nbGUvcHJvdG9idWYvZGVzY3JpcHRvci5wcm90bxIPZ29vZ2xlLnBy", |
| 27 "b3RvYnVmIkcKEUZpbGVEZXNjcmlwdG9yU2V0EjIKBGZpbGUYASADKAsyJC5n", |
| 28 "b29nbGUucHJvdG9idWYuRmlsZURlc2NyaXB0b3JQcm90byLbAwoTRmlsZURl", |
| 29 "c2NyaXB0b3JQcm90bxIMCgRuYW1lGAEgASgJEg8KB3BhY2thZ2UYAiABKAkS", |
| 30 "EgoKZGVwZW5kZW5jeRgDIAMoCRIZChFwdWJsaWNfZGVwZW5kZW5jeRgKIAMo", |
| 31 "BRIXCg93ZWFrX2RlcGVuZGVuY3kYCyADKAUSNgoMbWVzc2FnZV90eXBlGAQg", |
| 32 "AygLMiAuZ29vZ2xlLnByb3RvYnVmLkRlc2NyaXB0b3JQcm90bxI3CgllbnVt", |
| 33 "X3R5cGUYBSADKAsyJC5nb29nbGUucHJvdG9idWYuRW51bURlc2NyaXB0b3JQ", |
| 34 "cm90bxI4CgdzZXJ2aWNlGAYgAygLMicuZ29vZ2xlLnByb3RvYnVmLlNlcnZp", |
| 35 "Y2VEZXNjcmlwdG9yUHJvdG8SOAoJZXh0ZW5zaW9uGAcgAygLMiUuZ29vZ2xl", |
| 36 "LnByb3RvYnVmLkZpZWxkRGVzY3JpcHRvclByb3RvEi0KB29wdGlvbnMYCCAB", |
| 37 "KAsyHC5nb29nbGUucHJvdG9idWYuRmlsZU9wdGlvbnMSOQoQc291cmNlX2Nv", |
| 38 "ZGVfaW5mbxgJIAEoCzIfLmdvb2dsZS5wcm90b2J1Zi5Tb3VyY2VDb2RlSW5m", |
| 39 "bxIOCgZzeW50YXgYDCABKAki8AQKD0Rlc2NyaXB0b3JQcm90bxIMCgRuYW1l", |
| 40 "GAEgASgJEjQKBWZpZWxkGAIgAygLMiUuZ29vZ2xlLnByb3RvYnVmLkZpZWxk", |
| 41 "RGVzY3JpcHRvclByb3RvEjgKCWV4dGVuc2lvbhgGIAMoCzIlLmdvb2dsZS5w", |
| 42 "cm90b2J1Zi5GaWVsZERlc2NyaXB0b3JQcm90bxI1CgtuZXN0ZWRfdHlwZRgD", |
| 43 "IAMoCzIgLmdvb2dsZS5wcm90b2J1Zi5EZXNjcmlwdG9yUHJvdG8SNwoJZW51", |
| 44 "bV90eXBlGAQgAygLMiQuZ29vZ2xlLnByb3RvYnVmLkVudW1EZXNjcmlwdG9y", |
| 45 "UHJvdG8SSAoPZXh0ZW5zaW9uX3JhbmdlGAUgAygLMi8uZ29vZ2xlLnByb3Rv", |
| 46 "YnVmLkRlc2NyaXB0b3JQcm90by5FeHRlbnNpb25SYW5nZRI5CgpvbmVvZl9k", |
| 47 "ZWNsGAggAygLMiUuZ29vZ2xlLnByb3RvYnVmLk9uZW9mRGVzY3JpcHRvclBy", |
| 48 "b3RvEjAKB29wdGlvbnMYByABKAsyHy5nb29nbGUucHJvdG9idWYuTWVzc2Fn", |
| 49 "ZU9wdGlvbnMSRgoOcmVzZXJ2ZWRfcmFuZ2UYCSADKAsyLi5nb29nbGUucHJv", |
| 50 "dG9idWYuRGVzY3JpcHRvclByb3RvLlJlc2VydmVkUmFuZ2USFQoNcmVzZXJ2", |
| 51 "ZWRfbmFtZRgKIAMoCRosCg5FeHRlbnNpb25SYW5nZRINCgVzdGFydBgBIAEo", |
| 52 "BRILCgNlbmQYAiABKAUaKwoNUmVzZXJ2ZWRSYW5nZRINCgVzdGFydBgBIAEo", |
| 53 "BRILCgNlbmQYAiABKAUivAUKFEZpZWxkRGVzY3JpcHRvclByb3RvEgwKBG5h", |
| 54 "bWUYASABKAkSDgoGbnVtYmVyGAMgASgFEjoKBWxhYmVsGAQgASgOMisuZ29v", |
| 55 "Z2xlLnByb3RvYnVmLkZpZWxkRGVzY3JpcHRvclByb3RvLkxhYmVsEjgKBHR5", |
| 56 "cGUYBSABKA4yKi5nb29nbGUucHJvdG9idWYuRmllbGREZXNjcmlwdG9yUHJv", |
| 57 "dG8uVHlwZRIRCgl0eXBlX25hbWUYBiABKAkSEAoIZXh0ZW5kZWUYAiABKAkS", |
| 58 "FQoNZGVmYXVsdF92YWx1ZRgHIAEoCRITCgtvbmVvZl9pbmRleBgJIAEoBRIR", |
| 59 "Cglqc29uX25hbWUYCiABKAkSLgoHb3B0aW9ucxgIIAEoCzIdLmdvb2dsZS5w", |
| 60 "cm90b2J1Zi5GaWVsZE9wdGlvbnMitgIKBFR5cGUSDwoLVFlQRV9ET1VCTEUQ", |
| 61 "ARIOCgpUWVBFX0ZMT0FUEAISDgoKVFlQRV9JTlQ2NBADEg8KC1RZUEVfVUlO", |
| 62 "VDY0EAQSDgoKVFlQRV9JTlQzMhAFEhAKDFRZUEVfRklYRUQ2NBAGEhAKDFRZ", |
| 63 "UEVfRklYRUQzMhAHEg0KCVRZUEVfQk9PTBAIEg8KC1RZUEVfU1RSSU5HEAkS", |
| 64 "DgoKVFlQRV9HUk9VUBAKEhAKDFRZUEVfTUVTU0FHRRALEg4KClRZUEVfQllU", |
| 65 "RVMQDBIPCgtUWVBFX1VJTlQzMhANEg0KCVRZUEVfRU5VTRAOEhEKDVRZUEVf", |
| 66 "U0ZJWEVEMzIQDxIRCg1UWVBFX1NGSVhFRDY0EBASDwoLVFlQRV9TSU5UMzIQ", |
| 67 "ERIPCgtUWVBFX1NJTlQ2NBASIkMKBUxhYmVsEhIKDkxBQkVMX09QVElPTkFM", |
| 68 "EAESEgoOTEFCRUxfUkVRVUlSRUQQAhISCg5MQUJFTF9SRVBFQVRFRBADIiQK", |
| 69 "FE9uZW9mRGVzY3JpcHRvclByb3RvEgwKBG5hbWUYASABKAkijAEKE0VudW1E", |
| 70 "ZXNjcmlwdG9yUHJvdG8SDAoEbmFtZRgBIAEoCRI4CgV2YWx1ZRgCIAMoCzIp", |
| 71 "Lmdvb2dsZS5wcm90b2J1Zi5FbnVtVmFsdWVEZXNjcmlwdG9yUHJvdG8SLQoH", |
| 72 "b3B0aW9ucxgDIAEoCzIcLmdvb2dsZS5wcm90b2J1Zi5FbnVtT3B0aW9ucyJs", |
| 73 "ChhFbnVtVmFsdWVEZXNjcmlwdG9yUHJvdG8SDAoEbmFtZRgBIAEoCRIOCgZu", |
| 74 "dW1iZXIYAiABKAUSMgoHb3B0aW9ucxgDIAEoCzIhLmdvb2dsZS5wcm90b2J1", |
| 75 "Zi5FbnVtVmFsdWVPcHRpb25zIpABChZTZXJ2aWNlRGVzY3JpcHRvclByb3Rv", |
| 76 "EgwKBG5hbWUYASABKAkSNgoGbWV0aG9kGAIgAygLMiYuZ29vZ2xlLnByb3Rv", |
| 77 "YnVmLk1ldGhvZERlc2NyaXB0b3JQcm90bxIwCgdvcHRpb25zGAMgASgLMh8u", |
| 78 "Z29vZ2xlLnByb3RvYnVmLlNlcnZpY2VPcHRpb25zIsEBChVNZXRob2REZXNj", |
| 79 "cmlwdG9yUHJvdG8SDAoEbmFtZRgBIAEoCRISCgppbnB1dF90eXBlGAIgASgJ", |
| 80 "EhMKC291dHB1dF90eXBlGAMgASgJEi8KB29wdGlvbnMYBCABKAsyHi5nb29n", |
| 81 "bGUucHJvdG9idWYuTWV0aG9kT3B0aW9ucxIfChBjbGllbnRfc3RyZWFtaW5n", |
| 82 "GAUgASgIOgVmYWxzZRIfChBzZXJ2ZXJfc3RyZWFtaW5nGAYgASgIOgVmYWxz", |
| 83 "ZSKqBQoLRmlsZU9wdGlvbnMSFAoMamF2YV9wYWNrYWdlGAEgASgJEhwKFGph", |
| 84 "dmFfb3V0ZXJfY2xhc3NuYW1lGAggASgJEiIKE2phdmFfbXVsdGlwbGVfZmls", |
| 85 "ZXMYCiABKAg6BWZhbHNlEiwKHWphdmFfZ2VuZXJhdGVfZXF1YWxzX2FuZF9o", |
| 86 "YXNoGBQgASgIOgVmYWxzZRIlChZqYXZhX3N0cmluZ19jaGVja191dGY4GBsg", |
| 87 "ASgIOgVmYWxzZRJGCgxvcHRpbWl6ZV9mb3IYCSABKA4yKS5nb29nbGUucHJv", |
| 88 "dG9idWYuRmlsZU9wdGlvbnMuT3B0aW1pemVNb2RlOgVTUEVFRBISCgpnb19w", |
| 89 "YWNrYWdlGAsgASgJEiIKE2NjX2dlbmVyaWNfc2VydmljZXMYECABKAg6BWZh", |
| 90 "bHNlEiQKFWphdmFfZ2VuZXJpY19zZXJ2aWNlcxgRIAEoCDoFZmFsc2USIgoT", |
| 91 "cHlfZ2VuZXJpY19zZXJ2aWNlcxgSIAEoCDoFZmFsc2USGQoKZGVwcmVjYXRl", |
| 92 "ZBgXIAEoCDoFZmFsc2USHwoQY2NfZW5hYmxlX2FyZW5hcxgfIAEoCDoFZmFs", |
| 93 "c2USGQoRb2JqY19jbGFzc19wcmVmaXgYJCABKAkSGAoQY3NoYXJwX25hbWVz", |
| 94 "cGFjZRglIAEoCRInCh9qYXZhbmFub191c2VfZGVwcmVjYXRlZF9wYWNrYWdl", |
| 95 "GCYgASgIEkMKFHVuaW50ZXJwcmV0ZWRfb3B0aW9uGOcHIAMoCzIkLmdvb2ds", |
| 96 "ZS5wcm90b2J1Zi5VbmludGVycHJldGVkT3B0aW9uIjoKDE9wdGltaXplTW9k", |
| 97 "ZRIJCgVTUEVFRBABEg0KCUNPREVfU0laRRACEhAKDExJVEVfUlVOVElNRRAD", |
| 98 "KgkI6AcQgICAgAIi5gEKDk1lc3NhZ2VPcHRpb25zEiYKF21lc3NhZ2Vfc2V0", |
| 99 "X3dpcmVfZm9ybWF0GAEgASgIOgVmYWxzZRIuCh9ub19zdGFuZGFyZF9kZXNj", |
| 100 "cmlwdG9yX2FjY2Vzc29yGAIgASgIOgVmYWxzZRIZCgpkZXByZWNhdGVkGAMg", |
| 101 "ASgIOgVmYWxzZRIRCgltYXBfZW50cnkYByABKAgSQwoUdW5pbnRlcnByZXRl", |
| 102 "ZF9vcHRpb24Y5wcgAygLMiQuZ29vZ2xlLnByb3RvYnVmLlVuaW50ZXJwcmV0", |
| 103 "ZWRPcHRpb24qCQjoBxCAgICAAiKYAwoMRmllbGRPcHRpb25zEjoKBWN0eXBl", |
| 104 "GAEgASgOMiMuZ29vZ2xlLnByb3RvYnVmLkZpZWxkT3B0aW9ucy5DVHlwZToG", |
| 105 "U1RSSU5HEg4KBnBhY2tlZBgCIAEoCBI/CgZqc3R5cGUYBiABKA4yJC5nb29n", |
| 106 "bGUucHJvdG9idWYuRmllbGRPcHRpb25zLkpTVHlwZToJSlNfTk9STUFMEhMK", |
| 107 "BGxhenkYBSABKAg6BWZhbHNlEhkKCmRlcHJlY2F0ZWQYAyABKAg6BWZhbHNl", |
| 108 "EhMKBHdlYWsYCiABKAg6BWZhbHNlEkMKFHVuaW50ZXJwcmV0ZWRfb3B0aW9u", |
| 109 "GOcHIAMoCzIkLmdvb2dsZS5wcm90b2J1Zi5VbmludGVycHJldGVkT3B0aW9u", |
| 110 "Ii8KBUNUeXBlEgoKBlNUUklORxAAEggKBENPUkQQARIQCgxTVFJJTkdfUElF", |
| 111 "Q0UQAiI1CgZKU1R5cGUSDQoJSlNfTk9STUFMEAASDQoJSlNfU1RSSU5HEAES", |
| 112 "DQoJSlNfTlVNQkVSEAIqCQjoBxCAgICAAiKNAQoLRW51bU9wdGlvbnMSEwoL", |
| 113 "YWxsb3dfYWxpYXMYAiABKAgSGQoKZGVwcmVjYXRlZBgDIAEoCDoFZmFsc2US", |
| 114 "QwoUdW5pbnRlcnByZXRlZF9vcHRpb24Y5wcgAygLMiQuZ29vZ2xlLnByb3Rv", |
| 115 "YnVmLlVuaW50ZXJwcmV0ZWRPcHRpb24qCQjoBxCAgICAAiJ9ChBFbnVtVmFs", |
| 116 "dWVPcHRpb25zEhkKCmRlcHJlY2F0ZWQYASABKAg6BWZhbHNlEkMKFHVuaW50", |
| 117 "ZXJwcmV0ZWRfb3B0aW9uGOcHIAMoCzIkLmdvb2dsZS5wcm90b2J1Zi5Vbmlu", |
| 118 "dGVycHJldGVkT3B0aW9uKgkI6AcQgICAgAIiewoOU2VydmljZU9wdGlvbnMS", |
| 119 "GQoKZGVwcmVjYXRlZBghIAEoCDoFZmFsc2USQwoUdW5pbnRlcnByZXRlZF9v", |
| 120 "cHRpb24Y5wcgAygLMiQuZ29vZ2xlLnByb3RvYnVmLlVuaW50ZXJwcmV0ZWRP", |
| 121 "cHRpb24qCQjoBxCAgICAAiJ6Cg1NZXRob2RPcHRpb25zEhkKCmRlcHJlY2F0", |
| 122 "ZWQYISABKAg6BWZhbHNlEkMKFHVuaW50ZXJwcmV0ZWRfb3B0aW9uGOcHIAMo", |
| 123 "CzIkLmdvb2dsZS5wcm90b2J1Zi5VbmludGVycHJldGVkT3B0aW9uKgkI6AcQ", |
| 124 "gICAgAIingIKE1VuaW50ZXJwcmV0ZWRPcHRpb24SOwoEbmFtZRgCIAMoCzIt", |
| 125 "Lmdvb2dsZS5wcm90b2J1Zi5VbmludGVycHJldGVkT3B0aW9uLk5hbWVQYXJ0", |
| 126 "EhgKEGlkZW50aWZpZXJfdmFsdWUYAyABKAkSGgoScG9zaXRpdmVfaW50X3Zh", |
| 127 "bHVlGAQgASgEEhoKEm5lZ2F0aXZlX2ludF92YWx1ZRgFIAEoAxIUCgxkb3Vi", |
| 128 "bGVfdmFsdWUYBiABKAESFAoMc3RyaW5nX3ZhbHVlGAcgASgMEhcKD2FnZ3Jl", |
| 129 "Z2F0ZV92YWx1ZRgIIAEoCRozCghOYW1lUGFydBIRCgluYW1lX3BhcnQYASAC", |
| 130 "KAkSFAoMaXNfZXh0ZW5zaW9uGAIgAigIItUBCg5Tb3VyY2VDb2RlSW5mbxI6", |
| 131 "Cghsb2NhdGlvbhgBIAMoCzIoLmdvb2dsZS5wcm90b2J1Zi5Tb3VyY2VDb2Rl", |
| 132 "SW5mby5Mb2NhdGlvbhqGAQoITG9jYXRpb24SEAoEcGF0aBgBIAMoBUICEAES", |
| 133 "EAoEc3BhbhgCIAMoBUICEAESGAoQbGVhZGluZ19jb21tZW50cxgDIAEoCRIZ", |
| 134 "ChF0cmFpbGluZ19jb21tZW50cxgEIAEoCRIhChlsZWFkaW5nX2RldGFjaGVk", |
| 135 "X2NvbW1lbnRzGAYgAygJQlgKE2NvbS5nb29nbGUucHJvdG9idWZCEERlc2Ny", |
| 136 "aXB0b3JQcm90b3NIAVoKZGVzY3JpcHRvcqICA0dQQqoCGkdvb2dsZS5Qcm90", |
| 137 "b2J1Zi5SZWZsZWN0aW9u")); |
| 138 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, |
| 139 new pbr::FileDescriptor[] { }, |
| 140 new pbr::GeneratedCodeInfo(null, new pbr::GeneratedCodeInfo[] { |
| 141 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Reflection
.FileDescriptorSet), global::Google.Protobuf.Reflection.FileDescriptorSet.Parser
, new[]{ "File" }, null, null, null), |
| 142 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Reflection
.FileDescriptorProto), global::Google.Protobuf.Reflection.FileDescriptorProto.Pa
rser, new[]{ "Name", "Package", "Dependency", "PublicDependency", "WeakDependenc
y", "MessageType", "EnumType", "Service", "Extension", "Options", "SourceCodeInf
o", "Syntax" }, null, null, null), |
| 143 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Reflection
.DescriptorProto), global::Google.Protobuf.Reflection.DescriptorProto.Parser, ne
w[]{ "Name", "Field", "Extension", "NestedType", "EnumType", "ExtensionRange", "
OneofDecl", "Options", "ReservedRange", "ReservedName" }, null, null, new pbr::G
eneratedCodeInfo[] { new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.R
eflection.DescriptorProto.Types.ExtensionRange), global::Google.Protobuf.Reflect
ion.DescriptorProto.Types.ExtensionRange.Parser, new[]{ "Start", "End" }, null,
null, null), |
| 144 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Reflection
.DescriptorProto.Types.ReservedRange), global::Google.Protobuf.Reflection.Descri
ptorProto.Types.ReservedRange.Parser, new[]{ "Start", "End" }, null, null, null)
}), |
| 145 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Reflection
.FieldDescriptorProto), global::Google.Protobuf.Reflection.FieldDescriptorProto.
Parser, new[]{ "Name", "Number", "Label", "Type", "TypeName", "Extendee", "Defau
ltValue", "OneofIndex", "JsonName", "Options" }, null, new[]{ typeof(global::Goo
gle.Protobuf.Reflection.FieldDescriptorProto.Types.Type), typeof(global::Google.
Protobuf.Reflection.FieldDescriptorProto.Types.Label) }, null), |
| 146 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Reflection
.OneofDescriptorProto), global::Google.Protobuf.Reflection.OneofDescriptorProto.
Parser, new[]{ "Name" }, null, null, null), |
| 147 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Reflection
.EnumDescriptorProto), global::Google.Protobuf.Reflection.EnumDescriptorProto.Pa
rser, new[]{ "Name", "Value", "Options" }, null, null, null), |
| 148 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Reflection
.EnumValueDescriptorProto), global::Google.Protobuf.Reflection.EnumValueDescript
orProto.Parser, new[]{ "Name", "Number", "Options" }, null, null, null), |
| 149 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Reflection
.ServiceDescriptorProto), global::Google.Protobuf.Reflection.ServiceDescriptorPr
oto.Parser, new[]{ "Name", "Method", "Options" }, null, null, null), |
| 150 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Reflection
.MethodDescriptorProto), global::Google.Protobuf.Reflection.MethodDescriptorProt
o.Parser, new[]{ "Name", "InputType", "OutputType", "Options", "ClientStreaming"
, "ServerStreaming" }, null, null, null), |
| 151 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Reflection
.FileOptions), global::Google.Protobuf.Reflection.FileOptions.Parser, new[]{ "Ja
vaPackage", "JavaOuterClassname", "JavaMultipleFiles", "JavaGenerateEqualsAndHas
h", "JavaStringCheckUtf8", "OptimizeFor", "GoPackage", "CcGenericServices", "Jav
aGenericServices", "PyGenericServices", "Deprecated", "CcEnableArenas", "ObjcCla
ssPrefix", "CsharpNamespace", "JavananoUseDeprecatedPackage", "UninterpretedOpti
on" }, null, new[]{ typeof(global::Google.Protobuf.Reflection.FileOptions.Types.
OptimizeMode) }, null), |
| 152 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Reflection
.MessageOptions), global::Google.Protobuf.Reflection.MessageOptions.Parser, new[
]{ "MessageSetWireFormat", "NoStandardDescriptorAccessor", "Deprecated", "MapEnt
ry", "UninterpretedOption" }, null, null, null), |
| 153 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Reflection
.FieldOptions), global::Google.Protobuf.Reflection.FieldOptions.Parser, new[]{ "
Ctype", "Packed", "Jstype", "Lazy", "Deprecated", "Weak", "UninterpretedOption"
}, null, new[]{ typeof(global::Google.Protobuf.Reflection.FieldOptions.Types.CTy
pe), typeof(global::Google.Protobuf.Reflection.FieldOptions.Types.JSType) }, nul
l), |
| 154 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Reflection
.EnumOptions), global::Google.Protobuf.Reflection.EnumOptions.Parser, new[]{ "Al
lowAlias", "Deprecated", "UninterpretedOption" }, null, null, null), |
| 155 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Reflection
.EnumValueOptions), global::Google.Protobuf.Reflection.EnumValueOptions.Parser,
new[]{ "Deprecated", "UninterpretedOption" }, null, null, null), |
| 156 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Reflection
.ServiceOptions), global::Google.Protobuf.Reflection.ServiceOptions.Parser, new[
]{ "Deprecated", "UninterpretedOption" }, null, null, null), |
| 157 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Reflection
.MethodOptions), global::Google.Protobuf.Reflection.MethodOptions.Parser, new[]{
"Deprecated", "UninterpretedOption" }, null, null, null), |
| 158 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Reflection
.UninterpretedOption), global::Google.Protobuf.Reflection.UninterpretedOption.Pa
rser, new[]{ "Name", "IdentifierValue", "PositiveIntValue", "NegativeIntValue",
"DoubleValue", "StringValue", "AggregateValue" }, null, null, new pbr::Generated
CodeInfo[] { new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Reflectio
n.UninterpretedOption.Types.NamePart), global::Google.Protobuf.Reflection.Uninte
rpretedOption.Types.NamePart.Parser, new[]{ "NamePart_", "IsExtension" }, null,
null, null)}), |
| 159 new pbr::GeneratedCodeInfo(typeof(global::Google.Protobuf.Reflection
.SourceCodeInfo), global::Google.Protobuf.Reflection.SourceCodeInfo.Parser, new[
]{ "Location" }, null, null, new pbr::GeneratedCodeInfo[] { new pbr::GeneratedCo
deInfo(typeof(global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location),
global::Google.Protobuf.Reflection.SourceCodeInfo.Types.Location.Parser, new[]{
"Path", "Span", "LeadingComments", "TrailingComments", "LeadingDetachedComments
" }, null, null, null)}) |
| 160 })); |
| 161 } |
| 162 #endregion |
| 163 |
| 164 } |
| 165 #region Messages |
| 166 /// <summary> |
| 167 /// The protocol compiler can output a FileDescriptorSet containing the .prot
o |
| 168 /// files it parses. |
| 169 /// </summary> |
| 170 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 171 internal sealed partial class FileDescriptorSet : pb::IMessage<FileDescriptorS
et> { |
| 172 private static readonly pb::MessageParser<FileDescriptorSet> _parser = new p
b::MessageParser<FileDescriptorSet>(() => new FileDescriptorSet()); |
| 173 public static pb::MessageParser<FileDescriptorSet> Parser { get { return _pa
rser; } } |
| 174 |
| 175 public static pbr::MessageDescriptor Descriptor { |
| 176 get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descr
iptor.MessageTypes[0]; } |
| 177 } |
| 178 |
| 179 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 180 get { return Descriptor; } |
| 181 } |
| 182 |
| 183 public FileDescriptorSet() { |
| 184 OnConstruction(); |
| 185 } |
| 186 |
| 187 partial void OnConstruction(); |
| 188 |
| 189 public FileDescriptorSet(FileDescriptorSet other) : this() { |
| 190 file_ = other.file_.Clone(); |
| 191 } |
| 192 |
| 193 public FileDescriptorSet Clone() { |
| 194 return new FileDescriptorSet(this); |
| 195 } |
| 196 |
| 197 /// <summary>Field number for the "file" field.</summary> |
| 198 public const int FileFieldNumber = 1; |
| 199 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.Fi
leDescriptorProto> _repeated_file_codec |
| 200 = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Reflection.FileD
escriptorProto.Parser); |
| 201 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.FileD
escriptorProto> file_ = new pbc::RepeatedField<global::Google.Protobuf.Reflectio
n.FileDescriptorProto>(); |
| 202 public pbc::RepeatedField<global::Google.Protobuf.Reflection.FileDescriptorP
roto> File { |
| 203 get { return file_; } |
| 204 } |
| 205 |
| 206 public override bool Equals(object other) { |
| 207 return Equals(other as FileDescriptorSet); |
| 208 } |
| 209 |
| 210 public bool Equals(FileDescriptorSet other) { |
| 211 if (ReferenceEquals(other, null)) { |
| 212 return false; |
| 213 } |
| 214 if (ReferenceEquals(other, this)) { |
| 215 return true; |
| 216 } |
| 217 if(!file_.Equals(other.file_)) return false; |
| 218 return true; |
| 219 } |
| 220 |
| 221 public override int GetHashCode() { |
| 222 int hash = 1; |
| 223 hash ^= file_.GetHashCode(); |
| 224 return hash; |
| 225 } |
| 226 |
| 227 public override string ToString() { |
| 228 return pb::JsonFormatter.ToDiagnosticString(this); |
| 229 } |
| 230 |
| 231 public void WriteTo(pb::CodedOutputStream output) { |
| 232 file_.WriteTo(output, _repeated_file_codec); |
| 233 } |
| 234 |
| 235 public int CalculateSize() { |
| 236 int size = 0; |
| 237 size += file_.CalculateSize(_repeated_file_codec); |
| 238 return size; |
| 239 } |
| 240 |
| 241 public void MergeFrom(FileDescriptorSet other) { |
| 242 if (other == null) { |
| 243 return; |
| 244 } |
| 245 file_.Add(other.file_); |
| 246 } |
| 247 |
| 248 public void MergeFrom(pb::CodedInputStream input) { |
| 249 uint tag; |
| 250 while ((tag = input.ReadTag()) != 0) { |
| 251 switch(tag) { |
| 252 default: |
| 253 input.SkipLastField(); |
| 254 break; |
| 255 case 10: { |
| 256 file_.AddEntriesFrom(input, _repeated_file_codec); |
| 257 break; |
| 258 } |
| 259 } |
| 260 } |
| 261 } |
| 262 |
| 263 } |
| 264 |
| 265 /// <summary> |
| 266 /// Describes a complete .proto file. |
| 267 /// </summary> |
| 268 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 269 internal sealed partial class FileDescriptorProto : pb::IMessage<FileDescripto
rProto> { |
| 270 private static readonly pb::MessageParser<FileDescriptorProto> _parser = new
pb::MessageParser<FileDescriptorProto>(() => new FileDescriptorProto()); |
| 271 public static pb::MessageParser<FileDescriptorProto> Parser { get { return _
parser; } } |
| 272 |
| 273 public static pbr::MessageDescriptor Descriptor { |
| 274 get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descr
iptor.MessageTypes[1]; } |
| 275 } |
| 276 |
| 277 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 278 get { return Descriptor; } |
| 279 } |
| 280 |
| 281 public FileDescriptorProto() { |
| 282 OnConstruction(); |
| 283 } |
| 284 |
| 285 partial void OnConstruction(); |
| 286 |
| 287 public FileDescriptorProto(FileDescriptorProto other) : this() { |
| 288 name_ = other.name_; |
| 289 package_ = other.package_; |
| 290 dependency_ = other.dependency_.Clone(); |
| 291 publicDependency_ = other.publicDependency_.Clone(); |
| 292 weakDependency_ = other.weakDependency_.Clone(); |
| 293 messageType_ = other.messageType_.Clone(); |
| 294 enumType_ = other.enumType_.Clone(); |
| 295 service_ = other.service_.Clone(); |
| 296 extension_ = other.extension_.Clone(); |
| 297 Options = other.options_ != null ? other.Options.Clone() : null; |
| 298 SourceCodeInfo = other.sourceCodeInfo_ != null ? other.SourceCodeInfo.Clon
e() : null; |
| 299 syntax_ = other.syntax_; |
| 300 } |
| 301 |
| 302 public FileDescriptorProto Clone() { |
| 303 return new FileDescriptorProto(this); |
| 304 } |
| 305 |
| 306 /// <summary>Field number for the "name" field.</summary> |
| 307 public const int NameFieldNumber = 1; |
| 308 private string name_ = ""; |
| 309 /// <summary> |
| 310 /// file name, relative to root of source tree |
| 311 /// </summary> |
| 312 public string Name { |
| 313 get { return name_; } |
| 314 set { |
| 315 name_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 316 } |
| 317 } |
| 318 |
| 319 /// <summary>Field number for the "package" field.</summary> |
| 320 public const int PackageFieldNumber = 2; |
| 321 private string package_ = ""; |
| 322 /// <summary> |
| 323 /// e.g. "foo", "foo.bar", etc. |
| 324 /// </summary> |
| 325 public string Package { |
| 326 get { return package_; } |
| 327 set { |
| 328 package_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 329 } |
| 330 } |
| 331 |
| 332 /// <summary>Field number for the "dependency" field.</summary> |
| 333 public const int DependencyFieldNumber = 3; |
| 334 private static readonly pb::FieldCodec<string> _repeated_dependency_codec |
| 335 = pb::FieldCodec.ForString(26); |
| 336 private readonly pbc::RepeatedField<string> dependency_ = new pbc::RepeatedF
ield<string>(); |
| 337 /// <summary> |
| 338 /// Names of files imported by this file. |
| 339 /// </summary> |
| 340 public pbc::RepeatedField<string> Dependency { |
| 341 get { return dependency_; } |
| 342 } |
| 343 |
| 344 /// <summary>Field number for the "public_dependency" field.</summary> |
| 345 public const int PublicDependencyFieldNumber = 10; |
| 346 private static readonly pb::FieldCodec<int> _repeated_publicDependency_codec |
| 347 = pb::FieldCodec.ForInt32(80); |
| 348 private readonly pbc::RepeatedField<int> publicDependency_ = new pbc::Repeat
edField<int>(); |
| 349 /// <summary> |
| 350 /// Indexes of the public imported files in the dependency list above. |
| 351 /// </summary> |
| 352 public pbc::RepeatedField<int> PublicDependency { |
| 353 get { return publicDependency_; } |
| 354 } |
| 355 |
| 356 /// <summary>Field number for the "weak_dependency" field.</summary> |
| 357 public const int WeakDependencyFieldNumber = 11; |
| 358 private static readonly pb::FieldCodec<int> _repeated_weakDependency_codec |
| 359 = pb::FieldCodec.ForInt32(88); |
| 360 private readonly pbc::RepeatedField<int> weakDependency_ = new pbc::Repeated
Field<int>(); |
| 361 /// <summary> |
| 362 /// Indexes of the weak imported files in the dependency list. |
| 363 /// For Google-internal migration only. Do not use. |
| 364 /// </summary> |
| 365 public pbc::RepeatedField<int> WeakDependency { |
| 366 get { return weakDependency_; } |
| 367 } |
| 368 |
| 369 /// <summary>Field number for the "message_type" field.</summary> |
| 370 public const int MessageTypeFieldNumber = 4; |
| 371 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.De
scriptorProto> _repeated_messageType_codec |
| 372 = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.Reflection.Descr
iptorProto.Parser); |
| 373 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.Descr
iptorProto> messageType_ = new pbc::RepeatedField<global::Google.Protobuf.Reflec
tion.DescriptorProto>(); |
| 374 /// <summary> |
| 375 /// All top-level definitions in this file. |
| 376 /// </summary> |
| 377 public pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto
> MessageType { |
| 378 get { return messageType_; } |
| 379 } |
| 380 |
| 381 /// <summary>Field number for the "enum_type" field.</summary> |
| 382 public const int EnumTypeFieldNumber = 5; |
| 383 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.En
umDescriptorProto> _repeated_enumType_codec |
| 384 = pb::FieldCodec.ForMessage(42, global::Google.Protobuf.Reflection.EnumD
escriptorProto.Parser); |
| 385 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.EnumD
escriptorProto> enumType_ = new pbc::RepeatedField<global::Google.Protobuf.Refle
ction.EnumDescriptorProto>(); |
| 386 public pbc::RepeatedField<global::Google.Protobuf.Reflection.EnumDescriptorP
roto> EnumType { |
| 387 get { return enumType_; } |
| 388 } |
| 389 |
| 390 /// <summary>Field number for the "service" field.</summary> |
| 391 public const int ServiceFieldNumber = 6; |
| 392 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.Se
rviceDescriptorProto> _repeated_service_codec |
| 393 = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.Reflection.Servi
ceDescriptorProto.Parser); |
| 394 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.Servi
ceDescriptorProto> service_ = new pbc::RepeatedField<global::Google.Protobuf.Ref
lection.ServiceDescriptorProto>(); |
| 395 public pbc::RepeatedField<global::Google.Protobuf.Reflection.ServiceDescript
orProto> Service { |
| 396 get { return service_; } |
| 397 } |
| 398 |
| 399 /// <summary>Field number for the "extension" field.</summary> |
| 400 public const int ExtensionFieldNumber = 7; |
| 401 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.Fi
eldDescriptorProto> _repeated_extension_codec |
| 402 = pb::FieldCodec.ForMessage(58, global::Google.Protobuf.Reflection.Field
DescriptorProto.Parser); |
| 403 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.Field
DescriptorProto> extension_ = new pbc::RepeatedField<global::Google.Protobuf.Ref
lection.FieldDescriptorProto>(); |
| 404 public pbc::RepeatedField<global::Google.Protobuf.Reflection.FieldDescriptor
Proto> Extension { |
| 405 get { return extension_; } |
| 406 } |
| 407 |
| 408 /// <summary>Field number for the "options" field.</summary> |
| 409 public const int OptionsFieldNumber = 8; |
| 410 private global::Google.Protobuf.Reflection.FileOptions options_; |
| 411 public global::Google.Protobuf.Reflection.FileOptions Options { |
| 412 get { return options_; } |
| 413 set { |
| 414 options_ = value; |
| 415 } |
| 416 } |
| 417 |
| 418 /// <summary>Field number for the "source_code_info" field.</summary> |
| 419 public const int SourceCodeInfoFieldNumber = 9; |
| 420 private global::Google.Protobuf.Reflection.SourceCodeInfo sourceCodeInfo_; |
| 421 /// <summary> |
| 422 /// This field contains optional information about the original source code
. |
| 423 /// You may safely remove this entire field without harming runtime |
| 424 /// functionality of the descriptors -- the information is needed only by |
| 425 /// development tools. |
| 426 /// </summary> |
| 427 public global::Google.Protobuf.Reflection.SourceCodeInfo SourceCodeInfo { |
| 428 get { return sourceCodeInfo_; } |
| 429 set { |
| 430 sourceCodeInfo_ = value; |
| 431 } |
| 432 } |
| 433 |
| 434 /// <summary>Field number for the "syntax" field.</summary> |
| 435 public const int SyntaxFieldNumber = 12; |
| 436 private string syntax_ = ""; |
| 437 /// <summary> |
| 438 /// The syntax of the proto file. |
| 439 /// The supported values are "proto2" and "proto3". |
| 440 /// </summary> |
| 441 public string Syntax { |
| 442 get { return syntax_; } |
| 443 set { |
| 444 syntax_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 445 } |
| 446 } |
| 447 |
| 448 public override bool Equals(object other) { |
| 449 return Equals(other as FileDescriptorProto); |
| 450 } |
| 451 |
| 452 public bool Equals(FileDescriptorProto other) { |
| 453 if (ReferenceEquals(other, null)) { |
| 454 return false; |
| 455 } |
| 456 if (ReferenceEquals(other, this)) { |
| 457 return true; |
| 458 } |
| 459 if (Name != other.Name) return false; |
| 460 if (Package != other.Package) return false; |
| 461 if(!dependency_.Equals(other.dependency_)) return false; |
| 462 if(!publicDependency_.Equals(other.publicDependency_)) return false; |
| 463 if(!weakDependency_.Equals(other.weakDependency_)) return false; |
| 464 if(!messageType_.Equals(other.messageType_)) return false; |
| 465 if(!enumType_.Equals(other.enumType_)) return false; |
| 466 if(!service_.Equals(other.service_)) return false; |
| 467 if(!extension_.Equals(other.extension_)) return false; |
| 468 if (!object.Equals(Options, other.Options)) return false; |
| 469 if (!object.Equals(SourceCodeInfo, other.SourceCodeInfo)) return false; |
| 470 if (Syntax != other.Syntax) return false; |
| 471 return true; |
| 472 } |
| 473 |
| 474 public override int GetHashCode() { |
| 475 int hash = 1; |
| 476 if (Name.Length != 0) hash ^= Name.GetHashCode(); |
| 477 if (Package.Length != 0) hash ^= Package.GetHashCode(); |
| 478 hash ^= dependency_.GetHashCode(); |
| 479 hash ^= publicDependency_.GetHashCode(); |
| 480 hash ^= weakDependency_.GetHashCode(); |
| 481 hash ^= messageType_.GetHashCode(); |
| 482 hash ^= enumType_.GetHashCode(); |
| 483 hash ^= service_.GetHashCode(); |
| 484 hash ^= extension_.GetHashCode(); |
| 485 if (options_ != null) hash ^= Options.GetHashCode(); |
| 486 if (sourceCodeInfo_ != null) hash ^= SourceCodeInfo.GetHashCode(); |
| 487 if (Syntax.Length != 0) hash ^= Syntax.GetHashCode(); |
| 488 return hash; |
| 489 } |
| 490 |
| 491 public override string ToString() { |
| 492 return pb::JsonFormatter.ToDiagnosticString(this); |
| 493 } |
| 494 |
| 495 public void WriteTo(pb::CodedOutputStream output) { |
| 496 if (Name.Length != 0) { |
| 497 output.WriteRawTag(10); |
| 498 output.WriteString(Name); |
| 499 } |
| 500 if (Package.Length != 0) { |
| 501 output.WriteRawTag(18); |
| 502 output.WriteString(Package); |
| 503 } |
| 504 dependency_.WriteTo(output, _repeated_dependency_codec); |
| 505 messageType_.WriteTo(output, _repeated_messageType_codec); |
| 506 enumType_.WriteTo(output, _repeated_enumType_codec); |
| 507 service_.WriteTo(output, _repeated_service_codec); |
| 508 extension_.WriteTo(output, _repeated_extension_codec); |
| 509 if (options_ != null) { |
| 510 output.WriteRawTag(66); |
| 511 output.WriteMessage(Options); |
| 512 } |
| 513 if (sourceCodeInfo_ != null) { |
| 514 output.WriteRawTag(74); |
| 515 output.WriteMessage(SourceCodeInfo); |
| 516 } |
| 517 publicDependency_.WriteTo(output, _repeated_publicDependency_codec); |
| 518 weakDependency_.WriteTo(output, _repeated_weakDependency_codec); |
| 519 if (Syntax.Length != 0) { |
| 520 output.WriteRawTag(98); |
| 521 output.WriteString(Syntax); |
| 522 } |
| 523 } |
| 524 |
| 525 public int CalculateSize() { |
| 526 int size = 0; |
| 527 if (Name.Length != 0) { |
| 528 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
| 529 } |
| 530 if (Package.Length != 0) { |
| 531 size += 1 + pb::CodedOutputStream.ComputeStringSize(Package); |
| 532 } |
| 533 size += dependency_.CalculateSize(_repeated_dependency_codec); |
| 534 size += publicDependency_.CalculateSize(_repeated_publicDependency_codec); |
| 535 size += weakDependency_.CalculateSize(_repeated_weakDependency_codec); |
| 536 size += messageType_.CalculateSize(_repeated_messageType_codec); |
| 537 size += enumType_.CalculateSize(_repeated_enumType_codec); |
| 538 size += service_.CalculateSize(_repeated_service_codec); |
| 539 size += extension_.CalculateSize(_repeated_extension_codec); |
| 540 if (options_ != null) { |
| 541 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); |
| 542 } |
| 543 if (sourceCodeInfo_ != null) { |
| 544 size += 1 + pb::CodedOutputStream.ComputeMessageSize(SourceCodeInfo); |
| 545 } |
| 546 if (Syntax.Length != 0) { |
| 547 size += 1 + pb::CodedOutputStream.ComputeStringSize(Syntax); |
| 548 } |
| 549 return size; |
| 550 } |
| 551 |
| 552 public void MergeFrom(FileDescriptorProto other) { |
| 553 if (other == null) { |
| 554 return; |
| 555 } |
| 556 if (other.Name.Length != 0) { |
| 557 Name = other.Name; |
| 558 } |
| 559 if (other.Package.Length != 0) { |
| 560 Package = other.Package; |
| 561 } |
| 562 dependency_.Add(other.dependency_); |
| 563 publicDependency_.Add(other.publicDependency_); |
| 564 weakDependency_.Add(other.weakDependency_); |
| 565 messageType_.Add(other.messageType_); |
| 566 enumType_.Add(other.enumType_); |
| 567 service_.Add(other.service_); |
| 568 extension_.Add(other.extension_); |
| 569 if (other.options_ != null) { |
| 570 if (options_ == null) { |
| 571 options_ = new global::Google.Protobuf.Reflection.FileOptions(); |
| 572 } |
| 573 Options.MergeFrom(other.Options); |
| 574 } |
| 575 if (other.sourceCodeInfo_ != null) { |
| 576 if (sourceCodeInfo_ == null) { |
| 577 sourceCodeInfo_ = new global::Google.Protobuf.Reflection.SourceCodeInf
o(); |
| 578 } |
| 579 SourceCodeInfo.MergeFrom(other.SourceCodeInfo); |
| 580 } |
| 581 if (other.Syntax.Length != 0) { |
| 582 Syntax = other.Syntax; |
| 583 } |
| 584 } |
| 585 |
| 586 public void MergeFrom(pb::CodedInputStream input) { |
| 587 uint tag; |
| 588 while ((tag = input.ReadTag()) != 0) { |
| 589 switch(tag) { |
| 590 default: |
| 591 input.SkipLastField(); |
| 592 break; |
| 593 case 10: { |
| 594 Name = input.ReadString(); |
| 595 break; |
| 596 } |
| 597 case 18: { |
| 598 Package = input.ReadString(); |
| 599 break; |
| 600 } |
| 601 case 26: { |
| 602 dependency_.AddEntriesFrom(input, _repeated_dependency_codec); |
| 603 break; |
| 604 } |
| 605 case 34: { |
| 606 messageType_.AddEntriesFrom(input, _repeated_messageType_codec); |
| 607 break; |
| 608 } |
| 609 case 42: { |
| 610 enumType_.AddEntriesFrom(input, _repeated_enumType_codec); |
| 611 break; |
| 612 } |
| 613 case 50: { |
| 614 service_.AddEntriesFrom(input, _repeated_service_codec); |
| 615 break; |
| 616 } |
| 617 case 58: { |
| 618 extension_.AddEntriesFrom(input, _repeated_extension_codec); |
| 619 break; |
| 620 } |
| 621 case 66: { |
| 622 if (options_ == null) { |
| 623 options_ = new global::Google.Protobuf.Reflection.FileOptions(); |
| 624 } |
| 625 input.ReadMessage(options_); |
| 626 break; |
| 627 } |
| 628 case 74: { |
| 629 if (sourceCodeInfo_ == null) { |
| 630 sourceCodeInfo_ = new global::Google.Protobuf.Reflection.SourceCod
eInfo(); |
| 631 } |
| 632 input.ReadMessage(sourceCodeInfo_); |
| 633 break; |
| 634 } |
| 635 case 82: |
| 636 case 80: { |
| 637 publicDependency_.AddEntriesFrom(input, _repeated_publicDependency_c
odec); |
| 638 break; |
| 639 } |
| 640 case 90: |
| 641 case 88: { |
| 642 weakDependency_.AddEntriesFrom(input, _repeated_weakDependency_codec
); |
| 643 break; |
| 644 } |
| 645 case 98: { |
| 646 Syntax = input.ReadString(); |
| 647 break; |
| 648 } |
| 649 } |
| 650 } |
| 651 } |
| 652 |
| 653 } |
| 654 |
| 655 /// <summary> |
| 656 /// Describes a message type. |
| 657 /// </summary> |
| 658 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 659 internal sealed partial class DescriptorProto : pb::IMessage<DescriptorProto>
{ |
| 660 private static readonly pb::MessageParser<DescriptorProto> _parser = new pb:
:MessageParser<DescriptorProto>(() => new DescriptorProto()); |
| 661 public static pb::MessageParser<DescriptorProto> Parser { get { return _pars
er; } } |
| 662 |
| 663 public static pbr::MessageDescriptor Descriptor { |
| 664 get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descr
iptor.MessageTypes[2]; } |
| 665 } |
| 666 |
| 667 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 668 get { return Descriptor; } |
| 669 } |
| 670 |
| 671 public DescriptorProto() { |
| 672 OnConstruction(); |
| 673 } |
| 674 |
| 675 partial void OnConstruction(); |
| 676 |
| 677 public DescriptorProto(DescriptorProto other) : this() { |
| 678 name_ = other.name_; |
| 679 field_ = other.field_.Clone(); |
| 680 extension_ = other.extension_.Clone(); |
| 681 nestedType_ = other.nestedType_.Clone(); |
| 682 enumType_ = other.enumType_.Clone(); |
| 683 extensionRange_ = other.extensionRange_.Clone(); |
| 684 oneofDecl_ = other.oneofDecl_.Clone(); |
| 685 Options = other.options_ != null ? other.Options.Clone() : null; |
| 686 reservedRange_ = other.reservedRange_.Clone(); |
| 687 reservedName_ = other.reservedName_.Clone(); |
| 688 } |
| 689 |
| 690 public DescriptorProto Clone() { |
| 691 return new DescriptorProto(this); |
| 692 } |
| 693 |
| 694 /// <summary>Field number for the "name" field.</summary> |
| 695 public const int NameFieldNumber = 1; |
| 696 private string name_ = ""; |
| 697 public string Name { |
| 698 get { return name_; } |
| 699 set { |
| 700 name_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 701 } |
| 702 } |
| 703 |
| 704 /// <summary>Field number for the "field" field.</summary> |
| 705 public const int FieldFieldNumber = 2; |
| 706 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.Fi
eldDescriptorProto> _repeated_field_codec |
| 707 = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.Reflection.Field
DescriptorProto.Parser); |
| 708 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.Field
DescriptorProto> field_ = new pbc::RepeatedField<global::Google.Protobuf.Reflect
ion.FieldDescriptorProto>(); |
| 709 public pbc::RepeatedField<global::Google.Protobuf.Reflection.FieldDescriptor
Proto> Field { |
| 710 get { return field_; } |
| 711 } |
| 712 |
| 713 /// <summary>Field number for the "extension" field.</summary> |
| 714 public const int ExtensionFieldNumber = 6; |
| 715 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.Fi
eldDescriptorProto> _repeated_extension_codec |
| 716 = pb::FieldCodec.ForMessage(50, global::Google.Protobuf.Reflection.Field
DescriptorProto.Parser); |
| 717 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.Field
DescriptorProto> extension_ = new pbc::RepeatedField<global::Google.Protobuf.Ref
lection.FieldDescriptorProto>(); |
| 718 public pbc::RepeatedField<global::Google.Protobuf.Reflection.FieldDescriptor
Proto> Extension { |
| 719 get { return extension_; } |
| 720 } |
| 721 |
| 722 /// <summary>Field number for the "nested_type" field.</summary> |
| 723 public const int NestedTypeFieldNumber = 3; |
| 724 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.De
scriptorProto> _repeated_nestedType_codec |
| 725 = pb::FieldCodec.ForMessage(26, global::Google.Protobuf.Reflection.Descr
iptorProto.Parser); |
| 726 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.Descr
iptorProto> nestedType_ = new pbc::RepeatedField<global::Google.Protobuf.Reflect
ion.DescriptorProto>(); |
| 727 public pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto
> NestedType { |
| 728 get { return nestedType_; } |
| 729 } |
| 730 |
| 731 /// <summary>Field number for the "enum_type" field.</summary> |
| 732 public const int EnumTypeFieldNumber = 4; |
| 733 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.En
umDescriptorProto> _repeated_enumType_codec |
| 734 = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.Reflection.EnumD
escriptorProto.Parser); |
| 735 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.EnumD
escriptorProto> enumType_ = new pbc::RepeatedField<global::Google.Protobuf.Refle
ction.EnumDescriptorProto>(); |
| 736 public pbc::RepeatedField<global::Google.Protobuf.Reflection.EnumDescriptorP
roto> EnumType { |
| 737 get { return enumType_; } |
| 738 } |
| 739 |
| 740 /// <summary>Field number for the "extension_range" field.</summary> |
| 741 public const int ExtensionRangeFieldNumber = 5; |
| 742 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.De
scriptorProto.Types.ExtensionRange> _repeated_extensionRange_codec |
| 743 = pb::FieldCodec.ForMessage(42, global::Google.Protobuf.Reflection.Descr
iptorProto.Types.ExtensionRange.Parser); |
| 744 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.Descr
iptorProto.Types.ExtensionRange> extensionRange_ = new pbc::RepeatedField<global
::Google.Protobuf.Reflection.DescriptorProto.Types.ExtensionRange>(); |
| 745 public pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto
.Types.ExtensionRange> ExtensionRange { |
| 746 get { return extensionRange_; } |
| 747 } |
| 748 |
| 749 /// <summary>Field number for the "oneof_decl" field.</summary> |
| 750 public const int OneofDeclFieldNumber = 8; |
| 751 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.On
eofDescriptorProto> _repeated_oneofDecl_codec |
| 752 = pb::FieldCodec.ForMessage(66, global::Google.Protobuf.Reflection.Oneof
DescriptorProto.Parser); |
| 753 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.Oneof
DescriptorProto> oneofDecl_ = new pbc::RepeatedField<global::Google.Protobuf.Ref
lection.OneofDescriptorProto>(); |
| 754 public pbc::RepeatedField<global::Google.Protobuf.Reflection.OneofDescriptor
Proto> OneofDecl { |
| 755 get { return oneofDecl_; } |
| 756 } |
| 757 |
| 758 /// <summary>Field number for the "options" field.</summary> |
| 759 public const int OptionsFieldNumber = 7; |
| 760 private global::Google.Protobuf.Reflection.MessageOptions options_; |
| 761 public global::Google.Protobuf.Reflection.MessageOptions Options { |
| 762 get { return options_; } |
| 763 set { |
| 764 options_ = value; |
| 765 } |
| 766 } |
| 767 |
| 768 /// <summary>Field number for the "reserved_range" field.</summary> |
| 769 public const int ReservedRangeFieldNumber = 9; |
| 770 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.De
scriptorProto.Types.ReservedRange> _repeated_reservedRange_codec |
| 771 = pb::FieldCodec.ForMessage(74, global::Google.Protobuf.Reflection.Descr
iptorProto.Types.ReservedRange.Parser); |
| 772 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.Descr
iptorProto.Types.ReservedRange> reservedRange_ = new pbc::RepeatedField<global::
Google.Protobuf.Reflection.DescriptorProto.Types.ReservedRange>(); |
| 773 public pbc::RepeatedField<global::Google.Protobuf.Reflection.DescriptorProto
.Types.ReservedRange> ReservedRange { |
| 774 get { return reservedRange_; } |
| 775 } |
| 776 |
| 777 /// <summary>Field number for the "reserved_name" field.</summary> |
| 778 public const int ReservedNameFieldNumber = 10; |
| 779 private static readonly pb::FieldCodec<string> _repeated_reservedName_codec |
| 780 = pb::FieldCodec.ForString(82); |
| 781 private readonly pbc::RepeatedField<string> reservedName_ = new pbc::Repeate
dField<string>(); |
| 782 /// <summary> |
| 783 /// Reserved field names, which may not be used by fields in the same messa
ge. |
| 784 /// A given name may only be reserved once. |
| 785 /// </summary> |
| 786 public pbc::RepeatedField<string> ReservedName { |
| 787 get { return reservedName_; } |
| 788 } |
| 789 |
| 790 public override bool Equals(object other) { |
| 791 return Equals(other as DescriptorProto); |
| 792 } |
| 793 |
| 794 public bool Equals(DescriptorProto other) { |
| 795 if (ReferenceEquals(other, null)) { |
| 796 return false; |
| 797 } |
| 798 if (ReferenceEquals(other, this)) { |
| 799 return true; |
| 800 } |
| 801 if (Name != other.Name) return false; |
| 802 if(!field_.Equals(other.field_)) return false; |
| 803 if(!extension_.Equals(other.extension_)) return false; |
| 804 if(!nestedType_.Equals(other.nestedType_)) return false; |
| 805 if(!enumType_.Equals(other.enumType_)) return false; |
| 806 if(!extensionRange_.Equals(other.extensionRange_)) return false; |
| 807 if(!oneofDecl_.Equals(other.oneofDecl_)) return false; |
| 808 if (!object.Equals(Options, other.Options)) return false; |
| 809 if(!reservedRange_.Equals(other.reservedRange_)) return false; |
| 810 if(!reservedName_.Equals(other.reservedName_)) return false; |
| 811 return true; |
| 812 } |
| 813 |
| 814 public override int GetHashCode() { |
| 815 int hash = 1; |
| 816 if (Name.Length != 0) hash ^= Name.GetHashCode(); |
| 817 hash ^= field_.GetHashCode(); |
| 818 hash ^= extension_.GetHashCode(); |
| 819 hash ^= nestedType_.GetHashCode(); |
| 820 hash ^= enumType_.GetHashCode(); |
| 821 hash ^= extensionRange_.GetHashCode(); |
| 822 hash ^= oneofDecl_.GetHashCode(); |
| 823 if (options_ != null) hash ^= Options.GetHashCode(); |
| 824 hash ^= reservedRange_.GetHashCode(); |
| 825 hash ^= reservedName_.GetHashCode(); |
| 826 return hash; |
| 827 } |
| 828 |
| 829 public override string ToString() { |
| 830 return pb::JsonFormatter.ToDiagnosticString(this); |
| 831 } |
| 832 |
| 833 public void WriteTo(pb::CodedOutputStream output) { |
| 834 if (Name.Length != 0) { |
| 835 output.WriteRawTag(10); |
| 836 output.WriteString(Name); |
| 837 } |
| 838 field_.WriteTo(output, _repeated_field_codec); |
| 839 nestedType_.WriteTo(output, _repeated_nestedType_codec); |
| 840 enumType_.WriteTo(output, _repeated_enumType_codec); |
| 841 extensionRange_.WriteTo(output, _repeated_extensionRange_codec); |
| 842 extension_.WriteTo(output, _repeated_extension_codec); |
| 843 if (options_ != null) { |
| 844 output.WriteRawTag(58); |
| 845 output.WriteMessage(Options); |
| 846 } |
| 847 oneofDecl_.WriteTo(output, _repeated_oneofDecl_codec); |
| 848 reservedRange_.WriteTo(output, _repeated_reservedRange_codec); |
| 849 reservedName_.WriteTo(output, _repeated_reservedName_codec); |
| 850 } |
| 851 |
| 852 public int CalculateSize() { |
| 853 int size = 0; |
| 854 if (Name.Length != 0) { |
| 855 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
| 856 } |
| 857 size += field_.CalculateSize(_repeated_field_codec); |
| 858 size += extension_.CalculateSize(_repeated_extension_codec); |
| 859 size += nestedType_.CalculateSize(_repeated_nestedType_codec); |
| 860 size += enumType_.CalculateSize(_repeated_enumType_codec); |
| 861 size += extensionRange_.CalculateSize(_repeated_extensionRange_codec); |
| 862 size += oneofDecl_.CalculateSize(_repeated_oneofDecl_codec); |
| 863 if (options_ != null) { |
| 864 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); |
| 865 } |
| 866 size += reservedRange_.CalculateSize(_repeated_reservedRange_codec); |
| 867 size += reservedName_.CalculateSize(_repeated_reservedName_codec); |
| 868 return size; |
| 869 } |
| 870 |
| 871 public void MergeFrom(DescriptorProto other) { |
| 872 if (other == null) { |
| 873 return; |
| 874 } |
| 875 if (other.Name.Length != 0) { |
| 876 Name = other.Name; |
| 877 } |
| 878 field_.Add(other.field_); |
| 879 extension_.Add(other.extension_); |
| 880 nestedType_.Add(other.nestedType_); |
| 881 enumType_.Add(other.enumType_); |
| 882 extensionRange_.Add(other.extensionRange_); |
| 883 oneofDecl_.Add(other.oneofDecl_); |
| 884 if (other.options_ != null) { |
| 885 if (options_ == null) { |
| 886 options_ = new global::Google.Protobuf.Reflection.MessageOptions(); |
| 887 } |
| 888 Options.MergeFrom(other.Options); |
| 889 } |
| 890 reservedRange_.Add(other.reservedRange_); |
| 891 reservedName_.Add(other.reservedName_); |
| 892 } |
| 893 |
| 894 public void MergeFrom(pb::CodedInputStream input) { |
| 895 uint tag; |
| 896 while ((tag = input.ReadTag()) != 0) { |
| 897 switch(tag) { |
| 898 default: |
| 899 input.SkipLastField(); |
| 900 break; |
| 901 case 10: { |
| 902 Name = input.ReadString(); |
| 903 break; |
| 904 } |
| 905 case 18: { |
| 906 field_.AddEntriesFrom(input, _repeated_field_codec); |
| 907 break; |
| 908 } |
| 909 case 26: { |
| 910 nestedType_.AddEntriesFrom(input, _repeated_nestedType_codec); |
| 911 break; |
| 912 } |
| 913 case 34: { |
| 914 enumType_.AddEntriesFrom(input, _repeated_enumType_codec); |
| 915 break; |
| 916 } |
| 917 case 42: { |
| 918 extensionRange_.AddEntriesFrom(input, _repeated_extensionRange_codec
); |
| 919 break; |
| 920 } |
| 921 case 50: { |
| 922 extension_.AddEntriesFrom(input, _repeated_extension_codec); |
| 923 break; |
| 924 } |
| 925 case 58: { |
| 926 if (options_ == null) { |
| 927 options_ = new global::Google.Protobuf.Reflection.MessageOptions()
; |
| 928 } |
| 929 input.ReadMessage(options_); |
| 930 break; |
| 931 } |
| 932 case 66: { |
| 933 oneofDecl_.AddEntriesFrom(input, _repeated_oneofDecl_codec); |
| 934 break; |
| 935 } |
| 936 case 74: { |
| 937 reservedRange_.AddEntriesFrom(input, _repeated_reservedRange_codec); |
| 938 break; |
| 939 } |
| 940 case 82: { |
| 941 reservedName_.AddEntriesFrom(input, _repeated_reservedName_codec); |
| 942 break; |
| 943 } |
| 944 } |
| 945 } |
| 946 } |
| 947 |
| 948 #region Nested types |
| 949 /// <summary>Container for nested types declared in the DescriptorProto mess
age type.</summary> |
| 950 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 951 public static partial class Types { |
| 952 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 953 internal sealed partial class ExtensionRange : pb::IMessage<ExtensionRange
> { |
| 954 private static readonly pb::MessageParser<ExtensionRange> _parser = new
pb::MessageParser<ExtensionRange>(() => new ExtensionRange()); |
| 955 public static pb::MessageParser<ExtensionRange> Parser { get { return _p
arser; } } |
| 956 |
| 957 public static pbr::MessageDescriptor Descriptor { |
| 958 get { return global::Google.Protobuf.Reflection.DescriptorProto.Descri
ptor.NestedTypes[0]; } |
| 959 } |
| 960 |
| 961 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 962 get { return Descriptor; } |
| 963 } |
| 964 |
| 965 public ExtensionRange() { |
| 966 OnConstruction(); |
| 967 } |
| 968 |
| 969 partial void OnConstruction(); |
| 970 |
| 971 public ExtensionRange(ExtensionRange other) : this() { |
| 972 start_ = other.start_; |
| 973 end_ = other.end_; |
| 974 } |
| 975 |
| 976 public ExtensionRange Clone() { |
| 977 return new ExtensionRange(this); |
| 978 } |
| 979 |
| 980 /// <summary>Field number for the "start" field.</summary> |
| 981 public const int StartFieldNumber = 1; |
| 982 private int start_; |
| 983 public int Start { |
| 984 get { return start_; } |
| 985 set { |
| 986 start_ = value; |
| 987 } |
| 988 } |
| 989 |
| 990 /// <summary>Field number for the "end" field.</summary> |
| 991 public const int EndFieldNumber = 2; |
| 992 private int end_; |
| 993 public int End { |
| 994 get { return end_; } |
| 995 set { |
| 996 end_ = value; |
| 997 } |
| 998 } |
| 999 |
| 1000 public override bool Equals(object other) { |
| 1001 return Equals(other as ExtensionRange); |
| 1002 } |
| 1003 |
| 1004 public bool Equals(ExtensionRange other) { |
| 1005 if (ReferenceEquals(other, null)) { |
| 1006 return false; |
| 1007 } |
| 1008 if (ReferenceEquals(other, this)) { |
| 1009 return true; |
| 1010 } |
| 1011 if (Start != other.Start) return false; |
| 1012 if (End != other.End) return false; |
| 1013 return true; |
| 1014 } |
| 1015 |
| 1016 public override int GetHashCode() { |
| 1017 int hash = 1; |
| 1018 if (Start != 0) hash ^= Start.GetHashCode(); |
| 1019 if (End != 0) hash ^= End.GetHashCode(); |
| 1020 return hash; |
| 1021 } |
| 1022 |
| 1023 public override string ToString() { |
| 1024 return pb::JsonFormatter.ToDiagnosticString(this); |
| 1025 } |
| 1026 |
| 1027 public void WriteTo(pb::CodedOutputStream output) { |
| 1028 if (Start != 0) { |
| 1029 output.WriteRawTag(8); |
| 1030 output.WriteInt32(Start); |
| 1031 } |
| 1032 if (End != 0) { |
| 1033 output.WriteRawTag(16); |
| 1034 output.WriteInt32(End); |
| 1035 } |
| 1036 } |
| 1037 |
| 1038 public int CalculateSize() { |
| 1039 int size = 0; |
| 1040 if (Start != 0) { |
| 1041 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Start); |
| 1042 } |
| 1043 if (End != 0) { |
| 1044 size += 1 + pb::CodedOutputStream.ComputeInt32Size(End); |
| 1045 } |
| 1046 return size; |
| 1047 } |
| 1048 |
| 1049 public void MergeFrom(ExtensionRange other) { |
| 1050 if (other == null) { |
| 1051 return; |
| 1052 } |
| 1053 if (other.Start != 0) { |
| 1054 Start = other.Start; |
| 1055 } |
| 1056 if (other.End != 0) { |
| 1057 End = other.End; |
| 1058 } |
| 1059 } |
| 1060 |
| 1061 public void MergeFrom(pb::CodedInputStream input) { |
| 1062 uint tag; |
| 1063 while ((tag = input.ReadTag()) != 0) { |
| 1064 switch(tag) { |
| 1065 default: |
| 1066 input.SkipLastField(); |
| 1067 break; |
| 1068 case 8: { |
| 1069 Start = input.ReadInt32(); |
| 1070 break; |
| 1071 } |
| 1072 case 16: { |
| 1073 End = input.ReadInt32(); |
| 1074 break; |
| 1075 } |
| 1076 } |
| 1077 } |
| 1078 } |
| 1079 |
| 1080 } |
| 1081 |
| 1082 /// <summary> |
| 1083 /// Range of reserved tag numbers. Reserved tag numbers may not be used b
y |
| 1084 /// fields or extension ranges in the same message. Reserved ranges may |
| 1085 /// not overlap. |
| 1086 /// </summary> |
| 1087 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1088 internal sealed partial class ReservedRange : pb::IMessage<ReservedRange>
{ |
| 1089 private static readonly pb::MessageParser<ReservedRange> _parser = new p
b::MessageParser<ReservedRange>(() => new ReservedRange()); |
| 1090 public static pb::MessageParser<ReservedRange> Parser { get { return _pa
rser; } } |
| 1091 |
| 1092 public static pbr::MessageDescriptor Descriptor { |
| 1093 get { return global::Google.Protobuf.Reflection.DescriptorProto.Descri
ptor.NestedTypes[1]; } |
| 1094 } |
| 1095 |
| 1096 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1097 get { return Descriptor; } |
| 1098 } |
| 1099 |
| 1100 public ReservedRange() { |
| 1101 OnConstruction(); |
| 1102 } |
| 1103 |
| 1104 partial void OnConstruction(); |
| 1105 |
| 1106 public ReservedRange(ReservedRange other) : this() { |
| 1107 start_ = other.start_; |
| 1108 end_ = other.end_; |
| 1109 } |
| 1110 |
| 1111 public ReservedRange Clone() { |
| 1112 return new ReservedRange(this); |
| 1113 } |
| 1114 |
| 1115 /// <summary>Field number for the "start" field.</summary> |
| 1116 public const int StartFieldNumber = 1; |
| 1117 private int start_; |
| 1118 /// <summary> |
| 1119 /// Inclusive. |
| 1120 /// </summary> |
| 1121 public int Start { |
| 1122 get { return start_; } |
| 1123 set { |
| 1124 start_ = value; |
| 1125 } |
| 1126 } |
| 1127 |
| 1128 /// <summary>Field number for the "end" field.</summary> |
| 1129 public const int EndFieldNumber = 2; |
| 1130 private int end_; |
| 1131 /// <summary> |
| 1132 /// Exclusive. |
| 1133 /// </summary> |
| 1134 public int End { |
| 1135 get { return end_; } |
| 1136 set { |
| 1137 end_ = value; |
| 1138 } |
| 1139 } |
| 1140 |
| 1141 public override bool Equals(object other) { |
| 1142 return Equals(other as ReservedRange); |
| 1143 } |
| 1144 |
| 1145 public bool Equals(ReservedRange other) { |
| 1146 if (ReferenceEquals(other, null)) { |
| 1147 return false; |
| 1148 } |
| 1149 if (ReferenceEquals(other, this)) { |
| 1150 return true; |
| 1151 } |
| 1152 if (Start != other.Start) return false; |
| 1153 if (End != other.End) return false; |
| 1154 return true; |
| 1155 } |
| 1156 |
| 1157 public override int GetHashCode() { |
| 1158 int hash = 1; |
| 1159 if (Start != 0) hash ^= Start.GetHashCode(); |
| 1160 if (End != 0) hash ^= End.GetHashCode(); |
| 1161 return hash; |
| 1162 } |
| 1163 |
| 1164 public override string ToString() { |
| 1165 return pb::JsonFormatter.ToDiagnosticString(this); |
| 1166 } |
| 1167 |
| 1168 public void WriteTo(pb::CodedOutputStream output) { |
| 1169 if (Start != 0) { |
| 1170 output.WriteRawTag(8); |
| 1171 output.WriteInt32(Start); |
| 1172 } |
| 1173 if (End != 0) { |
| 1174 output.WriteRawTag(16); |
| 1175 output.WriteInt32(End); |
| 1176 } |
| 1177 } |
| 1178 |
| 1179 public int CalculateSize() { |
| 1180 int size = 0; |
| 1181 if (Start != 0) { |
| 1182 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Start); |
| 1183 } |
| 1184 if (End != 0) { |
| 1185 size += 1 + pb::CodedOutputStream.ComputeInt32Size(End); |
| 1186 } |
| 1187 return size; |
| 1188 } |
| 1189 |
| 1190 public void MergeFrom(ReservedRange other) { |
| 1191 if (other == null) { |
| 1192 return; |
| 1193 } |
| 1194 if (other.Start != 0) { |
| 1195 Start = other.Start; |
| 1196 } |
| 1197 if (other.End != 0) { |
| 1198 End = other.End; |
| 1199 } |
| 1200 } |
| 1201 |
| 1202 public void MergeFrom(pb::CodedInputStream input) { |
| 1203 uint tag; |
| 1204 while ((tag = input.ReadTag()) != 0) { |
| 1205 switch(tag) { |
| 1206 default: |
| 1207 input.SkipLastField(); |
| 1208 break; |
| 1209 case 8: { |
| 1210 Start = input.ReadInt32(); |
| 1211 break; |
| 1212 } |
| 1213 case 16: { |
| 1214 End = input.ReadInt32(); |
| 1215 break; |
| 1216 } |
| 1217 } |
| 1218 } |
| 1219 } |
| 1220 |
| 1221 } |
| 1222 |
| 1223 } |
| 1224 #endregion |
| 1225 |
| 1226 } |
| 1227 |
| 1228 /// <summary> |
| 1229 /// Describes a field within a message. |
| 1230 /// </summary> |
| 1231 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1232 internal sealed partial class FieldDescriptorProto : pb::IMessage<FieldDescrip
torProto> { |
| 1233 private static readonly pb::MessageParser<FieldDescriptorProto> _parser = ne
w pb::MessageParser<FieldDescriptorProto>(() => new FieldDescriptorProto()); |
| 1234 public static pb::MessageParser<FieldDescriptorProto> Parser { get { return
_parser; } } |
| 1235 |
| 1236 public static pbr::MessageDescriptor Descriptor { |
| 1237 get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descr
iptor.MessageTypes[3]; } |
| 1238 } |
| 1239 |
| 1240 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1241 get { return Descriptor; } |
| 1242 } |
| 1243 |
| 1244 public FieldDescriptorProto() { |
| 1245 OnConstruction(); |
| 1246 } |
| 1247 |
| 1248 partial void OnConstruction(); |
| 1249 |
| 1250 public FieldDescriptorProto(FieldDescriptorProto other) : this() { |
| 1251 name_ = other.name_; |
| 1252 number_ = other.number_; |
| 1253 label_ = other.label_; |
| 1254 type_ = other.type_; |
| 1255 typeName_ = other.typeName_; |
| 1256 extendee_ = other.extendee_; |
| 1257 defaultValue_ = other.defaultValue_; |
| 1258 oneofIndex_ = other.oneofIndex_; |
| 1259 jsonName_ = other.jsonName_; |
| 1260 Options = other.options_ != null ? other.Options.Clone() : null; |
| 1261 } |
| 1262 |
| 1263 public FieldDescriptorProto Clone() { |
| 1264 return new FieldDescriptorProto(this); |
| 1265 } |
| 1266 |
| 1267 /// <summary>Field number for the "name" field.</summary> |
| 1268 public const int NameFieldNumber = 1; |
| 1269 private string name_ = ""; |
| 1270 public string Name { |
| 1271 get { return name_; } |
| 1272 set { |
| 1273 name_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 1274 } |
| 1275 } |
| 1276 |
| 1277 /// <summary>Field number for the "number" field.</summary> |
| 1278 public const int NumberFieldNumber = 3; |
| 1279 private int number_; |
| 1280 public int Number { |
| 1281 get { return number_; } |
| 1282 set { |
| 1283 number_ = value; |
| 1284 } |
| 1285 } |
| 1286 |
| 1287 /// <summary>Field number for the "label" field.</summary> |
| 1288 public const int LabelFieldNumber = 4; |
| 1289 private global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Label
label_ = global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Label.LAB
EL_OPTIONAL; |
| 1290 public global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Label L
abel { |
| 1291 get { return label_; } |
| 1292 set { |
| 1293 label_ = value; |
| 1294 } |
| 1295 } |
| 1296 |
| 1297 /// <summary>Field number for the "type" field.</summary> |
| 1298 public const int TypeFieldNumber = 5; |
| 1299 private global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type t
ype_ = global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type.TYPE_D
OUBLE; |
| 1300 /// <summary> |
| 1301 /// If type_name is set, this need not be set. If both this and type_name |
| 1302 /// are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. |
| 1303 /// </summary> |
| 1304 public global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.Type Ty
pe { |
| 1305 get { return type_; } |
| 1306 set { |
| 1307 type_ = value; |
| 1308 } |
| 1309 } |
| 1310 |
| 1311 /// <summary>Field number for the "type_name" field.</summary> |
| 1312 public const int TypeNameFieldNumber = 6; |
| 1313 private string typeName_ = ""; |
| 1314 /// <summary> |
| 1315 /// For message and enum types, this is the name of the type. If the name |
| 1316 /// starts with a '.', it is fully-qualified. Otherwise, C++-like scoping |
| 1317 /// rules are used to find the type (i.e. first the nested types within thi
s |
| 1318 /// message are searched, then within the parent, on up to the root |
| 1319 /// namespace). |
| 1320 /// </summary> |
| 1321 public string TypeName { |
| 1322 get { return typeName_; } |
| 1323 set { |
| 1324 typeName_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 1325 } |
| 1326 } |
| 1327 |
| 1328 /// <summary>Field number for the "extendee" field.</summary> |
| 1329 public const int ExtendeeFieldNumber = 2; |
| 1330 private string extendee_ = ""; |
| 1331 /// <summary> |
| 1332 /// For extensions, this is the name of the type being extended. It is |
| 1333 /// resolved in the same manner as type_name. |
| 1334 /// </summary> |
| 1335 public string Extendee { |
| 1336 get { return extendee_; } |
| 1337 set { |
| 1338 extendee_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 1339 } |
| 1340 } |
| 1341 |
| 1342 /// <summary>Field number for the "default_value" field.</summary> |
| 1343 public const int DefaultValueFieldNumber = 7; |
| 1344 private string defaultValue_ = ""; |
| 1345 /// <summary> |
| 1346 /// For numeric types, contains the original text representation of the val
ue. |
| 1347 /// For booleans, "true" or "false". |
| 1348 /// For strings, contains the default text contents (not escaped in any way
). |
| 1349 /// For bytes, contains the C escaped value. All bytes >= 128 are escaped. |
| 1350 /// TODO(kenton): Base-64 encode? |
| 1351 /// </summary> |
| 1352 public string DefaultValue { |
| 1353 get { return defaultValue_; } |
| 1354 set { |
| 1355 defaultValue_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 1356 } |
| 1357 } |
| 1358 |
| 1359 /// <summary>Field number for the "oneof_index" field.</summary> |
| 1360 public const int OneofIndexFieldNumber = 9; |
| 1361 private int oneofIndex_; |
| 1362 /// <summary> |
| 1363 /// If set, gives the index of a oneof in the containing type's oneof_decl |
| 1364 /// list. This field is a member of that oneof. |
| 1365 /// </summary> |
| 1366 public int OneofIndex { |
| 1367 get { return oneofIndex_; } |
| 1368 set { |
| 1369 oneofIndex_ = value; |
| 1370 } |
| 1371 } |
| 1372 |
| 1373 /// <summary>Field number for the "json_name" field.</summary> |
| 1374 public const int JsonNameFieldNumber = 10; |
| 1375 private string jsonName_ = ""; |
| 1376 /// <summary> |
| 1377 /// JSON name of this field. The value is set by protocol compiler. If the |
| 1378 /// user has set a "json_name" option on this field, that option's value |
| 1379 /// will be used. Otherwise, it's deduced from the field's name by converti
ng |
| 1380 /// it to camelCase. |
| 1381 /// </summary> |
| 1382 public string JsonName { |
| 1383 get { return jsonName_; } |
| 1384 set { |
| 1385 jsonName_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 1386 } |
| 1387 } |
| 1388 |
| 1389 /// <summary>Field number for the "options" field.</summary> |
| 1390 public const int OptionsFieldNumber = 8; |
| 1391 private global::Google.Protobuf.Reflection.FieldOptions options_; |
| 1392 public global::Google.Protobuf.Reflection.FieldOptions Options { |
| 1393 get { return options_; } |
| 1394 set { |
| 1395 options_ = value; |
| 1396 } |
| 1397 } |
| 1398 |
| 1399 public override bool Equals(object other) { |
| 1400 return Equals(other as FieldDescriptorProto); |
| 1401 } |
| 1402 |
| 1403 public bool Equals(FieldDescriptorProto other) { |
| 1404 if (ReferenceEquals(other, null)) { |
| 1405 return false; |
| 1406 } |
| 1407 if (ReferenceEquals(other, this)) { |
| 1408 return true; |
| 1409 } |
| 1410 if (Name != other.Name) return false; |
| 1411 if (Number != other.Number) return false; |
| 1412 if (Label != other.Label) return false; |
| 1413 if (Type != other.Type) return false; |
| 1414 if (TypeName != other.TypeName) return false; |
| 1415 if (Extendee != other.Extendee) return false; |
| 1416 if (DefaultValue != other.DefaultValue) return false; |
| 1417 if (OneofIndex != other.OneofIndex) return false; |
| 1418 if (JsonName != other.JsonName) return false; |
| 1419 if (!object.Equals(Options, other.Options)) return false; |
| 1420 return true; |
| 1421 } |
| 1422 |
| 1423 public override int GetHashCode() { |
| 1424 int hash = 1; |
| 1425 if (Name.Length != 0) hash ^= Name.GetHashCode(); |
| 1426 if (Number != 0) hash ^= Number.GetHashCode(); |
| 1427 if (Label != global::Google.Protobuf.Reflection.FieldDescriptorProto.Types
.Label.LABEL_OPTIONAL) hash ^= Label.GetHashCode(); |
| 1428 if (Type != global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.
Type.TYPE_DOUBLE) hash ^= Type.GetHashCode(); |
| 1429 if (TypeName.Length != 0) hash ^= TypeName.GetHashCode(); |
| 1430 if (Extendee.Length != 0) hash ^= Extendee.GetHashCode(); |
| 1431 if (DefaultValue.Length != 0) hash ^= DefaultValue.GetHashCode(); |
| 1432 if (OneofIndex != 0) hash ^= OneofIndex.GetHashCode(); |
| 1433 if (JsonName.Length != 0) hash ^= JsonName.GetHashCode(); |
| 1434 if (options_ != null) hash ^= Options.GetHashCode(); |
| 1435 return hash; |
| 1436 } |
| 1437 |
| 1438 public override string ToString() { |
| 1439 return pb::JsonFormatter.ToDiagnosticString(this); |
| 1440 } |
| 1441 |
| 1442 public void WriteTo(pb::CodedOutputStream output) { |
| 1443 if (Name.Length != 0) { |
| 1444 output.WriteRawTag(10); |
| 1445 output.WriteString(Name); |
| 1446 } |
| 1447 if (Extendee.Length != 0) { |
| 1448 output.WriteRawTag(18); |
| 1449 output.WriteString(Extendee); |
| 1450 } |
| 1451 if (Number != 0) { |
| 1452 output.WriteRawTag(24); |
| 1453 output.WriteInt32(Number); |
| 1454 } |
| 1455 if (Label != global::Google.Protobuf.Reflection.FieldDescriptorProto.Types
.Label.LABEL_OPTIONAL) { |
| 1456 output.WriteRawTag(32); |
| 1457 output.WriteEnum((int) Label); |
| 1458 } |
| 1459 if (Type != global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.
Type.TYPE_DOUBLE) { |
| 1460 output.WriteRawTag(40); |
| 1461 output.WriteEnum((int) Type); |
| 1462 } |
| 1463 if (TypeName.Length != 0) { |
| 1464 output.WriteRawTag(50); |
| 1465 output.WriteString(TypeName); |
| 1466 } |
| 1467 if (DefaultValue.Length != 0) { |
| 1468 output.WriteRawTag(58); |
| 1469 output.WriteString(DefaultValue); |
| 1470 } |
| 1471 if (options_ != null) { |
| 1472 output.WriteRawTag(66); |
| 1473 output.WriteMessage(Options); |
| 1474 } |
| 1475 if (OneofIndex != 0) { |
| 1476 output.WriteRawTag(72); |
| 1477 output.WriteInt32(OneofIndex); |
| 1478 } |
| 1479 if (JsonName.Length != 0) { |
| 1480 output.WriteRawTag(82); |
| 1481 output.WriteString(JsonName); |
| 1482 } |
| 1483 } |
| 1484 |
| 1485 public int CalculateSize() { |
| 1486 int size = 0; |
| 1487 if (Name.Length != 0) { |
| 1488 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
| 1489 } |
| 1490 if (Number != 0) { |
| 1491 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number); |
| 1492 } |
| 1493 if (Label != global::Google.Protobuf.Reflection.FieldDescriptorProto.Types
.Label.LABEL_OPTIONAL) { |
| 1494 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Label); |
| 1495 } |
| 1496 if (Type != global::Google.Protobuf.Reflection.FieldDescriptorProto.Types.
Type.TYPE_DOUBLE) { |
| 1497 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); |
| 1498 } |
| 1499 if (TypeName.Length != 0) { |
| 1500 size += 1 + pb::CodedOutputStream.ComputeStringSize(TypeName); |
| 1501 } |
| 1502 if (Extendee.Length != 0) { |
| 1503 size += 1 + pb::CodedOutputStream.ComputeStringSize(Extendee); |
| 1504 } |
| 1505 if (DefaultValue.Length != 0) { |
| 1506 size += 1 + pb::CodedOutputStream.ComputeStringSize(DefaultValue); |
| 1507 } |
| 1508 if (OneofIndex != 0) { |
| 1509 size += 1 + pb::CodedOutputStream.ComputeInt32Size(OneofIndex); |
| 1510 } |
| 1511 if (JsonName.Length != 0) { |
| 1512 size += 1 + pb::CodedOutputStream.ComputeStringSize(JsonName); |
| 1513 } |
| 1514 if (options_ != null) { |
| 1515 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); |
| 1516 } |
| 1517 return size; |
| 1518 } |
| 1519 |
| 1520 public void MergeFrom(FieldDescriptorProto other) { |
| 1521 if (other == null) { |
| 1522 return; |
| 1523 } |
| 1524 if (other.Name.Length != 0) { |
| 1525 Name = other.Name; |
| 1526 } |
| 1527 if (other.Number != 0) { |
| 1528 Number = other.Number; |
| 1529 } |
| 1530 if (other.Label != global::Google.Protobuf.Reflection.FieldDescriptorProto
.Types.Label.LABEL_OPTIONAL) { |
| 1531 Label = other.Label; |
| 1532 } |
| 1533 if (other.Type != global::Google.Protobuf.Reflection.FieldDescriptorProto.
Types.Type.TYPE_DOUBLE) { |
| 1534 Type = other.Type; |
| 1535 } |
| 1536 if (other.TypeName.Length != 0) { |
| 1537 TypeName = other.TypeName; |
| 1538 } |
| 1539 if (other.Extendee.Length != 0) { |
| 1540 Extendee = other.Extendee; |
| 1541 } |
| 1542 if (other.DefaultValue.Length != 0) { |
| 1543 DefaultValue = other.DefaultValue; |
| 1544 } |
| 1545 if (other.OneofIndex != 0) { |
| 1546 OneofIndex = other.OneofIndex; |
| 1547 } |
| 1548 if (other.JsonName.Length != 0) { |
| 1549 JsonName = other.JsonName; |
| 1550 } |
| 1551 if (other.options_ != null) { |
| 1552 if (options_ == null) { |
| 1553 options_ = new global::Google.Protobuf.Reflection.FieldOptions(); |
| 1554 } |
| 1555 Options.MergeFrom(other.Options); |
| 1556 } |
| 1557 } |
| 1558 |
| 1559 public void MergeFrom(pb::CodedInputStream input) { |
| 1560 uint tag; |
| 1561 while ((tag = input.ReadTag()) != 0) { |
| 1562 switch(tag) { |
| 1563 default: |
| 1564 input.SkipLastField(); |
| 1565 break; |
| 1566 case 10: { |
| 1567 Name = input.ReadString(); |
| 1568 break; |
| 1569 } |
| 1570 case 18: { |
| 1571 Extendee = input.ReadString(); |
| 1572 break; |
| 1573 } |
| 1574 case 24: { |
| 1575 Number = input.ReadInt32(); |
| 1576 break; |
| 1577 } |
| 1578 case 32: { |
| 1579 label_ = (global::Google.Protobuf.Reflection.FieldDescriptorProto.Ty
pes.Label) input.ReadEnum(); |
| 1580 break; |
| 1581 } |
| 1582 case 40: { |
| 1583 type_ = (global::Google.Protobuf.Reflection.FieldDescriptorProto.Typ
es.Type) input.ReadEnum(); |
| 1584 break; |
| 1585 } |
| 1586 case 50: { |
| 1587 TypeName = input.ReadString(); |
| 1588 break; |
| 1589 } |
| 1590 case 58: { |
| 1591 DefaultValue = input.ReadString(); |
| 1592 break; |
| 1593 } |
| 1594 case 66: { |
| 1595 if (options_ == null) { |
| 1596 options_ = new global::Google.Protobuf.Reflection.FieldOptions(); |
| 1597 } |
| 1598 input.ReadMessage(options_); |
| 1599 break; |
| 1600 } |
| 1601 case 72: { |
| 1602 OneofIndex = input.ReadInt32(); |
| 1603 break; |
| 1604 } |
| 1605 case 82: { |
| 1606 JsonName = input.ReadString(); |
| 1607 break; |
| 1608 } |
| 1609 } |
| 1610 } |
| 1611 } |
| 1612 |
| 1613 #region Nested types |
| 1614 /// <summary>Container for nested types declared in the FieldDescriptorProto
message type.</summary> |
| 1615 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1616 public static partial class Types { |
| 1617 internal enum Type { |
| 1618 /// <summary> |
| 1619 /// 0 is reserved for errors. |
| 1620 /// Order is weird for historical reasons. |
| 1621 /// </summary> |
| 1622 TYPE_DOUBLE = 1, |
| 1623 TYPE_FLOAT = 2, |
| 1624 /// <summary> |
| 1625 /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT
64 if |
| 1626 /// negative values are likely. |
| 1627 /// </summary> |
| 1628 TYPE_INT64 = 3, |
| 1629 TYPE_UINT64 = 4, |
| 1630 /// <summary> |
| 1631 /// Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT
32 if |
| 1632 /// negative values are likely. |
| 1633 /// </summary> |
| 1634 TYPE_INT32 = 5, |
| 1635 TYPE_FIXED64 = 6, |
| 1636 TYPE_FIXED32 = 7, |
| 1637 TYPE_BOOL = 8, |
| 1638 TYPE_STRING = 9, |
| 1639 /// <summary> |
| 1640 /// Tag-delimited aggregate. |
| 1641 /// </summary> |
| 1642 TYPE_GROUP = 10, |
| 1643 /// <summary> |
| 1644 /// Length-delimited aggregate. |
| 1645 /// </summary> |
| 1646 TYPE_MESSAGE = 11, |
| 1647 /// <summary> |
| 1648 /// New in version 2. |
| 1649 /// </summary> |
| 1650 TYPE_BYTES = 12, |
| 1651 TYPE_UINT32 = 13, |
| 1652 TYPE_ENUM = 14, |
| 1653 TYPE_SFIXED32 = 15, |
| 1654 TYPE_SFIXED64 = 16, |
| 1655 /// <summary> |
| 1656 /// Uses ZigZag encoding. |
| 1657 /// </summary> |
| 1658 TYPE_SINT32 = 17, |
| 1659 /// <summary> |
| 1660 /// Uses ZigZag encoding. |
| 1661 /// </summary> |
| 1662 TYPE_SINT64 = 18, |
| 1663 } |
| 1664 |
| 1665 internal enum Label { |
| 1666 /// <summary> |
| 1667 /// 0 is reserved for errors |
| 1668 /// </summary> |
| 1669 LABEL_OPTIONAL = 1, |
| 1670 LABEL_REQUIRED = 2, |
| 1671 /// <summary> |
| 1672 /// TODO(sanjay): Should we add LABEL_MAP? |
| 1673 /// </summary> |
| 1674 LABEL_REPEATED = 3, |
| 1675 } |
| 1676 |
| 1677 } |
| 1678 #endregion |
| 1679 |
| 1680 } |
| 1681 |
| 1682 /// <summary> |
| 1683 /// Describes a oneof. |
| 1684 /// </summary> |
| 1685 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1686 internal sealed partial class OneofDescriptorProto : pb::IMessage<OneofDescrip
torProto> { |
| 1687 private static readonly pb::MessageParser<OneofDescriptorProto> _parser = ne
w pb::MessageParser<OneofDescriptorProto>(() => new OneofDescriptorProto()); |
| 1688 public static pb::MessageParser<OneofDescriptorProto> Parser { get { return
_parser; } } |
| 1689 |
| 1690 public static pbr::MessageDescriptor Descriptor { |
| 1691 get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descr
iptor.MessageTypes[4]; } |
| 1692 } |
| 1693 |
| 1694 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1695 get { return Descriptor; } |
| 1696 } |
| 1697 |
| 1698 public OneofDescriptorProto() { |
| 1699 OnConstruction(); |
| 1700 } |
| 1701 |
| 1702 partial void OnConstruction(); |
| 1703 |
| 1704 public OneofDescriptorProto(OneofDescriptorProto other) : this() { |
| 1705 name_ = other.name_; |
| 1706 } |
| 1707 |
| 1708 public OneofDescriptorProto Clone() { |
| 1709 return new OneofDescriptorProto(this); |
| 1710 } |
| 1711 |
| 1712 /// <summary>Field number for the "name" field.</summary> |
| 1713 public const int NameFieldNumber = 1; |
| 1714 private string name_ = ""; |
| 1715 public string Name { |
| 1716 get { return name_; } |
| 1717 set { |
| 1718 name_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 1719 } |
| 1720 } |
| 1721 |
| 1722 public override bool Equals(object other) { |
| 1723 return Equals(other as OneofDescriptorProto); |
| 1724 } |
| 1725 |
| 1726 public bool Equals(OneofDescriptorProto other) { |
| 1727 if (ReferenceEquals(other, null)) { |
| 1728 return false; |
| 1729 } |
| 1730 if (ReferenceEquals(other, this)) { |
| 1731 return true; |
| 1732 } |
| 1733 if (Name != other.Name) return false; |
| 1734 return true; |
| 1735 } |
| 1736 |
| 1737 public override int GetHashCode() { |
| 1738 int hash = 1; |
| 1739 if (Name.Length != 0) hash ^= Name.GetHashCode(); |
| 1740 return hash; |
| 1741 } |
| 1742 |
| 1743 public override string ToString() { |
| 1744 return pb::JsonFormatter.ToDiagnosticString(this); |
| 1745 } |
| 1746 |
| 1747 public void WriteTo(pb::CodedOutputStream output) { |
| 1748 if (Name.Length != 0) { |
| 1749 output.WriteRawTag(10); |
| 1750 output.WriteString(Name); |
| 1751 } |
| 1752 } |
| 1753 |
| 1754 public int CalculateSize() { |
| 1755 int size = 0; |
| 1756 if (Name.Length != 0) { |
| 1757 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
| 1758 } |
| 1759 return size; |
| 1760 } |
| 1761 |
| 1762 public void MergeFrom(OneofDescriptorProto other) { |
| 1763 if (other == null) { |
| 1764 return; |
| 1765 } |
| 1766 if (other.Name.Length != 0) { |
| 1767 Name = other.Name; |
| 1768 } |
| 1769 } |
| 1770 |
| 1771 public void MergeFrom(pb::CodedInputStream input) { |
| 1772 uint tag; |
| 1773 while ((tag = input.ReadTag()) != 0) { |
| 1774 switch(tag) { |
| 1775 default: |
| 1776 input.SkipLastField(); |
| 1777 break; |
| 1778 case 10: { |
| 1779 Name = input.ReadString(); |
| 1780 break; |
| 1781 } |
| 1782 } |
| 1783 } |
| 1784 } |
| 1785 |
| 1786 } |
| 1787 |
| 1788 /// <summary> |
| 1789 /// Describes an enum type. |
| 1790 /// </summary> |
| 1791 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1792 internal sealed partial class EnumDescriptorProto : pb::IMessage<EnumDescripto
rProto> { |
| 1793 private static readonly pb::MessageParser<EnumDescriptorProto> _parser = new
pb::MessageParser<EnumDescriptorProto>(() => new EnumDescriptorProto()); |
| 1794 public static pb::MessageParser<EnumDescriptorProto> Parser { get { return _
parser; } } |
| 1795 |
| 1796 public static pbr::MessageDescriptor Descriptor { |
| 1797 get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descr
iptor.MessageTypes[5]; } |
| 1798 } |
| 1799 |
| 1800 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1801 get { return Descriptor; } |
| 1802 } |
| 1803 |
| 1804 public EnumDescriptorProto() { |
| 1805 OnConstruction(); |
| 1806 } |
| 1807 |
| 1808 partial void OnConstruction(); |
| 1809 |
| 1810 public EnumDescriptorProto(EnumDescriptorProto other) : this() { |
| 1811 name_ = other.name_; |
| 1812 value_ = other.value_.Clone(); |
| 1813 Options = other.options_ != null ? other.Options.Clone() : null; |
| 1814 } |
| 1815 |
| 1816 public EnumDescriptorProto Clone() { |
| 1817 return new EnumDescriptorProto(this); |
| 1818 } |
| 1819 |
| 1820 /// <summary>Field number for the "name" field.</summary> |
| 1821 public const int NameFieldNumber = 1; |
| 1822 private string name_ = ""; |
| 1823 public string Name { |
| 1824 get { return name_; } |
| 1825 set { |
| 1826 name_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 1827 } |
| 1828 } |
| 1829 |
| 1830 /// <summary>Field number for the "value" field.</summary> |
| 1831 public const int ValueFieldNumber = 2; |
| 1832 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.En
umValueDescriptorProto> _repeated_value_codec |
| 1833 = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.Reflection.EnumV
alueDescriptorProto.Parser); |
| 1834 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.EnumV
alueDescriptorProto> value_ = new pbc::RepeatedField<global::Google.Protobuf.Ref
lection.EnumValueDescriptorProto>(); |
| 1835 public pbc::RepeatedField<global::Google.Protobuf.Reflection.EnumValueDescri
ptorProto> Value { |
| 1836 get { return value_; } |
| 1837 } |
| 1838 |
| 1839 /// <summary>Field number for the "options" field.</summary> |
| 1840 public const int OptionsFieldNumber = 3; |
| 1841 private global::Google.Protobuf.Reflection.EnumOptions options_; |
| 1842 public global::Google.Protobuf.Reflection.EnumOptions Options { |
| 1843 get { return options_; } |
| 1844 set { |
| 1845 options_ = value; |
| 1846 } |
| 1847 } |
| 1848 |
| 1849 public override bool Equals(object other) { |
| 1850 return Equals(other as EnumDescriptorProto); |
| 1851 } |
| 1852 |
| 1853 public bool Equals(EnumDescriptorProto other) { |
| 1854 if (ReferenceEquals(other, null)) { |
| 1855 return false; |
| 1856 } |
| 1857 if (ReferenceEquals(other, this)) { |
| 1858 return true; |
| 1859 } |
| 1860 if (Name != other.Name) return false; |
| 1861 if(!value_.Equals(other.value_)) return false; |
| 1862 if (!object.Equals(Options, other.Options)) return false; |
| 1863 return true; |
| 1864 } |
| 1865 |
| 1866 public override int GetHashCode() { |
| 1867 int hash = 1; |
| 1868 if (Name.Length != 0) hash ^= Name.GetHashCode(); |
| 1869 hash ^= value_.GetHashCode(); |
| 1870 if (options_ != null) hash ^= Options.GetHashCode(); |
| 1871 return hash; |
| 1872 } |
| 1873 |
| 1874 public override string ToString() { |
| 1875 return pb::JsonFormatter.ToDiagnosticString(this); |
| 1876 } |
| 1877 |
| 1878 public void WriteTo(pb::CodedOutputStream output) { |
| 1879 if (Name.Length != 0) { |
| 1880 output.WriteRawTag(10); |
| 1881 output.WriteString(Name); |
| 1882 } |
| 1883 value_.WriteTo(output, _repeated_value_codec); |
| 1884 if (options_ != null) { |
| 1885 output.WriteRawTag(26); |
| 1886 output.WriteMessage(Options); |
| 1887 } |
| 1888 } |
| 1889 |
| 1890 public int CalculateSize() { |
| 1891 int size = 0; |
| 1892 if (Name.Length != 0) { |
| 1893 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
| 1894 } |
| 1895 size += value_.CalculateSize(_repeated_value_codec); |
| 1896 if (options_ != null) { |
| 1897 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); |
| 1898 } |
| 1899 return size; |
| 1900 } |
| 1901 |
| 1902 public void MergeFrom(EnumDescriptorProto other) { |
| 1903 if (other == null) { |
| 1904 return; |
| 1905 } |
| 1906 if (other.Name.Length != 0) { |
| 1907 Name = other.Name; |
| 1908 } |
| 1909 value_.Add(other.value_); |
| 1910 if (other.options_ != null) { |
| 1911 if (options_ == null) { |
| 1912 options_ = new global::Google.Protobuf.Reflection.EnumOptions(); |
| 1913 } |
| 1914 Options.MergeFrom(other.Options); |
| 1915 } |
| 1916 } |
| 1917 |
| 1918 public void MergeFrom(pb::CodedInputStream input) { |
| 1919 uint tag; |
| 1920 while ((tag = input.ReadTag()) != 0) { |
| 1921 switch(tag) { |
| 1922 default: |
| 1923 input.SkipLastField(); |
| 1924 break; |
| 1925 case 10: { |
| 1926 Name = input.ReadString(); |
| 1927 break; |
| 1928 } |
| 1929 case 18: { |
| 1930 value_.AddEntriesFrom(input, _repeated_value_codec); |
| 1931 break; |
| 1932 } |
| 1933 case 26: { |
| 1934 if (options_ == null) { |
| 1935 options_ = new global::Google.Protobuf.Reflection.EnumOptions(); |
| 1936 } |
| 1937 input.ReadMessage(options_); |
| 1938 break; |
| 1939 } |
| 1940 } |
| 1941 } |
| 1942 } |
| 1943 |
| 1944 } |
| 1945 |
| 1946 /// <summary> |
| 1947 /// Describes a value within an enum. |
| 1948 /// </summary> |
| 1949 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 1950 internal sealed partial class EnumValueDescriptorProto : pb::IMessage<EnumValu
eDescriptorProto> { |
| 1951 private static readonly pb::MessageParser<EnumValueDescriptorProto> _parser
= new pb::MessageParser<EnumValueDescriptorProto>(() => new EnumValueDescriptorP
roto()); |
| 1952 public static pb::MessageParser<EnumValueDescriptorProto> Parser { get { ret
urn _parser; } } |
| 1953 |
| 1954 public static pbr::MessageDescriptor Descriptor { |
| 1955 get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descr
iptor.MessageTypes[6]; } |
| 1956 } |
| 1957 |
| 1958 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 1959 get { return Descriptor; } |
| 1960 } |
| 1961 |
| 1962 public EnumValueDescriptorProto() { |
| 1963 OnConstruction(); |
| 1964 } |
| 1965 |
| 1966 partial void OnConstruction(); |
| 1967 |
| 1968 public EnumValueDescriptorProto(EnumValueDescriptorProto other) : this() { |
| 1969 name_ = other.name_; |
| 1970 number_ = other.number_; |
| 1971 Options = other.options_ != null ? other.Options.Clone() : null; |
| 1972 } |
| 1973 |
| 1974 public EnumValueDescriptorProto Clone() { |
| 1975 return new EnumValueDescriptorProto(this); |
| 1976 } |
| 1977 |
| 1978 /// <summary>Field number for the "name" field.</summary> |
| 1979 public const int NameFieldNumber = 1; |
| 1980 private string name_ = ""; |
| 1981 public string Name { |
| 1982 get { return name_; } |
| 1983 set { |
| 1984 name_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 1985 } |
| 1986 } |
| 1987 |
| 1988 /// <summary>Field number for the "number" field.</summary> |
| 1989 public const int NumberFieldNumber = 2; |
| 1990 private int number_; |
| 1991 public int Number { |
| 1992 get { return number_; } |
| 1993 set { |
| 1994 number_ = value; |
| 1995 } |
| 1996 } |
| 1997 |
| 1998 /// <summary>Field number for the "options" field.</summary> |
| 1999 public const int OptionsFieldNumber = 3; |
| 2000 private global::Google.Protobuf.Reflection.EnumValueOptions options_; |
| 2001 public global::Google.Protobuf.Reflection.EnumValueOptions Options { |
| 2002 get { return options_; } |
| 2003 set { |
| 2004 options_ = value; |
| 2005 } |
| 2006 } |
| 2007 |
| 2008 public override bool Equals(object other) { |
| 2009 return Equals(other as EnumValueDescriptorProto); |
| 2010 } |
| 2011 |
| 2012 public bool Equals(EnumValueDescriptorProto other) { |
| 2013 if (ReferenceEquals(other, null)) { |
| 2014 return false; |
| 2015 } |
| 2016 if (ReferenceEquals(other, this)) { |
| 2017 return true; |
| 2018 } |
| 2019 if (Name != other.Name) return false; |
| 2020 if (Number != other.Number) return false; |
| 2021 if (!object.Equals(Options, other.Options)) return false; |
| 2022 return true; |
| 2023 } |
| 2024 |
| 2025 public override int GetHashCode() { |
| 2026 int hash = 1; |
| 2027 if (Name.Length != 0) hash ^= Name.GetHashCode(); |
| 2028 if (Number != 0) hash ^= Number.GetHashCode(); |
| 2029 if (options_ != null) hash ^= Options.GetHashCode(); |
| 2030 return hash; |
| 2031 } |
| 2032 |
| 2033 public override string ToString() { |
| 2034 return pb::JsonFormatter.ToDiagnosticString(this); |
| 2035 } |
| 2036 |
| 2037 public void WriteTo(pb::CodedOutputStream output) { |
| 2038 if (Name.Length != 0) { |
| 2039 output.WriteRawTag(10); |
| 2040 output.WriteString(Name); |
| 2041 } |
| 2042 if (Number != 0) { |
| 2043 output.WriteRawTag(16); |
| 2044 output.WriteInt32(Number); |
| 2045 } |
| 2046 if (options_ != null) { |
| 2047 output.WriteRawTag(26); |
| 2048 output.WriteMessage(Options); |
| 2049 } |
| 2050 } |
| 2051 |
| 2052 public int CalculateSize() { |
| 2053 int size = 0; |
| 2054 if (Name.Length != 0) { |
| 2055 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
| 2056 } |
| 2057 if (Number != 0) { |
| 2058 size += 1 + pb::CodedOutputStream.ComputeInt32Size(Number); |
| 2059 } |
| 2060 if (options_ != null) { |
| 2061 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); |
| 2062 } |
| 2063 return size; |
| 2064 } |
| 2065 |
| 2066 public void MergeFrom(EnumValueDescriptorProto other) { |
| 2067 if (other == null) { |
| 2068 return; |
| 2069 } |
| 2070 if (other.Name.Length != 0) { |
| 2071 Name = other.Name; |
| 2072 } |
| 2073 if (other.Number != 0) { |
| 2074 Number = other.Number; |
| 2075 } |
| 2076 if (other.options_ != null) { |
| 2077 if (options_ == null) { |
| 2078 options_ = new global::Google.Protobuf.Reflection.EnumValueOptions(); |
| 2079 } |
| 2080 Options.MergeFrom(other.Options); |
| 2081 } |
| 2082 } |
| 2083 |
| 2084 public void MergeFrom(pb::CodedInputStream input) { |
| 2085 uint tag; |
| 2086 while ((tag = input.ReadTag()) != 0) { |
| 2087 switch(tag) { |
| 2088 default: |
| 2089 input.SkipLastField(); |
| 2090 break; |
| 2091 case 10: { |
| 2092 Name = input.ReadString(); |
| 2093 break; |
| 2094 } |
| 2095 case 16: { |
| 2096 Number = input.ReadInt32(); |
| 2097 break; |
| 2098 } |
| 2099 case 26: { |
| 2100 if (options_ == null) { |
| 2101 options_ = new global::Google.Protobuf.Reflection.EnumValueOptions
(); |
| 2102 } |
| 2103 input.ReadMessage(options_); |
| 2104 break; |
| 2105 } |
| 2106 } |
| 2107 } |
| 2108 } |
| 2109 |
| 2110 } |
| 2111 |
| 2112 /// <summary> |
| 2113 /// Describes a service. |
| 2114 /// </summary> |
| 2115 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 2116 internal sealed partial class ServiceDescriptorProto : pb::IMessage<ServiceDes
criptorProto> { |
| 2117 private static readonly pb::MessageParser<ServiceDescriptorProto> _parser =
new pb::MessageParser<ServiceDescriptorProto>(() => new ServiceDescriptorProto()
); |
| 2118 public static pb::MessageParser<ServiceDescriptorProto> Parser { get { retur
n _parser; } } |
| 2119 |
| 2120 public static pbr::MessageDescriptor Descriptor { |
| 2121 get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descr
iptor.MessageTypes[7]; } |
| 2122 } |
| 2123 |
| 2124 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2125 get { return Descriptor; } |
| 2126 } |
| 2127 |
| 2128 public ServiceDescriptorProto() { |
| 2129 OnConstruction(); |
| 2130 } |
| 2131 |
| 2132 partial void OnConstruction(); |
| 2133 |
| 2134 public ServiceDescriptorProto(ServiceDescriptorProto other) : this() { |
| 2135 name_ = other.name_; |
| 2136 method_ = other.method_.Clone(); |
| 2137 Options = other.options_ != null ? other.Options.Clone() : null; |
| 2138 } |
| 2139 |
| 2140 public ServiceDescriptorProto Clone() { |
| 2141 return new ServiceDescriptorProto(this); |
| 2142 } |
| 2143 |
| 2144 /// <summary>Field number for the "name" field.</summary> |
| 2145 public const int NameFieldNumber = 1; |
| 2146 private string name_ = ""; |
| 2147 public string Name { |
| 2148 get { return name_; } |
| 2149 set { |
| 2150 name_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 2151 } |
| 2152 } |
| 2153 |
| 2154 /// <summary>Field number for the "method" field.</summary> |
| 2155 public const int MethodFieldNumber = 2; |
| 2156 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.Me
thodDescriptorProto> _repeated_method_codec |
| 2157 = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.Reflection.Metho
dDescriptorProto.Parser); |
| 2158 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.Metho
dDescriptorProto> method_ = new pbc::RepeatedField<global::Google.Protobuf.Refle
ction.MethodDescriptorProto>(); |
| 2159 public pbc::RepeatedField<global::Google.Protobuf.Reflection.MethodDescripto
rProto> Method { |
| 2160 get { return method_; } |
| 2161 } |
| 2162 |
| 2163 /// <summary>Field number for the "options" field.</summary> |
| 2164 public const int OptionsFieldNumber = 3; |
| 2165 private global::Google.Protobuf.Reflection.ServiceOptions options_; |
| 2166 public global::Google.Protobuf.Reflection.ServiceOptions Options { |
| 2167 get { return options_; } |
| 2168 set { |
| 2169 options_ = value; |
| 2170 } |
| 2171 } |
| 2172 |
| 2173 public override bool Equals(object other) { |
| 2174 return Equals(other as ServiceDescriptorProto); |
| 2175 } |
| 2176 |
| 2177 public bool Equals(ServiceDescriptorProto other) { |
| 2178 if (ReferenceEquals(other, null)) { |
| 2179 return false; |
| 2180 } |
| 2181 if (ReferenceEquals(other, this)) { |
| 2182 return true; |
| 2183 } |
| 2184 if (Name != other.Name) return false; |
| 2185 if(!method_.Equals(other.method_)) return false; |
| 2186 if (!object.Equals(Options, other.Options)) return false; |
| 2187 return true; |
| 2188 } |
| 2189 |
| 2190 public override int GetHashCode() { |
| 2191 int hash = 1; |
| 2192 if (Name.Length != 0) hash ^= Name.GetHashCode(); |
| 2193 hash ^= method_.GetHashCode(); |
| 2194 if (options_ != null) hash ^= Options.GetHashCode(); |
| 2195 return hash; |
| 2196 } |
| 2197 |
| 2198 public override string ToString() { |
| 2199 return pb::JsonFormatter.ToDiagnosticString(this); |
| 2200 } |
| 2201 |
| 2202 public void WriteTo(pb::CodedOutputStream output) { |
| 2203 if (Name.Length != 0) { |
| 2204 output.WriteRawTag(10); |
| 2205 output.WriteString(Name); |
| 2206 } |
| 2207 method_.WriteTo(output, _repeated_method_codec); |
| 2208 if (options_ != null) { |
| 2209 output.WriteRawTag(26); |
| 2210 output.WriteMessage(Options); |
| 2211 } |
| 2212 } |
| 2213 |
| 2214 public int CalculateSize() { |
| 2215 int size = 0; |
| 2216 if (Name.Length != 0) { |
| 2217 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
| 2218 } |
| 2219 size += method_.CalculateSize(_repeated_method_codec); |
| 2220 if (options_ != null) { |
| 2221 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); |
| 2222 } |
| 2223 return size; |
| 2224 } |
| 2225 |
| 2226 public void MergeFrom(ServiceDescriptorProto other) { |
| 2227 if (other == null) { |
| 2228 return; |
| 2229 } |
| 2230 if (other.Name.Length != 0) { |
| 2231 Name = other.Name; |
| 2232 } |
| 2233 method_.Add(other.method_); |
| 2234 if (other.options_ != null) { |
| 2235 if (options_ == null) { |
| 2236 options_ = new global::Google.Protobuf.Reflection.ServiceOptions(); |
| 2237 } |
| 2238 Options.MergeFrom(other.Options); |
| 2239 } |
| 2240 } |
| 2241 |
| 2242 public void MergeFrom(pb::CodedInputStream input) { |
| 2243 uint tag; |
| 2244 while ((tag = input.ReadTag()) != 0) { |
| 2245 switch(tag) { |
| 2246 default: |
| 2247 input.SkipLastField(); |
| 2248 break; |
| 2249 case 10: { |
| 2250 Name = input.ReadString(); |
| 2251 break; |
| 2252 } |
| 2253 case 18: { |
| 2254 method_.AddEntriesFrom(input, _repeated_method_codec); |
| 2255 break; |
| 2256 } |
| 2257 case 26: { |
| 2258 if (options_ == null) { |
| 2259 options_ = new global::Google.Protobuf.Reflection.ServiceOptions()
; |
| 2260 } |
| 2261 input.ReadMessage(options_); |
| 2262 break; |
| 2263 } |
| 2264 } |
| 2265 } |
| 2266 } |
| 2267 |
| 2268 } |
| 2269 |
| 2270 /// <summary> |
| 2271 /// Describes a method of a service. |
| 2272 /// </summary> |
| 2273 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 2274 internal sealed partial class MethodDescriptorProto : pb::IMessage<MethodDescr
iptorProto> { |
| 2275 private static readonly pb::MessageParser<MethodDescriptorProto> _parser = n
ew pb::MessageParser<MethodDescriptorProto>(() => new MethodDescriptorProto()); |
| 2276 public static pb::MessageParser<MethodDescriptorProto> Parser { get { return
_parser; } } |
| 2277 |
| 2278 public static pbr::MessageDescriptor Descriptor { |
| 2279 get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descr
iptor.MessageTypes[8]; } |
| 2280 } |
| 2281 |
| 2282 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2283 get { return Descriptor; } |
| 2284 } |
| 2285 |
| 2286 public MethodDescriptorProto() { |
| 2287 OnConstruction(); |
| 2288 } |
| 2289 |
| 2290 partial void OnConstruction(); |
| 2291 |
| 2292 public MethodDescriptorProto(MethodDescriptorProto other) : this() { |
| 2293 name_ = other.name_; |
| 2294 inputType_ = other.inputType_; |
| 2295 outputType_ = other.outputType_; |
| 2296 Options = other.options_ != null ? other.Options.Clone() : null; |
| 2297 clientStreaming_ = other.clientStreaming_; |
| 2298 serverStreaming_ = other.serverStreaming_; |
| 2299 } |
| 2300 |
| 2301 public MethodDescriptorProto Clone() { |
| 2302 return new MethodDescriptorProto(this); |
| 2303 } |
| 2304 |
| 2305 /// <summary>Field number for the "name" field.</summary> |
| 2306 public const int NameFieldNumber = 1; |
| 2307 private string name_ = ""; |
| 2308 public string Name { |
| 2309 get { return name_; } |
| 2310 set { |
| 2311 name_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 2312 } |
| 2313 } |
| 2314 |
| 2315 /// <summary>Field number for the "input_type" field.</summary> |
| 2316 public const int InputTypeFieldNumber = 2; |
| 2317 private string inputType_ = ""; |
| 2318 /// <summary> |
| 2319 /// Input and output type names. These are resolved in the same way as |
| 2320 /// FieldDescriptorProto.type_name, but must refer to a message type. |
| 2321 /// </summary> |
| 2322 public string InputType { |
| 2323 get { return inputType_; } |
| 2324 set { |
| 2325 inputType_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 2326 } |
| 2327 } |
| 2328 |
| 2329 /// <summary>Field number for the "output_type" field.</summary> |
| 2330 public const int OutputTypeFieldNumber = 3; |
| 2331 private string outputType_ = ""; |
| 2332 public string OutputType { |
| 2333 get { return outputType_; } |
| 2334 set { |
| 2335 outputType_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 2336 } |
| 2337 } |
| 2338 |
| 2339 /// <summary>Field number for the "options" field.</summary> |
| 2340 public const int OptionsFieldNumber = 4; |
| 2341 private global::Google.Protobuf.Reflection.MethodOptions options_; |
| 2342 public global::Google.Protobuf.Reflection.MethodOptions Options { |
| 2343 get { return options_; } |
| 2344 set { |
| 2345 options_ = value; |
| 2346 } |
| 2347 } |
| 2348 |
| 2349 /// <summary>Field number for the "client_streaming" field.</summary> |
| 2350 public const int ClientStreamingFieldNumber = 5; |
| 2351 private bool clientStreaming_; |
| 2352 /// <summary> |
| 2353 /// Identifies if client streams multiple client messages |
| 2354 /// </summary> |
| 2355 public bool ClientStreaming { |
| 2356 get { return clientStreaming_; } |
| 2357 set { |
| 2358 clientStreaming_ = value; |
| 2359 } |
| 2360 } |
| 2361 |
| 2362 /// <summary>Field number for the "server_streaming" field.</summary> |
| 2363 public const int ServerStreamingFieldNumber = 6; |
| 2364 private bool serverStreaming_; |
| 2365 /// <summary> |
| 2366 /// Identifies if server streams multiple server messages |
| 2367 /// </summary> |
| 2368 public bool ServerStreaming { |
| 2369 get { return serverStreaming_; } |
| 2370 set { |
| 2371 serverStreaming_ = value; |
| 2372 } |
| 2373 } |
| 2374 |
| 2375 public override bool Equals(object other) { |
| 2376 return Equals(other as MethodDescriptorProto); |
| 2377 } |
| 2378 |
| 2379 public bool Equals(MethodDescriptorProto other) { |
| 2380 if (ReferenceEquals(other, null)) { |
| 2381 return false; |
| 2382 } |
| 2383 if (ReferenceEquals(other, this)) { |
| 2384 return true; |
| 2385 } |
| 2386 if (Name != other.Name) return false; |
| 2387 if (InputType != other.InputType) return false; |
| 2388 if (OutputType != other.OutputType) return false; |
| 2389 if (!object.Equals(Options, other.Options)) return false; |
| 2390 if (ClientStreaming != other.ClientStreaming) return false; |
| 2391 if (ServerStreaming != other.ServerStreaming) return false; |
| 2392 return true; |
| 2393 } |
| 2394 |
| 2395 public override int GetHashCode() { |
| 2396 int hash = 1; |
| 2397 if (Name.Length != 0) hash ^= Name.GetHashCode(); |
| 2398 if (InputType.Length != 0) hash ^= InputType.GetHashCode(); |
| 2399 if (OutputType.Length != 0) hash ^= OutputType.GetHashCode(); |
| 2400 if (options_ != null) hash ^= Options.GetHashCode(); |
| 2401 if (ClientStreaming != false) hash ^= ClientStreaming.GetHashCode(); |
| 2402 if (ServerStreaming != false) hash ^= ServerStreaming.GetHashCode(); |
| 2403 return hash; |
| 2404 } |
| 2405 |
| 2406 public override string ToString() { |
| 2407 return pb::JsonFormatter.ToDiagnosticString(this); |
| 2408 } |
| 2409 |
| 2410 public void WriteTo(pb::CodedOutputStream output) { |
| 2411 if (Name.Length != 0) { |
| 2412 output.WriteRawTag(10); |
| 2413 output.WriteString(Name); |
| 2414 } |
| 2415 if (InputType.Length != 0) { |
| 2416 output.WriteRawTag(18); |
| 2417 output.WriteString(InputType); |
| 2418 } |
| 2419 if (OutputType.Length != 0) { |
| 2420 output.WriteRawTag(26); |
| 2421 output.WriteString(OutputType); |
| 2422 } |
| 2423 if (options_ != null) { |
| 2424 output.WriteRawTag(34); |
| 2425 output.WriteMessage(Options); |
| 2426 } |
| 2427 if (ClientStreaming != false) { |
| 2428 output.WriteRawTag(40); |
| 2429 output.WriteBool(ClientStreaming); |
| 2430 } |
| 2431 if (ServerStreaming != false) { |
| 2432 output.WriteRawTag(48); |
| 2433 output.WriteBool(ServerStreaming); |
| 2434 } |
| 2435 } |
| 2436 |
| 2437 public int CalculateSize() { |
| 2438 int size = 0; |
| 2439 if (Name.Length != 0) { |
| 2440 size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); |
| 2441 } |
| 2442 if (InputType.Length != 0) { |
| 2443 size += 1 + pb::CodedOutputStream.ComputeStringSize(InputType); |
| 2444 } |
| 2445 if (OutputType.Length != 0) { |
| 2446 size += 1 + pb::CodedOutputStream.ComputeStringSize(OutputType); |
| 2447 } |
| 2448 if (options_ != null) { |
| 2449 size += 1 + pb::CodedOutputStream.ComputeMessageSize(Options); |
| 2450 } |
| 2451 if (ClientStreaming != false) { |
| 2452 size += 1 + 1; |
| 2453 } |
| 2454 if (ServerStreaming != false) { |
| 2455 size += 1 + 1; |
| 2456 } |
| 2457 return size; |
| 2458 } |
| 2459 |
| 2460 public void MergeFrom(MethodDescriptorProto other) { |
| 2461 if (other == null) { |
| 2462 return; |
| 2463 } |
| 2464 if (other.Name.Length != 0) { |
| 2465 Name = other.Name; |
| 2466 } |
| 2467 if (other.InputType.Length != 0) { |
| 2468 InputType = other.InputType; |
| 2469 } |
| 2470 if (other.OutputType.Length != 0) { |
| 2471 OutputType = other.OutputType; |
| 2472 } |
| 2473 if (other.options_ != null) { |
| 2474 if (options_ == null) { |
| 2475 options_ = new global::Google.Protobuf.Reflection.MethodOptions(); |
| 2476 } |
| 2477 Options.MergeFrom(other.Options); |
| 2478 } |
| 2479 if (other.ClientStreaming != false) { |
| 2480 ClientStreaming = other.ClientStreaming; |
| 2481 } |
| 2482 if (other.ServerStreaming != false) { |
| 2483 ServerStreaming = other.ServerStreaming; |
| 2484 } |
| 2485 } |
| 2486 |
| 2487 public void MergeFrom(pb::CodedInputStream input) { |
| 2488 uint tag; |
| 2489 while ((tag = input.ReadTag()) != 0) { |
| 2490 switch(tag) { |
| 2491 default: |
| 2492 input.SkipLastField(); |
| 2493 break; |
| 2494 case 10: { |
| 2495 Name = input.ReadString(); |
| 2496 break; |
| 2497 } |
| 2498 case 18: { |
| 2499 InputType = input.ReadString(); |
| 2500 break; |
| 2501 } |
| 2502 case 26: { |
| 2503 OutputType = input.ReadString(); |
| 2504 break; |
| 2505 } |
| 2506 case 34: { |
| 2507 if (options_ == null) { |
| 2508 options_ = new global::Google.Protobuf.Reflection.MethodOptions(); |
| 2509 } |
| 2510 input.ReadMessage(options_); |
| 2511 break; |
| 2512 } |
| 2513 case 40: { |
| 2514 ClientStreaming = input.ReadBool(); |
| 2515 break; |
| 2516 } |
| 2517 case 48: { |
| 2518 ServerStreaming = input.ReadBool(); |
| 2519 break; |
| 2520 } |
| 2521 } |
| 2522 } |
| 2523 } |
| 2524 |
| 2525 } |
| 2526 |
| 2527 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 2528 internal sealed partial class FileOptions : pb::IMessage<FileOptions> { |
| 2529 private static readonly pb::MessageParser<FileOptions> _parser = new pb::Mes
sageParser<FileOptions>(() => new FileOptions()); |
| 2530 public static pb::MessageParser<FileOptions> Parser { get { return _parser;
} } |
| 2531 |
| 2532 public static pbr::MessageDescriptor Descriptor { |
| 2533 get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descr
iptor.MessageTypes[9]; } |
| 2534 } |
| 2535 |
| 2536 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 2537 get { return Descriptor; } |
| 2538 } |
| 2539 |
| 2540 public FileOptions() { |
| 2541 OnConstruction(); |
| 2542 } |
| 2543 |
| 2544 partial void OnConstruction(); |
| 2545 |
| 2546 public FileOptions(FileOptions other) : this() { |
| 2547 javaPackage_ = other.javaPackage_; |
| 2548 javaOuterClassname_ = other.javaOuterClassname_; |
| 2549 javaMultipleFiles_ = other.javaMultipleFiles_; |
| 2550 javaGenerateEqualsAndHash_ = other.javaGenerateEqualsAndHash_; |
| 2551 javaStringCheckUtf8_ = other.javaStringCheckUtf8_; |
| 2552 optimizeFor_ = other.optimizeFor_; |
| 2553 goPackage_ = other.goPackage_; |
| 2554 ccGenericServices_ = other.ccGenericServices_; |
| 2555 javaGenericServices_ = other.javaGenericServices_; |
| 2556 pyGenericServices_ = other.pyGenericServices_; |
| 2557 deprecated_ = other.deprecated_; |
| 2558 ccEnableArenas_ = other.ccEnableArenas_; |
| 2559 objcClassPrefix_ = other.objcClassPrefix_; |
| 2560 csharpNamespace_ = other.csharpNamespace_; |
| 2561 javananoUseDeprecatedPackage_ = other.javananoUseDeprecatedPackage_; |
| 2562 uninterpretedOption_ = other.uninterpretedOption_.Clone(); |
| 2563 } |
| 2564 |
| 2565 public FileOptions Clone() { |
| 2566 return new FileOptions(this); |
| 2567 } |
| 2568 |
| 2569 /// <summary>Field number for the "java_package" field.</summary> |
| 2570 public const int JavaPackageFieldNumber = 1; |
| 2571 private string javaPackage_ = ""; |
| 2572 /// <summary> |
| 2573 /// Sets the Java package where classes generated from this .proto will be |
| 2574 /// placed. By default, the proto package is used, but this is often |
| 2575 /// inappropriate because proto packages do not normally start with backwar
ds |
| 2576 /// domain names. |
| 2577 /// </summary> |
| 2578 public string JavaPackage { |
| 2579 get { return javaPackage_; } |
| 2580 set { |
| 2581 javaPackage_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 2582 } |
| 2583 } |
| 2584 |
| 2585 /// <summary>Field number for the "java_outer_classname" field.</summary> |
| 2586 public const int JavaOuterClassnameFieldNumber = 8; |
| 2587 private string javaOuterClassname_ = ""; |
| 2588 /// <summary> |
| 2589 /// If set, all the classes from the .proto file are wrapped in a single |
| 2590 /// outer class with the given name. This applies to both Proto1 |
| 2591 /// (equivalent to the old "--one_java_file" option) and Proto2 (where |
| 2592 /// a .proto always translates to a single class, but you may want to |
| 2593 /// explicitly choose the class name). |
| 2594 /// </summary> |
| 2595 public string JavaOuterClassname { |
| 2596 get { return javaOuterClassname_; } |
| 2597 set { |
| 2598 javaOuterClassname_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 2599 } |
| 2600 } |
| 2601 |
| 2602 /// <summary>Field number for the "java_multiple_files" field.</summary> |
| 2603 public const int JavaMultipleFilesFieldNumber = 10; |
| 2604 private bool javaMultipleFiles_; |
| 2605 /// <summary> |
| 2606 /// If set true, then the Java code generator will generate a separate .jav
a |
| 2607 /// file for each top-level message, enum, and service defined in the .prot
o |
| 2608 /// file. Thus, these types will *not* be nested inside the outer class |
| 2609 /// named by java_outer_classname. However, the outer class will still be |
| 2610 /// generated to contain the file's getDescriptor() method as well as any |
| 2611 /// top-level extensions defined in the file. |
| 2612 /// </summary> |
| 2613 public bool JavaMultipleFiles { |
| 2614 get { return javaMultipleFiles_; } |
| 2615 set { |
| 2616 javaMultipleFiles_ = value; |
| 2617 } |
| 2618 } |
| 2619 |
| 2620 /// <summary>Field number for the "java_generate_equals_and_hash" field.</su
mmary> |
| 2621 public const int JavaGenerateEqualsAndHashFieldNumber = 20; |
| 2622 private bool javaGenerateEqualsAndHash_; |
| 2623 /// <summary> |
| 2624 /// If set true, then the Java code generator will generate equals() and |
| 2625 /// hashCode() methods for all messages defined in the .proto file. |
| 2626 /// This increases generated code size, potentially substantially for large |
| 2627 /// protos, which may harm a memory-constrained application. |
| 2628 /// - In the full runtime this is a speed optimization, as the |
| 2629 /// AbstractMessage base class includes reflection-based implementations of |
| 2630 /// these methods. |
| 2631 /// - In the lite runtime, setting this option changes the semantics of |
| 2632 /// equals() and hashCode() to more closely match those of the full runtime
; |
| 2633 /// the generated methods compute their results based on field values rathe
r |
| 2634 /// than object identity. (Implementations should not assume that hashcodes |
| 2635 /// will be consistent across runtimes or versions of the protocol compiler
.) |
| 2636 /// </summary> |
| 2637 public bool JavaGenerateEqualsAndHash { |
| 2638 get { return javaGenerateEqualsAndHash_; } |
| 2639 set { |
| 2640 javaGenerateEqualsAndHash_ = value; |
| 2641 } |
| 2642 } |
| 2643 |
| 2644 /// <summary>Field number for the "java_string_check_utf8" field.</summary> |
| 2645 public const int JavaStringCheckUtf8FieldNumber = 27; |
| 2646 private bool javaStringCheckUtf8_; |
| 2647 /// <summary> |
| 2648 /// If set true, then the Java2 code generator will generate code that |
| 2649 /// throws an exception whenever an attempt is made to assign a non-UTF-8 |
| 2650 /// byte sequence to a string field. |
| 2651 /// Message reflection will do the same. |
| 2652 /// However, an extension field still accepts non-UTF-8 byte sequences. |
| 2653 /// This option has no effect on when used with the lite runtime. |
| 2654 /// </summary> |
| 2655 public bool JavaStringCheckUtf8 { |
| 2656 get { return javaStringCheckUtf8_; } |
| 2657 set { |
| 2658 javaStringCheckUtf8_ = value; |
| 2659 } |
| 2660 } |
| 2661 |
| 2662 /// <summary>Field number for the "optimize_for" field.</summary> |
| 2663 public const int OptimizeForFieldNumber = 9; |
| 2664 private global::Google.Protobuf.Reflection.FileOptions.Types.OptimizeMode op
timizeFor_ = global::Google.Protobuf.Reflection.FileOptions.Types.OptimizeMode.S
PEED; |
| 2665 public global::Google.Protobuf.Reflection.FileOptions.Types.OptimizeMode Opt
imizeFor { |
| 2666 get { return optimizeFor_; } |
| 2667 set { |
| 2668 optimizeFor_ = value; |
| 2669 } |
| 2670 } |
| 2671 |
| 2672 /// <summary>Field number for the "go_package" field.</summary> |
| 2673 public const int GoPackageFieldNumber = 11; |
| 2674 private string goPackage_ = ""; |
| 2675 /// <summary> |
| 2676 /// Sets the Go package where structs generated from this .proto will be |
| 2677 /// placed. If omitted, the Go package will be derived from the following: |
| 2678 /// - The basename of the package import path, if provided. |
| 2679 /// - Otherwise, the package statement in the .proto file, if present. |
| 2680 /// - Otherwise, the basename of the .proto file, without extension. |
| 2681 /// </summary> |
| 2682 public string GoPackage { |
| 2683 get { return goPackage_; } |
| 2684 set { |
| 2685 goPackage_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 2686 } |
| 2687 } |
| 2688 |
| 2689 /// <summary>Field number for the "cc_generic_services" field.</summary> |
| 2690 public const int CcGenericServicesFieldNumber = 16; |
| 2691 private bool ccGenericServices_; |
| 2692 /// <summary> |
| 2693 /// Should generic services be generated in each language? "Generic" servi
ces |
| 2694 /// are not specific to any particular RPC system. They are generated by t
he |
| 2695 /// main code generators in each language (without additional plugins). |
| 2696 /// Generic services were the only kind of service generation supported by |
| 2697 /// early versions of google.protobuf. |
| 2698 /// |
| 2699 /// Generic services are now considered deprecated in favor of using plugin
s |
| 2700 /// that generate code specific to your particular RPC system. Therefore, |
| 2701 /// these default to false. Old code which depends on generic services sho
uld |
| 2702 /// explicitly set them to true. |
| 2703 /// </summary> |
| 2704 public bool CcGenericServices { |
| 2705 get { return ccGenericServices_; } |
| 2706 set { |
| 2707 ccGenericServices_ = value; |
| 2708 } |
| 2709 } |
| 2710 |
| 2711 /// <summary>Field number for the "java_generic_services" field.</summary> |
| 2712 public const int JavaGenericServicesFieldNumber = 17; |
| 2713 private bool javaGenericServices_; |
| 2714 public bool JavaGenericServices { |
| 2715 get { return javaGenericServices_; } |
| 2716 set { |
| 2717 javaGenericServices_ = value; |
| 2718 } |
| 2719 } |
| 2720 |
| 2721 /// <summary>Field number for the "py_generic_services" field.</summary> |
| 2722 public const int PyGenericServicesFieldNumber = 18; |
| 2723 private bool pyGenericServices_; |
| 2724 public bool PyGenericServices { |
| 2725 get { return pyGenericServices_; } |
| 2726 set { |
| 2727 pyGenericServices_ = value; |
| 2728 } |
| 2729 } |
| 2730 |
| 2731 /// <summary>Field number for the "deprecated" field.</summary> |
| 2732 public const int DeprecatedFieldNumber = 23; |
| 2733 private bool deprecated_; |
| 2734 /// <summary> |
| 2735 /// Is this file deprecated? |
| 2736 /// Depending on the target platform, this can emit Deprecated annotations |
| 2737 /// for everything in the file, or it will be completely ignored; in the ve
ry |
| 2738 /// least, this is a formalization for deprecating files. |
| 2739 /// </summary> |
| 2740 public bool Deprecated { |
| 2741 get { return deprecated_; } |
| 2742 set { |
| 2743 deprecated_ = value; |
| 2744 } |
| 2745 } |
| 2746 |
| 2747 /// <summary>Field number for the "cc_enable_arenas" field.</summary> |
| 2748 public const int CcEnableArenasFieldNumber = 31; |
| 2749 private bool ccEnableArenas_; |
| 2750 /// <summary> |
| 2751 /// Enables the use of arenas for the proto messages in this file. This app
lies |
| 2752 /// only to generated classes for C++. |
| 2753 /// </summary> |
| 2754 public bool CcEnableArenas { |
| 2755 get { return ccEnableArenas_; } |
| 2756 set { |
| 2757 ccEnableArenas_ = value; |
| 2758 } |
| 2759 } |
| 2760 |
| 2761 /// <summary>Field number for the "objc_class_prefix" field.</summary> |
| 2762 public const int ObjcClassPrefixFieldNumber = 36; |
| 2763 private string objcClassPrefix_ = ""; |
| 2764 /// <summary> |
| 2765 /// Sets the objective c class prefix which is prepended to all objective c |
| 2766 /// generated classes from this .proto. There is no default. |
| 2767 /// </summary> |
| 2768 public string ObjcClassPrefix { |
| 2769 get { return objcClassPrefix_; } |
| 2770 set { |
| 2771 objcClassPrefix_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 2772 } |
| 2773 } |
| 2774 |
| 2775 /// <summary>Field number for the "csharp_namespace" field.</summary> |
| 2776 public const int CsharpNamespaceFieldNumber = 37; |
| 2777 private string csharpNamespace_ = ""; |
| 2778 /// <summary> |
| 2779 /// Namespace for generated classes; defaults to the package. |
| 2780 /// </summary> |
| 2781 public string CsharpNamespace { |
| 2782 get { return csharpNamespace_; } |
| 2783 set { |
| 2784 csharpNamespace_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 2785 } |
| 2786 } |
| 2787 |
| 2788 /// <summary>Field number for the "javanano_use_deprecated_package" field.</
summary> |
| 2789 public const int JavananoUseDeprecatedPackageFieldNumber = 38; |
| 2790 private bool javananoUseDeprecatedPackage_; |
| 2791 /// <summary> |
| 2792 /// Whether the nano proto compiler should generate in the deprecated non-n
ano |
| 2793 /// suffixed package. |
| 2794 /// </summary> |
| 2795 public bool JavananoUseDeprecatedPackage { |
| 2796 get { return javananoUseDeprecatedPackage_; } |
| 2797 set { |
| 2798 javananoUseDeprecatedPackage_ = value; |
| 2799 } |
| 2800 } |
| 2801 |
| 2802 /// <summary>Field number for the "uninterpreted_option" field.</summary> |
| 2803 public const int UninterpretedOptionFieldNumber = 999; |
| 2804 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.Un
interpretedOption> _repeated_uninterpretedOption_codec |
| 2805 = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.Uni
nterpretedOption.Parser); |
| 2806 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.Unint
erpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Pro
tobuf.Reflection.UninterpretedOption>(); |
| 2807 /// <summary> |
| 2808 /// The parser stores options it doesn't recognize here. See above. |
| 2809 /// </summary> |
| 2810 public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOp
tion> UninterpretedOption { |
| 2811 get { return uninterpretedOption_; } |
| 2812 } |
| 2813 |
| 2814 public override bool Equals(object other) { |
| 2815 return Equals(other as FileOptions); |
| 2816 } |
| 2817 |
| 2818 public bool Equals(FileOptions other) { |
| 2819 if (ReferenceEquals(other, null)) { |
| 2820 return false; |
| 2821 } |
| 2822 if (ReferenceEquals(other, this)) { |
| 2823 return true; |
| 2824 } |
| 2825 if (JavaPackage != other.JavaPackage) return false; |
| 2826 if (JavaOuterClassname != other.JavaOuterClassname) return false; |
| 2827 if (JavaMultipleFiles != other.JavaMultipleFiles) return false; |
| 2828 if (JavaGenerateEqualsAndHash != other.JavaGenerateEqualsAndHash) return f
alse; |
| 2829 if (JavaStringCheckUtf8 != other.JavaStringCheckUtf8) return false; |
| 2830 if (OptimizeFor != other.OptimizeFor) return false; |
| 2831 if (GoPackage != other.GoPackage) return false; |
| 2832 if (CcGenericServices != other.CcGenericServices) return false; |
| 2833 if (JavaGenericServices != other.JavaGenericServices) return false; |
| 2834 if (PyGenericServices != other.PyGenericServices) return false; |
| 2835 if (Deprecated != other.Deprecated) return false; |
| 2836 if (CcEnableArenas != other.CcEnableArenas) return false; |
| 2837 if (ObjcClassPrefix != other.ObjcClassPrefix) return false; |
| 2838 if (CsharpNamespace != other.CsharpNamespace) return false; |
| 2839 if (JavananoUseDeprecatedPackage != other.JavananoUseDeprecatedPackage) re
turn false; |
| 2840 if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; |
| 2841 return true; |
| 2842 } |
| 2843 |
| 2844 public override int GetHashCode() { |
| 2845 int hash = 1; |
| 2846 if (JavaPackage.Length != 0) hash ^= JavaPackage.GetHashCode(); |
| 2847 if (JavaOuterClassname.Length != 0) hash ^= JavaOuterClassname.GetHashCode
(); |
| 2848 if (JavaMultipleFiles != false) hash ^= JavaMultipleFiles.GetHashCode(); |
| 2849 if (JavaGenerateEqualsAndHash != false) hash ^= JavaGenerateEqualsAndHash.
GetHashCode(); |
| 2850 if (JavaStringCheckUtf8 != false) hash ^= JavaStringCheckUtf8.GetHashCode(
); |
| 2851 if (OptimizeFor != global::Google.Protobuf.Reflection.FileOptions.Types.Op
timizeMode.SPEED) hash ^= OptimizeFor.GetHashCode(); |
| 2852 if (GoPackage.Length != 0) hash ^= GoPackage.GetHashCode(); |
| 2853 if (CcGenericServices != false) hash ^= CcGenericServices.GetHashCode(); |
| 2854 if (JavaGenericServices != false) hash ^= JavaGenericServices.GetHashCode(
); |
| 2855 if (PyGenericServices != false) hash ^= PyGenericServices.GetHashCode(); |
| 2856 if (Deprecated != false) hash ^= Deprecated.GetHashCode(); |
| 2857 if (CcEnableArenas != false) hash ^= CcEnableArenas.GetHashCode(); |
| 2858 if (ObjcClassPrefix.Length != 0) hash ^= ObjcClassPrefix.GetHashCode(); |
| 2859 if (CsharpNamespace.Length != 0) hash ^= CsharpNamespace.GetHashCode(); |
| 2860 if (JavananoUseDeprecatedPackage != false) hash ^= JavananoUseDeprecatedPa
ckage.GetHashCode(); |
| 2861 hash ^= uninterpretedOption_.GetHashCode(); |
| 2862 return hash; |
| 2863 } |
| 2864 |
| 2865 public override string ToString() { |
| 2866 return pb::JsonFormatter.ToDiagnosticString(this); |
| 2867 } |
| 2868 |
| 2869 public void WriteTo(pb::CodedOutputStream output) { |
| 2870 if (JavaPackage.Length != 0) { |
| 2871 output.WriteRawTag(10); |
| 2872 output.WriteString(JavaPackage); |
| 2873 } |
| 2874 if (JavaOuterClassname.Length != 0) { |
| 2875 output.WriteRawTag(66); |
| 2876 output.WriteString(JavaOuterClassname); |
| 2877 } |
| 2878 if (OptimizeFor != global::Google.Protobuf.Reflection.FileOptions.Types.Op
timizeMode.SPEED) { |
| 2879 output.WriteRawTag(72); |
| 2880 output.WriteEnum((int) OptimizeFor); |
| 2881 } |
| 2882 if (JavaMultipleFiles != false) { |
| 2883 output.WriteRawTag(80); |
| 2884 output.WriteBool(JavaMultipleFiles); |
| 2885 } |
| 2886 if (GoPackage.Length != 0) { |
| 2887 output.WriteRawTag(90); |
| 2888 output.WriteString(GoPackage); |
| 2889 } |
| 2890 if (CcGenericServices != false) { |
| 2891 output.WriteRawTag(128, 1); |
| 2892 output.WriteBool(CcGenericServices); |
| 2893 } |
| 2894 if (JavaGenericServices != false) { |
| 2895 output.WriteRawTag(136, 1); |
| 2896 output.WriteBool(JavaGenericServices); |
| 2897 } |
| 2898 if (PyGenericServices != false) { |
| 2899 output.WriteRawTag(144, 1); |
| 2900 output.WriteBool(PyGenericServices); |
| 2901 } |
| 2902 if (JavaGenerateEqualsAndHash != false) { |
| 2903 output.WriteRawTag(160, 1); |
| 2904 output.WriteBool(JavaGenerateEqualsAndHash); |
| 2905 } |
| 2906 if (Deprecated != false) { |
| 2907 output.WriteRawTag(184, 1); |
| 2908 output.WriteBool(Deprecated); |
| 2909 } |
| 2910 if (JavaStringCheckUtf8 != false) { |
| 2911 output.WriteRawTag(216, 1); |
| 2912 output.WriteBool(JavaStringCheckUtf8); |
| 2913 } |
| 2914 if (CcEnableArenas != false) { |
| 2915 output.WriteRawTag(248, 1); |
| 2916 output.WriteBool(CcEnableArenas); |
| 2917 } |
| 2918 if (ObjcClassPrefix.Length != 0) { |
| 2919 output.WriteRawTag(162, 2); |
| 2920 output.WriteString(ObjcClassPrefix); |
| 2921 } |
| 2922 if (CsharpNamespace.Length != 0) { |
| 2923 output.WriteRawTag(170, 2); |
| 2924 output.WriteString(CsharpNamespace); |
| 2925 } |
| 2926 if (JavananoUseDeprecatedPackage != false) { |
| 2927 output.WriteRawTag(176, 2); |
| 2928 output.WriteBool(JavananoUseDeprecatedPackage); |
| 2929 } |
| 2930 uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); |
| 2931 } |
| 2932 |
| 2933 public int CalculateSize() { |
| 2934 int size = 0; |
| 2935 if (JavaPackage.Length != 0) { |
| 2936 size += 1 + pb::CodedOutputStream.ComputeStringSize(JavaPackage); |
| 2937 } |
| 2938 if (JavaOuterClassname.Length != 0) { |
| 2939 size += 1 + pb::CodedOutputStream.ComputeStringSize(JavaOuterClassname); |
| 2940 } |
| 2941 if (JavaMultipleFiles != false) { |
| 2942 size += 1 + 1; |
| 2943 } |
| 2944 if (JavaGenerateEqualsAndHash != false) { |
| 2945 size += 2 + 1; |
| 2946 } |
| 2947 if (JavaStringCheckUtf8 != false) { |
| 2948 size += 2 + 1; |
| 2949 } |
| 2950 if (OptimizeFor != global::Google.Protobuf.Reflection.FileOptions.Types.Op
timizeMode.SPEED) { |
| 2951 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) OptimizeFor); |
| 2952 } |
| 2953 if (GoPackage.Length != 0) { |
| 2954 size += 1 + pb::CodedOutputStream.ComputeStringSize(GoPackage); |
| 2955 } |
| 2956 if (CcGenericServices != false) { |
| 2957 size += 2 + 1; |
| 2958 } |
| 2959 if (JavaGenericServices != false) { |
| 2960 size += 2 + 1; |
| 2961 } |
| 2962 if (PyGenericServices != false) { |
| 2963 size += 2 + 1; |
| 2964 } |
| 2965 if (Deprecated != false) { |
| 2966 size += 2 + 1; |
| 2967 } |
| 2968 if (CcEnableArenas != false) { |
| 2969 size += 2 + 1; |
| 2970 } |
| 2971 if (ObjcClassPrefix.Length != 0) { |
| 2972 size += 2 + pb::CodedOutputStream.ComputeStringSize(ObjcClassPrefix); |
| 2973 } |
| 2974 if (CsharpNamespace.Length != 0) { |
| 2975 size += 2 + pb::CodedOutputStream.ComputeStringSize(CsharpNamespace); |
| 2976 } |
| 2977 if (JavananoUseDeprecatedPackage != false) { |
| 2978 size += 2 + 1; |
| 2979 } |
| 2980 size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_c
odec); |
| 2981 return size; |
| 2982 } |
| 2983 |
| 2984 public void MergeFrom(FileOptions other) { |
| 2985 if (other == null) { |
| 2986 return; |
| 2987 } |
| 2988 if (other.JavaPackage.Length != 0) { |
| 2989 JavaPackage = other.JavaPackage; |
| 2990 } |
| 2991 if (other.JavaOuterClassname.Length != 0) { |
| 2992 JavaOuterClassname = other.JavaOuterClassname; |
| 2993 } |
| 2994 if (other.JavaMultipleFiles != false) { |
| 2995 JavaMultipleFiles = other.JavaMultipleFiles; |
| 2996 } |
| 2997 if (other.JavaGenerateEqualsAndHash != false) { |
| 2998 JavaGenerateEqualsAndHash = other.JavaGenerateEqualsAndHash; |
| 2999 } |
| 3000 if (other.JavaStringCheckUtf8 != false) { |
| 3001 JavaStringCheckUtf8 = other.JavaStringCheckUtf8; |
| 3002 } |
| 3003 if (other.OptimizeFor != global::Google.Protobuf.Reflection.FileOptions.Ty
pes.OptimizeMode.SPEED) { |
| 3004 OptimizeFor = other.OptimizeFor; |
| 3005 } |
| 3006 if (other.GoPackage.Length != 0) { |
| 3007 GoPackage = other.GoPackage; |
| 3008 } |
| 3009 if (other.CcGenericServices != false) { |
| 3010 CcGenericServices = other.CcGenericServices; |
| 3011 } |
| 3012 if (other.JavaGenericServices != false) { |
| 3013 JavaGenericServices = other.JavaGenericServices; |
| 3014 } |
| 3015 if (other.PyGenericServices != false) { |
| 3016 PyGenericServices = other.PyGenericServices; |
| 3017 } |
| 3018 if (other.Deprecated != false) { |
| 3019 Deprecated = other.Deprecated; |
| 3020 } |
| 3021 if (other.CcEnableArenas != false) { |
| 3022 CcEnableArenas = other.CcEnableArenas; |
| 3023 } |
| 3024 if (other.ObjcClassPrefix.Length != 0) { |
| 3025 ObjcClassPrefix = other.ObjcClassPrefix; |
| 3026 } |
| 3027 if (other.CsharpNamespace.Length != 0) { |
| 3028 CsharpNamespace = other.CsharpNamespace; |
| 3029 } |
| 3030 if (other.JavananoUseDeprecatedPackage != false) { |
| 3031 JavananoUseDeprecatedPackage = other.JavananoUseDeprecatedPackage; |
| 3032 } |
| 3033 uninterpretedOption_.Add(other.uninterpretedOption_); |
| 3034 } |
| 3035 |
| 3036 public void MergeFrom(pb::CodedInputStream input) { |
| 3037 uint tag; |
| 3038 while ((tag = input.ReadTag()) != 0) { |
| 3039 switch(tag) { |
| 3040 default: |
| 3041 input.SkipLastField(); |
| 3042 break; |
| 3043 case 10: { |
| 3044 JavaPackage = input.ReadString(); |
| 3045 break; |
| 3046 } |
| 3047 case 66: { |
| 3048 JavaOuterClassname = input.ReadString(); |
| 3049 break; |
| 3050 } |
| 3051 case 72: { |
| 3052 optimizeFor_ = (global::Google.Protobuf.Reflection.FileOptions.Types
.OptimizeMode) input.ReadEnum(); |
| 3053 break; |
| 3054 } |
| 3055 case 80: { |
| 3056 JavaMultipleFiles = input.ReadBool(); |
| 3057 break; |
| 3058 } |
| 3059 case 90: { |
| 3060 GoPackage = input.ReadString(); |
| 3061 break; |
| 3062 } |
| 3063 case 128: { |
| 3064 CcGenericServices = input.ReadBool(); |
| 3065 break; |
| 3066 } |
| 3067 case 136: { |
| 3068 JavaGenericServices = input.ReadBool(); |
| 3069 break; |
| 3070 } |
| 3071 case 144: { |
| 3072 PyGenericServices = input.ReadBool(); |
| 3073 break; |
| 3074 } |
| 3075 case 160: { |
| 3076 JavaGenerateEqualsAndHash = input.ReadBool(); |
| 3077 break; |
| 3078 } |
| 3079 case 184: { |
| 3080 Deprecated = input.ReadBool(); |
| 3081 break; |
| 3082 } |
| 3083 case 216: { |
| 3084 JavaStringCheckUtf8 = input.ReadBool(); |
| 3085 break; |
| 3086 } |
| 3087 case 248: { |
| 3088 CcEnableArenas = input.ReadBool(); |
| 3089 break; |
| 3090 } |
| 3091 case 290: { |
| 3092 ObjcClassPrefix = input.ReadString(); |
| 3093 break; |
| 3094 } |
| 3095 case 298: { |
| 3096 CsharpNamespace = input.ReadString(); |
| 3097 break; |
| 3098 } |
| 3099 case 304: { |
| 3100 JavananoUseDeprecatedPackage = input.ReadBool(); |
| 3101 break; |
| 3102 } |
| 3103 case 7994: { |
| 3104 uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOp
tion_codec); |
| 3105 break; |
| 3106 } |
| 3107 } |
| 3108 } |
| 3109 } |
| 3110 |
| 3111 #region Nested types |
| 3112 /// <summary>Container for nested types declared in the FileOptions message
type.</summary> |
| 3113 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 3114 public static partial class Types { |
| 3115 /// <summary> |
| 3116 /// Generated classes can be optimized for speed or code size. |
| 3117 /// </summary> |
| 3118 internal enum OptimizeMode { |
| 3119 /// <summary> |
| 3120 /// Generate complete code for parsing, serialization, |
| 3121 /// </summary> |
| 3122 SPEED = 1, |
| 3123 /// <summary> |
| 3124 /// etc. |
| 3125 /// </summary> |
| 3126 CODE_SIZE = 2, |
| 3127 /// <summary> |
| 3128 /// Generate code using MessageLite and the lite runtime. |
| 3129 /// </summary> |
| 3130 LITE_RUNTIME = 3, |
| 3131 } |
| 3132 |
| 3133 } |
| 3134 #endregion |
| 3135 |
| 3136 } |
| 3137 |
| 3138 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 3139 internal sealed partial class MessageOptions : pb::IMessage<MessageOptions> { |
| 3140 private static readonly pb::MessageParser<MessageOptions> _parser = new pb::
MessageParser<MessageOptions>(() => new MessageOptions()); |
| 3141 public static pb::MessageParser<MessageOptions> Parser { get { return _parse
r; } } |
| 3142 |
| 3143 public static pbr::MessageDescriptor Descriptor { |
| 3144 get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descr
iptor.MessageTypes[10]; } |
| 3145 } |
| 3146 |
| 3147 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 3148 get { return Descriptor; } |
| 3149 } |
| 3150 |
| 3151 public MessageOptions() { |
| 3152 OnConstruction(); |
| 3153 } |
| 3154 |
| 3155 partial void OnConstruction(); |
| 3156 |
| 3157 public MessageOptions(MessageOptions other) : this() { |
| 3158 messageSetWireFormat_ = other.messageSetWireFormat_; |
| 3159 noStandardDescriptorAccessor_ = other.noStandardDescriptorAccessor_; |
| 3160 deprecated_ = other.deprecated_; |
| 3161 mapEntry_ = other.mapEntry_; |
| 3162 uninterpretedOption_ = other.uninterpretedOption_.Clone(); |
| 3163 } |
| 3164 |
| 3165 public MessageOptions Clone() { |
| 3166 return new MessageOptions(this); |
| 3167 } |
| 3168 |
| 3169 /// <summary>Field number for the "message_set_wire_format" field.</summary> |
| 3170 public const int MessageSetWireFormatFieldNumber = 1; |
| 3171 private bool messageSetWireFormat_; |
| 3172 /// <summary> |
| 3173 /// Set true to use the old proto1 MessageSet wire format for extensions. |
| 3174 /// This is provided for backwards-compatibility with the MessageSet wire |
| 3175 /// format. You should not use this for any other reason: It's less |
| 3176 /// efficient, has fewer features, and is more complicated. |
| 3177 /// |
| 3178 /// The message must be defined exactly as follows: |
| 3179 /// message Foo { |
| 3180 /// option message_set_wire_format = true; |
| 3181 /// extensions 4 to max; |
| 3182 /// } |
| 3183 /// Note that the message cannot have any defined fields; MessageSets only |
| 3184 /// have extensions. |
| 3185 /// |
| 3186 /// All extensions of your type must be singular messages; e.g. they cannot |
| 3187 /// be int32s, enums, or repeated messages. |
| 3188 /// |
| 3189 /// Because this is an option, the above two restrictions are not enforced
by |
| 3190 /// the protocol compiler. |
| 3191 /// </summary> |
| 3192 public bool MessageSetWireFormat { |
| 3193 get { return messageSetWireFormat_; } |
| 3194 set { |
| 3195 messageSetWireFormat_ = value; |
| 3196 } |
| 3197 } |
| 3198 |
| 3199 /// <summary>Field number for the "no_standard_descriptor_accessor" field.</
summary> |
| 3200 public const int NoStandardDescriptorAccessorFieldNumber = 2; |
| 3201 private bool noStandardDescriptorAccessor_; |
| 3202 /// <summary> |
| 3203 /// Disables the generation of the standard "descriptor()" accessor, which
can |
| 3204 /// conflict with a field of the same name. This is meant to make migratio
n |
| 3205 /// from proto1 easier; new code should avoid fields named "descriptor". |
| 3206 /// </summary> |
| 3207 public bool NoStandardDescriptorAccessor { |
| 3208 get { return noStandardDescriptorAccessor_; } |
| 3209 set { |
| 3210 noStandardDescriptorAccessor_ = value; |
| 3211 } |
| 3212 } |
| 3213 |
| 3214 /// <summary>Field number for the "deprecated" field.</summary> |
| 3215 public const int DeprecatedFieldNumber = 3; |
| 3216 private bool deprecated_; |
| 3217 /// <summary> |
| 3218 /// Is this message deprecated? |
| 3219 /// Depending on the target platform, this can emit Deprecated annotations |
| 3220 /// for the message, or it will be completely ignored; in the very least, |
| 3221 /// this is a formalization for deprecating messages. |
| 3222 /// </summary> |
| 3223 public bool Deprecated { |
| 3224 get { return deprecated_; } |
| 3225 set { |
| 3226 deprecated_ = value; |
| 3227 } |
| 3228 } |
| 3229 |
| 3230 /// <summary>Field number for the "map_entry" field.</summary> |
| 3231 public const int MapEntryFieldNumber = 7; |
| 3232 private bool mapEntry_; |
| 3233 /// <summary> |
| 3234 /// Whether the message is an automatically generated map entry type for th
e |
| 3235 /// maps field. |
| 3236 /// |
| 3237 /// For maps fields: |
| 3238 /// map<KeyType, ValueType> map_field = 1; |
| 3239 /// The parsed descriptor looks like: |
| 3240 /// message MapFieldEntry { |
| 3241 /// option map_entry = true; |
| 3242 /// optional KeyType key = 1; |
| 3243 /// optional ValueType value = 2; |
| 3244 /// } |
| 3245 /// repeated MapFieldEntry map_field = 1; |
| 3246 /// |
| 3247 /// Implementations may choose not to generate the map_entry=true message,
but |
| 3248 /// use a native map in the target language to hold the keys and values. |
| 3249 /// The reflection APIs in such implementions still need to work as |
| 3250 /// if the field is a repeated message field. |
| 3251 /// |
| 3252 /// NOTE: Do not set the option in .proto files. Always use the maps syntax |
| 3253 /// instead. The option should only be implicitly set by the proto compiler |
| 3254 /// parser. |
| 3255 /// </summary> |
| 3256 public bool MapEntry { |
| 3257 get { return mapEntry_; } |
| 3258 set { |
| 3259 mapEntry_ = value; |
| 3260 } |
| 3261 } |
| 3262 |
| 3263 /// <summary>Field number for the "uninterpreted_option" field.</summary> |
| 3264 public const int UninterpretedOptionFieldNumber = 999; |
| 3265 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.Un
interpretedOption> _repeated_uninterpretedOption_codec |
| 3266 = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.Uni
nterpretedOption.Parser); |
| 3267 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.Unint
erpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Pro
tobuf.Reflection.UninterpretedOption>(); |
| 3268 /// <summary> |
| 3269 /// The parser stores options it doesn't recognize here. See above. |
| 3270 /// </summary> |
| 3271 public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOp
tion> UninterpretedOption { |
| 3272 get { return uninterpretedOption_; } |
| 3273 } |
| 3274 |
| 3275 public override bool Equals(object other) { |
| 3276 return Equals(other as MessageOptions); |
| 3277 } |
| 3278 |
| 3279 public bool Equals(MessageOptions other) { |
| 3280 if (ReferenceEquals(other, null)) { |
| 3281 return false; |
| 3282 } |
| 3283 if (ReferenceEquals(other, this)) { |
| 3284 return true; |
| 3285 } |
| 3286 if (MessageSetWireFormat != other.MessageSetWireFormat) return false; |
| 3287 if (NoStandardDescriptorAccessor != other.NoStandardDescriptorAccessor) re
turn false; |
| 3288 if (Deprecated != other.Deprecated) return false; |
| 3289 if (MapEntry != other.MapEntry) return false; |
| 3290 if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; |
| 3291 return true; |
| 3292 } |
| 3293 |
| 3294 public override int GetHashCode() { |
| 3295 int hash = 1; |
| 3296 if (MessageSetWireFormat != false) hash ^= MessageSetWireFormat.GetHashCod
e(); |
| 3297 if (NoStandardDescriptorAccessor != false) hash ^= NoStandardDescriptorAcc
essor.GetHashCode(); |
| 3298 if (Deprecated != false) hash ^= Deprecated.GetHashCode(); |
| 3299 if (MapEntry != false) hash ^= MapEntry.GetHashCode(); |
| 3300 hash ^= uninterpretedOption_.GetHashCode(); |
| 3301 return hash; |
| 3302 } |
| 3303 |
| 3304 public override string ToString() { |
| 3305 return pb::JsonFormatter.ToDiagnosticString(this); |
| 3306 } |
| 3307 |
| 3308 public void WriteTo(pb::CodedOutputStream output) { |
| 3309 if (MessageSetWireFormat != false) { |
| 3310 output.WriteRawTag(8); |
| 3311 output.WriteBool(MessageSetWireFormat); |
| 3312 } |
| 3313 if (NoStandardDescriptorAccessor != false) { |
| 3314 output.WriteRawTag(16); |
| 3315 output.WriteBool(NoStandardDescriptorAccessor); |
| 3316 } |
| 3317 if (Deprecated != false) { |
| 3318 output.WriteRawTag(24); |
| 3319 output.WriteBool(Deprecated); |
| 3320 } |
| 3321 if (MapEntry != false) { |
| 3322 output.WriteRawTag(56); |
| 3323 output.WriteBool(MapEntry); |
| 3324 } |
| 3325 uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); |
| 3326 } |
| 3327 |
| 3328 public int CalculateSize() { |
| 3329 int size = 0; |
| 3330 if (MessageSetWireFormat != false) { |
| 3331 size += 1 + 1; |
| 3332 } |
| 3333 if (NoStandardDescriptorAccessor != false) { |
| 3334 size += 1 + 1; |
| 3335 } |
| 3336 if (Deprecated != false) { |
| 3337 size += 1 + 1; |
| 3338 } |
| 3339 if (MapEntry != false) { |
| 3340 size += 1 + 1; |
| 3341 } |
| 3342 size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_c
odec); |
| 3343 return size; |
| 3344 } |
| 3345 |
| 3346 public void MergeFrom(MessageOptions other) { |
| 3347 if (other == null) { |
| 3348 return; |
| 3349 } |
| 3350 if (other.MessageSetWireFormat != false) { |
| 3351 MessageSetWireFormat = other.MessageSetWireFormat; |
| 3352 } |
| 3353 if (other.NoStandardDescriptorAccessor != false) { |
| 3354 NoStandardDescriptorAccessor = other.NoStandardDescriptorAccessor; |
| 3355 } |
| 3356 if (other.Deprecated != false) { |
| 3357 Deprecated = other.Deprecated; |
| 3358 } |
| 3359 if (other.MapEntry != false) { |
| 3360 MapEntry = other.MapEntry; |
| 3361 } |
| 3362 uninterpretedOption_.Add(other.uninterpretedOption_); |
| 3363 } |
| 3364 |
| 3365 public void MergeFrom(pb::CodedInputStream input) { |
| 3366 uint tag; |
| 3367 while ((tag = input.ReadTag()) != 0) { |
| 3368 switch(tag) { |
| 3369 default: |
| 3370 input.SkipLastField(); |
| 3371 break; |
| 3372 case 8: { |
| 3373 MessageSetWireFormat = input.ReadBool(); |
| 3374 break; |
| 3375 } |
| 3376 case 16: { |
| 3377 NoStandardDescriptorAccessor = input.ReadBool(); |
| 3378 break; |
| 3379 } |
| 3380 case 24: { |
| 3381 Deprecated = input.ReadBool(); |
| 3382 break; |
| 3383 } |
| 3384 case 56: { |
| 3385 MapEntry = input.ReadBool(); |
| 3386 break; |
| 3387 } |
| 3388 case 7994: { |
| 3389 uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOp
tion_codec); |
| 3390 break; |
| 3391 } |
| 3392 } |
| 3393 } |
| 3394 } |
| 3395 |
| 3396 } |
| 3397 |
| 3398 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 3399 internal sealed partial class FieldOptions : pb::IMessage<FieldOptions> { |
| 3400 private static readonly pb::MessageParser<FieldOptions> _parser = new pb::Me
ssageParser<FieldOptions>(() => new FieldOptions()); |
| 3401 public static pb::MessageParser<FieldOptions> Parser { get { return _parser;
} } |
| 3402 |
| 3403 public static pbr::MessageDescriptor Descriptor { |
| 3404 get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descr
iptor.MessageTypes[11]; } |
| 3405 } |
| 3406 |
| 3407 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 3408 get { return Descriptor; } |
| 3409 } |
| 3410 |
| 3411 public FieldOptions() { |
| 3412 OnConstruction(); |
| 3413 } |
| 3414 |
| 3415 partial void OnConstruction(); |
| 3416 |
| 3417 public FieldOptions(FieldOptions other) : this() { |
| 3418 ctype_ = other.ctype_; |
| 3419 packed_ = other.packed_; |
| 3420 jstype_ = other.jstype_; |
| 3421 lazy_ = other.lazy_; |
| 3422 deprecated_ = other.deprecated_; |
| 3423 weak_ = other.weak_; |
| 3424 uninterpretedOption_ = other.uninterpretedOption_.Clone(); |
| 3425 } |
| 3426 |
| 3427 public FieldOptions Clone() { |
| 3428 return new FieldOptions(this); |
| 3429 } |
| 3430 |
| 3431 /// <summary>Field number for the "ctype" field.</summary> |
| 3432 public const int CtypeFieldNumber = 1; |
| 3433 private global::Google.Protobuf.Reflection.FieldOptions.Types.CType ctype_ =
global::Google.Protobuf.Reflection.FieldOptions.Types.CType.STRING; |
| 3434 /// <summary> |
| 3435 /// The ctype option instructs the C++ code generator to use a different |
| 3436 /// representation of the field than it normally would. See the specific |
| 3437 /// options below. This option is not yet implemented in the open source |
| 3438 /// release -- sorry, we'll try to include it in a future version! |
| 3439 /// </summary> |
| 3440 public global::Google.Protobuf.Reflection.FieldOptions.Types.CType Ctype { |
| 3441 get { return ctype_; } |
| 3442 set { |
| 3443 ctype_ = value; |
| 3444 } |
| 3445 } |
| 3446 |
| 3447 /// <summary>Field number for the "packed" field.</summary> |
| 3448 public const int PackedFieldNumber = 2; |
| 3449 private bool packed_; |
| 3450 /// <summary> |
| 3451 /// The packed option can be enabled for repeated primitive fields to enabl
e |
| 3452 /// a more efficient representation on the wire. Rather than repeatedly |
| 3453 /// writing the tag and type for each element, the entire array is encoded
as |
| 3454 /// a single length-delimited blob. In proto3, only explicit setting it to |
| 3455 /// false will avoid using packed encoding. |
| 3456 /// </summary> |
| 3457 public bool Packed { |
| 3458 get { return packed_; } |
| 3459 set { |
| 3460 packed_ = value; |
| 3461 } |
| 3462 } |
| 3463 |
| 3464 /// <summary>Field number for the "jstype" field.</summary> |
| 3465 public const int JstypeFieldNumber = 6; |
| 3466 private global::Google.Protobuf.Reflection.FieldOptions.Types.JSType jstype_
= global::Google.Protobuf.Reflection.FieldOptions.Types.JSType.JS_NORMAL; |
| 3467 /// <summary> |
| 3468 /// The jstype option determines the JavaScript type used for values of the |
| 3469 /// field. The option is permitted only for 64 bit integral and fixed type
s |
| 3470 /// (int64, uint64, sint64, fixed64, sfixed64). By default these types are |
| 3471 /// represented as JavaScript strings. This avoids loss of precision that
can |
| 3472 /// happen when a large value is converted to a floating point JavaScript |
| 3473 /// numbers. Specifying JS_NUMBER for the jstype causes the generated |
| 3474 /// JavaScript code to use the JavaScript "number" type instead of strings. |
| 3475 /// This option is an enum to permit additional types to be added, |
| 3476 /// e.g. goog.math.Integer. |
| 3477 /// </summary> |
| 3478 public global::Google.Protobuf.Reflection.FieldOptions.Types.JSType Jstype { |
| 3479 get { return jstype_; } |
| 3480 set { |
| 3481 jstype_ = value; |
| 3482 } |
| 3483 } |
| 3484 |
| 3485 /// <summary>Field number for the "lazy" field.</summary> |
| 3486 public const int LazyFieldNumber = 5; |
| 3487 private bool lazy_; |
| 3488 /// <summary> |
| 3489 /// Should this field be parsed lazily? Lazy applies only to message-type |
| 3490 /// fields. It means that when the outer message is initially parsed, the |
| 3491 /// inner message's contents will not be parsed but instead stored in encod
ed |
| 3492 /// form. The inner message will actually be parsed when it is first acces
sed. |
| 3493 /// |
| 3494 /// This is only a hint. Implementations are free to choose whether to use |
| 3495 /// eager or lazy parsing regardless of the value of this option. However, |
| 3496 /// setting this option true suggests that the protocol author believes tha
t |
| 3497 /// using lazy parsing on this field is worth the additional bookkeeping |
| 3498 /// overhead typically needed to implement it. |
| 3499 /// |
| 3500 /// This option does not affect the public interface of any generated code; |
| 3501 /// all method signatures remain the same. Furthermore, thread-safety of t
he |
| 3502 /// interface is not affected by this option; const methods remain safe to |
| 3503 /// call from multiple threads concurrently, while non-const methods contin
ue |
| 3504 /// to require exclusive access. |
| 3505 /// |
| 3506 /// Note that implementations may choose not to check required fields withi
n |
| 3507 /// a lazy sub-message. That is, calling IsInitialized() on the outher mes
sage |
| 3508 /// may return true even if the inner message has missing required fields. |
| 3509 /// This is necessary because otherwise the inner message would have to be |
| 3510 /// parsed in order to perform the check, defeating the purpose of lazy |
| 3511 /// parsing. An implementation which chooses not to check required fields |
| 3512 /// must be consistent about it. That is, for any particular sub-message,
the |
| 3513 /// implementation must either *always* check its required fields, or *neve
r* |
| 3514 /// check its required fields, regardless of whether or not the message has |
| 3515 /// been parsed. |
| 3516 /// </summary> |
| 3517 public bool Lazy { |
| 3518 get { return lazy_; } |
| 3519 set { |
| 3520 lazy_ = value; |
| 3521 } |
| 3522 } |
| 3523 |
| 3524 /// <summary>Field number for the "deprecated" field.</summary> |
| 3525 public const int DeprecatedFieldNumber = 3; |
| 3526 private bool deprecated_; |
| 3527 /// <summary> |
| 3528 /// Is this field deprecated? |
| 3529 /// Depending on the target platform, this can emit Deprecated annotations |
| 3530 /// for accessors, or it will be completely ignored; in the very least, thi
s |
| 3531 /// is a formalization for deprecating fields. |
| 3532 /// </summary> |
| 3533 public bool Deprecated { |
| 3534 get { return deprecated_; } |
| 3535 set { |
| 3536 deprecated_ = value; |
| 3537 } |
| 3538 } |
| 3539 |
| 3540 /// <summary>Field number for the "weak" field.</summary> |
| 3541 public const int WeakFieldNumber = 10; |
| 3542 private bool weak_; |
| 3543 /// <summary> |
| 3544 /// For Google-internal migration only. Do not use. |
| 3545 /// </summary> |
| 3546 public bool Weak { |
| 3547 get { return weak_; } |
| 3548 set { |
| 3549 weak_ = value; |
| 3550 } |
| 3551 } |
| 3552 |
| 3553 /// <summary>Field number for the "uninterpreted_option" field.</summary> |
| 3554 public const int UninterpretedOptionFieldNumber = 999; |
| 3555 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.Un
interpretedOption> _repeated_uninterpretedOption_codec |
| 3556 = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.Uni
nterpretedOption.Parser); |
| 3557 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.Unint
erpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Pro
tobuf.Reflection.UninterpretedOption>(); |
| 3558 /// <summary> |
| 3559 /// The parser stores options it doesn't recognize here. See above. |
| 3560 /// </summary> |
| 3561 public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOp
tion> UninterpretedOption { |
| 3562 get { return uninterpretedOption_; } |
| 3563 } |
| 3564 |
| 3565 public override bool Equals(object other) { |
| 3566 return Equals(other as FieldOptions); |
| 3567 } |
| 3568 |
| 3569 public bool Equals(FieldOptions other) { |
| 3570 if (ReferenceEquals(other, null)) { |
| 3571 return false; |
| 3572 } |
| 3573 if (ReferenceEquals(other, this)) { |
| 3574 return true; |
| 3575 } |
| 3576 if (Ctype != other.Ctype) return false; |
| 3577 if (Packed != other.Packed) return false; |
| 3578 if (Jstype != other.Jstype) return false; |
| 3579 if (Lazy != other.Lazy) return false; |
| 3580 if (Deprecated != other.Deprecated) return false; |
| 3581 if (Weak != other.Weak) return false; |
| 3582 if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; |
| 3583 return true; |
| 3584 } |
| 3585 |
| 3586 public override int GetHashCode() { |
| 3587 int hash = 1; |
| 3588 if (Ctype != global::Google.Protobuf.Reflection.FieldOptions.Types.CType.S
TRING) hash ^= Ctype.GetHashCode(); |
| 3589 if (Packed != false) hash ^= Packed.GetHashCode(); |
| 3590 if (Jstype != global::Google.Protobuf.Reflection.FieldOptions.Types.JSType
.JS_NORMAL) hash ^= Jstype.GetHashCode(); |
| 3591 if (Lazy != false) hash ^= Lazy.GetHashCode(); |
| 3592 if (Deprecated != false) hash ^= Deprecated.GetHashCode(); |
| 3593 if (Weak != false) hash ^= Weak.GetHashCode(); |
| 3594 hash ^= uninterpretedOption_.GetHashCode(); |
| 3595 return hash; |
| 3596 } |
| 3597 |
| 3598 public override string ToString() { |
| 3599 return pb::JsonFormatter.ToDiagnosticString(this); |
| 3600 } |
| 3601 |
| 3602 public void WriteTo(pb::CodedOutputStream output) { |
| 3603 if (Ctype != global::Google.Protobuf.Reflection.FieldOptions.Types.CType.S
TRING) { |
| 3604 output.WriteRawTag(8); |
| 3605 output.WriteEnum((int) Ctype); |
| 3606 } |
| 3607 if (Packed != false) { |
| 3608 output.WriteRawTag(16); |
| 3609 output.WriteBool(Packed); |
| 3610 } |
| 3611 if (Deprecated != false) { |
| 3612 output.WriteRawTag(24); |
| 3613 output.WriteBool(Deprecated); |
| 3614 } |
| 3615 if (Lazy != false) { |
| 3616 output.WriteRawTag(40); |
| 3617 output.WriteBool(Lazy); |
| 3618 } |
| 3619 if (Jstype != global::Google.Protobuf.Reflection.FieldOptions.Types.JSType
.JS_NORMAL) { |
| 3620 output.WriteRawTag(48); |
| 3621 output.WriteEnum((int) Jstype); |
| 3622 } |
| 3623 if (Weak != false) { |
| 3624 output.WriteRawTag(80); |
| 3625 output.WriteBool(Weak); |
| 3626 } |
| 3627 uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); |
| 3628 } |
| 3629 |
| 3630 public int CalculateSize() { |
| 3631 int size = 0; |
| 3632 if (Ctype != global::Google.Protobuf.Reflection.FieldOptions.Types.CType.S
TRING) { |
| 3633 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Ctype); |
| 3634 } |
| 3635 if (Packed != false) { |
| 3636 size += 1 + 1; |
| 3637 } |
| 3638 if (Jstype != global::Google.Protobuf.Reflection.FieldOptions.Types.JSType
.JS_NORMAL) { |
| 3639 size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Jstype); |
| 3640 } |
| 3641 if (Lazy != false) { |
| 3642 size += 1 + 1; |
| 3643 } |
| 3644 if (Deprecated != false) { |
| 3645 size += 1 + 1; |
| 3646 } |
| 3647 if (Weak != false) { |
| 3648 size += 1 + 1; |
| 3649 } |
| 3650 size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_c
odec); |
| 3651 return size; |
| 3652 } |
| 3653 |
| 3654 public void MergeFrom(FieldOptions other) { |
| 3655 if (other == null) { |
| 3656 return; |
| 3657 } |
| 3658 if (other.Ctype != global::Google.Protobuf.Reflection.FieldOptions.Types.C
Type.STRING) { |
| 3659 Ctype = other.Ctype; |
| 3660 } |
| 3661 if (other.Packed != false) { |
| 3662 Packed = other.Packed; |
| 3663 } |
| 3664 if (other.Jstype != global::Google.Protobuf.Reflection.FieldOptions.Types.
JSType.JS_NORMAL) { |
| 3665 Jstype = other.Jstype; |
| 3666 } |
| 3667 if (other.Lazy != false) { |
| 3668 Lazy = other.Lazy; |
| 3669 } |
| 3670 if (other.Deprecated != false) { |
| 3671 Deprecated = other.Deprecated; |
| 3672 } |
| 3673 if (other.Weak != false) { |
| 3674 Weak = other.Weak; |
| 3675 } |
| 3676 uninterpretedOption_.Add(other.uninterpretedOption_); |
| 3677 } |
| 3678 |
| 3679 public void MergeFrom(pb::CodedInputStream input) { |
| 3680 uint tag; |
| 3681 while ((tag = input.ReadTag()) != 0) { |
| 3682 switch(tag) { |
| 3683 default: |
| 3684 input.SkipLastField(); |
| 3685 break; |
| 3686 case 8: { |
| 3687 ctype_ = (global::Google.Protobuf.Reflection.FieldOptions.Types.CTyp
e) input.ReadEnum(); |
| 3688 break; |
| 3689 } |
| 3690 case 16: { |
| 3691 Packed = input.ReadBool(); |
| 3692 break; |
| 3693 } |
| 3694 case 24: { |
| 3695 Deprecated = input.ReadBool(); |
| 3696 break; |
| 3697 } |
| 3698 case 40: { |
| 3699 Lazy = input.ReadBool(); |
| 3700 break; |
| 3701 } |
| 3702 case 48: { |
| 3703 jstype_ = (global::Google.Protobuf.Reflection.FieldOptions.Types.JST
ype) input.ReadEnum(); |
| 3704 break; |
| 3705 } |
| 3706 case 80: { |
| 3707 Weak = input.ReadBool(); |
| 3708 break; |
| 3709 } |
| 3710 case 7994: { |
| 3711 uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOp
tion_codec); |
| 3712 break; |
| 3713 } |
| 3714 } |
| 3715 } |
| 3716 } |
| 3717 |
| 3718 #region Nested types |
| 3719 /// <summary>Container for nested types declared in the FieldOptions message
type.</summary> |
| 3720 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 3721 public static partial class Types { |
| 3722 internal enum CType { |
| 3723 /// <summary> |
| 3724 /// Default mode. |
| 3725 /// </summary> |
| 3726 STRING = 0, |
| 3727 CORD = 1, |
| 3728 STRING_PIECE = 2, |
| 3729 } |
| 3730 |
| 3731 internal enum JSType { |
| 3732 /// <summary> |
| 3733 /// Use the default type. |
| 3734 /// </summary> |
| 3735 JS_NORMAL = 0, |
| 3736 /// <summary> |
| 3737 /// Use JavaScript strings. |
| 3738 /// </summary> |
| 3739 JS_STRING = 1, |
| 3740 /// <summary> |
| 3741 /// Use JavaScript numbers. |
| 3742 /// </summary> |
| 3743 JS_NUMBER = 2, |
| 3744 } |
| 3745 |
| 3746 } |
| 3747 #endregion |
| 3748 |
| 3749 } |
| 3750 |
| 3751 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 3752 internal sealed partial class EnumOptions : pb::IMessage<EnumOptions> { |
| 3753 private static readonly pb::MessageParser<EnumOptions> _parser = new pb::Mes
sageParser<EnumOptions>(() => new EnumOptions()); |
| 3754 public static pb::MessageParser<EnumOptions> Parser { get { return _parser;
} } |
| 3755 |
| 3756 public static pbr::MessageDescriptor Descriptor { |
| 3757 get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descr
iptor.MessageTypes[12]; } |
| 3758 } |
| 3759 |
| 3760 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 3761 get { return Descriptor; } |
| 3762 } |
| 3763 |
| 3764 public EnumOptions() { |
| 3765 OnConstruction(); |
| 3766 } |
| 3767 |
| 3768 partial void OnConstruction(); |
| 3769 |
| 3770 public EnumOptions(EnumOptions other) : this() { |
| 3771 allowAlias_ = other.allowAlias_; |
| 3772 deprecated_ = other.deprecated_; |
| 3773 uninterpretedOption_ = other.uninterpretedOption_.Clone(); |
| 3774 } |
| 3775 |
| 3776 public EnumOptions Clone() { |
| 3777 return new EnumOptions(this); |
| 3778 } |
| 3779 |
| 3780 /// <summary>Field number for the "allow_alias" field.</summary> |
| 3781 public const int AllowAliasFieldNumber = 2; |
| 3782 private bool allowAlias_; |
| 3783 /// <summary> |
| 3784 /// Set this option to true to allow mapping different tag names to the sam
e |
| 3785 /// value. |
| 3786 /// </summary> |
| 3787 public bool AllowAlias { |
| 3788 get { return allowAlias_; } |
| 3789 set { |
| 3790 allowAlias_ = value; |
| 3791 } |
| 3792 } |
| 3793 |
| 3794 /// <summary>Field number for the "deprecated" field.</summary> |
| 3795 public const int DeprecatedFieldNumber = 3; |
| 3796 private bool deprecated_; |
| 3797 /// <summary> |
| 3798 /// Is this enum deprecated? |
| 3799 /// Depending on the target platform, this can emit Deprecated annotations |
| 3800 /// for the enum, or it will be completely ignored; in the very least, this |
| 3801 /// is a formalization for deprecating enums. |
| 3802 /// </summary> |
| 3803 public bool Deprecated { |
| 3804 get { return deprecated_; } |
| 3805 set { |
| 3806 deprecated_ = value; |
| 3807 } |
| 3808 } |
| 3809 |
| 3810 /// <summary>Field number for the "uninterpreted_option" field.</summary> |
| 3811 public const int UninterpretedOptionFieldNumber = 999; |
| 3812 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.Un
interpretedOption> _repeated_uninterpretedOption_codec |
| 3813 = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.Uni
nterpretedOption.Parser); |
| 3814 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.Unint
erpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Pro
tobuf.Reflection.UninterpretedOption>(); |
| 3815 /// <summary> |
| 3816 /// The parser stores options it doesn't recognize here. See above. |
| 3817 /// </summary> |
| 3818 public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOp
tion> UninterpretedOption { |
| 3819 get { return uninterpretedOption_; } |
| 3820 } |
| 3821 |
| 3822 public override bool Equals(object other) { |
| 3823 return Equals(other as EnumOptions); |
| 3824 } |
| 3825 |
| 3826 public bool Equals(EnumOptions other) { |
| 3827 if (ReferenceEquals(other, null)) { |
| 3828 return false; |
| 3829 } |
| 3830 if (ReferenceEquals(other, this)) { |
| 3831 return true; |
| 3832 } |
| 3833 if (AllowAlias != other.AllowAlias) return false; |
| 3834 if (Deprecated != other.Deprecated) return false; |
| 3835 if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; |
| 3836 return true; |
| 3837 } |
| 3838 |
| 3839 public override int GetHashCode() { |
| 3840 int hash = 1; |
| 3841 if (AllowAlias != false) hash ^= AllowAlias.GetHashCode(); |
| 3842 if (Deprecated != false) hash ^= Deprecated.GetHashCode(); |
| 3843 hash ^= uninterpretedOption_.GetHashCode(); |
| 3844 return hash; |
| 3845 } |
| 3846 |
| 3847 public override string ToString() { |
| 3848 return pb::JsonFormatter.ToDiagnosticString(this); |
| 3849 } |
| 3850 |
| 3851 public void WriteTo(pb::CodedOutputStream output) { |
| 3852 if (AllowAlias != false) { |
| 3853 output.WriteRawTag(16); |
| 3854 output.WriteBool(AllowAlias); |
| 3855 } |
| 3856 if (Deprecated != false) { |
| 3857 output.WriteRawTag(24); |
| 3858 output.WriteBool(Deprecated); |
| 3859 } |
| 3860 uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); |
| 3861 } |
| 3862 |
| 3863 public int CalculateSize() { |
| 3864 int size = 0; |
| 3865 if (AllowAlias != false) { |
| 3866 size += 1 + 1; |
| 3867 } |
| 3868 if (Deprecated != false) { |
| 3869 size += 1 + 1; |
| 3870 } |
| 3871 size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_c
odec); |
| 3872 return size; |
| 3873 } |
| 3874 |
| 3875 public void MergeFrom(EnumOptions other) { |
| 3876 if (other == null) { |
| 3877 return; |
| 3878 } |
| 3879 if (other.AllowAlias != false) { |
| 3880 AllowAlias = other.AllowAlias; |
| 3881 } |
| 3882 if (other.Deprecated != false) { |
| 3883 Deprecated = other.Deprecated; |
| 3884 } |
| 3885 uninterpretedOption_.Add(other.uninterpretedOption_); |
| 3886 } |
| 3887 |
| 3888 public void MergeFrom(pb::CodedInputStream input) { |
| 3889 uint tag; |
| 3890 while ((tag = input.ReadTag()) != 0) { |
| 3891 switch(tag) { |
| 3892 default: |
| 3893 input.SkipLastField(); |
| 3894 break; |
| 3895 case 16: { |
| 3896 AllowAlias = input.ReadBool(); |
| 3897 break; |
| 3898 } |
| 3899 case 24: { |
| 3900 Deprecated = input.ReadBool(); |
| 3901 break; |
| 3902 } |
| 3903 case 7994: { |
| 3904 uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOp
tion_codec); |
| 3905 break; |
| 3906 } |
| 3907 } |
| 3908 } |
| 3909 } |
| 3910 |
| 3911 } |
| 3912 |
| 3913 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 3914 internal sealed partial class EnumValueOptions : pb::IMessage<EnumValueOptions
> { |
| 3915 private static readonly pb::MessageParser<EnumValueOptions> _parser = new pb
::MessageParser<EnumValueOptions>(() => new EnumValueOptions()); |
| 3916 public static pb::MessageParser<EnumValueOptions> Parser { get { return _par
ser; } } |
| 3917 |
| 3918 public static pbr::MessageDescriptor Descriptor { |
| 3919 get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descr
iptor.MessageTypes[13]; } |
| 3920 } |
| 3921 |
| 3922 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 3923 get { return Descriptor; } |
| 3924 } |
| 3925 |
| 3926 public EnumValueOptions() { |
| 3927 OnConstruction(); |
| 3928 } |
| 3929 |
| 3930 partial void OnConstruction(); |
| 3931 |
| 3932 public EnumValueOptions(EnumValueOptions other) : this() { |
| 3933 deprecated_ = other.deprecated_; |
| 3934 uninterpretedOption_ = other.uninterpretedOption_.Clone(); |
| 3935 } |
| 3936 |
| 3937 public EnumValueOptions Clone() { |
| 3938 return new EnumValueOptions(this); |
| 3939 } |
| 3940 |
| 3941 /// <summary>Field number for the "deprecated" field.</summary> |
| 3942 public const int DeprecatedFieldNumber = 1; |
| 3943 private bool deprecated_; |
| 3944 /// <summary> |
| 3945 /// Is this enum value deprecated? |
| 3946 /// Depending on the target platform, this can emit Deprecated annotations |
| 3947 /// for the enum value, or it will be completely ignored; in the very least
, |
| 3948 /// this is a formalization for deprecating enum values. |
| 3949 /// </summary> |
| 3950 public bool Deprecated { |
| 3951 get { return deprecated_; } |
| 3952 set { |
| 3953 deprecated_ = value; |
| 3954 } |
| 3955 } |
| 3956 |
| 3957 /// <summary>Field number for the "uninterpreted_option" field.</summary> |
| 3958 public const int UninterpretedOptionFieldNumber = 999; |
| 3959 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.Un
interpretedOption> _repeated_uninterpretedOption_codec |
| 3960 = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.Uni
nterpretedOption.Parser); |
| 3961 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.Unint
erpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Pro
tobuf.Reflection.UninterpretedOption>(); |
| 3962 /// <summary> |
| 3963 /// The parser stores options it doesn't recognize here. See above. |
| 3964 /// </summary> |
| 3965 public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOp
tion> UninterpretedOption { |
| 3966 get { return uninterpretedOption_; } |
| 3967 } |
| 3968 |
| 3969 public override bool Equals(object other) { |
| 3970 return Equals(other as EnumValueOptions); |
| 3971 } |
| 3972 |
| 3973 public bool Equals(EnumValueOptions other) { |
| 3974 if (ReferenceEquals(other, null)) { |
| 3975 return false; |
| 3976 } |
| 3977 if (ReferenceEquals(other, this)) { |
| 3978 return true; |
| 3979 } |
| 3980 if (Deprecated != other.Deprecated) return false; |
| 3981 if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; |
| 3982 return true; |
| 3983 } |
| 3984 |
| 3985 public override int GetHashCode() { |
| 3986 int hash = 1; |
| 3987 if (Deprecated != false) hash ^= Deprecated.GetHashCode(); |
| 3988 hash ^= uninterpretedOption_.GetHashCode(); |
| 3989 return hash; |
| 3990 } |
| 3991 |
| 3992 public override string ToString() { |
| 3993 return pb::JsonFormatter.ToDiagnosticString(this); |
| 3994 } |
| 3995 |
| 3996 public void WriteTo(pb::CodedOutputStream output) { |
| 3997 if (Deprecated != false) { |
| 3998 output.WriteRawTag(8); |
| 3999 output.WriteBool(Deprecated); |
| 4000 } |
| 4001 uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); |
| 4002 } |
| 4003 |
| 4004 public int CalculateSize() { |
| 4005 int size = 0; |
| 4006 if (Deprecated != false) { |
| 4007 size += 1 + 1; |
| 4008 } |
| 4009 size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_c
odec); |
| 4010 return size; |
| 4011 } |
| 4012 |
| 4013 public void MergeFrom(EnumValueOptions other) { |
| 4014 if (other == null) { |
| 4015 return; |
| 4016 } |
| 4017 if (other.Deprecated != false) { |
| 4018 Deprecated = other.Deprecated; |
| 4019 } |
| 4020 uninterpretedOption_.Add(other.uninterpretedOption_); |
| 4021 } |
| 4022 |
| 4023 public void MergeFrom(pb::CodedInputStream input) { |
| 4024 uint tag; |
| 4025 while ((tag = input.ReadTag()) != 0) { |
| 4026 switch(tag) { |
| 4027 default: |
| 4028 input.SkipLastField(); |
| 4029 break; |
| 4030 case 8: { |
| 4031 Deprecated = input.ReadBool(); |
| 4032 break; |
| 4033 } |
| 4034 case 7994: { |
| 4035 uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOp
tion_codec); |
| 4036 break; |
| 4037 } |
| 4038 } |
| 4039 } |
| 4040 } |
| 4041 |
| 4042 } |
| 4043 |
| 4044 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 4045 internal sealed partial class ServiceOptions : pb::IMessage<ServiceOptions> { |
| 4046 private static readonly pb::MessageParser<ServiceOptions> _parser = new pb::
MessageParser<ServiceOptions>(() => new ServiceOptions()); |
| 4047 public static pb::MessageParser<ServiceOptions> Parser { get { return _parse
r; } } |
| 4048 |
| 4049 public static pbr::MessageDescriptor Descriptor { |
| 4050 get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descr
iptor.MessageTypes[14]; } |
| 4051 } |
| 4052 |
| 4053 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4054 get { return Descriptor; } |
| 4055 } |
| 4056 |
| 4057 public ServiceOptions() { |
| 4058 OnConstruction(); |
| 4059 } |
| 4060 |
| 4061 partial void OnConstruction(); |
| 4062 |
| 4063 public ServiceOptions(ServiceOptions other) : this() { |
| 4064 deprecated_ = other.deprecated_; |
| 4065 uninterpretedOption_ = other.uninterpretedOption_.Clone(); |
| 4066 } |
| 4067 |
| 4068 public ServiceOptions Clone() { |
| 4069 return new ServiceOptions(this); |
| 4070 } |
| 4071 |
| 4072 /// <summary>Field number for the "deprecated" field.</summary> |
| 4073 public const int DeprecatedFieldNumber = 33; |
| 4074 private bool deprecated_; |
| 4075 /// <summary> |
| 4076 /// Is this service deprecated? |
| 4077 /// Depending on the target platform, this can emit Deprecated annotations |
| 4078 /// for the service, or it will be completely ignored; in the very least, |
| 4079 /// this is a formalization for deprecating services. |
| 4080 /// </summary> |
| 4081 public bool Deprecated { |
| 4082 get { return deprecated_; } |
| 4083 set { |
| 4084 deprecated_ = value; |
| 4085 } |
| 4086 } |
| 4087 |
| 4088 /// <summary>Field number for the "uninterpreted_option" field.</summary> |
| 4089 public const int UninterpretedOptionFieldNumber = 999; |
| 4090 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.Un
interpretedOption> _repeated_uninterpretedOption_codec |
| 4091 = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.Uni
nterpretedOption.Parser); |
| 4092 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.Unint
erpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Pro
tobuf.Reflection.UninterpretedOption>(); |
| 4093 /// <summary> |
| 4094 /// The parser stores options it doesn't recognize here. See above. |
| 4095 /// </summary> |
| 4096 public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOp
tion> UninterpretedOption { |
| 4097 get { return uninterpretedOption_; } |
| 4098 } |
| 4099 |
| 4100 public override bool Equals(object other) { |
| 4101 return Equals(other as ServiceOptions); |
| 4102 } |
| 4103 |
| 4104 public bool Equals(ServiceOptions other) { |
| 4105 if (ReferenceEquals(other, null)) { |
| 4106 return false; |
| 4107 } |
| 4108 if (ReferenceEquals(other, this)) { |
| 4109 return true; |
| 4110 } |
| 4111 if (Deprecated != other.Deprecated) return false; |
| 4112 if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; |
| 4113 return true; |
| 4114 } |
| 4115 |
| 4116 public override int GetHashCode() { |
| 4117 int hash = 1; |
| 4118 if (Deprecated != false) hash ^= Deprecated.GetHashCode(); |
| 4119 hash ^= uninterpretedOption_.GetHashCode(); |
| 4120 return hash; |
| 4121 } |
| 4122 |
| 4123 public override string ToString() { |
| 4124 return pb::JsonFormatter.ToDiagnosticString(this); |
| 4125 } |
| 4126 |
| 4127 public void WriteTo(pb::CodedOutputStream output) { |
| 4128 if (Deprecated != false) { |
| 4129 output.WriteRawTag(136, 2); |
| 4130 output.WriteBool(Deprecated); |
| 4131 } |
| 4132 uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); |
| 4133 } |
| 4134 |
| 4135 public int CalculateSize() { |
| 4136 int size = 0; |
| 4137 if (Deprecated != false) { |
| 4138 size += 2 + 1; |
| 4139 } |
| 4140 size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_c
odec); |
| 4141 return size; |
| 4142 } |
| 4143 |
| 4144 public void MergeFrom(ServiceOptions other) { |
| 4145 if (other == null) { |
| 4146 return; |
| 4147 } |
| 4148 if (other.Deprecated != false) { |
| 4149 Deprecated = other.Deprecated; |
| 4150 } |
| 4151 uninterpretedOption_.Add(other.uninterpretedOption_); |
| 4152 } |
| 4153 |
| 4154 public void MergeFrom(pb::CodedInputStream input) { |
| 4155 uint tag; |
| 4156 while ((tag = input.ReadTag()) != 0) { |
| 4157 switch(tag) { |
| 4158 default: |
| 4159 input.SkipLastField(); |
| 4160 break; |
| 4161 case 264: { |
| 4162 Deprecated = input.ReadBool(); |
| 4163 break; |
| 4164 } |
| 4165 case 7994: { |
| 4166 uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOp
tion_codec); |
| 4167 break; |
| 4168 } |
| 4169 } |
| 4170 } |
| 4171 } |
| 4172 |
| 4173 } |
| 4174 |
| 4175 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 4176 internal sealed partial class MethodOptions : pb::IMessage<MethodOptions> { |
| 4177 private static readonly pb::MessageParser<MethodOptions> _parser = new pb::M
essageParser<MethodOptions>(() => new MethodOptions()); |
| 4178 public static pb::MessageParser<MethodOptions> Parser { get { return _parser
; } } |
| 4179 |
| 4180 public static pbr::MessageDescriptor Descriptor { |
| 4181 get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descr
iptor.MessageTypes[15]; } |
| 4182 } |
| 4183 |
| 4184 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4185 get { return Descriptor; } |
| 4186 } |
| 4187 |
| 4188 public MethodOptions() { |
| 4189 OnConstruction(); |
| 4190 } |
| 4191 |
| 4192 partial void OnConstruction(); |
| 4193 |
| 4194 public MethodOptions(MethodOptions other) : this() { |
| 4195 deprecated_ = other.deprecated_; |
| 4196 uninterpretedOption_ = other.uninterpretedOption_.Clone(); |
| 4197 } |
| 4198 |
| 4199 public MethodOptions Clone() { |
| 4200 return new MethodOptions(this); |
| 4201 } |
| 4202 |
| 4203 /// <summary>Field number for the "deprecated" field.</summary> |
| 4204 public const int DeprecatedFieldNumber = 33; |
| 4205 private bool deprecated_; |
| 4206 /// <summary> |
| 4207 /// Is this method deprecated? |
| 4208 /// Depending on the target platform, this can emit Deprecated annotations |
| 4209 /// for the method, or it will be completely ignored; in the very least, |
| 4210 /// this is a formalization for deprecating methods. |
| 4211 /// </summary> |
| 4212 public bool Deprecated { |
| 4213 get { return deprecated_; } |
| 4214 set { |
| 4215 deprecated_ = value; |
| 4216 } |
| 4217 } |
| 4218 |
| 4219 /// <summary>Field number for the "uninterpreted_option" field.</summary> |
| 4220 public const int UninterpretedOptionFieldNumber = 999; |
| 4221 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.Un
interpretedOption> _repeated_uninterpretedOption_codec |
| 4222 = pb::FieldCodec.ForMessage(7994, global::Google.Protobuf.Reflection.Uni
nterpretedOption.Parser); |
| 4223 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.Unint
erpretedOption> uninterpretedOption_ = new pbc::RepeatedField<global::Google.Pro
tobuf.Reflection.UninterpretedOption>(); |
| 4224 /// <summary> |
| 4225 /// The parser stores options it doesn't recognize here. See above. |
| 4226 /// </summary> |
| 4227 public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOp
tion> UninterpretedOption { |
| 4228 get { return uninterpretedOption_; } |
| 4229 } |
| 4230 |
| 4231 public override bool Equals(object other) { |
| 4232 return Equals(other as MethodOptions); |
| 4233 } |
| 4234 |
| 4235 public bool Equals(MethodOptions other) { |
| 4236 if (ReferenceEquals(other, null)) { |
| 4237 return false; |
| 4238 } |
| 4239 if (ReferenceEquals(other, this)) { |
| 4240 return true; |
| 4241 } |
| 4242 if (Deprecated != other.Deprecated) return false; |
| 4243 if(!uninterpretedOption_.Equals(other.uninterpretedOption_)) return false; |
| 4244 return true; |
| 4245 } |
| 4246 |
| 4247 public override int GetHashCode() { |
| 4248 int hash = 1; |
| 4249 if (Deprecated != false) hash ^= Deprecated.GetHashCode(); |
| 4250 hash ^= uninterpretedOption_.GetHashCode(); |
| 4251 return hash; |
| 4252 } |
| 4253 |
| 4254 public override string ToString() { |
| 4255 return pb::JsonFormatter.ToDiagnosticString(this); |
| 4256 } |
| 4257 |
| 4258 public void WriteTo(pb::CodedOutputStream output) { |
| 4259 if (Deprecated != false) { |
| 4260 output.WriteRawTag(136, 2); |
| 4261 output.WriteBool(Deprecated); |
| 4262 } |
| 4263 uninterpretedOption_.WriteTo(output, _repeated_uninterpretedOption_codec); |
| 4264 } |
| 4265 |
| 4266 public int CalculateSize() { |
| 4267 int size = 0; |
| 4268 if (Deprecated != false) { |
| 4269 size += 2 + 1; |
| 4270 } |
| 4271 size += uninterpretedOption_.CalculateSize(_repeated_uninterpretedOption_c
odec); |
| 4272 return size; |
| 4273 } |
| 4274 |
| 4275 public void MergeFrom(MethodOptions other) { |
| 4276 if (other == null) { |
| 4277 return; |
| 4278 } |
| 4279 if (other.Deprecated != false) { |
| 4280 Deprecated = other.Deprecated; |
| 4281 } |
| 4282 uninterpretedOption_.Add(other.uninterpretedOption_); |
| 4283 } |
| 4284 |
| 4285 public void MergeFrom(pb::CodedInputStream input) { |
| 4286 uint tag; |
| 4287 while ((tag = input.ReadTag()) != 0) { |
| 4288 switch(tag) { |
| 4289 default: |
| 4290 input.SkipLastField(); |
| 4291 break; |
| 4292 case 264: { |
| 4293 Deprecated = input.ReadBool(); |
| 4294 break; |
| 4295 } |
| 4296 case 7994: { |
| 4297 uninterpretedOption_.AddEntriesFrom(input, _repeated_uninterpretedOp
tion_codec); |
| 4298 break; |
| 4299 } |
| 4300 } |
| 4301 } |
| 4302 } |
| 4303 |
| 4304 } |
| 4305 |
| 4306 /// <summary> |
| 4307 /// A message representing a option the parser does not recognize. This only |
| 4308 /// appears in options protos created by the compiler::Parser class. |
| 4309 /// DescriptorPool resolves these when building Descriptor objects. Therefore
, |
| 4310 /// options protos in descriptor objects (e.g. returned by Descriptor::option
s(), |
| 4311 /// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions |
| 4312 /// in them. |
| 4313 /// </summary> |
| 4314 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 4315 internal sealed partial class UninterpretedOption : pb::IMessage<Uninterpreted
Option> { |
| 4316 private static readonly pb::MessageParser<UninterpretedOption> _parser = new
pb::MessageParser<UninterpretedOption>(() => new UninterpretedOption()); |
| 4317 public static pb::MessageParser<UninterpretedOption> Parser { get { return _
parser; } } |
| 4318 |
| 4319 public static pbr::MessageDescriptor Descriptor { |
| 4320 get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descr
iptor.MessageTypes[16]; } |
| 4321 } |
| 4322 |
| 4323 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4324 get { return Descriptor; } |
| 4325 } |
| 4326 |
| 4327 public UninterpretedOption() { |
| 4328 OnConstruction(); |
| 4329 } |
| 4330 |
| 4331 partial void OnConstruction(); |
| 4332 |
| 4333 public UninterpretedOption(UninterpretedOption other) : this() { |
| 4334 name_ = other.name_.Clone(); |
| 4335 identifierValue_ = other.identifierValue_; |
| 4336 positiveIntValue_ = other.positiveIntValue_; |
| 4337 negativeIntValue_ = other.negativeIntValue_; |
| 4338 doubleValue_ = other.doubleValue_; |
| 4339 stringValue_ = other.stringValue_; |
| 4340 aggregateValue_ = other.aggregateValue_; |
| 4341 } |
| 4342 |
| 4343 public UninterpretedOption Clone() { |
| 4344 return new UninterpretedOption(this); |
| 4345 } |
| 4346 |
| 4347 /// <summary>Field number for the "name" field.</summary> |
| 4348 public const int NameFieldNumber = 2; |
| 4349 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.Un
interpretedOption.Types.NamePart> _repeated_name_codec |
| 4350 = pb::FieldCodec.ForMessage(18, global::Google.Protobuf.Reflection.Unint
erpretedOption.Types.NamePart.Parser); |
| 4351 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.Unint
erpretedOption.Types.NamePart> name_ = new pbc::RepeatedField<global::Google.Pro
tobuf.Reflection.UninterpretedOption.Types.NamePart>(); |
| 4352 public pbc::RepeatedField<global::Google.Protobuf.Reflection.UninterpretedOp
tion.Types.NamePart> Name { |
| 4353 get { return name_; } |
| 4354 } |
| 4355 |
| 4356 /// <summary>Field number for the "identifier_value" field.</summary> |
| 4357 public const int IdentifierValueFieldNumber = 3; |
| 4358 private string identifierValue_ = ""; |
| 4359 /// <summary> |
| 4360 /// The value of the uninterpreted option, in whatever type the tokenizer |
| 4361 /// identified it as during parsing. Exactly one of these should be set. |
| 4362 /// </summary> |
| 4363 public string IdentifierValue { |
| 4364 get { return identifierValue_; } |
| 4365 set { |
| 4366 identifierValue_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 4367 } |
| 4368 } |
| 4369 |
| 4370 /// <summary>Field number for the "positive_int_value" field.</summary> |
| 4371 public const int PositiveIntValueFieldNumber = 4; |
| 4372 private ulong positiveIntValue_; |
| 4373 public ulong PositiveIntValue { |
| 4374 get { return positiveIntValue_; } |
| 4375 set { |
| 4376 positiveIntValue_ = value; |
| 4377 } |
| 4378 } |
| 4379 |
| 4380 /// <summary>Field number for the "negative_int_value" field.</summary> |
| 4381 public const int NegativeIntValueFieldNumber = 5; |
| 4382 private long negativeIntValue_; |
| 4383 public long NegativeIntValue { |
| 4384 get { return negativeIntValue_; } |
| 4385 set { |
| 4386 negativeIntValue_ = value; |
| 4387 } |
| 4388 } |
| 4389 |
| 4390 /// <summary>Field number for the "double_value" field.</summary> |
| 4391 public const int DoubleValueFieldNumber = 6; |
| 4392 private double doubleValue_; |
| 4393 public double DoubleValue { |
| 4394 get { return doubleValue_; } |
| 4395 set { |
| 4396 doubleValue_ = value; |
| 4397 } |
| 4398 } |
| 4399 |
| 4400 /// <summary>Field number for the "string_value" field.</summary> |
| 4401 public const int StringValueFieldNumber = 7; |
| 4402 private pb::ByteString stringValue_ = pb::ByteString.Empty; |
| 4403 public pb::ByteString StringValue { |
| 4404 get { return stringValue_; } |
| 4405 set { |
| 4406 stringValue_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 4407 } |
| 4408 } |
| 4409 |
| 4410 /// <summary>Field number for the "aggregate_value" field.</summary> |
| 4411 public const int AggregateValueFieldNumber = 8; |
| 4412 private string aggregateValue_ = ""; |
| 4413 public string AggregateValue { |
| 4414 get { return aggregateValue_; } |
| 4415 set { |
| 4416 aggregateValue_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 4417 } |
| 4418 } |
| 4419 |
| 4420 public override bool Equals(object other) { |
| 4421 return Equals(other as UninterpretedOption); |
| 4422 } |
| 4423 |
| 4424 public bool Equals(UninterpretedOption other) { |
| 4425 if (ReferenceEquals(other, null)) { |
| 4426 return false; |
| 4427 } |
| 4428 if (ReferenceEquals(other, this)) { |
| 4429 return true; |
| 4430 } |
| 4431 if(!name_.Equals(other.name_)) return false; |
| 4432 if (IdentifierValue != other.IdentifierValue) return false; |
| 4433 if (PositiveIntValue != other.PositiveIntValue) return false; |
| 4434 if (NegativeIntValue != other.NegativeIntValue) return false; |
| 4435 if (DoubleValue != other.DoubleValue) return false; |
| 4436 if (StringValue != other.StringValue) return false; |
| 4437 if (AggregateValue != other.AggregateValue) return false; |
| 4438 return true; |
| 4439 } |
| 4440 |
| 4441 public override int GetHashCode() { |
| 4442 int hash = 1; |
| 4443 hash ^= name_.GetHashCode(); |
| 4444 if (IdentifierValue.Length != 0) hash ^= IdentifierValue.GetHashCode(); |
| 4445 if (PositiveIntValue != 0UL) hash ^= PositiveIntValue.GetHashCode(); |
| 4446 if (NegativeIntValue != 0L) hash ^= NegativeIntValue.GetHashCode(); |
| 4447 if (DoubleValue != 0D) hash ^= DoubleValue.GetHashCode(); |
| 4448 if (StringValue.Length != 0) hash ^= StringValue.GetHashCode(); |
| 4449 if (AggregateValue.Length != 0) hash ^= AggregateValue.GetHashCode(); |
| 4450 return hash; |
| 4451 } |
| 4452 |
| 4453 public override string ToString() { |
| 4454 return pb::JsonFormatter.ToDiagnosticString(this); |
| 4455 } |
| 4456 |
| 4457 public void WriteTo(pb::CodedOutputStream output) { |
| 4458 name_.WriteTo(output, _repeated_name_codec); |
| 4459 if (IdentifierValue.Length != 0) { |
| 4460 output.WriteRawTag(26); |
| 4461 output.WriteString(IdentifierValue); |
| 4462 } |
| 4463 if (PositiveIntValue != 0UL) { |
| 4464 output.WriteRawTag(32); |
| 4465 output.WriteUInt64(PositiveIntValue); |
| 4466 } |
| 4467 if (NegativeIntValue != 0L) { |
| 4468 output.WriteRawTag(40); |
| 4469 output.WriteInt64(NegativeIntValue); |
| 4470 } |
| 4471 if (DoubleValue != 0D) { |
| 4472 output.WriteRawTag(49); |
| 4473 output.WriteDouble(DoubleValue); |
| 4474 } |
| 4475 if (StringValue.Length != 0) { |
| 4476 output.WriteRawTag(58); |
| 4477 output.WriteBytes(StringValue); |
| 4478 } |
| 4479 if (AggregateValue.Length != 0) { |
| 4480 output.WriteRawTag(66); |
| 4481 output.WriteString(AggregateValue); |
| 4482 } |
| 4483 } |
| 4484 |
| 4485 public int CalculateSize() { |
| 4486 int size = 0; |
| 4487 size += name_.CalculateSize(_repeated_name_codec); |
| 4488 if (IdentifierValue.Length != 0) { |
| 4489 size += 1 + pb::CodedOutputStream.ComputeStringSize(IdentifierValue); |
| 4490 } |
| 4491 if (PositiveIntValue != 0UL) { |
| 4492 size += 1 + pb::CodedOutputStream.ComputeUInt64Size(PositiveIntValue); |
| 4493 } |
| 4494 if (NegativeIntValue != 0L) { |
| 4495 size += 1 + pb::CodedOutputStream.ComputeInt64Size(NegativeIntValue); |
| 4496 } |
| 4497 if (DoubleValue != 0D) { |
| 4498 size += 1 + 8; |
| 4499 } |
| 4500 if (StringValue.Length != 0) { |
| 4501 size += 1 + pb::CodedOutputStream.ComputeBytesSize(StringValue); |
| 4502 } |
| 4503 if (AggregateValue.Length != 0) { |
| 4504 size += 1 + pb::CodedOutputStream.ComputeStringSize(AggregateValue); |
| 4505 } |
| 4506 return size; |
| 4507 } |
| 4508 |
| 4509 public void MergeFrom(UninterpretedOption other) { |
| 4510 if (other == null) { |
| 4511 return; |
| 4512 } |
| 4513 name_.Add(other.name_); |
| 4514 if (other.IdentifierValue.Length != 0) { |
| 4515 IdentifierValue = other.IdentifierValue; |
| 4516 } |
| 4517 if (other.PositiveIntValue != 0UL) { |
| 4518 PositiveIntValue = other.PositiveIntValue; |
| 4519 } |
| 4520 if (other.NegativeIntValue != 0L) { |
| 4521 NegativeIntValue = other.NegativeIntValue; |
| 4522 } |
| 4523 if (other.DoubleValue != 0D) { |
| 4524 DoubleValue = other.DoubleValue; |
| 4525 } |
| 4526 if (other.StringValue.Length != 0) { |
| 4527 StringValue = other.StringValue; |
| 4528 } |
| 4529 if (other.AggregateValue.Length != 0) { |
| 4530 AggregateValue = other.AggregateValue; |
| 4531 } |
| 4532 } |
| 4533 |
| 4534 public void MergeFrom(pb::CodedInputStream input) { |
| 4535 uint tag; |
| 4536 while ((tag = input.ReadTag()) != 0) { |
| 4537 switch(tag) { |
| 4538 default: |
| 4539 input.SkipLastField(); |
| 4540 break; |
| 4541 case 18: { |
| 4542 name_.AddEntriesFrom(input, _repeated_name_codec); |
| 4543 break; |
| 4544 } |
| 4545 case 26: { |
| 4546 IdentifierValue = input.ReadString(); |
| 4547 break; |
| 4548 } |
| 4549 case 32: { |
| 4550 PositiveIntValue = input.ReadUInt64(); |
| 4551 break; |
| 4552 } |
| 4553 case 40: { |
| 4554 NegativeIntValue = input.ReadInt64(); |
| 4555 break; |
| 4556 } |
| 4557 case 49: { |
| 4558 DoubleValue = input.ReadDouble(); |
| 4559 break; |
| 4560 } |
| 4561 case 58: { |
| 4562 StringValue = input.ReadBytes(); |
| 4563 break; |
| 4564 } |
| 4565 case 66: { |
| 4566 AggregateValue = input.ReadString(); |
| 4567 break; |
| 4568 } |
| 4569 } |
| 4570 } |
| 4571 } |
| 4572 |
| 4573 #region Nested types |
| 4574 /// <summary>Container for nested types declared in the UninterpretedOption
message type.</summary> |
| 4575 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 4576 public static partial class Types { |
| 4577 /// <summary> |
| 4578 /// The name of the uninterpreted option. Each string represents a segme
nt in |
| 4579 /// a dot-separated name. is_extension is true iff a segment represents
an |
| 4580 /// extension (denoted with parentheses in options specs in .proto files)
. |
| 4581 /// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents |
| 4582 /// "foo.(bar.baz).qux". |
| 4583 /// </summary> |
| 4584 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 4585 internal sealed partial class NamePart : pb::IMessage<NamePart> { |
| 4586 private static readonly pb::MessageParser<NamePart> _parser = new pb::Me
ssageParser<NamePart>(() => new NamePart()); |
| 4587 public static pb::MessageParser<NamePart> Parser { get { return _parser;
} } |
| 4588 |
| 4589 public static pbr::MessageDescriptor Descriptor { |
| 4590 get { return global::Google.Protobuf.Reflection.UninterpretedOption.De
scriptor.NestedTypes[0]; } |
| 4591 } |
| 4592 |
| 4593 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4594 get { return Descriptor; } |
| 4595 } |
| 4596 |
| 4597 public NamePart() { |
| 4598 OnConstruction(); |
| 4599 } |
| 4600 |
| 4601 partial void OnConstruction(); |
| 4602 |
| 4603 public NamePart(NamePart other) : this() { |
| 4604 namePart_ = other.namePart_; |
| 4605 isExtension_ = other.isExtension_; |
| 4606 } |
| 4607 |
| 4608 public NamePart Clone() { |
| 4609 return new NamePart(this); |
| 4610 } |
| 4611 |
| 4612 /// <summary>Field number for the "name_part" field.</summary> |
| 4613 public const int NamePart_FieldNumber = 1; |
| 4614 private string namePart_ = ""; |
| 4615 public string NamePart_ { |
| 4616 get { return namePart_; } |
| 4617 set { |
| 4618 namePart_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 4619 } |
| 4620 } |
| 4621 |
| 4622 /// <summary>Field number for the "is_extension" field.</summary> |
| 4623 public const int IsExtensionFieldNumber = 2; |
| 4624 private bool isExtension_; |
| 4625 public bool IsExtension { |
| 4626 get { return isExtension_; } |
| 4627 set { |
| 4628 isExtension_ = value; |
| 4629 } |
| 4630 } |
| 4631 |
| 4632 public override bool Equals(object other) { |
| 4633 return Equals(other as NamePart); |
| 4634 } |
| 4635 |
| 4636 public bool Equals(NamePart other) { |
| 4637 if (ReferenceEquals(other, null)) { |
| 4638 return false; |
| 4639 } |
| 4640 if (ReferenceEquals(other, this)) { |
| 4641 return true; |
| 4642 } |
| 4643 if (NamePart_ != other.NamePart_) return false; |
| 4644 if (IsExtension != other.IsExtension) return false; |
| 4645 return true; |
| 4646 } |
| 4647 |
| 4648 public override int GetHashCode() { |
| 4649 int hash = 1; |
| 4650 if (NamePart_.Length != 0) hash ^= NamePart_.GetHashCode(); |
| 4651 if (IsExtension != false) hash ^= IsExtension.GetHashCode(); |
| 4652 return hash; |
| 4653 } |
| 4654 |
| 4655 public override string ToString() { |
| 4656 return pb::JsonFormatter.ToDiagnosticString(this); |
| 4657 } |
| 4658 |
| 4659 public void WriteTo(pb::CodedOutputStream output) { |
| 4660 if (NamePart_.Length != 0) { |
| 4661 output.WriteRawTag(10); |
| 4662 output.WriteString(NamePart_); |
| 4663 } |
| 4664 if (IsExtension != false) { |
| 4665 output.WriteRawTag(16); |
| 4666 output.WriteBool(IsExtension); |
| 4667 } |
| 4668 } |
| 4669 |
| 4670 public int CalculateSize() { |
| 4671 int size = 0; |
| 4672 if (NamePart_.Length != 0) { |
| 4673 size += 1 + pb::CodedOutputStream.ComputeStringSize(NamePart_); |
| 4674 } |
| 4675 if (IsExtension != false) { |
| 4676 size += 1 + 1; |
| 4677 } |
| 4678 return size; |
| 4679 } |
| 4680 |
| 4681 public void MergeFrom(NamePart other) { |
| 4682 if (other == null) { |
| 4683 return; |
| 4684 } |
| 4685 if (other.NamePart_.Length != 0) { |
| 4686 NamePart_ = other.NamePart_; |
| 4687 } |
| 4688 if (other.IsExtension != false) { |
| 4689 IsExtension = other.IsExtension; |
| 4690 } |
| 4691 } |
| 4692 |
| 4693 public void MergeFrom(pb::CodedInputStream input) { |
| 4694 uint tag; |
| 4695 while ((tag = input.ReadTag()) != 0) { |
| 4696 switch(tag) { |
| 4697 default: |
| 4698 input.SkipLastField(); |
| 4699 break; |
| 4700 case 10: { |
| 4701 NamePart_ = input.ReadString(); |
| 4702 break; |
| 4703 } |
| 4704 case 16: { |
| 4705 IsExtension = input.ReadBool(); |
| 4706 break; |
| 4707 } |
| 4708 } |
| 4709 } |
| 4710 } |
| 4711 |
| 4712 } |
| 4713 |
| 4714 } |
| 4715 #endregion |
| 4716 |
| 4717 } |
| 4718 |
| 4719 /// <summary> |
| 4720 /// Encapsulates information about the original source file from which a |
| 4721 /// FileDescriptorProto was generated. |
| 4722 /// </summary> |
| 4723 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 4724 internal sealed partial class SourceCodeInfo : pb::IMessage<SourceCodeInfo> { |
| 4725 private static readonly pb::MessageParser<SourceCodeInfo> _parser = new pb::
MessageParser<SourceCodeInfo>(() => new SourceCodeInfo()); |
| 4726 public static pb::MessageParser<SourceCodeInfo> Parser { get { return _parse
r; } } |
| 4727 |
| 4728 public static pbr::MessageDescriptor Descriptor { |
| 4729 get { return global::Google.Protobuf.Reflection.DescriptorReflection.Descr
iptor.MessageTypes[17]; } |
| 4730 } |
| 4731 |
| 4732 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4733 get { return Descriptor; } |
| 4734 } |
| 4735 |
| 4736 public SourceCodeInfo() { |
| 4737 OnConstruction(); |
| 4738 } |
| 4739 |
| 4740 partial void OnConstruction(); |
| 4741 |
| 4742 public SourceCodeInfo(SourceCodeInfo other) : this() { |
| 4743 location_ = other.location_.Clone(); |
| 4744 } |
| 4745 |
| 4746 public SourceCodeInfo Clone() { |
| 4747 return new SourceCodeInfo(this); |
| 4748 } |
| 4749 |
| 4750 /// <summary>Field number for the "location" field.</summary> |
| 4751 public const int LocationFieldNumber = 1; |
| 4752 private static readonly pb::FieldCodec<global::Google.Protobuf.Reflection.So
urceCodeInfo.Types.Location> _repeated_location_codec |
| 4753 = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Reflection.Sourc
eCodeInfo.Types.Location.Parser); |
| 4754 private readonly pbc::RepeatedField<global::Google.Protobuf.Reflection.Sourc
eCodeInfo.Types.Location> location_ = new pbc::RepeatedField<global::Google.Prot
obuf.Reflection.SourceCodeInfo.Types.Location>(); |
| 4755 /// <summary> |
| 4756 /// A Location identifies a piece of source code in a .proto file which |
| 4757 /// corresponds to a particular definition. This information is intended |
| 4758 /// to be useful to IDEs, code indexers, documentation generators, and simi
lar |
| 4759 /// tools. |
| 4760 /// |
| 4761 /// For example, say we have a file like: |
| 4762 /// message Foo { |
| 4763 /// optional string foo = 1; |
| 4764 /// } |
| 4765 /// Let's look at just the field definition: |
| 4766 /// optional string foo = 1; |
| 4767 /// ^ ^^ ^^ ^ ^^^ |
| 4768 /// a bc de f ghi |
| 4769 /// We have the following locations: |
| 4770 /// span path represents |
| 4771 /// [a,i) [ 4, 0, 2, 0 ] The whole field definition. |
| 4772 /// [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). |
| 4773 /// [c,d) [ 4, 0, 2, 0, 5 ] The type (string). |
| 4774 /// [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). |
| 4775 /// [g,h) [ 4, 0, 2, 0, 3 ] The number (1). |
| 4776 /// |
| 4777 /// Notes: |
| 4778 /// - A location may refer to a repeated field itself (i.e. not to any |
| 4779 /// particular index within it). This is used whenever a set of elements
are |
| 4780 /// logically enclosed in a single code segment. For example, an entire |
| 4781 /// extend block (possibly containing multiple extension definitions) wil
l |
| 4782 /// have an outer location whose path refers to the "extensions" repeated |
| 4783 /// field without an index. |
| 4784 /// - Multiple locations may have the same path. This happens when a singl
e |
| 4785 /// logical declaration is spread out across multiple places. The most |
| 4786 /// obvious example is the "extend" block again -- there may be multiple |
| 4787 /// extend blocks in the same scope, each of which will have the same pat
h. |
| 4788 /// - A location's span is not always a subset of its parent's span. For |
| 4789 /// example, the "extendee" of an extension declaration appears at the |
| 4790 /// beginning of the "extend" block and is shared by all extensions withi
n |
| 4791 /// the block. |
| 4792 /// - Just because a location's span is a subset of some other location's s
pan |
| 4793 /// does not mean that it is a descendent. For example, a "group" define
s |
| 4794 /// both a type and a field in a single declaration. Thus, the locations |
| 4795 /// corresponding to the type and field and their components will overlap
. |
| 4796 /// - Code which tries to interpret locations should probably be designed t
o |
| 4797 /// ignore those that it doesn't understand, as more types of locations c
ould |
| 4798 /// be recorded in the future. |
| 4799 /// </summary> |
| 4800 public pbc::RepeatedField<global::Google.Protobuf.Reflection.SourceCodeInfo.
Types.Location> Location { |
| 4801 get { return location_; } |
| 4802 } |
| 4803 |
| 4804 public override bool Equals(object other) { |
| 4805 return Equals(other as SourceCodeInfo); |
| 4806 } |
| 4807 |
| 4808 public bool Equals(SourceCodeInfo other) { |
| 4809 if (ReferenceEquals(other, null)) { |
| 4810 return false; |
| 4811 } |
| 4812 if (ReferenceEquals(other, this)) { |
| 4813 return true; |
| 4814 } |
| 4815 if(!location_.Equals(other.location_)) return false; |
| 4816 return true; |
| 4817 } |
| 4818 |
| 4819 public override int GetHashCode() { |
| 4820 int hash = 1; |
| 4821 hash ^= location_.GetHashCode(); |
| 4822 return hash; |
| 4823 } |
| 4824 |
| 4825 public override string ToString() { |
| 4826 return pb::JsonFormatter.ToDiagnosticString(this); |
| 4827 } |
| 4828 |
| 4829 public void WriteTo(pb::CodedOutputStream output) { |
| 4830 location_.WriteTo(output, _repeated_location_codec); |
| 4831 } |
| 4832 |
| 4833 public int CalculateSize() { |
| 4834 int size = 0; |
| 4835 size += location_.CalculateSize(_repeated_location_codec); |
| 4836 return size; |
| 4837 } |
| 4838 |
| 4839 public void MergeFrom(SourceCodeInfo other) { |
| 4840 if (other == null) { |
| 4841 return; |
| 4842 } |
| 4843 location_.Add(other.location_); |
| 4844 } |
| 4845 |
| 4846 public void MergeFrom(pb::CodedInputStream input) { |
| 4847 uint tag; |
| 4848 while ((tag = input.ReadTag()) != 0) { |
| 4849 switch(tag) { |
| 4850 default: |
| 4851 input.SkipLastField(); |
| 4852 break; |
| 4853 case 10: { |
| 4854 location_.AddEntriesFrom(input, _repeated_location_codec); |
| 4855 break; |
| 4856 } |
| 4857 } |
| 4858 } |
| 4859 } |
| 4860 |
| 4861 #region Nested types |
| 4862 /// <summary>Container for nested types declared in the SourceCodeInfo messa
ge type.</summary> |
| 4863 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 4864 public static partial class Types { |
| 4865 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] |
| 4866 internal sealed partial class Location : pb::IMessage<Location> { |
| 4867 private static readonly pb::MessageParser<Location> _parser = new pb::Me
ssageParser<Location>(() => new Location()); |
| 4868 public static pb::MessageParser<Location> Parser { get { return _parser;
} } |
| 4869 |
| 4870 public static pbr::MessageDescriptor Descriptor { |
| 4871 get { return global::Google.Protobuf.Reflection.SourceCodeInfo.Descrip
tor.NestedTypes[0]; } |
| 4872 } |
| 4873 |
| 4874 pbr::MessageDescriptor pb::IMessage.Descriptor { |
| 4875 get { return Descriptor; } |
| 4876 } |
| 4877 |
| 4878 public Location() { |
| 4879 OnConstruction(); |
| 4880 } |
| 4881 |
| 4882 partial void OnConstruction(); |
| 4883 |
| 4884 public Location(Location other) : this() { |
| 4885 path_ = other.path_.Clone(); |
| 4886 span_ = other.span_.Clone(); |
| 4887 leadingComments_ = other.leadingComments_; |
| 4888 trailingComments_ = other.trailingComments_; |
| 4889 leadingDetachedComments_ = other.leadingDetachedComments_.Clone(); |
| 4890 } |
| 4891 |
| 4892 public Location Clone() { |
| 4893 return new Location(this); |
| 4894 } |
| 4895 |
| 4896 /// <summary>Field number for the "path" field.</summary> |
| 4897 public const int PathFieldNumber = 1; |
| 4898 private static readonly pb::FieldCodec<int> _repeated_path_codec |
| 4899 = pb::FieldCodec.ForInt32(10); |
| 4900 private readonly pbc::RepeatedField<int> path_ = new pbc::RepeatedField<
int>(); |
| 4901 /// <summary> |
| 4902 /// Identifies which part of the FileDescriptorProto was defined at thi
s |
| 4903 /// location. |
| 4904 /// |
| 4905 /// Each element is a field number or an index. They form a path from |
| 4906 /// the root FileDescriptorProto to the place where the definition. Fo
r |
| 4907 /// example, this path: |
| 4908 /// [ 4, 3, 2, 7, 1 ] |
| 4909 /// refers to: |
| 4910 /// file.message_type(3) // 4, 3 |
| 4911 /// .field(7) // 2, 7 |
| 4912 /// .name() // 1 |
| 4913 /// This is because FileDescriptorProto.message_type has field number 4
: |
| 4914 /// repeated DescriptorProto message_type = 4; |
| 4915 /// and DescriptorProto.field has field number 2: |
| 4916 /// repeated FieldDescriptorProto field = 2; |
| 4917 /// and FieldDescriptorProto.name has field number 1: |
| 4918 /// optional string name = 1; |
| 4919 /// |
| 4920 /// Thus, the above path gives the location of a field name. If we rem
oved |
| 4921 /// the last element: |
| 4922 /// [ 4, 3, 2, 7 ] |
| 4923 /// this path refers to the whole field declaration (from the beginning |
| 4924 /// of the label to the terminating semicolon). |
| 4925 /// </summary> |
| 4926 public pbc::RepeatedField<int> Path { |
| 4927 get { return path_; } |
| 4928 } |
| 4929 |
| 4930 /// <summary>Field number for the "span" field.</summary> |
| 4931 public const int SpanFieldNumber = 2; |
| 4932 private static readonly pb::FieldCodec<int> _repeated_span_codec |
| 4933 = pb::FieldCodec.ForInt32(18); |
| 4934 private readonly pbc::RepeatedField<int> span_ = new pbc::RepeatedField<
int>(); |
| 4935 /// <summary> |
| 4936 /// Always has exactly three or four elements: start line, start column
, |
| 4937 /// end line (optional, otherwise assumed same as start line), end colu
mn. |
| 4938 /// These are packed into a single field for efficiency. Note that lin
e |
| 4939 /// and column numbers are zero-based -- typically you will want to add |
| 4940 /// 1 to each before displaying to a user. |
| 4941 /// </summary> |
| 4942 public pbc::RepeatedField<int> Span { |
| 4943 get { return span_; } |
| 4944 } |
| 4945 |
| 4946 /// <summary>Field number for the "leading_comments" field.</summary> |
| 4947 public const int LeadingCommentsFieldNumber = 3; |
| 4948 private string leadingComments_ = ""; |
| 4949 /// <summary> |
| 4950 /// If this SourceCodeInfo represents a complete declaration, these are
any |
| 4951 /// comments appearing before and after the declaration which appear to
be |
| 4952 /// attached to the declaration. |
| 4953 /// |
| 4954 /// A series of line comments appearing on consecutive lines, with no o
ther |
| 4955 /// tokens appearing on those lines, will be treated as a single commen
t. |
| 4956 /// |
| 4957 /// leading_detached_comments will keep paragraphs of comments that app
ear |
| 4958 /// before (but not connected to) the current element. Each paragraph, |
| 4959 /// separated by empty lines, will be one comment element in the repeat
ed |
| 4960 /// field. |
| 4961 /// |
| 4962 /// Only the comment content is provided; comment markers (e.g. //) are |
| 4963 /// stripped out. For block comments, leading whitespace and an asteri
sk |
| 4964 /// will be stripped from the beginning of each line other than the fir
st. |
| 4965 /// Newlines are included in the output. |
| 4966 /// |
| 4967 /// Examples: |
| 4968 /// |
| 4969 /// optional int32 foo = 1; // Comment attached to foo. |
| 4970 /// // Comment attached to bar. |
| 4971 /// optional int32 bar = 2; |
| 4972 /// |
| 4973 /// optional string baz = 3; |
| 4974 /// // Comment attached to baz. |
| 4975 /// // Another line attached to baz. |
| 4976 /// |
| 4977 /// // Comment attached to qux. |
| 4978 /// // |
| 4979 /// // Another line attached to qux. |
| 4980 /// optional double qux = 4; |
| 4981 /// |
| 4982 /// // Detached comment for corge. This is not leading or trailing co
mments |
| 4983 /// // to qux or corge because there are blank lines separating it fr
om |
| 4984 /// // both. |
| 4985 /// |
| 4986 /// // Detached comment for corge paragraph 2. |
| 4987 /// |
| 4988 /// optional string corge = 5; |
| 4989 /// /* Block comment attached |
| 4990 /// * to corge. Leading asterisks |
| 4991 /// * will be removed. */ |
| 4992 /// /* Block comment attached to |
| 4993 /// * grault. */ |
| 4994 /// optional int32 grault = 6; |
| 4995 /// |
| 4996 /// // ignored detached comments. |
| 4997 /// </summary> |
| 4998 public string LeadingComments { |
| 4999 get { return leadingComments_; } |
| 5000 set { |
| 5001 leadingComments_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 5002 } |
| 5003 } |
| 5004 |
| 5005 /// <summary>Field number for the "trailing_comments" field.</summary> |
| 5006 public const int TrailingCommentsFieldNumber = 4; |
| 5007 private string trailingComments_ = ""; |
| 5008 public string TrailingComments { |
| 5009 get { return trailingComments_; } |
| 5010 set { |
| 5011 trailingComments_ = pb::Preconditions.CheckNotNull(value, "value"); |
| 5012 } |
| 5013 } |
| 5014 |
| 5015 /// <summary>Field number for the "leading_detached_comments" field.</su
mmary> |
| 5016 public const int LeadingDetachedCommentsFieldNumber = 6; |
| 5017 private static readonly pb::FieldCodec<string> _repeated_leadingDetached
Comments_codec |
| 5018 = pb::FieldCodec.ForString(50); |
| 5019 private readonly pbc::RepeatedField<string> leadingDetachedComments_ = n
ew pbc::RepeatedField<string>(); |
| 5020 public pbc::RepeatedField<string> LeadingDetachedComments { |
| 5021 get { return leadingDetachedComments_; } |
| 5022 } |
| 5023 |
| 5024 public override bool Equals(object other) { |
| 5025 return Equals(other as Location); |
| 5026 } |
| 5027 |
| 5028 public bool Equals(Location other) { |
| 5029 if (ReferenceEquals(other, null)) { |
| 5030 return false; |
| 5031 } |
| 5032 if (ReferenceEquals(other, this)) { |
| 5033 return true; |
| 5034 } |
| 5035 if(!path_.Equals(other.path_)) return false; |
| 5036 if(!span_.Equals(other.span_)) return false; |
| 5037 if (LeadingComments != other.LeadingComments) return false; |
| 5038 if (TrailingComments != other.TrailingComments) return false; |
| 5039 if(!leadingDetachedComments_.Equals(other.leadingDetachedComments_)) r
eturn false; |
| 5040 return true; |
| 5041 } |
| 5042 |
| 5043 public override int GetHashCode() { |
| 5044 int hash = 1; |
| 5045 hash ^= path_.GetHashCode(); |
| 5046 hash ^= span_.GetHashCode(); |
| 5047 if (LeadingComments.Length != 0) hash ^= LeadingComments.GetHashCode()
; |
| 5048 if (TrailingComments.Length != 0) hash ^= TrailingComments.GetHashCode
(); |
| 5049 hash ^= leadingDetachedComments_.GetHashCode(); |
| 5050 return hash; |
| 5051 } |
| 5052 |
| 5053 public override string ToString() { |
| 5054 return pb::JsonFormatter.ToDiagnosticString(this); |
| 5055 } |
| 5056 |
| 5057 public void WriteTo(pb::CodedOutputStream output) { |
| 5058 path_.WriteTo(output, _repeated_path_codec); |
| 5059 span_.WriteTo(output, _repeated_span_codec); |
| 5060 if (LeadingComments.Length != 0) { |
| 5061 output.WriteRawTag(26); |
| 5062 output.WriteString(LeadingComments); |
| 5063 } |
| 5064 if (TrailingComments.Length != 0) { |
| 5065 output.WriteRawTag(34); |
| 5066 output.WriteString(TrailingComments); |
| 5067 } |
| 5068 leadingDetachedComments_.WriteTo(output, _repeated_leadingDetachedComm
ents_codec); |
| 5069 } |
| 5070 |
| 5071 public int CalculateSize() { |
| 5072 int size = 0; |
| 5073 size += path_.CalculateSize(_repeated_path_codec); |
| 5074 size += span_.CalculateSize(_repeated_span_codec); |
| 5075 if (LeadingComments.Length != 0) { |
| 5076 size += 1 + pb::CodedOutputStream.ComputeStringSize(LeadingComments)
; |
| 5077 } |
| 5078 if (TrailingComments.Length != 0) { |
| 5079 size += 1 + pb::CodedOutputStream.ComputeStringSize(TrailingComments
); |
| 5080 } |
| 5081 size += leadingDetachedComments_.CalculateSize(_repeated_leadingDetach
edComments_codec); |
| 5082 return size; |
| 5083 } |
| 5084 |
| 5085 public void MergeFrom(Location other) { |
| 5086 if (other == null) { |
| 5087 return; |
| 5088 } |
| 5089 path_.Add(other.path_); |
| 5090 span_.Add(other.span_); |
| 5091 if (other.LeadingComments.Length != 0) { |
| 5092 LeadingComments = other.LeadingComments; |
| 5093 } |
| 5094 if (other.TrailingComments.Length != 0) { |
| 5095 TrailingComments = other.TrailingComments; |
| 5096 } |
| 5097 leadingDetachedComments_.Add(other.leadingDetachedComments_); |
| 5098 } |
| 5099 |
| 5100 public void MergeFrom(pb::CodedInputStream input) { |
| 5101 uint tag; |
| 5102 while ((tag = input.ReadTag()) != 0) { |
| 5103 switch(tag) { |
| 5104 default: |
| 5105 input.SkipLastField(); |
| 5106 break; |
| 5107 case 10: |
| 5108 case 8: { |
| 5109 path_.AddEntriesFrom(input, _repeated_path_codec); |
| 5110 break; |
| 5111 } |
| 5112 case 18: |
| 5113 case 16: { |
| 5114 span_.AddEntriesFrom(input, _repeated_span_codec); |
| 5115 break; |
| 5116 } |
| 5117 case 26: { |
| 5118 LeadingComments = input.ReadString(); |
| 5119 break; |
| 5120 } |
| 5121 case 34: { |
| 5122 TrailingComments = input.ReadString(); |
| 5123 break; |
| 5124 } |
| 5125 case 50: { |
| 5126 leadingDetachedComments_.AddEntriesFrom(input, _repeated_leading
DetachedComments_codec); |
| 5127 break; |
| 5128 } |
| 5129 } |
| 5130 } |
| 5131 } |
| 5132 |
| 5133 } |
| 5134 |
| 5135 } |
| 5136 #endregion |
| 5137 |
| 5138 } |
| 5139 |
| 5140 #endregion |
| 5141 |
| 5142 } |
| 5143 |
| 5144 #endregion Designer generated code |
OLD | NEW |