public override int GetHashCode() { int hash = 1; if (ResourceName.Length != 0) { hash ^= ResourceName.GetHashCode(); } if (Status != global::Google.Ads.GoogleAds.V4.Enums.AdGroupAdStatusEnum.Types.AdGroupAdStatus.Unspecified) { hash ^= Status.GetHashCode(); } if (adGroup_ != null) { hash ^= AdGroup.GetHashCode(); } if (ad_ != null) { hash ^= Ad.GetHashCode(); } if (policySummary_ != null) { hash ^= PolicySummary.GetHashCode(); } if (AdStrength != global::Google.Ads.GoogleAds.V4.Enums.AdStrengthEnum.Types.AdStrength.Unspecified) { hash ^= AdStrength.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (ResourceName.Length != 0) { hash ^= ResourceName.GetHashCode(); } if (Status != 0) { hash ^= Status.GetHashCode(); } if (adGroup_ != null) { hash ^= AdGroup.GetHashCode(); } if (ad_ != null) { hash ^= Ad.GetHashCode(); } if (policySummary_ != null) { hash ^= PolicySummary.GetHashCode(); } if (AdStrength != 0) { hash ^= AdStrength.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public void MergeFrom(AdGroupAdAssetView other) { if (other == null) { return; } if (other.ResourceName.Length != 0) { ResourceName = other.ResourceName; } if (other.adGroupAd_ != null) { if (adGroupAd_ == null || other.AdGroupAd != "") { AdGroupAd = other.AdGroupAd; } } if (other.asset_ != null) { if (asset_ == null || other.Asset != "") { Asset = other.Asset; } } if (other.FieldType != global::Google.Ads.GoogleAds.V5.Enums.AssetFieldTypeEnum.Types.AssetFieldType.Unspecified) { FieldType = other.FieldType; } if (other.HasEnabled) { Enabled = other.Enabled; } if (other.policySummary_ != null) { if (policySummary_ == null) { PolicySummary = new global::Google.Ads.GoogleAds.V5.Resources.AdGroupAdAssetPolicySummary(); } PolicySummary.MergeFrom(other.PolicySummary); } if (other.PerformanceLabel != global::Google.Ads.GoogleAds.V5.Enums.AssetPerformanceLabelEnum.Types.AssetPerformanceLabel.Unspecified) { PerformanceLabel = other.PerformanceLabel; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public void MergeFrom(AdGroupAd other) { if (other == null) { return; } if (other.ResourceName.Length != 0) { ResourceName = other.ResourceName; } if (other.Status != 0) { Status = other.Status; } if (other.adGroup_ != null) { if (adGroup_ == null || other.AdGroup != "") { AdGroup = other.AdGroup; } } if (other.ad_ != null) { if (ad_ == null) { Ad = new global::Google.Ads.GoogleAds.V2.Resources.Ad(); } Ad.MergeFrom(other.Ad); } if (other.policySummary_ != null) { if (policySummary_ == null) { PolicySummary = new global::Google.Ads.GoogleAds.V2.Resources.AdGroupAdPolicySummary(); } PolicySummary.MergeFrom(other.PolicySummary); } if (other.AdStrength != 0) { AdStrength = other.AdStrength; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public void MergeFrom(AdGroupAd other) { if (other == null) { return; } if (other.ResourceName.Length != 0) { ResourceName = other.ResourceName; } if (other.Status != global::Google.Ads.GoogleAds.V10.Enums.AdGroupAdStatusEnum.Types.AdGroupAdStatus.Unspecified) { Status = other.Status; } if (other.HasAdGroup) { AdGroup = other.AdGroup; } if (other.ad_ != null) { if (ad_ == null) { Ad = new global::Google.Ads.GoogleAds.V10.Resources.Ad(); } Ad.MergeFrom(other.Ad); } if (other.policySummary_ != null) { if (policySummary_ == null) { PolicySummary = new global::Google.Ads.GoogleAds.V10.Resources.AdGroupAdPolicySummary(); } PolicySummary.MergeFrom(other.PolicySummary); } if (other.AdStrength != global::Google.Ads.GoogleAds.V10.Enums.AdStrengthEnum.Types.AdStrength.Unspecified) { AdStrength = other.AdStrength; } actionItems_.Add(other.actionItems_); labels_.Add(other.labels_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
private void GetTextForConditions(PolicySummary policy) { m_indent = 0; AppendText(Properties.Resouces.BASICTEXT_CONDITIONS); string logic = String.Format(Thread.CurrentThread.CurrentCulture, "{0} ", policy.ConditionLogic.ToString()); bool bFirstCondition = true; foreach (ConditionSummary cond in policy.ConditionSummaries) { m_indent = 1; AppendText(String.Format(Thread.CurrentThread.CurrentCulture, "{0}{1}", !bFirstCondition ? logic : String.Empty, cond.Description)); bFirstCondition = false; } }
public override int GetHashCode() { int hash = 1; if (ResourceName.Length != 0) { hash ^= ResourceName.GetHashCode(); } if (adGroupAd_ != null) { hash ^= AdGroupAd.GetHashCode(); } if (asset_ != null) { hash ^= Asset.GetHashCode(); } if (FieldType != global::Google.Ads.GoogleAds.V5.Enums.AssetFieldTypeEnum.Types.AssetFieldType.Unspecified) { hash ^= FieldType.GetHashCode(); } if (HasEnabled) { hash ^= Enabled.GetHashCode(); } if (policySummary_ != null) { hash ^= PolicySummary.GetHashCode(); } if (PerformanceLabel != global::Google.Ads.GoogleAds.V5.Enums.AssetPerformanceLabelEnum.Types.AssetPerformanceLabel.Unspecified) { hash ^= PerformanceLabel.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
/// <summary> /// Displays information about the Organizations policies associated /// with an Organization. /// </summary> /// <param name="policy">An Organizations Policy Summary to display /// information on the console.</param> private static void DisplayPolicies(PolicySummary policy) { string policyInfo = $"{policy.Id} {policy.Name}\t{policy.Description}"; Console.WriteLine(policyInfo); }
private void GetTextForActions(PolicySummary policy) { m_indent = 0; AppendText(Properties.Resouces.BASICTEXT_ACTIONS); foreach (ChannelSummary channelSummary in policy.ChannelSummaries) { if (channelSummary.ActionSetSummaries != null && channelSummary.ActionSetSummaries.Length > 0) { m_indent = 1; AppendText(String.Format(Thread.CurrentThread.CurrentCulture, Properties.Resouces.BASICTEXT_ACTION_CHANNEL, channelSummary.Name)); foreach (ActionSetSummary ass in channelSummary.ActionSetSummaries) { m_indent = 2; AppendText(String.Format(Thread.CurrentThread.CurrentCulture, Properties.Resouces.BASICTEXT_ACTIONSET, ass.Name, ass.Description)); AppendText(Properties.Resouces.BASICTEXT_FOLLOWINGACTIONS); m_indent = 3; foreach (ActionSummary action in ass.ActionSummaries) { AppendText(String.Format(Thread.CurrentThread.CurrentCulture, "{0} ({1})", action.Name, action.Description)); } } } } }