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