<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/ads/googleads/v25/common/policy.proto

namespace Google\Ads\GoogleAds\V25\Common;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\GPBUtil;
use Google\Protobuf\RepeatedField;

/**
 * Parameter for controlling how policy exemption is done.
 *
 * Generated from protobuf message <code>google.ads.googleads.v25.common.PolicyValidationParameter</code>
 */
class PolicyValidationParameter extends \Google\Protobuf\Internal\Message
{
    /**
     * The list of policy topics that should not cause a `PolicyFindingError` to
     * be reported. This field is used for ad policy exemptions. It corresponds
     * to the `PolicyTopicEntry.topic` field.
     * If this field is populated, then `exempt_policy_violation_keys` must be
     * empty.
     * Resources that violate these policies will be saved, but will not be
     * eligible to serve. They may begin serving at a later time due to a change
     * in policies, re-review of the resource, or a change in advertiser
     * certificates.
     *
     * Generated from protobuf field <code>repeated string ignorable_policy_topics = 3;</code>
     */
    private $ignorable_policy_topics;
    /**
     * The list of policy violation keys that should not cause a
     * `PolicyViolationError` to be reported. Not all policy violations are
     * exemptable. Refer to the `is_exemptible` field in the returned
     * `PolicyViolationError`. This field is used for keyword policy exemptions.
     * If this field is populated, then `ignorable_policy_topics` must be empty.
     * Resources that violate these policies will be saved, but will not be
     * eligible to serve. They may begin serving at a later time due to a change
     * in policies, re-review of the resource, or a change in advertiser
     * certificates.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v25.common.PolicyViolationKey exempt_policy_violation_keys = 2;</code>
     */
    private $exempt_policy_violation_keys;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string[] $ignorable_policy_topics
     *           The list of policy topics that should not cause a `PolicyFindingError` to
     *           be reported. This field is used for ad policy exemptions. It corresponds
     *           to the `PolicyTopicEntry.topic` field.
     *           If this field is populated, then `exempt_policy_violation_keys` must be
     *           empty.
     *           Resources that violate these policies will be saved, but will not be
     *           eligible to serve. They may begin serving at a later time due to a change
     *           in policies, re-review of the resource, or a change in advertiser
     *           certificates.
     *     @type \Google\Ads\GoogleAds\V25\Common\PolicyViolationKey[] $exempt_policy_violation_keys
     *           The list of policy violation keys that should not cause a
     *           `PolicyViolationError` to be reported. Not all policy violations are
     *           exemptable. Refer to the `is_exemptible` field in the returned
     *           `PolicyViolationError`. This field is used for keyword policy exemptions.
     *           If this field is populated, then `ignorable_policy_topics` must be empty.
     *           Resources that violate these policies will be saved, but will not be
     *           eligible to serve. They may begin serving at a later time due to a change
     *           in policies, re-review of the resource, or a change in advertiser
     *           certificates.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V25\Common\Policy::initOnce();
        parent::__construct($data);
    }

    /**
     * The list of policy topics that should not cause a `PolicyFindingError` to
     * be reported. This field is used for ad policy exemptions. It corresponds
     * to the `PolicyTopicEntry.topic` field.
     * If this field is populated, then `exempt_policy_violation_keys` must be
     * empty.
     * Resources that violate these policies will be saved, but will not be
     * eligible to serve. They may begin serving at a later time due to a change
     * in policies, re-review of the resource, or a change in advertiser
     * certificates.
     *
     * Generated from protobuf field <code>repeated string ignorable_policy_topics = 3;</code>
     * @return RepeatedField<string>
     */
    public function getIgnorablePolicyTopics()
    {
        return $this->ignorable_policy_topics;
    }

    /**
     * The list of policy topics that should not cause a `PolicyFindingError` to
     * be reported. This field is used for ad policy exemptions. It corresponds
     * to the `PolicyTopicEntry.topic` field.
     * If this field is populated, then `exempt_policy_violation_keys` must be
     * empty.
     * Resources that violate these policies will be saved, but will not be
     * eligible to serve. They may begin serving at a later time due to a change
     * in policies, re-review of the resource, or a change in advertiser
     * certificates.
     *
     * Generated from protobuf field <code>repeated string ignorable_policy_topics = 3;</code>
     * @param string[] $var
     * @return $this
     */
    public function setIgnorablePolicyTopics($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->ignorable_policy_topics = $arr;

        return $this;
    }

    /**
     * The list of policy violation keys that should not cause a
     * `PolicyViolationError` to be reported. Not all policy violations are
     * exemptable. Refer to the `is_exemptible` field in the returned
     * `PolicyViolationError`. This field is used for keyword policy exemptions.
     * If this field is populated, then `ignorable_policy_topics` must be empty.
     * Resources that violate these policies will be saved, but will not be
     * eligible to serve. They may begin serving at a later time due to a change
     * in policies, re-review of the resource, or a change in advertiser
     * certificates.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v25.common.PolicyViolationKey exempt_policy_violation_keys = 2;</code>
     * @return RepeatedField<\Google\Ads\GoogleAds\V25\Common\PolicyViolationKey>
     */
    public function getExemptPolicyViolationKeys()
    {
        return $this->exempt_policy_violation_keys;
    }

    /**
     * The list of policy violation keys that should not cause a
     * `PolicyViolationError` to be reported. Not all policy violations are
     * exemptable. Refer to the `is_exemptible` field in the returned
     * `PolicyViolationError`. This field is used for keyword policy exemptions.
     * If this field is populated, then `ignorable_policy_topics` must be empty.
     * Resources that violate these policies will be saved, but will not be
     * eligible to serve. They may begin serving at a later time due to a change
     * in policies, re-review of the resource, or a change in advertiser
     * certificates.
     *
     * Generated from protobuf field <code>repeated .google.ads.googleads.v25.common.PolicyViolationKey exempt_policy_violation_keys = 2;</code>
     * @param \Google\Ads\GoogleAds\V25\Common\PolicyViolationKey[] $var
     * @return $this
     */
    public function setExemptPolicyViolationKeys($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Ads\GoogleAds\V25\Common\PolicyViolationKey::class);
        $this->exempt_policy_violation_keys = $arr;

        return $this;
    }

}

