Ejemplo n.º 1
0
        public void MergeFrom(AdGroupSimulation other)
        {
            if (other == null)
            {
                return;
            }
            if (other.ResourceName.Length != 0)
            {
                ResourceName = other.ResourceName;
            }
            if (other.adGroupId_ != null)
            {
                if (adGroupId_ == null || other.AdGroupId != 0L)
                {
                    AdGroupId = other.AdGroupId;
                }
            }
            if (other.Type != 0)
            {
                Type = other.Type;
            }
            if (other.ModificationMethod != 0)
            {
                ModificationMethod = other.ModificationMethod;
            }
            if (other.startDate_ != null)
            {
                if (startDate_ == null || other.StartDate != "")
                {
                    StartDate = other.StartDate;
                }
            }
            if (other.endDate_ != null)
            {
                if (endDate_ == null || other.EndDate != "")
                {
                    EndDate = other.EndDate;
                }
            }
            switch (other.PointListCase)
            {
            case PointListOneofCase.CpcBidPointList:
                if (CpcBidPointList == null)
                {
                    CpcBidPointList = new global::Google.Ads.GoogleAds.V1.Common.CpcBidSimulationPointList();
                }
                CpcBidPointList.MergeFrom(other.CpcBidPointList);
                break;

            case PointListOneofCase.TargetCpaPointList:
                if (TargetCpaPointList == null)
                {
                    TargetCpaPointList = new global::Google.Ads.GoogleAds.V1.Common.TargetCpaSimulationPointList();
                }
                TargetCpaPointList.MergeFrom(other.TargetCpaPointList);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
        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.V5.Enums.SimulationTypeEnum.Types.SimulationType.Unspecified)
            {
                Type = other.Type;
            }
            if (other.ModificationMethod != global::Google.Ads.GoogleAds.V5.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.V5.Common.CpcBidSimulationPointList();
                }
                CpcBidPointList.MergeFrom(other.CpcBidPointList);
                break;

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

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Ejemplo n.º 3
0
        public void MergeFrom(CampaignSimulation other)
        {
            if (other == null)
            {
                return;
            }
            if (other.ResourceName.Length != 0)
            {
                ResourceName = other.ResourceName;
            }
            if (other.CampaignId != 0L)
            {
                CampaignId = other.CampaignId;
            }
            if (other.Type != global::Google.Ads.GoogleAds.V10.Enums.SimulationTypeEnum.Types.SimulationType.Unspecified)
            {
                Type = other.Type;
            }
            if (other.ModificationMethod != global::Google.Ads.GoogleAds.V10.Enums.SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unspecified)
            {
                ModificationMethod = other.ModificationMethod;
            }
            if (other.StartDate.Length != 0)
            {
                StartDate = other.StartDate;
            }
            if (other.EndDate.Length != 0)
            {
                EndDate = other.EndDate;
            }
            switch (other.PointListCase)
            {
            case PointListOneofCase.CpcBidPointList:
                if (CpcBidPointList == null)
                {
                    CpcBidPointList = new global::Google.Ads.GoogleAds.V10.Common.CpcBidSimulationPointList();
                }
                CpcBidPointList.MergeFrom(other.CpcBidPointList);
                break;

            case PointListOneofCase.TargetCpaPointList:
                if (TargetCpaPointList == null)
                {
                    TargetCpaPointList = new global::Google.Ads.GoogleAds.V10.Common.TargetCpaSimulationPointList();
                }
                TargetCpaPointList.MergeFrom(other.TargetCpaPointList);
                break;

            case PointListOneofCase.TargetRoasPointList:
                if (TargetRoasPointList == null)
                {
                    TargetRoasPointList = new global::Google.Ads.GoogleAds.V10.Common.TargetRoasSimulationPointList();
                }
                TargetRoasPointList.MergeFrom(other.TargetRoasPointList);
                break;

            case PointListOneofCase.TargetImpressionSharePointList:
                if (TargetImpressionSharePointList == null)
                {
                    TargetImpressionSharePointList = new global::Google.Ads.GoogleAds.V10.Common.TargetImpressionShareSimulationPointList();
                }
                TargetImpressionSharePointList.MergeFrom(other.TargetImpressionSharePointList);
                break;

            case PointListOneofCase.BudgetPointList:
                if (BudgetPointList == null)
                {
                    BudgetPointList = new global::Google.Ads.GoogleAds.V10.Common.BudgetSimulationPointList();
                }
                BudgetPointList.MergeFrom(other.BudgetPointList);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }