Example #1
0
 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);
 }
Example #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (ResourceName.Length != 0)
            {
                hash ^= ResourceName.GetHashCode();
            }
            if (id_ != null)
            {
                hash ^= Id.GetHashCode();
            }
            if (name_ != null)
            {
                hash ^= Name.GetHashCode();
            }
            if (Status != 0)
            {
                hash ^= Status.GetHashCode();
            }
            if (Type != 0)
            {
                hash ^= Type.GetHashCode();
            }
            if (AdRotationMode != 0)
            {
                hash ^= AdRotationMode.GetHashCode();
            }
            if (trackingUrlTemplate_ != null)
            {
                hash ^= TrackingUrlTemplate.GetHashCode();
            }
            hash ^= urlCustomParameters_.GetHashCode();
            if (campaign_ != null)
            {
                hash ^= Campaign.GetHashCode();
            }
            if (cpcBidMicros_ != null)
            {
                hash ^= CpcBidMicros.GetHashCode();
            }
            if (cpmBidMicros_ != null)
            {
                hash ^= CpmBidMicros.GetHashCode();
            }
            if (cpaBidMicros_ != null)
            {
                hash ^= CpaBidMicros.GetHashCode();
            }
            if (cpvBidMicros_ != null)
            {
                hash ^= CpvBidMicros.GetHashCode();
            }
            if (targetRoasOverride_ != null)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseNullableDoubleEqualityComparer.GetHashCode(TargetRoasOverride);
            }
            if (percentCpcBidMicros_ != null)
            {
                hash ^= PercentCpcBidMicros.GetHashCode();
            }
            if (explorerAutoOptimizerSetting_ != null)
            {
                hash ^= ExplorerAutoOptimizerSetting.GetHashCode();
            }
            if (DisplayCustomBidDimension != 0)
            {
                hash ^= DisplayCustomBidDimension.GetHashCode();
            }
            if (finalUrlSuffix_ != null)
            {
                hash ^= FinalUrlSuffix.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }