Beispiel #1
0
        public void MergeFrom(AdGroupBidModifier other)
        {
            if (other == null)
            {
                return;
            }
            if (other.ResourceName.Length != 0)
            {
                ResourceName = other.ResourceName;
            }
            if (other.HasAdGroup)
            {
                AdGroup = other.AdGroup;
            }
            if (other.HasCriterionId)
            {
                CriterionId = other.CriterionId;
            }
            if (other.HasBidModifier)
            {
                BidModifier = other.BidModifier;
            }
            if (other.HasBaseAdGroup)
            {
                BaseAdGroup = other.BaseAdGroup;
            }
            if (other.BidModifierSource != global::Google.Ads.GoogleAds.V7.Enums.BidModifierSourceEnum.Types.BidModifierSource.Unspecified)
            {
                BidModifierSource = other.BidModifierSource;
            }
            switch (other.CriterionCase)
            {
            case CriterionOneofCase.HotelDateSelectionType:
                if (HotelDateSelectionType == null)
                {
                    HotelDateSelectionType = new global::Google.Ads.GoogleAds.V7.Common.HotelDateSelectionTypeInfo();
                }
                HotelDateSelectionType.MergeFrom(other.HotelDateSelectionType);
                break;

            case CriterionOneofCase.HotelAdvanceBookingWindow:
                if (HotelAdvanceBookingWindow == null)
                {
                    HotelAdvanceBookingWindow = new global::Google.Ads.GoogleAds.V7.Common.HotelAdvanceBookingWindowInfo();
                }
                HotelAdvanceBookingWindow.MergeFrom(other.HotelAdvanceBookingWindow);
                break;

            case CriterionOneofCase.HotelLengthOfStay:
                if (HotelLengthOfStay == null)
                {
                    HotelLengthOfStay = new global::Google.Ads.GoogleAds.V7.Common.HotelLengthOfStayInfo();
                }
                HotelLengthOfStay.MergeFrom(other.HotelLengthOfStay);
                break;

            case CriterionOneofCase.HotelCheckInDay:
                if (HotelCheckInDay == null)
                {
                    HotelCheckInDay = new global::Google.Ads.GoogleAds.V7.Common.HotelCheckInDayInfo();
                }
                HotelCheckInDay.MergeFrom(other.HotelCheckInDay);
                break;

            case CriterionOneofCase.Device:
                if (Device == null)
                {
                    Device = new global::Google.Ads.GoogleAds.V7.Common.DeviceInfo();
                }
                Device.MergeFrom(other.Device);
                break;

            case CriterionOneofCase.PreferredContent:
                if (PreferredContent == null)
                {
                    PreferredContent = new global::Google.Ads.GoogleAds.V7.Common.PreferredContentInfo();
                }
                PreferredContent.MergeFrom(other.PreferredContent);
                break;

            case CriterionOneofCase.HotelCheckInDateRange:
                if (HotelCheckInDateRange == null)
                {
                    HotelCheckInDateRange = new global::Google.Ads.GoogleAds.V7.Common.HotelCheckInDateRangeInfo();
                }
                HotelCheckInDateRange.MergeFrom(other.HotelCheckInDateRange);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Beispiel #2
0
        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: {
                    ResourceName = input.ReadString();
                    break;
                }

                case 42: {
                    global::Google.Ads.GoogleAds.V7.Common.HotelDateSelectionTypeInfo subBuilder = new global::Google.Ads.GoogleAds.V7.Common.HotelDateSelectionTypeInfo();
                    if (criterionCase_ == CriterionOneofCase.HotelDateSelectionType)
                    {
                        subBuilder.MergeFrom(HotelDateSelectionType);
                    }
                    input.ReadMessage(subBuilder);
                    HotelDateSelectionType = subBuilder;
                    break;
                }

                case 50: {
                    global::Google.Ads.GoogleAds.V7.Common.HotelAdvanceBookingWindowInfo subBuilder = new global::Google.Ads.GoogleAds.V7.Common.HotelAdvanceBookingWindowInfo();
                    if (criterionCase_ == CriterionOneofCase.HotelAdvanceBookingWindow)
                    {
                        subBuilder.MergeFrom(HotelAdvanceBookingWindow);
                    }
                    input.ReadMessage(subBuilder);
                    HotelAdvanceBookingWindow = subBuilder;
                    break;
                }

                case 58: {
                    global::Google.Ads.GoogleAds.V7.Common.HotelLengthOfStayInfo subBuilder = new global::Google.Ads.GoogleAds.V7.Common.HotelLengthOfStayInfo();
                    if (criterionCase_ == CriterionOneofCase.HotelLengthOfStay)
                    {
                        subBuilder.MergeFrom(HotelLengthOfStay);
                    }
                    input.ReadMessage(subBuilder);
                    HotelLengthOfStay = subBuilder;
                    break;
                }

                case 66: {
                    global::Google.Ads.GoogleAds.V7.Common.HotelCheckInDayInfo subBuilder = new global::Google.Ads.GoogleAds.V7.Common.HotelCheckInDayInfo();
                    if (criterionCase_ == CriterionOneofCase.HotelCheckInDay)
                    {
                        subBuilder.MergeFrom(HotelCheckInDay);
                    }
                    input.ReadMessage(subBuilder);
                    HotelCheckInDay = subBuilder;
                    break;
                }

                case 80: {
                    BidModifierSource = (global::Google.Ads.GoogleAds.V7.Enums.BidModifierSourceEnum.Types.BidModifierSource)input.ReadEnum();
                    break;
                }

                case 90: {
                    global::Google.Ads.GoogleAds.V7.Common.DeviceInfo subBuilder = new global::Google.Ads.GoogleAds.V7.Common.DeviceInfo();
                    if (criterionCase_ == CriterionOneofCase.Device)
                    {
                        subBuilder.MergeFrom(Device);
                    }
                    input.ReadMessage(subBuilder);
                    Device = subBuilder;
                    break;
                }

                case 98: {
                    global::Google.Ads.GoogleAds.V7.Common.PreferredContentInfo subBuilder = new global::Google.Ads.GoogleAds.V7.Common.PreferredContentInfo();
                    if (criterionCase_ == CriterionOneofCase.PreferredContent)
                    {
                        subBuilder.MergeFrom(PreferredContent);
                    }
                    input.ReadMessage(subBuilder);
                    PreferredContent = subBuilder;
                    break;
                }

                case 106: {
                    AdGroup = input.ReadString();
                    break;
                }

                case 112: {
                    CriterionId = input.ReadInt64();
                    break;
                }

                case 121: {
                    BidModifier = input.ReadDouble();
                    break;
                }

                case 130: {
                    BaseAdGroup = input.ReadString();
                    break;
                }

                case 138: {
                    global::Google.Ads.GoogleAds.V7.Common.HotelCheckInDateRangeInfo subBuilder = new global::Google.Ads.GoogleAds.V7.Common.HotelCheckInDateRangeInfo();
                    if (criterionCase_ == CriterionOneofCase.HotelCheckInDateRange)
                    {
                        subBuilder.MergeFrom(HotelCheckInDateRange);
                    }
                    input.ReadMessage(subBuilder);
                    HotelCheckInDateRange = subBuilder;
                    break;
                }
                }
            }
    #endif
        }
Beispiel #3
0
        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: {
                    ResourceName = input.ReadString();
                    break;
                }

                case 42: {
                    global::Google.Ads.GoogleAds.V7.Common.HotelDateSelectionTypeInfo subBuilder = new global::Google.Ads.GoogleAds.V7.Common.HotelDateSelectionTypeInfo();
                    if (criterionCase_ == CriterionOneofCase.HotelDateSelectionType)
                    {
                        subBuilder.MergeFrom(HotelDateSelectionType);
                    }
                    input.ReadMessage(subBuilder);
                    HotelDateSelectionType = subBuilder;
                    break;
                }

                case 50: {
                    global::Google.Ads.GoogleAds.V7.Common.HotelAdvanceBookingWindowInfo subBuilder = new global::Google.Ads.GoogleAds.V7.Common.HotelAdvanceBookingWindowInfo();
                    if (criterionCase_ == CriterionOneofCase.HotelAdvanceBookingWindow)
                    {
                        subBuilder.MergeFrom(HotelAdvanceBookingWindow);
                    }
                    input.ReadMessage(subBuilder);
                    HotelAdvanceBookingWindow = subBuilder;
                    break;
                }

                case 58: {
                    global::Google.Ads.GoogleAds.V7.Common.HotelLengthOfStayInfo subBuilder = new global::Google.Ads.GoogleAds.V7.Common.HotelLengthOfStayInfo();
                    if (criterionCase_ == CriterionOneofCase.HotelLengthOfStay)
                    {
                        subBuilder.MergeFrom(HotelLengthOfStay);
                    }
                    input.ReadMessage(subBuilder);
                    HotelLengthOfStay = subBuilder;
                    break;
                }

                case 66: {
                    global::Google.Ads.GoogleAds.V7.Common.HotelCheckInDayInfo subBuilder = new global::Google.Ads.GoogleAds.V7.Common.HotelCheckInDayInfo();
                    if (criterionCase_ == CriterionOneofCase.HotelCheckInDay)
                    {
                        subBuilder.MergeFrom(HotelCheckInDay);
                    }
                    input.ReadMessage(subBuilder);
                    HotelCheckInDay = subBuilder;
                    break;
                }

                case 80: {
                    BidModifierSource = (global::Google.Ads.GoogleAds.V7.Enums.BidModifierSourceEnum.Types.BidModifierSource)input.ReadEnum();
                    break;
                }

                case 90: {
                    global::Google.Ads.GoogleAds.V7.Common.DeviceInfo subBuilder = new global::Google.Ads.GoogleAds.V7.Common.DeviceInfo();
                    if (criterionCase_ == CriterionOneofCase.Device)
                    {
                        subBuilder.MergeFrom(Device);
                    }
                    input.ReadMessage(subBuilder);
                    Device = subBuilder;
                    break;
                }

                case 98: {
                    global::Google.Ads.GoogleAds.V7.Common.PreferredContentInfo subBuilder = new global::Google.Ads.GoogleAds.V7.Common.PreferredContentInfo();
                    if (criterionCase_ == CriterionOneofCase.PreferredContent)
                    {
                        subBuilder.MergeFrom(PreferredContent);
                    }
                    input.ReadMessage(subBuilder);
                    PreferredContent = subBuilder;
                    break;
                }

                case 106: {
                    AdGroup = input.ReadString();
                    break;
                }

                case 112: {
                    CriterionId = input.ReadInt64();
                    break;
                }

                case 121: {
                    BidModifier = input.ReadDouble();
                    break;
                }

                case 130: {
                    BaseAdGroup = input.ReadString();
                    break;
                }

                case 138: {
                    global::Google.Ads.GoogleAds.V7.Common.HotelCheckInDateRangeInfo subBuilder = new global::Google.Ads.GoogleAds.V7.Common.HotelCheckInDateRangeInfo();
                    if (criterionCase_ == CriterionOneofCase.HotelCheckInDateRange)
                    {
                        subBuilder.MergeFrom(HotelCheckInDateRange);
                    }
                    input.ReadMessage(subBuilder);
                    HotelCheckInDateRange = subBuilder;
                    break;
                }
                }
            }
        }