コード例 #1
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 40: {
                    Type = (global::Google.Ads.GoogleAds.V5.Enums.BiddingStrategyTypeEnum.Types.BiddingStrategyType)input.ReadEnum();
                    break;
                }

                case 58: {
                    global::Google.Ads.GoogleAds.V5.Common.EnhancedCpc subBuilder = new global::Google.Ads.GoogleAds.V5.Common.EnhancedCpc();
                    if (schemeCase_ == SchemeOneofCase.EnhancedCpc)
                    {
                        subBuilder.MergeFrom(EnhancedCpc);
                    }
                    input.ReadMessage(subBuilder);
                    EnhancedCpc = subBuilder;
                    break;
                }

                case 74: {
                    global::Google.Ads.GoogleAds.V5.Common.TargetCpa subBuilder = new global::Google.Ads.GoogleAds.V5.Common.TargetCpa();
                    if (schemeCase_ == SchemeOneofCase.TargetCpa)
                    {
                        subBuilder.MergeFrom(TargetCpa);
                    }
                    input.ReadMessage(subBuilder);
                    TargetCpa = subBuilder;
                    break;
                }

                case 90: {
                    global::Google.Ads.GoogleAds.V5.Common.TargetRoas subBuilder = new global::Google.Ads.GoogleAds.V5.Common.TargetRoas();
                    if (schemeCase_ == SchemeOneofCase.TargetRoas)
                    {
                        subBuilder.MergeFrom(TargetRoas);
                    }
                    input.ReadMessage(subBuilder);
                    TargetRoas = subBuilder;
                    break;
                }

                case 98: {
                    global::Google.Ads.GoogleAds.V5.Common.TargetSpend subBuilder = new global::Google.Ads.GoogleAds.V5.Common.TargetSpend();
                    if (schemeCase_ == SchemeOneofCase.TargetSpend)
                    {
                        subBuilder.MergeFrom(TargetSpend);
                    }
                    input.ReadMessage(subBuilder);
                    TargetSpend = subBuilder;
                    break;
                }

                case 120: {
                    Status = (global::Google.Ads.GoogleAds.V5.Enums.BiddingStrategyStatusEnum.Types.BiddingStrategyStatus)input.ReadEnum();
                    break;
                }

                case 128: {
                    Id = input.ReadInt64();
                    break;
                }

                case 138: {
                    Name = input.ReadString();
                    break;
                }

                case 144: {
                    CampaignCount = input.ReadInt64();
                    break;
                }

                case 152: {
                    NonRemovedCampaignCount = input.ReadInt64();
                    break;
                }

                case 162: {
                    EffectiveCurrencyCode = input.ReadString();
                    break;
                }

                case 386: {
                    global::Google.Ads.GoogleAds.V5.Common.TargetImpressionShare subBuilder = new global::Google.Ads.GoogleAds.V5.Common.TargetImpressionShare();
                    if (schemeCase_ == SchemeOneofCase.TargetImpressionShare)
                    {
                        subBuilder.MergeFrom(TargetImpressionShare);
                    }
                    input.ReadMessage(subBuilder);
                    TargetImpressionShare = subBuilder;
                    break;
                }
                }
            }
    #endif
        }
コード例 #2
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 40: {
                    Type = (global::Google.Ads.GoogleAds.V5.Enums.BiddingStrategyTypeEnum.Types.BiddingStrategyType)input.ReadEnum();
                    break;
                }

                case 58: {
                    global::Google.Ads.GoogleAds.V5.Common.EnhancedCpc subBuilder = new global::Google.Ads.GoogleAds.V5.Common.EnhancedCpc();
                    if (schemeCase_ == SchemeOneofCase.EnhancedCpc)
                    {
                        subBuilder.MergeFrom(EnhancedCpc);
                    }
                    input.ReadMessage(subBuilder);
                    EnhancedCpc = subBuilder;
                    break;
                }

                case 74: {
                    global::Google.Ads.GoogleAds.V5.Common.TargetCpa subBuilder = new global::Google.Ads.GoogleAds.V5.Common.TargetCpa();
                    if (schemeCase_ == SchemeOneofCase.TargetCpa)
                    {
                        subBuilder.MergeFrom(TargetCpa);
                    }
                    input.ReadMessage(subBuilder);
                    TargetCpa = subBuilder;
                    break;
                }

                case 90: {
                    global::Google.Ads.GoogleAds.V5.Common.TargetRoas subBuilder = new global::Google.Ads.GoogleAds.V5.Common.TargetRoas();
                    if (schemeCase_ == SchemeOneofCase.TargetRoas)
                    {
                        subBuilder.MergeFrom(TargetRoas);
                    }
                    input.ReadMessage(subBuilder);
                    TargetRoas = subBuilder;
                    break;
                }

                case 98: {
                    global::Google.Ads.GoogleAds.V5.Common.TargetSpend subBuilder = new global::Google.Ads.GoogleAds.V5.Common.TargetSpend();
                    if (schemeCase_ == SchemeOneofCase.TargetSpend)
                    {
                        subBuilder.MergeFrom(TargetSpend);
                    }
                    input.ReadMessage(subBuilder);
                    TargetSpend = subBuilder;
                    break;
                }

                case 120: {
                    Status = (global::Google.Ads.GoogleAds.V5.Enums.BiddingStrategyStatusEnum.Types.BiddingStrategyStatus)input.ReadEnum();
                    break;
                }

                case 128: {
                    Id = input.ReadInt64();
                    break;
                }

                case 138: {
                    Name = input.ReadString();
                    break;
                }

                case 144: {
                    CampaignCount = input.ReadInt64();
                    break;
                }

                case 152: {
                    NonRemovedCampaignCount = input.ReadInt64();
                    break;
                }

                case 162: {
                    EffectiveCurrencyCode = input.ReadString();
                    break;
                }

                case 386: {
                    global::Google.Ads.GoogleAds.V5.Common.TargetImpressionShare subBuilder = new global::Google.Ads.GoogleAds.V5.Common.TargetImpressionShare();
                    if (schemeCase_ == SchemeOneofCase.TargetImpressionShare)
                    {
                        subBuilder.MergeFrom(TargetImpressionShare);
                    }
                    input.ReadMessage(subBuilder);
                    TargetImpressionShare = subBuilder;
                    break;
                }
                }
            }
        }