Exemplo n.º 1
0
        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 != global::Google.Ads.GoogleAds.V3.Enums.BillingSetupStatusEnum.Types.BillingSetupStatus.Unspecified)
            {
                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.V3.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);
        }
Exemplo n.º 2
0
        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.V3.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.V3.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;
                }
                }
            }
        }