public void MergeFrom(Customer other) { if (other == null) { return; } if (other.Name.Length != 0) { Name = other.Name; } if (other.OrgDisplayName.Length != 0) { OrgDisplayName = other.OrgDisplayName; } if (other.orgPostalAddress_ != null) { if (orgPostalAddress_ == null) { OrgPostalAddress = new global::Google.Type.PostalAddress(); } OrgPostalAddress.MergeFrom(other.OrgPostalAddress); } if (other.primaryContactInfo_ != null) { if (primaryContactInfo_ == null) { PrimaryContactInfo = new global::Google.Cloud.Channel.V1.ContactInfo(); } PrimaryContactInfo.MergeFrom(other.PrimaryContactInfo); } if (other.AlternateEmail.Length != 0) { AlternateEmail = other.AlternateEmail; } if (other.Domain.Length != 0) { Domain = other.Domain; } if (other.createTime_ != null) { if (createTime_ == null) { CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } CreateTime.MergeFrom(other.CreateTime); } if (other.updateTime_ != null) { if (updateTime_ == null) { UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } UpdateTime.MergeFrom(other.UpdateTime); } if (other.CloudIdentityId.Length != 0) { CloudIdentityId = other.CloudIdentityId; } if (other.LanguageCode.Length != 0) { LanguageCode = other.LanguageCode; } if (other.cloudIdentityInfo_ != null) { if (cloudIdentityInfo_ == null) { CloudIdentityInfo = new global::Google.Cloud.Channel.V1.CloudIdentityInfo(); } CloudIdentityInfo.MergeFrom(other.CloudIdentityInfo); } if (other.ChannelPartnerId.Length != 0) { ChannelPartnerId = other.ChannelPartnerId; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 10: { Name = input.ReadString(); break; } case 18: { OrgDisplayName = input.ReadString(); break; } case 26: { if (orgPostalAddress_ == null) { OrgPostalAddress = new global::Google.Type.PostalAddress(); } input.ReadMessage(OrgPostalAddress); break; } case 34: { if (primaryContactInfo_ == null) { PrimaryContactInfo = new global::Google.Cloud.Channel.V1.ContactInfo(); } input.ReadMessage(PrimaryContactInfo); break; } case 42: { AlternateEmail = input.ReadString(); break; } case 50: { Domain = input.ReadString(); break; } case 58: { if (createTime_ == null) { CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } input.ReadMessage(CreateTime); break; } case 66: { if (updateTime_ == null) { UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } input.ReadMessage(UpdateTime); break; } case 74: { CloudIdentityId = input.ReadString(); break; } case 82: { LanguageCode = input.ReadString(); break; } case 98: { if (cloudIdentityInfo_ == null) { CloudIdentityInfo = new global::Google.Cloud.Channel.V1.CloudIdentityInfo(); } input.ReadMessage(CloudIdentityInfo); break; } case 106: { ChannelPartnerId = input.ReadString(); break; } } } }
public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { Name = input.ReadString(); break; } case 18: { OrgDisplayName = input.ReadString(); break; } case 26: { if (orgPostalAddress_ == null) { OrgPostalAddress = new global::Google.Type.PostalAddress(); } input.ReadMessage(OrgPostalAddress); break; } case 34: { if (primaryContactInfo_ == null) { PrimaryContactInfo = new global::Google.Cloud.Channel.V1.ContactInfo(); } input.ReadMessage(PrimaryContactInfo); break; } case 42: { AlternateEmail = input.ReadString(); break; } case 50: { Domain = input.ReadString(); break; } case 58: { if (createTime_ == null) { CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } input.ReadMessage(CreateTime); break; } case 66: { if (updateTime_ == null) { UpdateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } input.ReadMessage(UpdateTime); break; } case 74: { CloudIdentityId = input.ReadString(); break; } case 82: { LanguageCode = input.ReadString(); break; } case 98: { if (cloudIdentityInfo_ == null) { CloudIdentityInfo = new global::Google.Cloud.Channel.V1.CloudIdentityInfo(); } input.ReadMessage(CloudIdentityInfo); break; } case 106: { ChannelPartnerId = input.ReadString(); break; } } } #endif }