public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { ResourceName = input.ReadString(); break; } case 26: { long?value = _single_id_codec.Read(input); if (id_ == null || value != 0L) { Id = value; } break; } case 34: { string value = _single_name_codec.Read(input); if (name_ == null || value != "") { Name = value; } break; } case 40: { status_ = (global::Google.Ads.GoogleAds.V0.Enums.AdGroupStatusEnum.Types.AdGroupStatus)input.ReadEnum(); break; } case 50: { urlCustomParameters_.AddEntriesFrom(input, _repeated_urlCustomParameters_codec); break; } case 82: { string value = _single_campaign_codec.Read(input); if (campaign_ == null || value != "") { Campaign = value; } break; } case 96: { type_ = (global::Google.Ads.GoogleAds.V0.Enums.AdGroupTypeEnum.Types.AdGroupType)input.ReadEnum(); break; } case 106: { string value = _single_trackingUrlTemplate_codec.Read(input); if (trackingUrlTemplate_ == null || value != "") { TrackingUrlTemplate = value; } break; } case 114: { long?value = _single_cpcBidMicros_codec.Read(input); if (cpcBidMicros_ == null || value != 0L) { CpcBidMicros = value; } break; } case 122: { long?value = _single_cpmBidMicros_codec.Read(input); if (cpmBidMicros_ == null || value != 0L) { CpmBidMicros = value; } break; } case 130: { long?value = _single_cpaBidMicros_codec.Read(input); if (cpaBidMicros_ == null || value != 0L) { CpaBidMicros = value; } break; } case 138: { long?value = _single_cpvBidMicros_codec.Read(input); if (cpvBidMicros_ == null || value != 0L) { CpvBidMicros = value; } break; } case 154: { double?value = _single_targetRoasOverride_codec.Read(input); if (targetRoasOverride_ == null || value != 0D) { TargetRoasOverride = value; } break; } case 162: { long?value = _single_percentCpcBidMicros_codec.Read(input); if (percentCpcBidMicros_ == null || value != 0L) { PercentCpcBidMicros = value; } break; } case 170: { if (explorerAutoOptimizerSetting_ == null) { explorerAutoOptimizerSetting_ = new global::Google.Ads.GoogleAds.V0.Common.ExplorerAutoOptimizerSetting(); } input.ReadMessage(explorerAutoOptimizerSetting_); break; } case 176: { adRotationMode_ = (global::Google.Ads.GoogleAds.V0.Enums.AdGroupAdRotationModeEnum.Types.AdGroupAdRotationMode)input.ReadEnum(); break; } case 184: { displayCustomBidDimension_ = (global::Google.Ads.GoogleAds.V0.Enums.TargetingDimensionEnum.Types.TargetingDimension)input.ReadEnum(); break; } case 194: { string value = _single_finalUrlSuffix_codec.Read(input); if (finalUrlSuffix_ == null || value != "") { FinalUrlSuffix = value; } break; } } } }
public void MergeFrom(AdGroup 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.AdRotationMode != 0) { AdRotationMode = other.AdRotationMode; } if (other.trackingUrlTemplate_ != null) { if (trackingUrlTemplate_ == null || other.TrackingUrlTemplate != "") { TrackingUrlTemplate = other.TrackingUrlTemplate; } } urlCustomParameters_.Add(other.urlCustomParameters_); if (other.campaign_ != null) { if (campaign_ == null || other.Campaign != "") { Campaign = other.Campaign; } } if (other.cpcBidMicros_ != null) { if (cpcBidMicros_ == null || other.CpcBidMicros != 0L) { CpcBidMicros = other.CpcBidMicros; } } if (other.cpmBidMicros_ != null) { if (cpmBidMicros_ == null || other.CpmBidMicros != 0L) { CpmBidMicros = other.CpmBidMicros; } } if (other.cpaBidMicros_ != null) { if (cpaBidMicros_ == null || other.CpaBidMicros != 0L) { CpaBidMicros = other.CpaBidMicros; } } if (other.cpvBidMicros_ != null) { if (cpvBidMicros_ == null || other.CpvBidMicros != 0L) { CpvBidMicros = other.CpvBidMicros; } } if (other.targetRoasOverride_ != null) { if (targetRoasOverride_ == null || other.TargetRoasOverride != 0D) { TargetRoasOverride = other.TargetRoasOverride; } } if (other.percentCpcBidMicros_ != null) { if (percentCpcBidMicros_ == null || other.PercentCpcBidMicros != 0L) { PercentCpcBidMicros = other.PercentCpcBidMicros; } } if (other.explorerAutoOptimizerSetting_ != null) { if (explorerAutoOptimizerSetting_ == null) { explorerAutoOptimizerSetting_ = new global::Google.Ads.GoogleAds.V0.Common.ExplorerAutoOptimizerSetting(); } ExplorerAutoOptimizerSetting.MergeFrom(other.ExplorerAutoOptimizerSetting); } if (other.DisplayCustomBidDimension != 0) { DisplayCustomBidDimension = other.DisplayCustomBidDimension; } if (other.finalUrlSuffix_ != null) { if (finalUrlSuffix_ == null || other.FinalUrlSuffix != "") { FinalUrlSuffix = other.FinalUrlSuffix; } } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }