Ejemplo n.º 1
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 18: {
                    string value = _single_feedItem_codec.Read(ref input);
                    if (feedItem_ == null || value != "")
                    {
                        FeedItem = value;
                    }
                    break;
                }

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

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

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

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

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

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

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

                case 82: {
                    global::Google.Ads.GoogleAds.V4.Common.AdScheduleInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.AdScheduleInfo();
                    if (targetCase_ == TargetOneofCase.AdSchedule)
                    {
                        subBuilder.MergeFrom(AdSchedule);
                    }
                    input.ReadMessage(subBuilder);
                    AdSchedule = subBuilder;
                    break;
                }

                case 88: {
                    Status = (global::Google.Ads.GoogleAds.V4.Enums.FeedItemTargetStatusEnum.Types.FeedItemTargetStatus)input.ReadEnum();
                    break;
                }
                }
            }
        }
Ejemplo n.º 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 18: {
                    string value = _single_feedItem_codec.Read(input);
                    if (feedItem_ == null || value != "")
                    {
                        FeedItem = value;
                    }
                    break;
                }

                case 24: {
                    FeedItemTargetType = (global::Google.Ads.GoogleAds.V4.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.V4.Common.KeywordInfo subBuilder = new global::Google.Ads.GoogleAds.V4.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.V4.Common.AdScheduleInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.AdScheduleInfo();
                    if (targetCase_ == TargetOneofCase.AdSchedule)
                    {
                        subBuilder.MergeFrom(AdSchedule);
                    }
                    input.ReadMessage(subBuilder);
                    AdSchedule = subBuilder;
                    break;
                }

                case 88: {
                    Status = (global::Google.Ads.GoogleAds.V4.Enums.FeedItemTargetStatusEnum.Types.FeedItemTargetStatus)input.ReadEnum();
                    break;
                }
                }
            }
    #endif
        }