1ffe3c632Sopenharmony_ci// <auto-generated> 2ffe3c632Sopenharmony_ci// Generated by the protocol buffer compiler. DO NOT EDIT! 3ffe3c632Sopenharmony_ci// source: addressbook.proto 4ffe3c632Sopenharmony_ci// </auto-generated> 5ffe3c632Sopenharmony_ci#pragma warning disable 1591, 0612, 3021 6ffe3c632Sopenharmony_ci#region Designer generated code 7ffe3c632Sopenharmony_ci 8ffe3c632Sopenharmony_ciusing pb = global::Google.Protobuf; 9ffe3c632Sopenharmony_ciusing pbc = global::Google.Protobuf.Collections; 10ffe3c632Sopenharmony_ciusing pbr = global::Google.Protobuf.Reflection; 11ffe3c632Sopenharmony_ciusing scg = global::System.Collections.Generic; 12ffe3c632Sopenharmony_cinamespace Google.Protobuf.Examples.AddressBook { 13ffe3c632Sopenharmony_ci 14ffe3c632Sopenharmony_ci /// <summary>Holder for reflection information generated from addressbook.proto</summary> 15ffe3c632Sopenharmony_ci public static partial class AddressbookReflection { 16ffe3c632Sopenharmony_ci 17ffe3c632Sopenharmony_ci #region Descriptor 18ffe3c632Sopenharmony_ci /// <summary>File descriptor for addressbook.proto</summary> 19ffe3c632Sopenharmony_ci public static pbr::FileDescriptor Descriptor { 20ffe3c632Sopenharmony_ci get { return descriptor; } 21ffe3c632Sopenharmony_ci } 22ffe3c632Sopenharmony_ci private static pbr::FileDescriptor descriptor; 23ffe3c632Sopenharmony_ci 24ffe3c632Sopenharmony_ci static AddressbookReflection() { 25ffe3c632Sopenharmony_ci byte[] descriptorData = global::System.Convert.FromBase64String( 26ffe3c632Sopenharmony_ci string.Concat( 27ffe3c632Sopenharmony_ci "ChFhZGRyZXNzYm9vay5wcm90bxIIdHV0b3JpYWwaH2dvb2dsZS9wcm90b2J1", 28ffe3c632Sopenharmony_ci "Zi90aW1lc3RhbXAucHJvdG8ihwIKBlBlcnNvbhIMCgRuYW1lGAEgASgJEgoK", 29ffe3c632Sopenharmony_ci "AmlkGAIgASgFEg0KBWVtYWlsGAMgASgJEiwKBnBob25lcxgEIAMoCzIcLnR1", 30ffe3c632Sopenharmony_ci "dG9yaWFsLlBlcnNvbi5QaG9uZU51bWJlchIwCgxsYXN0X3VwZGF0ZWQYBSAB", 31ffe3c632Sopenharmony_ci "KAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wGkcKC1Bob25lTnVtYmVy", 32ffe3c632Sopenharmony_ci "Eg4KBm51bWJlchgBIAEoCRIoCgR0eXBlGAIgASgOMhoudHV0b3JpYWwuUGVy", 33ffe3c632Sopenharmony_ci "c29uLlBob25lVHlwZSIrCglQaG9uZVR5cGUSCgoGTU9CSUxFEAASCAoESE9N", 34ffe3c632Sopenharmony_ci "RRABEggKBFdPUksQAiIvCgtBZGRyZXNzQm9vaxIgCgZwZW9wbGUYASADKAsy", 35ffe3c632Sopenharmony_ci "EC50dXRvcmlhbC5QZXJzb25CUAoUY29tLmV4YW1wbGUudHV0b3JpYWxCEUFk", 36ffe3c632Sopenharmony_ci "ZHJlc3NCb29rUHJvdG9zqgIkR29vZ2xlLlByb3RvYnVmLkV4YW1wbGVzLkFk", 37ffe3c632Sopenharmony_ci "ZHJlc3NCb29rYgZwcm90bzM=")); 38ffe3c632Sopenharmony_ci descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, 39ffe3c632Sopenharmony_ci new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, }, 40ffe3c632Sopenharmony_ci new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { 41ffe3c632Sopenharmony_ci new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Examples.AddressBook.Person), global::Google.Protobuf.Examples.AddressBook.Person.Parser, new[]{ "Name", "Id", "Email", "Phones", "LastUpdated" }, null, new[]{ typeof(global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneNumber), global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneNumber.Parser, new[]{ "Number", "Type" }, null, null, null, null)}), 42ffe3c632Sopenharmony_ci new pbr::GeneratedClrTypeInfo(typeof(global::Google.Protobuf.Examples.AddressBook.AddressBook), global::Google.Protobuf.Examples.AddressBook.AddressBook.Parser, new[]{ "People" }, null, null, null, null) 43ffe3c632Sopenharmony_ci })); 44ffe3c632Sopenharmony_ci } 45ffe3c632Sopenharmony_ci #endregion 46ffe3c632Sopenharmony_ci 47ffe3c632Sopenharmony_ci } 48ffe3c632Sopenharmony_ci #region Messages 49ffe3c632Sopenharmony_ci /// <summary> 50ffe3c632Sopenharmony_ci /// [START messages] 51ffe3c632Sopenharmony_ci /// </summary> 52ffe3c632Sopenharmony_ci public sealed partial class Person : pb::IMessage<Person> 53ffe3c632Sopenharmony_ci #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 54ffe3c632Sopenharmony_ci , pb::IBufferMessage 55ffe3c632Sopenharmony_ci #endif 56ffe3c632Sopenharmony_ci { 57ffe3c632Sopenharmony_ci private static readonly pb::MessageParser<Person> _parser = new pb::MessageParser<Person>(() => new Person()); 58ffe3c632Sopenharmony_ci private pb::UnknownFieldSet _unknownFields; 59ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 60ffe3c632Sopenharmony_ci public static pb::MessageParser<Person> Parser { get { return _parser; } } 61ffe3c632Sopenharmony_ci 62ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 63ffe3c632Sopenharmony_ci public static pbr::MessageDescriptor Descriptor { 64ffe3c632Sopenharmony_ci get { return global::Google.Protobuf.Examples.AddressBook.AddressbookReflection.Descriptor.MessageTypes[0]; } 65ffe3c632Sopenharmony_ci } 66ffe3c632Sopenharmony_ci 67ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 68ffe3c632Sopenharmony_ci pbr::MessageDescriptor pb::IMessage.Descriptor { 69ffe3c632Sopenharmony_ci get { return Descriptor; } 70ffe3c632Sopenharmony_ci } 71ffe3c632Sopenharmony_ci 72ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 73ffe3c632Sopenharmony_ci public Person() { 74ffe3c632Sopenharmony_ci OnConstruction(); 75ffe3c632Sopenharmony_ci } 76ffe3c632Sopenharmony_ci 77ffe3c632Sopenharmony_ci partial void OnConstruction(); 78ffe3c632Sopenharmony_ci 79ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 80ffe3c632Sopenharmony_ci public Person(Person other) : this() { 81ffe3c632Sopenharmony_ci name_ = other.name_; 82ffe3c632Sopenharmony_ci id_ = other.id_; 83ffe3c632Sopenharmony_ci email_ = other.email_; 84ffe3c632Sopenharmony_ci phones_ = other.phones_.Clone(); 85ffe3c632Sopenharmony_ci lastUpdated_ = other.lastUpdated_ != null ? other.lastUpdated_.Clone() : null; 86ffe3c632Sopenharmony_ci _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 87ffe3c632Sopenharmony_ci } 88ffe3c632Sopenharmony_ci 89ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 90ffe3c632Sopenharmony_ci public Person Clone() { 91ffe3c632Sopenharmony_ci return new Person(this); 92ffe3c632Sopenharmony_ci } 93ffe3c632Sopenharmony_ci 94ffe3c632Sopenharmony_ci /// <summary>Field number for the "name" field.</summary> 95ffe3c632Sopenharmony_ci public const int NameFieldNumber = 1; 96ffe3c632Sopenharmony_ci private string name_ = ""; 97ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 98ffe3c632Sopenharmony_ci public string Name { 99ffe3c632Sopenharmony_ci get { return name_; } 100ffe3c632Sopenharmony_ci set { 101ffe3c632Sopenharmony_ci name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 102ffe3c632Sopenharmony_ci } 103ffe3c632Sopenharmony_ci } 104ffe3c632Sopenharmony_ci 105ffe3c632Sopenharmony_ci /// <summary>Field number for the "id" field.</summary> 106ffe3c632Sopenharmony_ci public const int IdFieldNumber = 2; 107ffe3c632Sopenharmony_ci private int id_; 108ffe3c632Sopenharmony_ci /// <summary> 109ffe3c632Sopenharmony_ci /// Unique ID number for this person. 110ffe3c632Sopenharmony_ci /// </summary> 111ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 112ffe3c632Sopenharmony_ci public int Id { 113ffe3c632Sopenharmony_ci get { return id_; } 114ffe3c632Sopenharmony_ci set { 115ffe3c632Sopenharmony_ci id_ = value; 116ffe3c632Sopenharmony_ci } 117ffe3c632Sopenharmony_ci } 118ffe3c632Sopenharmony_ci 119ffe3c632Sopenharmony_ci /// <summary>Field number for the "email" field.</summary> 120ffe3c632Sopenharmony_ci public const int EmailFieldNumber = 3; 121ffe3c632Sopenharmony_ci private string email_ = ""; 122ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 123ffe3c632Sopenharmony_ci public string Email { 124ffe3c632Sopenharmony_ci get { return email_; } 125ffe3c632Sopenharmony_ci set { 126ffe3c632Sopenharmony_ci email_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 127ffe3c632Sopenharmony_ci } 128ffe3c632Sopenharmony_ci } 129ffe3c632Sopenharmony_ci 130ffe3c632Sopenharmony_ci /// <summary>Field number for the "phones" field.</summary> 131ffe3c632Sopenharmony_ci public const int PhonesFieldNumber = 4; 132ffe3c632Sopenharmony_ci private static readonly pb::FieldCodec<global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneNumber> _repeated_phones_codec 133ffe3c632Sopenharmony_ci = pb::FieldCodec.ForMessage(34, global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneNumber.Parser); 134ffe3c632Sopenharmony_ci private readonly pbc::RepeatedField<global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneNumber> phones_ = new pbc::RepeatedField<global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneNumber>(); 135ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 136ffe3c632Sopenharmony_ci public pbc::RepeatedField<global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneNumber> Phones { 137ffe3c632Sopenharmony_ci get { return phones_; } 138ffe3c632Sopenharmony_ci } 139ffe3c632Sopenharmony_ci 140ffe3c632Sopenharmony_ci /// <summary>Field number for the "last_updated" field.</summary> 141ffe3c632Sopenharmony_ci public const int LastUpdatedFieldNumber = 5; 142ffe3c632Sopenharmony_ci private global::Google.Protobuf.WellKnownTypes.Timestamp lastUpdated_; 143ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 144ffe3c632Sopenharmony_ci public global::Google.Protobuf.WellKnownTypes.Timestamp LastUpdated { 145ffe3c632Sopenharmony_ci get { return lastUpdated_; } 146ffe3c632Sopenharmony_ci set { 147ffe3c632Sopenharmony_ci lastUpdated_ = value; 148ffe3c632Sopenharmony_ci } 149ffe3c632Sopenharmony_ci } 150ffe3c632Sopenharmony_ci 151ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 152ffe3c632Sopenharmony_ci public override bool Equals(object other) { 153ffe3c632Sopenharmony_ci return Equals(other as Person); 154ffe3c632Sopenharmony_ci } 155ffe3c632Sopenharmony_ci 156ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 157ffe3c632Sopenharmony_ci public bool Equals(Person other) { 158ffe3c632Sopenharmony_ci if (ReferenceEquals(other, null)) { 159ffe3c632Sopenharmony_ci return false; 160ffe3c632Sopenharmony_ci } 161ffe3c632Sopenharmony_ci if (ReferenceEquals(other, this)) { 162ffe3c632Sopenharmony_ci return true; 163ffe3c632Sopenharmony_ci } 164ffe3c632Sopenharmony_ci if (Name != other.Name) return false; 165ffe3c632Sopenharmony_ci if (Id != other.Id) return false; 166ffe3c632Sopenharmony_ci if (Email != other.Email) return false; 167ffe3c632Sopenharmony_ci if(!phones_.Equals(other.phones_)) return false; 168ffe3c632Sopenharmony_ci if (!object.Equals(LastUpdated, other.LastUpdated)) return false; 169ffe3c632Sopenharmony_ci return Equals(_unknownFields, other._unknownFields); 170ffe3c632Sopenharmony_ci } 171ffe3c632Sopenharmony_ci 172ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 173ffe3c632Sopenharmony_ci public override int GetHashCode() { 174ffe3c632Sopenharmony_ci int hash = 1; 175ffe3c632Sopenharmony_ci if (Name.Length != 0) hash ^= Name.GetHashCode(); 176ffe3c632Sopenharmony_ci if (Id != 0) hash ^= Id.GetHashCode(); 177ffe3c632Sopenharmony_ci if (Email.Length != 0) hash ^= Email.GetHashCode(); 178ffe3c632Sopenharmony_ci hash ^= phones_.GetHashCode(); 179ffe3c632Sopenharmony_ci if (lastUpdated_ != null) hash ^= LastUpdated.GetHashCode(); 180ffe3c632Sopenharmony_ci if (_unknownFields != null) { 181ffe3c632Sopenharmony_ci hash ^= _unknownFields.GetHashCode(); 182ffe3c632Sopenharmony_ci } 183ffe3c632Sopenharmony_ci return hash; 184ffe3c632Sopenharmony_ci } 185ffe3c632Sopenharmony_ci 186ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 187ffe3c632Sopenharmony_ci public override string ToString() { 188ffe3c632Sopenharmony_ci return pb::JsonFormatter.ToDiagnosticString(this); 189ffe3c632Sopenharmony_ci } 190ffe3c632Sopenharmony_ci 191ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 192ffe3c632Sopenharmony_ci public void WriteTo(pb::CodedOutputStream output) { 193ffe3c632Sopenharmony_ci #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 194ffe3c632Sopenharmony_ci output.WriteRawMessage(this); 195ffe3c632Sopenharmony_ci #else 196ffe3c632Sopenharmony_ci if (Name.Length != 0) { 197ffe3c632Sopenharmony_ci output.WriteRawTag(10); 198ffe3c632Sopenharmony_ci output.WriteString(Name); 199ffe3c632Sopenharmony_ci } 200ffe3c632Sopenharmony_ci if (Id != 0) { 201ffe3c632Sopenharmony_ci output.WriteRawTag(16); 202ffe3c632Sopenharmony_ci output.WriteInt32(Id); 203ffe3c632Sopenharmony_ci } 204ffe3c632Sopenharmony_ci if (Email.Length != 0) { 205ffe3c632Sopenharmony_ci output.WriteRawTag(26); 206ffe3c632Sopenharmony_ci output.WriteString(Email); 207ffe3c632Sopenharmony_ci } 208ffe3c632Sopenharmony_ci phones_.WriteTo(output, _repeated_phones_codec); 209ffe3c632Sopenharmony_ci if (lastUpdated_ != null) { 210ffe3c632Sopenharmony_ci output.WriteRawTag(42); 211ffe3c632Sopenharmony_ci output.WriteMessage(LastUpdated); 212ffe3c632Sopenharmony_ci } 213ffe3c632Sopenharmony_ci if (_unknownFields != null) { 214ffe3c632Sopenharmony_ci _unknownFields.WriteTo(output); 215ffe3c632Sopenharmony_ci } 216ffe3c632Sopenharmony_ci #endif 217ffe3c632Sopenharmony_ci } 218ffe3c632Sopenharmony_ci 219ffe3c632Sopenharmony_ci #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 220ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 221ffe3c632Sopenharmony_ci void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 222ffe3c632Sopenharmony_ci if (Name.Length != 0) { 223ffe3c632Sopenharmony_ci output.WriteRawTag(10); 224ffe3c632Sopenharmony_ci output.WriteString(Name); 225ffe3c632Sopenharmony_ci } 226ffe3c632Sopenharmony_ci if (Id != 0) { 227ffe3c632Sopenharmony_ci output.WriteRawTag(16); 228ffe3c632Sopenharmony_ci output.WriteInt32(Id); 229ffe3c632Sopenharmony_ci } 230ffe3c632Sopenharmony_ci if (Email.Length != 0) { 231ffe3c632Sopenharmony_ci output.WriteRawTag(26); 232ffe3c632Sopenharmony_ci output.WriteString(Email); 233ffe3c632Sopenharmony_ci } 234ffe3c632Sopenharmony_ci phones_.WriteTo(ref output, _repeated_phones_codec); 235ffe3c632Sopenharmony_ci if (lastUpdated_ != null) { 236ffe3c632Sopenharmony_ci output.WriteRawTag(42); 237ffe3c632Sopenharmony_ci output.WriteMessage(LastUpdated); 238ffe3c632Sopenharmony_ci } 239ffe3c632Sopenharmony_ci if (_unknownFields != null) { 240ffe3c632Sopenharmony_ci _unknownFields.WriteTo(ref output); 241ffe3c632Sopenharmony_ci } 242ffe3c632Sopenharmony_ci } 243ffe3c632Sopenharmony_ci #endif 244ffe3c632Sopenharmony_ci 245ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 246ffe3c632Sopenharmony_ci public int CalculateSize() { 247ffe3c632Sopenharmony_ci int size = 0; 248ffe3c632Sopenharmony_ci if (Name.Length != 0) { 249ffe3c632Sopenharmony_ci size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); 250ffe3c632Sopenharmony_ci } 251ffe3c632Sopenharmony_ci if (Id != 0) { 252ffe3c632Sopenharmony_ci size += 1 + pb::CodedOutputStream.ComputeInt32Size(Id); 253ffe3c632Sopenharmony_ci } 254ffe3c632Sopenharmony_ci if (Email.Length != 0) { 255ffe3c632Sopenharmony_ci size += 1 + pb::CodedOutputStream.ComputeStringSize(Email); 256ffe3c632Sopenharmony_ci } 257ffe3c632Sopenharmony_ci size += phones_.CalculateSize(_repeated_phones_codec); 258ffe3c632Sopenharmony_ci if (lastUpdated_ != null) { 259ffe3c632Sopenharmony_ci size += 1 + pb::CodedOutputStream.ComputeMessageSize(LastUpdated); 260ffe3c632Sopenharmony_ci } 261ffe3c632Sopenharmony_ci if (_unknownFields != null) { 262ffe3c632Sopenharmony_ci size += _unknownFields.CalculateSize(); 263ffe3c632Sopenharmony_ci } 264ffe3c632Sopenharmony_ci return size; 265ffe3c632Sopenharmony_ci } 266ffe3c632Sopenharmony_ci 267ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 268ffe3c632Sopenharmony_ci public void MergeFrom(Person other) { 269ffe3c632Sopenharmony_ci if (other == null) { 270ffe3c632Sopenharmony_ci return; 271ffe3c632Sopenharmony_ci } 272ffe3c632Sopenharmony_ci if (other.Name.Length != 0) { 273ffe3c632Sopenharmony_ci Name = other.Name; 274ffe3c632Sopenharmony_ci } 275ffe3c632Sopenharmony_ci if (other.Id != 0) { 276ffe3c632Sopenharmony_ci Id = other.Id; 277ffe3c632Sopenharmony_ci } 278ffe3c632Sopenharmony_ci if (other.Email.Length != 0) { 279ffe3c632Sopenharmony_ci Email = other.Email; 280ffe3c632Sopenharmony_ci } 281ffe3c632Sopenharmony_ci phones_.Add(other.phones_); 282ffe3c632Sopenharmony_ci if (other.lastUpdated_ != null) { 283ffe3c632Sopenharmony_ci if (lastUpdated_ == null) { 284ffe3c632Sopenharmony_ci LastUpdated = new global::Google.Protobuf.WellKnownTypes.Timestamp(); 285ffe3c632Sopenharmony_ci } 286ffe3c632Sopenharmony_ci LastUpdated.MergeFrom(other.LastUpdated); 287ffe3c632Sopenharmony_ci } 288ffe3c632Sopenharmony_ci _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 289ffe3c632Sopenharmony_ci } 290ffe3c632Sopenharmony_ci 291ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 292ffe3c632Sopenharmony_ci public void MergeFrom(pb::CodedInputStream input) { 293ffe3c632Sopenharmony_ci #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 294ffe3c632Sopenharmony_ci input.ReadRawMessage(this); 295ffe3c632Sopenharmony_ci #else 296ffe3c632Sopenharmony_ci uint tag; 297ffe3c632Sopenharmony_ci while ((tag = input.ReadTag()) != 0) { 298ffe3c632Sopenharmony_ci switch(tag) { 299ffe3c632Sopenharmony_ci default: 300ffe3c632Sopenharmony_ci _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 301ffe3c632Sopenharmony_ci break; 302ffe3c632Sopenharmony_ci case 10: { 303ffe3c632Sopenharmony_ci Name = input.ReadString(); 304ffe3c632Sopenharmony_ci break; 305ffe3c632Sopenharmony_ci } 306ffe3c632Sopenharmony_ci case 16: { 307ffe3c632Sopenharmony_ci Id = input.ReadInt32(); 308ffe3c632Sopenharmony_ci break; 309ffe3c632Sopenharmony_ci } 310ffe3c632Sopenharmony_ci case 26: { 311ffe3c632Sopenharmony_ci Email = input.ReadString(); 312ffe3c632Sopenharmony_ci break; 313ffe3c632Sopenharmony_ci } 314ffe3c632Sopenharmony_ci case 34: { 315ffe3c632Sopenharmony_ci phones_.AddEntriesFrom(input, _repeated_phones_codec); 316ffe3c632Sopenharmony_ci break; 317ffe3c632Sopenharmony_ci } 318ffe3c632Sopenharmony_ci case 42: { 319ffe3c632Sopenharmony_ci if (lastUpdated_ == null) { 320ffe3c632Sopenharmony_ci LastUpdated = new global::Google.Protobuf.WellKnownTypes.Timestamp(); 321ffe3c632Sopenharmony_ci } 322ffe3c632Sopenharmony_ci input.ReadMessage(LastUpdated); 323ffe3c632Sopenharmony_ci break; 324ffe3c632Sopenharmony_ci } 325ffe3c632Sopenharmony_ci } 326ffe3c632Sopenharmony_ci } 327ffe3c632Sopenharmony_ci #endif 328ffe3c632Sopenharmony_ci } 329ffe3c632Sopenharmony_ci 330ffe3c632Sopenharmony_ci #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 331ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 332ffe3c632Sopenharmony_ci void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 333ffe3c632Sopenharmony_ci uint tag; 334ffe3c632Sopenharmony_ci while ((tag = input.ReadTag()) != 0) { 335ffe3c632Sopenharmony_ci switch(tag) { 336ffe3c632Sopenharmony_ci default: 337ffe3c632Sopenharmony_ci _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 338ffe3c632Sopenharmony_ci break; 339ffe3c632Sopenharmony_ci case 10: { 340ffe3c632Sopenharmony_ci Name = input.ReadString(); 341ffe3c632Sopenharmony_ci break; 342ffe3c632Sopenharmony_ci } 343ffe3c632Sopenharmony_ci case 16: { 344ffe3c632Sopenharmony_ci Id = input.ReadInt32(); 345ffe3c632Sopenharmony_ci break; 346ffe3c632Sopenharmony_ci } 347ffe3c632Sopenharmony_ci case 26: { 348ffe3c632Sopenharmony_ci Email = input.ReadString(); 349ffe3c632Sopenharmony_ci break; 350ffe3c632Sopenharmony_ci } 351ffe3c632Sopenharmony_ci case 34: { 352ffe3c632Sopenharmony_ci phones_.AddEntriesFrom(ref input, _repeated_phones_codec); 353ffe3c632Sopenharmony_ci break; 354ffe3c632Sopenharmony_ci } 355ffe3c632Sopenharmony_ci case 42: { 356ffe3c632Sopenharmony_ci if (lastUpdated_ == null) { 357ffe3c632Sopenharmony_ci LastUpdated = new global::Google.Protobuf.WellKnownTypes.Timestamp(); 358ffe3c632Sopenharmony_ci } 359ffe3c632Sopenharmony_ci input.ReadMessage(LastUpdated); 360ffe3c632Sopenharmony_ci break; 361ffe3c632Sopenharmony_ci } 362ffe3c632Sopenharmony_ci } 363ffe3c632Sopenharmony_ci } 364ffe3c632Sopenharmony_ci } 365ffe3c632Sopenharmony_ci #endif 366ffe3c632Sopenharmony_ci 367ffe3c632Sopenharmony_ci #region Nested types 368ffe3c632Sopenharmony_ci /// <summary>Container for nested types declared in the Person message type.</summary> 369ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 370ffe3c632Sopenharmony_ci public static partial class Types { 371ffe3c632Sopenharmony_ci public enum PhoneType { 372ffe3c632Sopenharmony_ci [pbr::OriginalName("MOBILE")] Mobile = 0, 373ffe3c632Sopenharmony_ci [pbr::OriginalName("HOME")] Home = 1, 374ffe3c632Sopenharmony_ci [pbr::OriginalName("WORK")] Work = 2, 375ffe3c632Sopenharmony_ci } 376ffe3c632Sopenharmony_ci 377ffe3c632Sopenharmony_ci public sealed partial class PhoneNumber : pb::IMessage<PhoneNumber> 378ffe3c632Sopenharmony_ci #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 379ffe3c632Sopenharmony_ci , pb::IBufferMessage 380ffe3c632Sopenharmony_ci #endif 381ffe3c632Sopenharmony_ci { 382ffe3c632Sopenharmony_ci private static readonly pb::MessageParser<PhoneNumber> _parser = new pb::MessageParser<PhoneNumber>(() => new PhoneNumber()); 383ffe3c632Sopenharmony_ci private pb::UnknownFieldSet _unknownFields; 384ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 385ffe3c632Sopenharmony_ci public static pb::MessageParser<PhoneNumber> Parser { get { return _parser; } } 386ffe3c632Sopenharmony_ci 387ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 388ffe3c632Sopenharmony_ci public static pbr::MessageDescriptor Descriptor { 389ffe3c632Sopenharmony_ci get { return global::Google.Protobuf.Examples.AddressBook.Person.Descriptor.NestedTypes[0]; } 390ffe3c632Sopenharmony_ci } 391ffe3c632Sopenharmony_ci 392ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 393ffe3c632Sopenharmony_ci pbr::MessageDescriptor pb::IMessage.Descriptor { 394ffe3c632Sopenharmony_ci get { return Descriptor; } 395ffe3c632Sopenharmony_ci } 396ffe3c632Sopenharmony_ci 397ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 398ffe3c632Sopenharmony_ci public PhoneNumber() { 399ffe3c632Sopenharmony_ci OnConstruction(); 400ffe3c632Sopenharmony_ci } 401ffe3c632Sopenharmony_ci 402ffe3c632Sopenharmony_ci partial void OnConstruction(); 403ffe3c632Sopenharmony_ci 404ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 405ffe3c632Sopenharmony_ci public PhoneNumber(PhoneNumber other) : this() { 406ffe3c632Sopenharmony_ci number_ = other.number_; 407ffe3c632Sopenharmony_ci type_ = other.type_; 408ffe3c632Sopenharmony_ci _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 409ffe3c632Sopenharmony_ci } 410ffe3c632Sopenharmony_ci 411ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 412ffe3c632Sopenharmony_ci public PhoneNumber Clone() { 413ffe3c632Sopenharmony_ci return new PhoneNumber(this); 414ffe3c632Sopenharmony_ci } 415ffe3c632Sopenharmony_ci 416ffe3c632Sopenharmony_ci /// <summary>Field number for the "number" field.</summary> 417ffe3c632Sopenharmony_ci public const int NumberFieldNumber = 1; 418ffe3c632Sopenharmony_ci private string number_ = ""; 419ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 420ffe3c632Sopenharmony_ci public string Number { 421ffe3c632Sopenharmony_ci get { return number_; } 422ffe3c632Sopenharmony_ci set { 423ffe3c632Sopenharmony_ci number_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); 424ffe3c632Sopenharmony_ci } 425ffe3c632Sopenharmony_ci } 426ffe3c632Sopenharmony_ci 427ffe3c632Sopenharmony_ci /// <summary>Field number for the "type" field.</summary> 428ffe3c632Sopenharmony_ci public const int TypeFieldNumber = 2; 429ffe3c632Sopenharmony_ci private global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType type_ = global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.Mobile; 430ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 431ffe3c632Sopenharmony_ci public global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType Type { 432ffe3c632Sopenharmony_ci get { return type_; } 433ffe3c632Sopenharmony_ci set { 434ffe3c632Sopenharmony_ci type_ = value; 435ffe3c632Sopenharmony_ci } 436ffe3c632Sopenharmony_ci } 437ffe3c632Sopenharmony_ci 438ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 439ffe3c632Sopenharmony_ci public override bool Equals(object other) { 440ffe3c632Sopenharmony_ci return Equals(other as PhoneNumber); 441ffe3c632Sopenharmony_ci } 442ffe3c632Sopenharmony_ci 443ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 444ffe3c632Sopenharmony_ci public bool Equals(PhoneNumber other) { 445ffe3c632Sopenharmony_ci if (ReferenceEquals(other, null)) { 446ffe3c632Sopenharmony_ci return false; 447ffe3c632Sopenharmony_ci } 448ffe3c632Sopenharmony_ci if (ReferenceEquals(other, this)) { 449ffe3c632Sopenharmony_ci return true; 450ffe3c632Sopenharmony_ci } 451ffe3c632Sopenharmony_ci if (Number != other.Number) return false; 452ffe3c632Sopenharmony_ci if (Type != other.Type) return false; 453ffe3c632Sopenharmony_ci return Equals(_unknownFields, other._unknownFields); 454ffe3c632Sopenharmony_ci } 455ffe3c632Sopenharmony_ci 456ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 457ffe3c632Sopenharmony_ci public override int GetHashCode() { 458ffe3c632Sopenharmony_ci int hash = 1; 459ffe3c632Sopenharmony_ci if (Number.Length != 0) hash ^= Number.GetHashCode(); 460ffe3c632Sopenharmony_ci if (Type != global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.Mobile) hash ^= Type.GetHashCode(); 461ffe3c632Sopenharmony_ci if (_unknownFields != null) { 462ffe3c632Sopenharmony_ci hash ^= _unknownFields.GetHashCode(); 463ffe3c632Sopenharmony_ci } 464ffe3c632Sopenharmony_ci return hash; 465ffe3c632Sopenharmony_ci } 466ffe3c632Sopenharmony_ci 467ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 468ffe3c632Sopenharmony_ci public override string ToString() { 469ffe3c632Sopenharmony_ci return pb::JsonFormatter.ToDiagnosticString(this); 470ffe3c632Sopenharmony_ci } 471ffe3c632Sopenharmony_ci 472ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 473ffe3c632Sopenharmony_ci public void WriteTo(pb::CodedOutputStream output) { 474ffe3c632Sopenharmony_ci #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 475ffe3c632Sopenharmony_ci output.WriteRawMessage(this); 476ffe3c632Sopenharmony_ci #else 477ffe3c632Sopenharmony_ci if (Number.Length != 0) { 478ffe3c632Sopenharmony_ci output.WriteRawTag(10); 479ffe3c632Sopenharmony_ci output.WriteString(Number); 480ffe3c632Sopenharmony_ci } 481ffe3c632Sopenharmony_ci if (Type != global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.Mobile) { 482ffe3c632Sopenharmony_ci output.WriteRawTag(16); 483ffe3c632Sopenharmony_ci output.WriteEnum((int) Type); 484ffe3c632Sopenharmony_ci } 485ffe3c632Sopenharmony_ci if (_unknownFields != null) { 486ffe3c632Sopenharmony_ci _unknownFields.WriteTo(output); 487ffe3c632Sopenharmony_ci } 488ffe3c632Sopenharmony_ci #endif 489ffe3c632Sopenharmony_ci } 490ffe3c632Sopenharmony_ci 491ffe3c632Sopenharmony_ci #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 492ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 493ffe3c632Sopenharmony_ci void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 494ffe3c632Sopenharmony_ci if (Number.Length != 0) { 495ffe3c632Sopenharmony_ci output.WriteRawTag(10); 496ffe3c632Sopenharmony_ci output.WriteString(Number); 497ffe3c632Sopenharmony_ci } 498ffe3c632Sopenharmony_ci if (Type != global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.Mobile) { 499ffe3c632Sopenharmony_ci output.WriteRawTag(16); 500ffe3c632Sopenharmony_ci output.WriteEnum((int) Type); 501ffe3c632Sopenharmony_ci } 502ffe3c632Sopenharmony_ci if (_unknownFields != null) { 503ffe3c632Sopenharmony_ci _unknownFields.WriteTo(ref output); 504ffe3c632Sopenharmony_ci } 505ffe3c632Sopenharmony_ci } 506ffe3c632Sopenharmony_ci #endif 507ffe3c632Sopenharmony_ci 508ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 509ffe3c632Sopenharmony_ci public int CalculateSize() { 510ffe3c632Sopenharmony_ci int size = 0; 511ffe3c632Sopenharmony_ci if (Number.Length != 0) { 512ffe3c632Sopenharmony_ci size += 1 + pb::CodedOutputStream.ComputeStringSize(Number); 513ffe3c632Sopenharmony_ci } 514ffe3c632Sopenharmony_ci if (Type != global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.Mobile) { 515ffe3c632Sopenharmony_ci size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); 516ffe3c632Sopenharmony_ci } 517ffe3c632Sopenharmony_ci if (_unknownFields != null) { 518ffe3c632Sopenharmony_ci size += _unknownFields.CalculateSize(); 519ffe3c632Sopenharmony_ci } 520ffe3c632Sopenharmony_ci return size; 521ffe3c632Sopenharmony_ci } 522ffe3c632Sopenharmony_ci 523ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 524ffe3c632Sopenharmony_ci public void MergeFrom(PhoneNumber other) { 525ffe3c632Sopenharmony_ci if (other == null) { 526ffe3c632Sopenharmony_ci return; 527ffe3c632Sopenharmony_ci } 528ffe3c632Sopenharmony_ci if (other.Number.Length != 0) { 529ffe3c632Sopenharmony_ci Number = other.Number; 530ffe3c632Sopenharmony_ci } 531ffe3c632Sopenharmony_ci if (other.Type != global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType.Mobile) { 532ffe3c632Sopenharmony_ci Type = other.Type; 533ffe3c632Sopenharmony_ci } 534ffe3c632Sopenharmony_ci _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 535ffe3c632Sopenharmony_ci } 536ffe3c632Sopenharmony_ci 537ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 538ffe3c632Sopenharmony_ci public void MergeFrom(pb::CodedInputStream input) { 539ffe3c632Sopenharmony_ci #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 540ffe3c632Sopenharmony_ci input.ReadRawMessage(this); 541ffe3c632Sopenharmony_ci #else 542ffe3c632Sopenharmony_ci uint tag; 543ffe3c632Sopenharmony_ci while ((tag = input.ReadTag()) != 0) { 544ffe3c632Sopenharmony_ci switch(tag) { 545ffe3c632Sopenharmony_ci default: 546ffe3c632Sopenharmony_ci _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 547ffe3c632Sopenharmony_ci break; 548ffe3c632Sopenharmony_ci case 10: { 549ffe3c632Sopenharmony_ci Number = input.ReadString(); 550ffe3c632Sopenharmony_ci break; 551ffe3c632Sopenharmony_ci } 552ffe3c632Sopenharmony_ci case 16: { 553ffe3c632Sopenharmony_ci Type = (global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType) input.ReadEnum(); 554ffe3c632Sopenharmony_ci break; 555ffe3c632Sopenharmony_ci } 556ffe3c632Sopenharmony_ci } 557ffe3c632Sopenharmony_ci } 558ffe3c632Sopenharmony_ci #endif 559ffe3c632Sopenharmony_ci } 560ffe3c632Sopenharmony_ci 561ffe3c632Sopenharmony_ci #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 562ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 563ffe3c632Sopenharmony_ci void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 564ffe3c632Sopenharmony_ci uint tag; 565ffe3c632Sopenharmony_ci while ((tag = input.ReadTag()) != 0) { 566ffe3c632Sopenharmony_ci switch(tag) { 567ffe3c632Sopenharmony_ci default: 568ffe3c632Sopenharmony_ci _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 569ffe3c632Sopenharmony_ci break; 570ffe3c632Sopenharmony_ci case 10: { 571ffe3c632Sopenharmony_ci Number = input.ReadString(); 572ffe3c632Sopenharmony_ci break; 573ffe3c632Sopenharmony_ci } 574ffe3c632Sopenharmony_ci case 16: { 575ffe3c632Sopenharmony_ci Type = (global::Google.Protobuf.Examples.AddressBook.Person.Types.PhoneType) input.ReadEnum(); 576ffe3c632Sopenharmony_ci break; 577ffe3c632Sopenharmony_ci } 578ffe3c632Sopenharmony_ci } 579ffe3c632Sopenharmony_ci } 580ffe3c632Sopenharmony_ci } 581ffe3c632Sopenharmony_ci #endif 582ffe3c632Sopenharmony_ci 583ffe3c632Sopenharmony_ci } 584ffe3c632Sopenharmony_ci 585ffe3c632Sopenharmony_ci } 586ffe3c632Sopenharmony_ci #endregion 587ffe3c632Sopenharmony_ci 588ffe3c632Sopenharmony_ci } 589ffe3c632Sopenharmony_ci 590ffe3c632Sopenharmony_ci /// <summary> 591ffe3c632Sopenharmony_ci /// Our address book file is just one of these. 592ffe3c632Sopenharmony_ci /// </summary> 593ffe3c632Sopenharmony_ci public sealed partial class AddressBook : pb::IMessage<AddressBook> 594ffe3c632Sopenharmony_ci #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 595ffe3c632Sopenharmony_ci , pb::IBufferMessage 596ffe3c632Sopenharmony_ci #endif 597ffe3c632Sopenharmony_ci { 598ffe3c632Sopenharmony_ci private static readonly pb::MessageParser<AddressBook> _parser = new pb::MessageParser<AddressBook>(() => new AddressBook()); 599ffe3c632Sopenharmony_ci private pb::UnknownFieldSet _unknownFields; 600ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 601ffe3c632Sopenharmony_ci public static pb::MessageParser<AddressBook> Parser { get { return _parser; } } 602ffe3c632Sopenharmony_ci 603ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 604ffe3c632Sopenharmony_ci public static pbr::MessageDescriptor Descriptor { 605ffe3c632Sopenharmony_ci get { return global::Google.Protobuf.Examples.AddressBook.AddressbookReflection.Descriptor.MessageTypes[1]; } 606ffe3c632Sopenharmony_ci } 607ffe3c632Sopenharmony_ci 608ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 609ffe3c632Sopenharmony_ci pbr::MessageDescriptor pb::IMessage.Descriptor { 610ffe3c632Sopenharmony_ci get { return Descriptor; } 611ffe3c632Sopenharmony_ci } 612ffe3c632Sopenharmony_ci 613ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 614ffe3c632Sopenharmony_ci public AddressBook() { 615ffe3c632Sopenharmony_ci OnConstruction(); 616ffe3c632Sopenharmony_ci } 617ffe3c632Sopenharmony_ci 618ffe3c632Sopenharmony_ci partial void OnConstruction(); 619ffe3c632Sopenharmony_ci 620ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 621ffe3c632Sopenharmony_ci public AddressBook(AddressBook other) : this() { 622ffe3c632Sopenharmony_ci people_ = other.people_.Clone(); 623ffe3c632Sopenharmony_ci _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); 624ffe3c632Sopenharmony_ci } 625ffe3c632Sopenharmony_ci 626ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 627ffe3c632Sopenharmony_ci public AddressBook Clone() { 628ffe3c632Sopenharmony_ci return new AddressBook(this); 629ffe3c632Sopenharmony_ci } 630ffe3c632Sopenharmony_ci 631ffe3c632Sopenharmony_ci /// <summary>Field number for the "people" field.</summary> 632ffe3c632Sopenharmony_ci public const int PeopleFieldNumber = 1; 633ffe3c632Sopenharmony_ci private static readonly pb::FieldCodec<global::Google.Protobuf.Examples.AddressBook.Person> _repeated_people_codec 634ffe3c632Sopenharmony_ci = pb::FieldCodec.ForMessage(10, global::Google.Protobuf.Examples.AddressBook.Person.Parser); 635ffe3c632Sopenharmony_ci private readonly pbc::RepeatedField<global::Google.Protobuf.Examples.AddressBook.Person> people_ = new pbc::RepeatedField<global::Google.Protobuf.Examples.AddressBook.Person>(); 636ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 637ffe3c632Sopenharmony_ci public pbc::RepeatedField<global::Google.Protobuf.Examples.AddressBook.Person> People { 638ffe3c632Sopenharmony_ci get { return people_; } 639ffe3c632Sopenharmony_ci } 640ffe3c632Sopenharmony_ci 641ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 642ffe3c632Sopenharmony_ci public override bool Equals(object other) { 643ffe3c632Sopenharmony_ci return Equals(other as AddressBook); 644ffe3c632Sopenharmony_ci } 645ffe3c632Sopenharmony_ci 646ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 647ffe3c632Sopenharmony_ci public bool Equals(AddressBook other) { 648ffe3c632Sopenharmony_ci if (ReferenceEquals(other, null)) { 649ffe3c632Sopenharmony_ci return false; 650ffe3c632Sopenharmony_ci } 651ffe3c632Sopenharmony_ci if (ReferenceEquals(other, this)) { 652ffe3c632Sopenharmony_ci return true; 653ffe3c632Sopenharmony_ci } 654ffe3c632Sopenharmony_ci if(!people_.Equals(other.people_)) return false; 655ffe3c632Sopenharmony_ci return Equals(_unknownFields, other._unknownFields); 656ffe3c632Sopenharmony_ci } 657ffe3c632Sopenharmony_ci 658ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 659ffe3c632Sopenharmony_ci public override int GetHashCode() { 660ffe3c632Sopenharmony_ci int hash = 1; 661ffe3c632Sopenharmony_ci hash ^= people_.GetHashCode(); 662ffe3c632Sopenharmony_ci if (_unknownFields != null) { 663ffe3c632Sopenharmony_ci hash ^= _unknownFields.GetHashCode(); 664ffe3c632Sopenharmony_ci } 665ffe3c632Sopenharmony_ci return hash; 666ffe3c632Sopenharmony_ci } 667ffe3c632Sopenharmony_ci 668ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 669ffe3c632Sopenharmony_ci public override string ToString() { 670ffe3c632Sopenharmony_ci return pb::JsonFormatter.ToDiagnosticString(this); 671ffe3c632Sopenharmony_ci } 672ffe3c632Sopenharmony_ci 673ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 674ffe3c632Sopenharmony_ci public void WriteTo(pb::CodedOutputStream output) { 675ffe3c632Sopenharmony_ci #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 676ffe3c632Sopenharmony_ci output.WriteRawMessage(this); 677ffe3c632Sopenharmony_ci #else 678ffe3c632Sopenharmony_ci people_.WriteTo(output, _repeated_people_codec); 679ffe3c632Sopenharmony_ci if (_unknownFields != null) { 680ffe3c632Sopenharmony_ci _unknownFields.WriteTo(output); 681ffe3c632Sopenharmony_ci } 682ffe3c632Sopenharmony_ci #endif 683ffe3c632Sopenharmony_ci } 684ffe3c632Sopenharmony_ci 685ffe3c632Sopenharmony_ci #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 686ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 687ffe3c632Sopenharmony_ci void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { 688ffe3c632Sopenharmony_ci people_.WriteTo(ref output, _repeated_people_codec); 689ffe3c632Sopenharmony_ci if (_unknownFields != null) { 690ffe3c632Sopenharmony_ci _unknownFields.WriteTo(ref output); 691ffe3c632Sopenharmony_ci } 692ffe3c632Sopenharmony_ci } 693ffe3c632Sopenharmony_ci #endif 694ffe3c632Sopenharmony_ci 695ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 696ffe3c632Sopenharmony_ci public int CalculateSize() { 697ffe3c632Sopenharmony_ci int size = 0; 698ffe3c632Sopenharmony_ci size += people_.CalculateSize(_repeated_people_codec); 699ffe3c632Sopenharmony_ci if (_unknownFields != null) { 700ffe3c632Sopenharmony_ci size += _unknownFields.CalculateSize(); 701ffe3c632Sopenharmony_ci } 702ffe3c632Sopenharmony_ci return size; 703ffe3c632Sopenharmony_ci } 704ffe3c632Sopenharmony_ci 705ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 706ffe3c632Sopenharmony_ci public void MergeFrom(AddressBook other) { 707ffe3c632Sopenharmony_ci if (other == null) { 708ffe3c632Sopenharmony_ci return; 709ffe3c632Sopenharmony_ci } 710ffe3c632Sopenharmony_ci people_.Add(other.people_); 711ffe3c632Sopenharmony_ci _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); 712ffe3c632Sopenharmony_ci } 713ffe3c632Sopenharmony_ci 714ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 715ffe3c632Sopenharmony_ci public void MergeFrom(pb::CodedInputStream input) { 716ffe3c632Sopenharmony_ci #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 717ffe3c632Sopenharmony_ci input.ReadRawMessage(this); 718ffe3c632Sopenharmony_ci #else 719ffe3c632Sopenharmony_ci uint tag; 720ffe3c632Sopenharmony_ci while ((tag = input.ReadTag()) != 0) { 721ffe3c632Sopenharmony_ci switch(tag) { 722ffe3c632Sopenharmony_ci default: 723ffe3c632Sopenharmony_ci _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); 724ffe3c632Sopenharmony_ci break; 725ffe3c632Sopenharmony_ci case 10: { 726ffe3c632Sopenharmony_ci people_.AddEntriesFrom(input, _repeated_people_codec); 727ffe3c632Sopenharmony_ci break; 728ffe3c632Sopenharmony_ci } 729ffe3c632Sopenharmony_ci } 730ffe3c632Sopenharmony_ci } 731ffe3c632Sopenharmony_ci #endif 732ffe3c632Sopenharmony_ci } 733ffe3c632Sopenharmony_ci 734ffe3c632Sopenharmony_ci #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE 735ffe3c632Sopenharmony_ci [global::System.Diagnostics.DebuggerNonUserCodeAttribute] 736ffe3c632Sopenharmony_ci void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { 737ffe3c632Sopenharmony_ci uint tag; 738ffe3c632Sopenharmony_ci while ((tag = input.ReadTag()) != 0) { 739ffe3c632Sopenharmony_ci switch(tag) { 740ffe3c632Sopenharmony_ci default: 741ffe3c632Sopenharmony_ci _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); 742ffe3c632Sopenharmony_ci break; 743ffe3c632Sopenharmony_ci case 10: { 744ffe3c632Sopenharmony_ci people_.AddEntriesFrom(ref input, _repeated_people_codec); 745ffe3c632Sopenharmony_ci break; 746ffe3c632Sopenharmony_ci } 747ffe3c632Sopenharmony_ci } 748ffe3c632Sopenharmony_ci } 749ffe3c632Sopenharmony_ci } 750ffe3c632Sopenharmony_ci #endif 751ffe3c632Sopenharmony_ci 752ffe3c632Sopenharmony_ci } 753ffe3c632Sopenharmony_ci 754ffe3c632Sopenharmony_ci #endregion 755ffe3c632Sopenharmony_ci 756ffe3c632Sopenharmony_ci} 757ffe3c632Sopenharmony_ci 758ffe3c632Sopenharmony_ci#endregion Designer generated code 759