Ejemplo n.º 1
0
        public void MergeFrom(AdGroupCriterionSimulation other)
        {
            if (other == null)
            {
                return;
            }
            if (other.ResourceName.Length != 0)
            {
                ResourceName = other.ResourceName;
            }
            if (other.HasAdGroupId)
            {
                AdGroupId = other.AdGroupId;
            }
            if (other.HasCriterionId)
            {
                CriterionId = other.CriterionId;
            }
            if (other.Type != global::Google.Ads.GoogleAds.V6.Enums.SimulationTypeEnum.Types.SimulationType.Unspecified)
            {
                Type = other.Type;
            }
            if (other.ModificationMethod != global::Google.Ads.GoogleAds.V6.Enums.SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unspecified)
            {
                ModificationMethod = other.ModificationMethod;
            }
            if (other.HasStartDate)
            {
                StartDate = other.StartDate;
            }
            if (other.HasEndDate)
            {
                EndDate = other.EndDate;
            }
            switch (other.PointListCase)
            {
            case PointListOneofCase.CpcBidPointList:
                if (CpcBidPointList == null)
                {
                    CpcBidPointList = new global::Google.Ads.GoogleAds.V6.Common.CpcBidSimulationPointList();
                }
                CpcBidPointList.MergeFrom(other.CpcBidPointList);
                break;

            case PointListOneofCase.PercentCpcBidPointList:
                if (PercentCpcBidPointList == null)
                {
                    PercentCpcBidPointList = new global::Google.Ads.GoogleAds.V6.Common.PercentCpcBidSimulationPointList();
                }
                PercentCpcBidPointList.MergeFrom(other.PercentCpcBidPointList);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Ejemplo n.º 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 32: {
                    Type = (global::Google.Ads.GoogleAds.V6.Enums.SimulationTypeEnum.Types.SimulationType)input.ReadEnum();
                    break;
                }

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

                case 66: {
                    global::Google.Ads.GoogleAds.V6.Common.CpcBidSimulationPointList subBuilder = new global::Google.Ads.GoogleAds.V6.Common.CpcBidSimulationPointList();
                    if (pointListCase_ == PointListOneofCase.CpcBidPointList)
                    {
                        subBuilder.MergeFrom(CpcBidPointList);
                    }
                    input.ReadMessage(subBuilder);
                    CpcBidPointList = subBuilder;
                    break;
                }

                case 72: {
                    AdGroupId = input.ReadInt64();
                    break;
                }

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

                case 90: {
                    StartDate = input.ReadString();
                    break;
                }

                case 98: {
                    EndDate = input.ReadString();
                    break;
                }

                case 106: {
                    global::Google.Ads.GoogleAds.V6.Common.PercentCpcBidSimulationPointList subBuilder = new global::Google.Ads.GoogleAds.V6.Common.PercentCpcBidSimulationPointList();
                    if (pointListCase_ == PointListOneofCase.PercentCpcBidPointList)
                    {
                        subBuilder.MergeFrom(PercentCpcBidPointList);
                    }
                    input.ReadMessage(subBuilder);
                    PercentCpcBidPointList = subBuilder;
                    break;
                }
                }
            }
        }
Ejemplo n.º 3
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 32: {
                    Type = (global::Google.Ads.GoogleAds.V6.Enums.SimulationTypeEnum.Types.SimulationType)input.ReadEnum();
                    break;
                }

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

                case 66: {
                    global::Google.Ads.GoogleAds.V6.Common.CpcBidSimulationPointList subBuilder = new global::Google.Ads.GoogleAds.V6.Common.CpcBidSimulationPointList();
                    if (pointListCase_ == PointListOneofCase.CpcBidPointList)
                    {
                        subBuilder.MergeFrom(CpcBidPointList);
                    }
                    input.ReadMessage(subBuilder);
                    CpcBidPointList = subBuilder;
                    break;
                }

                case 72: {
                    AdGroupId = input.ReadInt64();
                    break;
                }

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

                case 90: {
                    StartDate = input.ReadString();
                    break;
                }

                case 98: {
                    EndDate = input.ReadString();
                    break;
                }

                case 106: {
                    global::Google.Ads.GoogleAds.V6.Common.PercentCpcBidSimulationPointList subBuilder = new global::Google.Ads.GoogleAds.V6.Common.PercentCpcBidSimulationPointList();
                    if (pointListCase_ == PointListOneofCase.PercentCpcBidPointList)
                    {
                        subBuilder.MergeFrom(PercentCpcBidPointList);
                    }
                    input.ReadMessage(subBuilder);
                    PercentCpcBidPointList = subBuilder;
                    break;
                }
                }
            }
    #endif
        }