예제 #1
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: {
                    string value = _single_feedItem_codec.Read(input);
                    if (feedItem_ == null || value != "")
                    {
                        FeedItem = value;
                    }
                    break;
                }

                case 24: {
                    feedItemTargetType_ = (global::Google.Ads.GoogleAds.V1.Enums.FeedItemTargetTypeEnum.Types.FeedItemTargetType)input.ReadEnum();
                    break;
                }

                case 34: {
                    Campaign = _oneof_campaign_codec.Read(input);
                    break;
                }

                case 42: {
                    AdGroup = _oneof_adGroup_codec.Read(input);
                    break;
                }

                case 50: {
                    long?value = _single_feedItemTargetId_codec.Read(input);
                    if (feedItemTargetId_ == null || value != 0L)
                    {
                        FeedItemTargetId = value;
                    }
                    break;
                }

                case 58: {
                    global::Google.Ads.GoogleAds.V1.Common.KeywordInfo subBuilder = new global::Google.Ads.GoogleAds.V1.Common.KeywordInfo();
                    if (targetCase_ == TargetOneofCase.Keyword)
                    {
                        subBuilder.MergeFrom(Keyword);
                    }
                    input.ReadMessage(subBuilder);
                    Keyword = subBuilder;
                    break;
                }

                case 66: {
                    GeoTargetConstant = _oneof_geoTargetConstant_codec.Read(input);
                    break;
                }

                case 72: {
                    target_     = input.ReadEnum();
                    targetCase_ = TargetOneofCase.Device;
                    break;
                }

                case 82: {
                    global::Google.Ads.GoogleAds.V1.Common.AdScheduleInfo subBuilder = new global::Google.Ads.GoogleAds.V1.Common.AdScheduleInfo();
                    if (targetCase_ == TargetOneofCase.AdSchedule)
                    {
                        subBuilder.MergeFrom(AdSchedule);
                    }
                    input.ReadMessage(subBuilder);
                    AdSchedule = subBuilder;
                    break;
                }
                }
            }
        }
예제 #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: {
                    string value = _single_sharedSet_codec.Read(input);
                    if (sharedSet_ == null || value != "")
                    {
                        SharedSet = value;
                    }
                    break;
                }

                case 26: {
                    global::Google.Ads.GoogleAds.V1.Common.KeywordInfo subBuilder = new global::Google.Ads.GoogleAds.V1.Common.KeywordInfo();
                    if (criterionCase_ == CriterionOneofCase.Keyword)
                    {
                        subBuilder.MergeFrom(Keyword);
                    }
                    input.ReadMessage(subBuilder);
                    Keyword = subBuilder;
                    break;
                }

                case 32: {
                    type_ = (global::Google.Ads.GoogleAds.V1.Enums.CriterionTypeEnum.Types.CriterionType)input.ReadEnum();
                    break;
                }

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

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

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

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

                case 74: {
                    global::Google.Ads.GoogleAds.V1.Common.MobileApplicationInfo subBuilder = new global::Google.Ads.GoogleAds.V1.Common.MobileApplicationInfo();
                    if (criterionCase_ == CriterionOneofCase.MobileApplication)
                    {
                        subBuilder.MergeFrom(MobileApplication);
                    }
                    input.ReadMessage(subBuilder);
                    MobileApplication = subBuilder;
                    break;
                }

                case 210: {
                    long?value = _single_criterionId_codec.Read(input);
                    if (criterionId_ == null || value != 0L)
                    {
                        CriterionId = value;
                    }
                    break;
                }
                }
            }
        }