public void MergeFrom(BillingSetup other) { if (other == null) { return; } if (other.ResourceName.Length != 0) { ResourceName = other.ResourceName; } if (other.id_ != null) { if (id_ == null || other.Id != 0L) { Id = other.Id; } } if (other.Status != 0) { Status = other.Status; } if (other.paymentsAccount_ != null) { if (paymentsAccount_ == null || other.PaymentsAccount != "") { PaymentsAccount = other.PaymentsAccount; } } if (other.paymentsAccountInfo_ != null) { if (paymentsAccountInfo_ == null) { paymentsAccountInfo_ = new global::Google.Ads.GoogleAds.V1.Resources.BillingSetup.Types.PaymentsAccountInfo(); } PaymentsAccountInfo.MergeFrom(other.PaymentsAccountInfo); } switch (other.StartTimeCase) { case StartTimeOneofCase.StartDateTime: StartDateTime = other.StartDateTime; break; case StartTimeOneofCase.StartTimeType: StartTimeType = other.StartTimeType; break; } switch (other.EndTimeCase) { case EndTimeOneofCase.EndDateTime: EndDateTime = other.EndDateTime; break; case EndTimeOneofCase.EndTimeType: EndTimeType = other.EndTimeType; 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: { ResourceName = input.ReadString(); break; } case 18: { long?value = _single_id_codec.Read(input); if (id_ == null || value != 0L) { Id = value; } break; } case 24: { status_ = (global::Google.Ads.GoogleAds.V1.Enums.BillingSetupStatusEnum.Types.BillingSetupStatus)input.ReadEnum(); break; } case 74: { StartDateTime = _oneof_startDateTime_codec.Read(input); break; } case 80: { startTime_ = input.ReadEnum(); startTimeCase_ = StartTimeOneofCase.StartTimeType; break; } case 90: { string value = _single_paymentsAccount_codec.Read(input); if (paymentsAccount_ == null || value != "") { PaymentsAccount = value; } break; } case 98: { if (paymentsAccountInfo_ == null) { paymentsAccountInfo_ = new global::Google.Ads.GoogleAds.V1.Resources.BillingSetup.Types.PaymentsAccountInfo(); } input.ReadMessage(paymentsAccountInfo_); break; } case 106: { EndDateTime = _oneof_endDateTime_codec.Read(input); break; } case 112: { endTime_ = input.ReadEnum(); endTimeCase_ = EndTimeOneofCase.EndTimeType; break; } } } }