1 // <auto-generated> 2 // Generated by the protocol buffer compiler. DO NOT EDIT! 3 // source: google/protobuf/unittest_retention.proto 4 // </auto-generated> 5 #pragma warning disable 1591, 0612, 3021, 8981 6 #region Designer generated code 7 8 using pb = global::Google.Protobuf; 9 using pbc = global::Google.Protobuf.Collections; 10 using pbr = global::Google.Protobuf.Reflection; 11 using scg = global::System.Collections.Generic; 12 namespace ProtobufUnittest { 13 14 /// <summary>Holder for reflection information generated from google/protobuf/unittest_retention.proto</summary> 15 public static partial class UnittestRetentionReflection { 16 17 #region Descriptor 18 /// <summary>File descriptor for google/protobuf/unittest_retention.proto</summary> 19 public static pbr::FileDescriptor Descriptor { 20 get { return descriptor; } 21 } 22 private static pbr::FileDescriptor descriptor; 23 UnittestRetentionReflection()24 static UnittestRetentionReflection() { 25 byte[] descriptorData = global::System.Convert.FromBase64String( 26 string.Concat( 27 "Cihnb29nbGUvcHJvdG9idWYvdW5pdHRlc3RfcmV0ZW50aW9uLnByb3RvEhFw", 28 "cm90b2J1Zl91bml0dGVzdBogZ29vZ2xlL3Byb3RvYnVmL2Rlc2NyaXB0b3Iu", 29 "cHJvdG8icAoOT3B0aW9uc01lc3NhZ2USEwoLcGxhaW5fZmllbGQYASABKAUS", 30 "JAoXcnVudGltZV9yZXRlbnRpb25fZmllbGQYAiABKAVCA4gBARIjChZzb3Vy", 31 "Y2VfcmV0ZW50aW9uX2ZpZWxkGAMgASgFQgOIAQIiFgoIRXh0ZW5kZWUqBAgB", 32 "EAIqBAgCEAMi4wEKD1RvcExldmVsTWVzc2FnZRIVCgFmGAEgASgCQgqauu2E", 33 "DwQIARACEgsKAWkYAiABKANIABobCg1OZXN0ZWRNZXNzYWdlOgqaxd6FDwQI", 34 "ARACIiwKCk5lc3RlZEVudW0SEgoOTkVTVEVEX1VOS05PV04QABoK+p6qhA8E", 35 "CAEQAioQCAoQZRoKopjfhQ8ECAEQAjIyCgFzEhsucHJvdG9idWZfdW5pdHRl", 36 "c3QuRXh0ZW5kZWUYAiABKAlCCpq67YQPBAgBEAI6CprF3oUPBAgBEAJCDwoB", 37 "bxIKitu3hA8ECAEQAio9CgxUb3BMZXZlbEVudW0SIQoRVE9QX0xFVkVMX1VO", 38 "S05PV04QABoK0t2phA8ECAEQAhoK+p6qhA8ECAEQAjJ0CgdTZXJ2aWNlEl0K", 39 "B0RvU3R1ZmYSIi5wcm90b2J1Zl91bml0dGVzdC5Ub3BMZXZlbE1lc3NhZ2Ua", 40 "Ii5wcm90b2J1Zl91bml0dGVzdC5Ub3BMZXZlbE1lc3NhZ2UiCuKu+IMPBAgB", 41 "EAIaCuqHi4QPBAgBEAI6NgoMcGxhaW5fb3B0aW9uEhwuZ29vZ2xlLnByb3Rv", 42 "YnVmLkZpbGVPcHRpb25zGMa17PABIAEoBTpHChhydW50aW1lX3JldGVudGlv", 43 "bl9vcHRpb24SHC5nb29nbGUucHJvdG9idWYuRmlsZU9wdGlvbnMYnJLp8AEg", 44 "ASgFQgOIAQE6RgoXc291cmNlX3JldGVudGlvbl9vcHRpb24SHC5nb29nbGUu", 45 "cHJvdG9idWYuRmlsZU9wdGlvbnMY1Kzf8AEgASgFQgOIAQI6WAoLZmlsZV9v", 46 "cHRpb24SHC5nb29nbGUucHJvdG9idWYuRmlsZU9wdGlvbnMYgPLe8AEgASgL", 47 "MiEucHJvdG9idWZfdW5pdHRlc3QuT3B0aW9uc01lc3NhZ2U6XQoQcmVwZWF0", 48 "ZWRfb3B0aW9ucxIcLmdvb2dsZS5wcm90b2J1Zi5GaWxlT3B0aW9ucxiS/tvw", 49 "ASADKAsyIS5wcm90b2J1Zl91bml0dGVzdC5PcHRpb25zTWVzc2FnZTptChZl", 50 "eHRlbnNpb25fcmFuZ2Vfb3B0aW9uEiYuZ29vZ2xlLnByb3RvYnVmLkV4dGVu", 51 "c2lvblJhbmdlT3B0aW9ucxiE89vwASABKAsyIS5wcm90b2J1Zl91bml0dGVz", 52 "dC5PcHRpb25zTWVzc2FnZTpeCg5tZXNzYWdlX29wdGlvbhIfLmdvb2dsZS5w", 53 "cm90b2J1Zi5NZXNzYWdlT3B0aW9ucxjT6NvwASABKAsyIS5wcm90b2J1Zl91", 54 "bml0dGVzdC5PcHRpb25zTWVzc2FnZTpaCgxmaWVsZF9vcHRpb24SHS5nb29n", 55 "bGUucHJvdG9idWYuRmllbGRPcHRpb25zGKPXzfABIAEoCzIhLnByb3RvYnVm", 56 "X3VuaXR0ZXN0Lk9wdGlvbnNNZXNzYWdlOloKDG9uZW9mX29wdGlvbhIdLmdv", 57 "b2dsZS5wcm90b2J1Zi5PbmVvZk9wdGlvbnMYsfvG8AEgASgLMiEucHJvdG9i", 58 "dWZfdW5pdHRlc3QuT3B0aW9uc01lc3NhZ2U6WAoLZW51bV9vcHRpb24SHC5n", 59 "b29nbGUucHJvdG9idWYuRW51bU9wdGlvbnMY76PF8AEgASgLMiEucHJvdG9i", 60 "dWZfdW5pdHRlc3QuT3B0aW9uc01lc3NhZ2U6YwoRZW51bV9lbnRyeV9vcHRp", 61 "b24SIS5nb29nbGUucHJvdG9idWYuRW51bVZhbHVlT3B0aW9ucxjam8XwASAB", 62 "KAsyIS5wcm90b2J1Zl91bml0dGVzdC5PcHRpb25zTWVzc2FnZTpeCg5zZXJ2", 63 "aWNlX29wdGlvbhIfLmdvb2dsZS5wcm90b2J1Zi5TZXJ2aWNlT3B0aW9ucxj9", 64 "sMHwASABKAsyIS5wcm90b2J1Zl91bml0dGVzdC5PcHRpb25zTWVzc2FnZTpc", 65 "Cg1tZXRob2Rfb3B0aW9uEh4uZ29vZ2xlLnByb3RvYnVmLk1ldGhvZE9wdGlv", 66 "bnMY7IW/8AEgASgLMiEucHJvdG9idWZfdW5pdHRlc3QuT3B0aW9uc01lc3Nh", 67 "Z2U6MgoBaRIbLnByb3RvYnVmX3VuaXR0ZXN0LkV4dGVuZGVlGAEgASgFQgqa", 68 "uu2EDwQIARACQjOqAhBQcm90b2J1ZlVuaXR0ZXN0kvHfhQ8ECAEQAoKQ94UP", 69 "BAgBEALgkcmGDwKwrOOGDwE=")); 70 descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 71 new pbr::FileDescriptor[] { global::Google.Protobuf.Reflection.DescriptorReflection.Descriptor, }, 72 new pbr::GeneratedClrTypeInfo(new[] {typeof(global::ProtobufUnittest.TopLevelEnum), }, new pb::Extension[] { UnittestRetentionExtensions.PlainOption, UnittestRetentionExtensions.RuntimeRetentionOption, UnittestRetentionExtensions.SourceRetentionOption, UnittestRetentionExtensions.FileOption, UnittestRetentionExtensions.RepeatedOptions, UnittestRetentionExtensions.ExtensionRangeOption, UnittestRetentionExtensions.MessageOption, UnittestRetentionExtensions.FieldOption, UnittestRetentionExtensions.OneofOption, UnittestRetentionExtensions.EnumOption, UnittestRetentionExtensions.EnumEntryOption, UnittestRetentionExtensions.ServiceOption, UnittestRetentionExtensions.MethodOption, UnittestRetentionExtensions.I }, new pbr::GeneratedClrTypeInfo[] { 73 new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufUnittest.OptionsMessage), global::ProtobufUnittest.OptionsMessage.Parser, new[]{ "PlainField", "RuntimeRetentionField", "SourceRetentionField" }, null, null, null, null), 74 new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufUnittest.Extendee), global::ProtobufUnittest.Extendee.Parser, null, null, null, null, null), 75 new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufUnittest.TopLevelMessage), global::ProtobufUnittest.TopLevelMessage.Parser, new[]{ "F", "I" }, new[]{ "O" }, new[]{ typeof(global::ProtobufUnittest.TopLevelMessage.Types.NestedEnum) }, new pb::Extension[] { global::ProtobufUnittest.TopLevelMessage.Extensions.S }, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::ProtobufUnittest.TopLevelMessage.Types.NestedMessage), global::ProtobufUnittest.TopLevelMessage.Types.NestedMessage.Parser, null, null, null, null, null)}) 76 })); 77 } 78 #endregion 79 80 } 81 /// <summary>Holder for extension identifiers generated from the top level of google/protobuf/unittest_retention.proto</summary> 82 public static partial class UnittestRetentionExtensions { 83 public static readonly pb::Extension<global::Google.Protobuf.Reflection.FileOptions, int> PlainOption = 84 new pb::Extension<global::Google.Protobuf.Reflection.FileOptions, int>(505092806, pb::FieldCodec.ForInt32(4040742448, 0)); 85 public static readonly pb::Extension<global::Google.Protobuf.Reflection.FileOptions, int> RuntimeRetentionOption = 86 new pb::Extension<global::Google.Protobuf.Reflection.FileOptions, int>(505039132, pb::FieldCodec.ForInt32(4040313056, 0)); 87 public static readonly pb::Extension<global::Google.Protobuf.Reflection.FileOptions, int> SourceRetentionOption = 88 new pb::Extension<global::Google.Protobuf.Reflection.FileOptions, int>(504878676, pb::FieldCodec.ForInt32(4039029408, 0)); 89 public static readonly pb::Extension<global::Google.Protobuf.Reflection.FileOptions, global::ProtobufUnittest.OptionsMessage> FileOption = 90 new pb::Extension<global::Google.Protobuf.Reflection.FileOptions, global::ProtobufUnittest.OptionsMessage>(504871168, pb::FieldCodec.ForMessage(4038969346, global::ProtobufUnittest.OptionsMessage.Parser)); 91 public static readonly pb::RepeatedExtension<global::Google.Protobuf.Reflection.FileOptions, global::ProtobufUnittest.OptionsMessage> RepeatedOptions = 92 new pb::RepeatedExtension<global::Google.Protobuf.Reflection.FileOptions, global::ProtobufUnittest.OptionsMessage>(504823570, pb::FieldCodec.ForMessage(4038588562, global::ProtobufUnittest.OptionsMessage.Parser)); 93 public static readonly pb::Extension<global::Google.Protobuf.Reflection.ExtensionRangeOptions, global::ProtobufUnittest.OptionsMessage> ExtensionRangeOption = 94 new pb::Extension<global::Google.Protobuf.Reflection.ExtensionRangeOptions, global::ProtobufUnittest.OptionsMessage>(504822148, pb::FieldCodec.ForMessage(4038577186, global::ProtobufUnittest.OptionsMessage.Parser)); 95 public static readonly pb::Extension<global::Google.Protobuf.Reflection.MessageOptions, global::ProtobufUnittest.OptionsMessage> MessageOption = 96 new pb::Extension<global::Google.Protobuf.Reflection.MessageOptions, global::ProtobufUnittest.OptionsMessage>(504820819, pb::FieldCodec.ForMessage(4038566554, global::ProtobufUnittest.OptionsMessage.Parser)); 97 public static readonly pb::Extension<global::Google.Protobuf.Reflection.FieldOptions, global::ProtobufUnittest.OptionsMessage> FieldOption = 98 new pb::Extension<global::Google.Protobuf.Reflection.FieldOptions, global::ProtobufUnittest.OptionsMessage>(504589219, pb::FieldCodec.ForMessage(4036713754, global::ProtobufUnittest.OptionsMessage.Parser)); 99 public static readonly pb::Extension<global::Google.Protobuf.Reflection.OneofOptions, global::ProtobufUnittest.OptionsMessage> OneofOption = 100 new pb::Extension<global::Google.Protobuf.Reflection.OneofOptions, global::ProtobufUnittest.OptionsMessage>(504479153, pb::FieldCodec.ForMessage(4035833226, global::ProtobufUnittest.OptionsMessage.Parser)); 101 public static readonly pb::Extension<global::Google.Protobuf.Reflection.EnumOptions, global::ProtobufUnittest.OptionsMessage> EnumOption = 102 new pb::Extension<global::Google.Protobuf.Reflection.EnumOptions, global::ProtobufUnittest.OptionsMessage>(504451567, pb::FieldCodec.ForMessage(4035612538, global::ProtobufUnittest.OptionsMessage.Parser)); 103 public static readonly pb::Extension<global::Google.Protobuf.Reflection.EnumValueOptions, global::ProtobufUnittest.OptionsMessage> EnumEntryOption = 104 new pb::Extension<global::Google.Protobuf.Reflection.EnumValueOptions, global::ProtobufUnittest.OptionsMessage>(504450522, pb::FieldCodec.ForMessage(4035604178, global::ProtobufUnittest.OptionsMessage.Parser)); 105 public static readonly pb::Extension<global::Google.Protobuf.Reflection.ServiceOptions, global::ProtobufUnittest.OptionsMessage> ServiceOption = 106 new pb::Extension<global::Google.Protobuf.Reflection.ServiceOptions, global::ProtobufUnittest.OptionsMessage>(504387709, pb::FieldCodec.ForMessage(4035101674, global::ProtobufUnittest.OptionsMessage.Parser)); 107 public static readonly pb::Extension<global::Google.Protobuf.Reflection.MethodOptions, global::ProtobufUnittest.OptionsMessage> MethodOption = 108 new pb::Extension<global::Google.Protobuf.Reflection.MethodOptions, global::ProtobufUnittest.OptionsMessage>(504349420, pb::FieldCodec.ForMessage(4034795362, global::ProtobufUnittest.OptionsMessage.Parser)); 109 public static readonly pb::Extension<global::ProtobufUnittest.Extendee, int> I = 110 new pb::Extension<global::ProtobufUnittest.Extendee, int>(1, pb::FieldCodec.ForInt32(8, 0)); 111 } 112 113 #region Enums 114 public enum TopLevelEnum { 115 [pbr::OriginalName("TOP_LEVEL_UNKNOWN")] TopLevelUnknown = 0, 116 } 117 118 #endregion 119 120 #region Messages 121 /// <summary> 122 /// Retention attributes set on fields nested within a message 123 /// </summary> 124 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] 125 public sealed partial class OptionsMessage : pb::IMessage<OptionsMessage> 126 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 127 , pb::IBufferMessage 128 #endif 129 { 130 private static readonly pb::MessageParser<OptionsMessage> _parser = new pb::MessageParser<OptionsMessage>(() => new OptionsMessage()); 131 private pb::UnknownFieldSet _unknownFields; 132 private int _hasBits0; 133 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 134 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 135 public static pb::MessageParser<OptionsMessage> Parser { get { return _parser; } } 136 137 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 138 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 139 public static pbr::MessageDescriptor Descriptor { 140 get { return global::ProtobufUnittest.UnittestRetentionReflection.Descriptor.MessageTypes[0]; } 141 } 142 143 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 144 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 145 pbr::MessageDescriptor pb::IMessage.Descriptor { 146 get { return Descriptor; } 147 } 148 149 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 150 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] OptionsMessage()151 public OptionsMessage() { 152 OnConstruction(); 153 } 154 OnConstruction()155 partial void OnConstruction(); 156 157 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 158 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] OptionsMessage(OptionsMessage other)159 public OptionsMessage(OptionsMessage other) : this() { 160 _hasBits0 = other._hasBits0; 161 plainField_ = other.plainField_; 162 runtimeRetentionField_ = other.runtimeRetentionField_; 163 sourceRetentionField_ = other.sourceRetentionField_; 164 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 165 } 166 167 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 168 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Clone()169 public OptionsMessage Clone() { 170 return new OptionsMessage(this); 171 } 172 173 /// <summary>Field number for the "plain_field" field.</summary> 174 public const int PlainFieldFieldNumber = 1; 175 private readonly static int PlainFieldDefaultValue = 0; 176 177 private int plainField_; 178 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 179 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 180 public int PlainField { 181 get { if ((_hasBits0 & 1) != 0) { return plainField_; } else { return PlainFieldDefaultValue; } } 182 set { 183 _hasBits0 |= 1; 184 plainField_ = value; 185 } 186 } 187 /// <summary>Gets whether the "plain_field" field is set</summary> 188 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 189 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 190 public bool HasPlainField { 191 get { return (_hasBits0 & 1) != 0; } 192 } 193 /// <summary>Clears the value of the "plain_field" field</summary> 194 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 195 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearPlainField()196 public void ClearPlainField() { 197 _hasBits0 &= ~1; 198 } 199 200 /// <summary>Field number for the "runtime_retention_field" field.</summary> 201 public const int RuntimeRetentionFieldFieldNumber = 2; 202 private readonly static int RuntimeRetentionFieldDefaultValue = 0; 203 204 private int runtimeRetentionField_; 205 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 206 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 207 public int RuntimeRetentionField { 208 get { if ((_hasBits0 & 2) != 0) { return runtimeRetentionField_; } else { return RuntimeRetentionFieldDefaultValue; } } 209 set { 210 _hasBits0 |= 2; 211 runtimeRetentionField_ = value; 212 } 213 } 214 /// <summary>Gets whether the "runtime_retention_field" field is set</summary> 215 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 216 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 217 public bool HasRuntimeRetentionField { 218 get { return (_hasBits0 & 2) != 0; } 219 } 220 /// <summary>Clears the value of the "runtime_retention_field" field</summary> 221 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 222 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearRuntimeRetentionField()223 public void ClearRuntimeRetentionField() { 224 _hasBits0 &= ~2; 225 } 226 227 /// <summary>Field number for the "source_retention_field" field.</summary> 228 public const int SourceRetentionFieldFieldNumber = 3; 229 private readonly static int SourceRetentionFieldDefaultValue = 0; 230 231 private int sourceRetentionField_; 232 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 233 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 234 public int SourceRetentionField { 235 get { if ((_hasBits0 & 4) != 0) { return sourceRetentionField_; } else { return SourceRetentionFieldDefaultValue; } } 236 set { 237 _hasBits0 |= 4; 238 sourceRetentionField_ = value; 239 } 240 } 241 /// <summary>Gets whether the "source_retention_field" field is set</summary> 242 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 243 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 244 public bool HasSourceRetentionField { 245 get { return (_hasBits0 & 4) != 0; } 246 } 247 /// <summary>Clears the value of the "source_retention_field" field</summary> 248 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 249 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearSourceRetentionField()250 public void ClearSourceRetentionField() { 251 _hasBits0 &= ~4; 252 } 253 254 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 255 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(object other)256 public override bool Equals(object other) { 257 return Equals(other as OptionsMessage); 258 } 259 260 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 261 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(OptionsMessage other)262 public bool Equals(OptionsMessage other) { 263 if (ReferenceEquals(other, null)) { 264 return false; 265 } 266 if (ReferenceEquals(other, this)) { 267 return true; 268 } 269 if (PlainField != other.PlainField) return false; 270 if (RuntimeRetentionField != other.RuntimeRetentionField) return false; 271 if (SourceRetentionField != other.SourceRetentionField) return false; 272 return Equals(_unknownFields, other._unknownFields); 273 } 274 275 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 276 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] GetHashCode()277 public override int GetHashCode() { 278 int hash = 1; 279 if (HasPlainField) hash ^= PlainField.GetHashCode(); 280 if (HasRuntimeRetentionField) hash ^= RuntimeRetentionField.GetHashCode(); 281 if (HasSourceRetentionField) hash ^= SourceRetentionField.GetHashCode(); 282 if (_unknownFields != null) { 283 hash ^= _unknownFields.GetHashCode(); 284 } 285 return hash; 286 } 287 288 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 289 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ToString()290 public override string ToString() { 291 return pb::JsonFormatter.ToDiagnosticString(this); 292 } 293 294 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 295 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] WriteTo(pb::CodedOutputStream output)296 public void WriteTo(pb::CodedOutputStream output) { 297 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 298 output.WriteRawMessage(this); 299 #else 300 if (HasPlainField) { 301 output.WriteRawTag(8); 302 output.WriteInt32(PlainField); 303 } 304 if (HasRuntimeRetentionField) { 305 output.WriteRawTag(16); 306 output.WriteInt32(RuntimeRetentionField); 307 } 308 if (HasSourceRetentionField) { 309 output.WriteRawTag(24); 310 output.WriteInt32(SourceRetentionField); 311 } 312 if (_unknownFields != null) { 313 _unknownFields.WriteTo(output); 314 } 315 #endif 316 } 317 318 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 319 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 320 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)321 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 322 if (HasPlainField) { 323 output.WriteRawTag(8); 324 output.WriteInt32(PlainField); 325 } 326 if (HasRuntimeRetentionField) { 327 output.WriteRawTag(16); 328 output.WriteInt32(RuntimeRetentionField); 329 } 330 if (HasSourceRetentionField) { 331 output.WriteRawTag(24); 332 output.WriteInt32(SourceRetentionField); 333 } 334 if (_unknownFields != null) { 335 _unknownFields.WriteTo(ref output); 336 } 337 } 338 #endif 339 340 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 341 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] CalculateSize()342 public int CalculateSize() { 343 int size = 0; 344 if (HasPlainField) { 345 size += 1 + pb::CodedOutputStream.ComputeInt32Size(PlainField); 346 } 347 if (HasRuntimeRetentionField) { 348 size += 1 + pb::CodedOutputStream.ComputeInt32Size(RuntimeRetentionField); 349 } 350 if (HasSourceRetentionField) { 351 size += 1 + pb::CodedOutputStream.ComputeInt32Size(SourceRetentionField); 352 } 353 if (_unknownFields != null) { 354 size += _unknownFields.CalculateSize(); 355 } 356 return size; 357 } 358 359 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 360 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(OptionsMessage other)361 public void MergeFrom(OptionsMessage other) { 362 if (other == null) { 363 return; 364 } 365 if (other.HasPlainField) { 366 PlainField = other.PlainField; 367 } 368 if (other.HasRuntimeRetentionField) { 369 RuntimeRetentionField = other.RuntimeRetentionField; 370 } 371 if (other.HasSourceRetentionField) { 372 SourceRetentionField = other.SourceRetentionField; 373 } 374 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 375 } 376 377 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 378 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(pb::CodedInputStream input)379 public void MergeFrom(pb::CodedInputStream input) { 380 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 381 input.ReadRawMessage(this); 382 #else 383 uint tag; 384 while ((tag = input.ReadTag()) != 0) { 385 if ((tag & 7) == 4) { 386 // Abort on any end group tag. 387 return; 388 } 389 switch(tag) { 390 default: 391 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 392 break; 393 case 8: { 394 PlainField = input.ReadInt32(); 395 break; 396 } 397 case 16: { 398 RuntimeRetentionField = input.ReadInt32(); 399 break; 400 } 401 case 24: { 402 SourceRetentionField = input.ReadInt32(); 403 break; 404 } 405 } 406 } 407 #endif 408 } 409 410 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 411 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 412 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)413 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 414 uint tag; 415 while ((tag = input.ReadTag()) != 0) { 416 if ((tag & 7) == 4) { 417 // Abort on any end group tag. 418 return; 419 } 420 switch(tag) { 421 default: 422 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 423 break; 424 case 8: { 425 PlainField = input.ReadInt32(); 426 break; 427 } 428 case 16: { 429 RuntimeRetentionField = input.ReadInt32(); 430 break; 431 } 432 case 24: { 433 SourceRetentionField = input.ReadInt32(); 434 break; 435 } 436 } 437 } 438 } 439 #endif 440 441 } 442 443 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] 444 public sealed partial class Extendee : pb::IExtendableMessage<Extendee> 445 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 446 , pb::IBufferMessage 447 #endif 448 { 449 private static readonly pb::MessageParser<Extendee> _parser = new pb::MessageParser<Extendee>(() => new Extendee()); 450 private pb::UnknownFieldSet _unknownFields; 451 private pb::ExtensionSet<Extendee> _extensions; 452 private pb::ExtensionSet<Extendee> _Extensions { get { return _extensions; } } 453 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 454 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 455 public static pb::MessageParser<Extendee> Parser { get { return _parser; } } 456 457 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 458 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 459 public static pbr::MessageDescriptor Descriptor { 460 get { return global::ProtobufUnittest.UnittestRetentionReflection.Descriptor.MessageTypes[1]; } 461 } 462 463 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 464 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 465 pbr::MessageDescriptor pb::IMessage.Descriptor { 466 get { return Descriptor; } 467 } 468 469 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 470 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Extendee()471 public Extendee() { 472 OnConstruction(); 473 } 474 OnConstruction()475 partial void OnConstruction(); 476 477 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 478 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Extendee(Extendee other)479 public Extendee(Extendee other) : this() { 480 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 481 _extensions = pb::ExtensionSet.Clone(other._extensions); 482 } 483 484 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 485 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Clone()486 public Extendee Clone() { 487 return new Extendee(this); 488 } 489 490 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 491 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(object other)492 public override bool Equals(object other) { 493 return Equals(other as Extendee); 494 } 495 496 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 497 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(Extendee other)498 public bool Equals(Extendee other) { 499 if (ReferenceEquals(other, null)) { 500 return false; 501 } 502 if (ReferenceEquals(other, this)) { 503 return true; 504 } 505 if (!Equals(_extensions, other._extensions)) { 506 return false; 507 } 508 return Equals(_unknownFields, other._unknownFields); 509 } 510 511 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 512 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] GetHashCode()513 public override int GetHashCode() { 514 int hash = 1; 515 if (_extensions != null) { 516 hash ^= _extensions.GetHashCode(); 517 } 518 if (_unknownFields != null) { 519 hash ^= _unknownFields.GetHashCode(); 520 } 521 return hash; 522 } 523 524 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 525 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ToString()526 public override string ToString() { 527 return pb::JsonFormatter.ToDiagnosticString(this); 528 } 529 530 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 531 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] WriteTo(pb::CodedOutputStream output)532 public void WriteTo(pb::CodedOutputStream output) { 533 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 534 output.WriteRawMessage(this); 535 #else 536 if (_extensions != null) { 537 _extensions.WriteTo(output); 538 } 539 if (_unknownFields != null) { 540 _unknownFields.WriteTo(output); 541 } 542 #endif 543 } 544 545 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 546 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 547 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)548 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 549 if (_extensions != null) { 550 _extensions.WriteTo(ref output); 551 } 552 if (_unknownFields != null) { 553 _unknownFields.WriteTo(ref output); 554 } 555 } 556 #endif 557 558 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 559 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] CalculateSize()560 public int CalculateSize() { 561 int size = 0; 562 if (_extensions != null) { 563 size += _extensions.CalculateSize(); 564 } 565 if (_unknownFields != null) { 566 size += _unknownFields.CalculateSize(); 567 } 568 return size; 569 } 570 571 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 572 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(Extendee other)573 public void MergeFrom(Extendee other) { 574 if (other == null) { 575 return; 576 } 577 pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions); 578 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 579 } 580 581 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 582 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(pb::CodedInputStream input)583 public void MergeFrom(pb::CodedInputStream input) { 584 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 585 input.ReadRawMessage(this); 586 #else 587 uint tag; 588 while ((tag = input.ReadTag()) != 0) { 589 if ((tag & 7) == 4) { 590 // Abort on any end group tag. 591 return; 592 } 593 switch(tag) { 594 default: 595 if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) { 596 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 597 } 598 break; 599 } 600 } 601 #endif 602 } 603 604 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 605 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 606 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)607 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 608 uint tag; 609 while ((tag = input.ReadTag()) != 0) { 610 if ((tag & 7) == 4) { 611 // Abort on any end group tag. 612 return; 613 } 614 switch(tag) { 615 default: 616 if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, ref input)) { 617 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 618 } 619 break; 620 } 621 } 622 } 623 #endif 624 GetExtension(pb::Extension<Extendee, TValue> extension)625 public TValue GetExtension<TValue>(pb::Extension<Extendee, TValue> extension) { 626 return pb::ExtensionSet.Get(ref _extensions, extension); 627 } GetExtension(pb::RepeatedExtension<Extendee, TValue> extension)628 public pbc::RepeatedField<TValue> GetExtension<TValue>(pb::RepeatedExtension<Extendee, TValue> extension) { 629 return pb::ExtensionSet.Get(ref _extensions, extension); 630 } GetOrInitializeExtension(pb::RepeatedExtension<Extendee, TValue> extension)631 public pbc::RepeatedField<TValue> GetOrInitializeExtension<TValue>(pb::RepeatedExtension<Extendee, TValue> extension) { 632 return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); 633 } SetExtension(pb::Extension<Extendee, TValue> extension, TValue value)634 public void SetExtension<TValue>(pb::Extension<Extendee, TValue> extension, TValue value) { 635 pb::ExtensionSet.Set(ref _extensions, extension, value); 636 } HasExtension(pb::Extension<Extendee, TValue> extension)637 public bool HasExtension<TValue>(pb::Extension<Extendee, TValue> extension) { 638 return pb::ExtensionSet.Has(ref _extensions, extension); 639 } ClearExtension(pb::Extension<Extendee, TValue> extension)640 public void ClearExtension<TValue>(pb::Extension<Extendee, TValue> extension) { 641 pb::ExtensionSet.Clear(ref _extensions, extension); 642 } ClearExtension(pb::RepeatedExtension<Extendee, TValue> extension)643 public void ClearExtension<TValue>(pb::RepeatedExtension<Extendee, TValue> extension) { 644 pb::ExtensionSet.Clear(ref _extensions, extension); 645 } 646 647 } 648 649 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] 650 public sealed partial class TopLevelMessage : pb::IExtendableMessage<TopLevelMessage> 651 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 652 , pb::IBufferMessage 653 #endif 654 { 655 private static readonly pb::MessageParser<TopLevelMessage> _parser = new pb::MessageParser<TopLevelMessage>(() => new TopLevelMessage()); 656 private pb::UnknownFieldSet _unknownFields; 657 private pb::ExtensionSet<TopLevelMessage> _extensions; 658 private pb::ExtensionSet<TopLevelMessage> _Extensions { get { return _extensions; } } 659 private int _hasBits0; 660 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 661 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 662 public static pb::MessageParser<TopLevelMessage> Parser { get { return _parser; } } 663 664 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 665 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 666 public static pbr::MessageDescriptor Descriptor { 667 get { return global::ProtobufUnittest.UnittestRetentionReflection.Descriptor.MessageTypes[2]; } 668 } 669 670 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 671 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 672 pbr::MessageDescriptor pb::IMessage.Descriptor { 673 get { return Descriptor; } 674 } 675 676 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 677 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] TopLevelMessage()678 public TopLevelMessage() { 679 OnConstruction(); 680 } 681 OnConstruction()682 partial void OnConstruction(); 683 684 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 685 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] TopLevelMessage(TopLevelMessage other)686 public TopLevelMessage(TopLevelMessage other) : this() { 687 _hasBits0 = other._hasBits0; 688 f_ = other.f_; 689 switch (other.OCase) { 690 case OOneofCase.I: 691 I = other.I; 692 break; 693 } 694 695 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 696 _extensions = pb::ExtensionSet.Clone(other._extensions); 697 } 698 699 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 700 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Clone()701 public TopLevelMessage Clone() { 702 return new TopLevelMessage(this); 703 } 704 705 /// <summary>Field number for the "f" field.</summary> 706 public const int FFieldNumber = 1; 707 private readonly static float FDefaultValue = 0F; 708 709 private float f_; 710 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 711 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 712 public float F { 713 get { if ((_hasBits0 & 1) != 0) { return f_; } else { return FDefaultValue; } } 714 set { 715 _hasBits0 |= 1; 716 f_ = value; 717 } 718 } 719 /// <summary>Gets whether the "f" field is set</summary> 720 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 721 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 722 public bool HasF { 723 get { return (_hasBits0 & 1) != 0; } 724 } 725 /// <summary>Clears the value of the "f" field</summary> 726 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 727 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearF()728 public void ClearF() { 729 _hasBits0 &= ~1; 730 } 731 732 /// <summary>Field number for the "i" field.</summary> 733 public const int IFieldNumber = 2; 734 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 735 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 736 public long I { 737 get { return HasI ? (long) o_ : 0L; } 738 set { 739 o_ = value; 740 oCase_ = OOneofCase.I; 741 } 742 } 743 /// <summary>Gets whether the "i" field is set</summary> 744 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 745 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 746 public bool HasI { 747 get { return oCase_ == OOneofCase.I; } 748 } 749 /// <summary> Clears the value of the oneof if it's currently set to "i" </summary> 750 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 751 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearI()752 public void ClearI() { 753 if (HasI) { 754 ClearO(); 755 } 756 } 757 758 private object o_; 759 /// <summary>Enum of possible cases for the "o" oneof.</summary> 760 public enum OOneofCase { 761 None = 0, 762 I = 2, 763 } 764 private OOneofCase oCase_ = OOneofCase.None; 765 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 766 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 767 public OOneofCase OCase { 768 get { return oCase_; } 769 } 770 771 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 772 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ClearO()773 public void ClearO() { 774 oCase_ = OOneofCase.None; 775 o_ = null; 776 } 777 778 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 779 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(object other)780 public override bool Equals(object other) { 781 return Equals(other as TopLevelMessage); 782 } 783 784 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 785 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(TopLevelMessage other)786 public bool Equals(TopLevelMessage other) { 787 if (ReferenceEquals(other, null)) { 788 return false; 789 } 790 if (ReferenceEquals(other, this)) { 791 return true; 792 } 793 if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(F, other.F)) return false; 794 if (I != other.I) return false; 795 if (OCase != other.OCase) return false; 796 if (!Equals(_extensions, other._extensions)) { 797 return false; 798 } 799 return Equals(_unknownFields, other._unknownFields); 800 } 801 802 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 803 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] GetHashCode()804 public override int GetHashCode() { 805 int hash = 1; 806 if (HasF) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(F); 807 if (HasI) hash ^= I.GetHashCode(); 808 hash ^= (int) oCase_; 809 if (_extensions != null) { 810 hash ^= _extensions.GetHashCode(); 811 } 812 if (_unknownFields != null) { 813 hash ^= _unknownFields.GetHashCode(); 814 } 815 return hash; 816 } 817 818 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 819 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ToString()820 public override string ToString() { 821 return pb::JsonFormatter.ToDiagnosticString(this); 822 } 823 824 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 825 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] WriteTo(pb::CodedOutputStream output)826 public void WriteTo(pb::CodedOutputStream output) { 827 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 828 output.WriteRawMessage(this); 829 #else 830 if (HasF) { 831 output.WriteRawTag(13); 832 output.WriteFloat(F); 833 } 834 if (HasI) { 835 output.WriteRawTag(16); 836 output.WriteInt64(I); 837 } 838 if (_extensions != null) { 839 _extensions.WriteTo(output); 840 } 841 if (_unknownFields != null) { 842 _unknownFields.WriteTo(output); 843 } 844 #endif 845 } 846 847 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 848 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 849 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)850 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 851 if (HasF) { 852 output.WriteRawTag(13); 853 output.WriteFloat(F); 854 } 855 if (HasI) { 856 output.WriteRawTag(16); 857 output.WriteInt64(I); 858 } 859 if (_extensions != null) { 860 _extensions.WriteTo(ref output); 861 } 862 if (_unknownFields != null) { 863 _unknownFields.WriteTo(ref output); 864 } 865 } 866 #endif 867 868 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 869 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] CalculateSize()870 public int CalculateSize() { 871 int size = 0; 872 if (HasF) { 873 size += 1 + 4; 874 } 875 if (HasI) { 876 size += 1 + pb::CodedOutputStream.ComputeInt64Size(I); 877 } 878 if (_extensions != null) { 879 size += _extensions.CalculateSize(); 880 } 881 if (_unknownFields != null) { 882 size += _unknownFields.CalculateSize(); 883 } 884 return size; 885 } 886 887 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 888 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(TopLevelMessage other)889 public void MergeFrom(TopLevelMessage other) { 890 if (other == null) { 891 return; 892 } 893 if (other.HasF) { 894 F = other.F; 895 } 896 switch (other.OCase) { 897 case OOneofCase.I: 898 I = other.I; 899 break; 900 } 901 902 pb::ExtensionSet.MergeFrom(ref _extensions, other._extensions); 903 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 904 } 905 906 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 907 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(pb::CodedInputStream input)908 public void MergeFrom(pb::CodedInputStream input) { 909 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 910 input.ReadRawMessage(this); 911 #else 912 uint tag; 913 while ((tag = input.ReadTag()) != 0) { 914 if ((tag & 7) == 4) { 915 // Abort on any end group tag. 916 return; 917 } 918 switch(tag) { 919 default: 920 if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, input)) { 921 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 922 } 923 break; 924 case 13: { 925 F = input.ReadFloat(); 926 break; 927 } 928 case 16: { 929 I = input.ReadInt64(); 930 break; 931 } 932 } 933 } 934 #endif 935 } 936 937 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 938 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 939 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)940 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 941 uint tag; 942 while ((tag = input.ReadTag()) != 0) { 943 if ((tag & 7) == 4) { 944 // Abort on any end group tag. 945 return; 946 } 947 switch(tag) { 948 default: 949 if (!pb::ExtensionSet.TryMergeFieldFrom(ref _extensions, ref input)) { 950 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 951 } 952 break; 953 case 13: { 954 F = input.ReadFloat(); 955 break; 956 } 957 case 16: { 958 I = input.ReadInt64(); 959 break; 960 } 961 } 962 } 963 } 964 #endif 965 GetExtension(pb::Extension<TopLevelMessage, TValue> extension)966 public TValue GetExtension<TValue>(pb::Extension<TopLevelMessage, TValue> extension) { 967 return pb::ExtensionSet.Get(ref _extensions, extension); 968 } GetExtension(pb::RepeatedExtension<TopLevelMessage, TValue> extension)969 public pbc::RepeatedField<TValue> GetExtension<TValue>(pb::RepeatedExtension<TopLevelMessage, TValue> extension) { 970 return pb::ExtensionSet.Get(ref _extensions, extension); 971 } GetOrInitializeExtension(pb::RepeatedExtension<TopLevelMessage, TValue> extension)972 public pbc::RepeatedField<TValue> GetOrInitializeExtension<TValue>(pb::RepeatedExtension<TopLevelMessage, TValue> extension) { 973 return pb::ExtensionSet.GetOrInitialize(ref _extensions, extension); 974 } SetExtension(pb::Extension<TopLevelMessage, TValue> extension, TValue value)975 public void SetExtension<TValue>(pb::Extension<TopLevelMessage, TValue> extension, TValue value) { 976 pb::ExtensionSet.Set(ref _extensions, extension, value); 977 } HasExtension(pb::Extension<TopLevelMessage, TValue> extension)978 public bool HasExtension<TValue>(pb::Extension<TopLevelMessage, TValue> extension) { 979 return pb::ExtensionSet.Has(ref _extensions, extension); 980 } ClearExtension(pb::Extension<TopLevelMessage, TValue> extension)981 public void ClearExtension<TValue>(pb::Extension<TopLevelMessage, TValue> extension) { 982 pb::ExtensionSet.Clear(ref _extensions, extension); 983 } ClearExtension(pb::RepeatedExtension<TopLevelMessage, TValue> extension)984 public void ClearExtension<TValue>(pb::RepeatedExtension<TopLevelMessage, TValue> extension) { 985 pb::ExtensionSet.Clear(ref _extensions, extension); 986 } 987 988 #region Nested types 989 /// <summary>Container for nested types declared in the TopLevelMessage message type.</summary> 990 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 991 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 992 public static partial class Types { 993 public enum NestedEnum { 994 [pbr::OriginalName("NESTED_UNKNOWN")] NestedUnknown = 0, 995 } 996 997 [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] 998 public sealed partial class NestedMessage : pb::IMessage<NestedMessage> 999 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1000 , pb::IBufferMessage 1001 #endif 1002 { 1003 private static readonly pb::MessageParser<NestedMessage> _parser = new pb::MessageParser<NestedMessage>(() => new NestedMessage()); 1004 private pb::UnknownFieldSet _unknownFields; 1005 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1006 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1007 public static pb::MessageParser<NestedMessage> Parser { get { return _parser; } } 1008 1009 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1010 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1011 public static pbr::MessageDescriptor Descriptor { 1012 get { return global::ProtobufUnittest.TopLevelMessage.Descriptor.NestedTypes[0]; } 1013 } 1014 1015 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1016 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1017 pbr::MessageDescriptor pb::IMessage.Descriptor { 1018 get { return Descriptor; } 1019 } 1020 1021 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1022 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] NestedMessage()1023 public NestedMessage() { 1024 OnConstruction(); 1025 } 1026 OnConstruction()1027 partial void OnConstruction(); 1028 1029 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1030 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] NestedMessage(NestedMessage other)1031 public NestedMessage(NestedMessage other) : this() { 1032 _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 1033 } 1034 1035 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1036 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Clone()1037 public NestedMessage Clone() { 1038 return new NestedMessage(this); 1039 } 1040 1041 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1042 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(object other)1043 public override bool Equals(object other) { 1044 return Equals(other as NestedMessage); 1045 } 1046 1047 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1048 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] Equals(NestedMessage other)1049 public bool Equals(NestedMessage other) { 1050 if (ReferenceEquals(other, null)) { 1051 return false; 1052 } 1053 if (ReferenceEquals(other, this)) { 1054 return true; 1055 } 1056 return Equals(_unknownFields, other._unknownFields); 1057 } 1058 1059 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1060 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] GetHashCode()1061 public override int GetHashCode() { 1062 int hash = 1; 1063 if (_unknownFields != null) { 1064 hash ^= _unknownFields.GetHashCode(); 1065 } 1066 return hash; 1067 } 1068 1069 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1070 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] ToString()1071 public override string ToString() { 1072 return pb::JsonFormatter.ToDiagnosticString(this); 1073 } 1074 1075 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1076 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] WriteTo(pb::CodedOutputStream output)1077 public void WriteTo(pb::CodedOutputStream output) { 1078 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1079 output.WriteRawMessage(this); 1080 #else 1081 if (_unknownFields != null) { 1082 _unknownFields.WriteTo(output); 1083 } 1084 #endif 1085 } 1086 1087 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1088 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1089 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalWriteTo(ref pb::WriteContext output)1090 void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 1091 if (_unknownFields != null) { 1092 _unknownFields.WriteTo(ref output); 1093 } 1094 } 1095 #endif 1096 1097 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1098 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] CalculateSize()1099 public int CalculateSize() { 1100 int size = 0; 1101 if (_unknownFields != null) { 1102 size += _unknownFields.CalculateSize(); 1103 } 1104 return size; 1105 } 1106 1107 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1108 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(NestedMessage other)1109 public void MergeFrom(NestedMessage other) { 1110 if (other == null) { 1111 return; 1112 } 1113 _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 1114 } 1115 1116 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1117 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] MergeFrom(pb::CodedInputStream input)1118 public void MergeFrom(pb::CodedInputStream input) { 1119 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1120 input.ReadRawMessage(this); 1121 #else 1122 uint tag; 1123 while ((tag = input.ReadTag()) != 0) { 1124 if ((tag & 7) == 4) { 1125 // Abort on any end group tag. 1126 return; 1127 } 1128 switch(tag) { 1129 default: 1130 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 1131 break; 1132 } 1133 } 1134 #endif 1135 } 1136 1137 #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 1138 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1139 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)1140 void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 1141 uint tag; 1142 while ((tag = input.ReadTag()) != 0) { 1143 if ((tag & 7) == 4) { 1144 // Abort on any end group tag. 1145 return; 1146 } 1147 switch(tag) { 1148 default: 1149 _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 1150 break; 1151 } 1152 } 1153 } 1154 #endif 1155 1156 } 1157 1158 } 1159 #endregion 1160 1161 #region Extensions 1162 /// <summary>Container for extensions for other messages declared in the TopLevelMessage message type.</summary> 1163 [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 1164 [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] 1165 public static partial class Extensions { 1166 public static readonly pb::Extension<global::ProtobufUnittest.Extendee, string> S = 1167 new pb::Extension<global::ProtobufUnittest.Extendee, string>(2, pb::FieldCodec.ForString(18, "")); 1168 } 1169 #endregion 1170 1171 } 1172 1173 #endregion 1174 1175 } 1176 1177 #endregion Designer generated code 1178