public void MergeFrom(Address other) { if (other == null) { return; } if (other.Id.Length != 0) { Id = other.Id; } if (other.FolderId.Length != 0) { FolderId = other.FolderId; } if (other.createdAt_ != null) { if (createdAt_ == null) { CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } CreatedAt.MergeFrom(other.CreatedAt); } if (other.Name.Length != 0) { Name = other.Name; } if (other.Description.Length != 0) { Description = other.Description; } labels_.Add(other.labels_); if (other.Reserved != false) { Reserved = other.Reserved; } if (other.Used != false) { Used = other.Used; } switch (other.AddressCase) { case AddressOneofCase.ExternalIpv4Address: if (ExternalIpv4Address == null) { ExternalIpv4Address = new global::Yandex.Cloud.Vpc.V1.ExternalIpv4Address(); } ExternalIpv4Address.MergeFrom(other.ExternalIpv4Address); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { Id = input.ReadString(); break; } case 18: { FolderId = input.ReadString(); break; } case 26: { if (createdAt_ == null) { CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } input.ReadMessage(CreatedAt); break; } case 34: { Name = input.ReadString(); break; } case 42: { Description = input.ReadString(); break; } case 50: { labels_.AddEntriesFrom(input, _map_labels_codec); break; } case 58: { global::Yandex.Cloud.Vpc.V1.ExternalIpv4Address subBuilder = new global::Yandex.Cloud.Vpc.V1.ExternalIpv4Address(); if (addressCase_ == AddressOneofCase.ExternalIpv4Address) { subBuilder.MergeFrom(ExternalIpv4Address); } input.ReadMessage(subBuilder); ExternalIpv4Address = subBuilder; break; } case 120: { Reserved = input.ReadBool(); break; } case 128: { Used = input.ReadBool(); break; } } } }