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); }
public override int GetHashCode() { int hash = 1; if (ResourceName.Length != 0) { hash ^= ResourceName.GetHashCode(); } if (HasAdGroupId) { hash ^= AdGroupId.GetHashCode(); } if (HasCriterionId) { hash ^= CriterionId.GetHashCode(); } if (Type != global::Google.Ads.GoogleAds.V5.Enums.SimulationTypeEnum.Types.SimulationType.Unspecified) { hash ^= Type.GetHashCode(); } if (ModificationMethod != global::Google.Ads.GoogleAds.V5.Enums.SimulationModificationMethodEnum.Types.SimulationModificationMethod.Unspecified) { hash ^= ModificationMethod.GetHashCode(); } if (HasStartDate) { hash ^= StartDate.GetHashCode(); } if (HasEndDate) { hash ^= EndDate.GetHashCode(); } if (pointListCase_ == PointListOneofCase.CpcBidPointList) { hash ^= CpcBidPointList.GetHashCode(); } if (pointListCase_ == PointListOneofCase.PercentCpcBidPointList) { hash ^= PercentCpcBidPointList.GetHashCode(); } hash ^= (int)pointListCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }