Exemple #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: {
                    long?value = _single_campaignId_codec.Read(ref input);
                    if (campaignId_ == null || value != 0L)
                    {
                        CampaignId = value;
                    }
                    break;
                }

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

                case 32: {
                    Type = (global::Google.Ads.GoogleAds.V4.Enums.SimulationTypeEnum.Types.SimulationType)input.ReadEnum();
                    break;
                }

                case 40: {
                    ModificationMethod = (global::Google.Ads.GoogleAds.V4.Enums.SimulationModificationMethodEnum.Types.SimulationModificationMethod)input.ReadEnum();
                    break;
                }

                case 50: {
                    string value = _single_startDate_codec.Read(ref input);
                    if (startDate_ == null || value != "")
                    {
                        StartDate = value;
                    }
                    break;
                }

                case 58: {
                    string value = _single_endDate_codec.Read(ref input);
                    if (endDate_ == null || value != "")
                    {
                        EndDate = value;
                    }
                    break;
                }

                case 66: {
                    global::Google.Ads.GoogleAds.V4.Common.BidModifierSimulationPointList subBuilder = new global::Google.Ads.GoogleAds.V4.Common.BidModifierSimulationPointList();
                    if (pointListCase_ == PointListOneofCase.BidModifierPointList)
                    {
                        subBuilder.MergeFrom(BidModifierPointList);
                    }
                    input.ReadMessage(subBuilder);
                    BidModifierPointList = subBuilder;
                    break;
                }
                }
            }
        }
Exemple #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: {
                    long?value = _single_campaignId_codec.Read(input);
                    if (campaignId_ == null || value != 0L)
                    {
                        CampaignId = value;
                    }
                    break;
                }

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

                case 32: {
                    Type = (global::Google.Ads.GoogleAds.V4.Enums.SimulationTypeEnum.Types.SimulationType)input.ReadEnum();
                    break;
                }

                case 40: {
                    ModificationMethod = (global::Google.Ads.GoogleAds.V4.Enums.SimulationModificationMethodEnum.Types.SimulationModificationMethod)input.ReadEnum();
                    break;
                }

                case 50: {
                    string value = _single_startDate_codec.Read(input);
                    if (startDate_ == null || value != "")
                    {
                        StartDate = value;
                    }
                    break;
                }

                case 58: {
                    string value = _single_endDate_codec.Read(input);
                    if (endDate_ == null || value != "")
                    {
                        EndDate = value;
                    }
                    break;
                }

                case 66: {
                    global::Google.Ads.GoogleAds.V4.Common.BidModifierSimulationPointList subBuilder = new global::Google.Ads.GoogleAds.V4.Common.BidModifierSimulationPointList();
                    if (pointListCase_ == PointListOneofCase.BidModifierPointList)
                    {
                        subBuilder.MergeFrom(BidModifierPointList);
                    }
                    input.ReadMessage(subBuilder);
                    BidModifierPointList = subBuilder;
                    break;
                }
                }
            }
    #endif
        }