public void MergeFrom(BiddingStrategy other) { if (other == null) { return; } if (other.ResourceName.Length != 0) { ResourceName = other.ResourceName; } if (other.id_ != null) { if (id_ == null || other.Id != 0L) { Id = other.Id; } } if (other.name_ != null) { if (name_ == null || other.Name != "") { Name = other.Name; } } if (other.Status != 0) { Status = other.Status; } if (other.Type != 0) { Type = other.Type; } if (other.campaignCount_ != null) { if (campaignCount_ == null || other.CampaignCount != 0L) { CampaignCount = other.CampaignCount; } } if (other.nonRemovedCampaignCount_ != null) { if (nonRemovedCampaignCount_ == null || other.NonRemovedCampaignCount != 0L) { NonRemovedCampaignCount = other.NonRemovedCampaignCount; } } switch (other.SchemeCase) { case SchemeOneofCase.EnhancedCpc: if (EnhancedCpc == null) { EnhancedCpc = new global::Google.Ads.GoogleAds.V2.Common.EnhancedCpc(); } EnhancedCpc.MergeFrom(other.EnhancedCpc); break; case SchemeOneofCase.PageOnePromoted: if (PageOnePromoted == null) { PageOnePromoted = new global::Google.Ads.GoogleAds.V2.Common.PageOnePromoted(); } PageOnePromoted.MergeFrom(other.PageOnePromoted); break; case SchemeOneofCase.TargetCpa: if (TargetCpa == null) { TargetCpa = new global::Google.Ads.GoogleAds.V2.Common.TargetCpa(); } TargetCpa.MergeFrom(other.TargetCpa); break; case SchemeOneofCase.TargetImpressionShare: if (TargetImpressionShare == null) { TargetImpressionShare = new global::Google.Ads.GoogleAds.V2.Common.TargetImpressionShare(); } TargetImpressionShare.MergeFrom(other.TargetImpressionShare); break; case SchemeOneofCase.TargetOutrankShare: if (TargetOutrankShare == null) { TargetOutrankShare = new global::Google.Ads.GoogleAds.V2.Common.TargetOutrankShare(); } TargetOutrankShare.MergeFrom(other.TargetOutrankShare); break; case SchemeOneofCase.TargetRoas: if (TargetRoas == null) { TargetRoas = new global::Google.Ads.GoogleAds.V2.Common.TargetRoas(); } TargetRoas.MergeFrom(other.TargetRoas); break; case SchemeOneofCase.TargetSpend: if (TargetSpend == null) { TargetSpend = new global::Google.Ads.GoogleAds.V2.Common.TargetSpend(); } TargetSpend.MergeFrom(other.TargetSpend); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public void MergeFrom(BiddingStrategy other) { if (other == null) { return; } if (other.ResourceName.Length != 0) { ResourceName = other.ResourceName; } if (other.HasId) { Id = other.Id; } if (other.HasName) { Name = other.Name; } if (other.Status != global::Google.Ads.GoogleAds.V5.Enums.BiddingStrategyStatusEnum.Types.BiddingStrategyStatus.Unspecified) { Status = other.Status; } if (other.Type != global::Google.Ads.GoogleAds.V5.Enums.BiddingStrategyTypeEnum.Types.BiddingStrategyType.Unspecified) { Type = other.Type; } if (other.HasEffectiveCurrencyCode) { EffectiveCurrencyCode = other.EffectiveCurrencyCode; } if (other.HasCampaignCount) { CampaignCount = other.CampaignCount; } if (other.HasNonRemovedCampaignCount) { NonRemovedCampaignCount = other.NonRemovedCampaignCount; } switch (other.SchemeCase) { case SchemeOneofCase.EnhancedCpc: if (EnhancedCpc == null) { EnhancedCpc = new global::Google.Ads.GoogleAds.V5.Common.EnhancedCpc(); } EnhancedCpc.MergeFrom(other.EnhancedCpc); break; case SchemeOneofCase.TargetCpa: if (TargetCpa == null) { TargetCpa = new global::Google.Ads.GoogleAds.V5.Common.TargetCpa(); } TargetCpa.MergeFrom(other.TargetCpa); break; case SchemeOneofCase.TargetImpressionShare: if (TargetImpressionShare == null) { TargetImpressionShare = new global::Google.Ads.GoogleAds.V5.Common.TargetImpressionShare(); } TargetImpressionShare.MergeFrom(other.TargetImpressionShare); break; case SchemeOneofCase.TargetRoas: if (TargetRoas == null) { TargetRoas = new global::Google.Ads.GoogleAds.V5.Common.TargetRoas(); } TargetRoas.MergeFrom(other.TargetRoas); break; case SchemeOneofCase.TargetSpend: if (TargetSpend == null) { TargetSpend = new global::Google.Ads.GoogleAds.V5.Common.TargetSpend(); } TargetSpend.MergeFrom(other.TargetSpend); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }