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

namespace Google\Ads\GoogleAds\V23\Common\PolicyTopicConstraint;

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

/**
 * Indicates that a resource's ability to serve in a particular country is
 * constrained.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.common.PolicyTopicConstraint.CountryConstraint</code>
 */
class CountryConstraint extends \Google\Protobuf\Internal\Message
{
    /**
     * Geo target constant resource name of the country in which serving is
     * constrained.
     *
     * Generated from protobuf field <code>optional string country_criterion = 2;</code>
     */
    protected $country_criterion = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *                    Optional. Data for populating the Message object.
     *
     * @type string $country_criterion
     *           Geo target constant resource name of the country in which serving is
     *           constrained.
     * }
     */
    public function __construct($data = null)
    {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Common\Policy::initOnce();
        parent::__construct($data);
    }

    /**
     * Geo target constant resource name of the country in which serving is
     * constrained.
     *
     * Generated from protobuf field <code>optional string country_criterion = 2;</code>
     *
     * @return string
     */
    public function getCountryCriterion()
    {
        return isset($this->country_criterion) ? $this->country_criterion : '';
    }

    public function hasCountryCriterion()
    {
        return isset($this->country_criterion);
    }

    public function clearCountryCriterion()
    {
        unset($this->country_criterion);
    }

    /**
     * Geo target constant resource name of the country in which serving is
     * constrained.
     *
     * Generated from protobuf field <code>optional string country_criterion = 2;</code>
     *
     * @param  string $var
     * @return $this
     */
    public function setCountryCriterion($var)
    {
        GPBUtil::checkString($var, true);
        $this->country_criterion = $var;

        return $this;
    }

}

