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

namespace Google\Ads\GoogleAds\V23\Common;

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

/**
 * Information about which locales a category is available in.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.common.CriterionCategoryLocaleAvailability</code>
 */
class CriterionCategoryLocaleAvailability extends \Google\Protobuf\Internal\Message
{
    /**
     * Format of the locale availability. Can be LAUNCHED_TO_ALL (both country and
     * language will be empty), COUNTRY (only country will be set), LANGUAGE (only
     * language wil be set), COUNTRY_AND_LANGUAGE (both country and language will
     * be set).
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.CriterionCategoryLocaleAvailabilityModeEnum.CriterionCategoryLocaleAvailabilityMode availability_mode = 1;</code>
     */
    protected $availability_mode = 0;
    /**
     * The ISO-3166-1 alpha-2 country code associated with the category.
     *
     * Generated from protobuf field <code>optional string country_code = 4;</code>
     */
    protected $country_code = null;
    /**
     * ISO 639-1 code of the language associated with the category.
     *
     * Generated from protobuf field <code>optional string language_code = 5;</code>
     */
    protected $language_code = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $availability_mode
     *           Format of the locale availability. Can be LAUNCHED_TO_ALL (both country and
     *           language will be empty), COUNTRY (only country will be set), LANGUAGE (only
     *           language wil be set), COUNTRY_AND_LANGUAGE (both country and language will
     *           be set).
     *     @type string $country_code
     *           The ISO-3166-1 alpha-2 country code associated with the category.
     *     @type string $language_code
     *           ISO 639-1 code of the language associated with the category.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Common\CriterionCategoryAvailability::initOnce();
        parent::__construct($data);
    }

    /**
     * Format of the locale availability. Can be LAUNCHED_TO_ALL (both country and
     * language will be empty), COUNTRY (only country will be set), LANGUAGE (only
     * language wil be set), COUNTRY_AND_LANGUAGE (both country and language will
     * be set).
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.CriterionCategoryLocaleAvailabilityModeEnum.CriterionCategoryLocaleAvailabilityMode availability_mode = 1;</code>
     * @return int
     */
    public function getAvailabilityMode()
    {
        return $this->availability_mode;
    }

    /**
     * Format of the locale availability. Can be LAUNCHED_TO_ALL (both country and
     * language will be empty), COUNTRY (only country will be set), LANGUAGE (only
     * language wil be set), COUNTRY_AND_LANGUAGE (both country and language will
     * be set).
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.CriterionCategoryLocaleAvailabilityModeEnum.CriterionCategoryLocaleAvailabilityMode availability_mode = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setAvailabilityMode($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V23\Enums\CriterionCategoryLocaleAvailabilityModeEnum\CriterionCategoryLocaleAvailabilityMode::class);
        $this->availability_mode = $var;

        return $this;
    }

    /**
     * The ISO-3166-1 alpha-2 country code associated with the category.
     *
     * Generated from protobuf field <code>optional string country_code = 4;</code>
     * @return string
     */
    public function getCountryCode()
    {
        return isset($this->country_code) ? $this->country_code : '';
    }

    public function hasCountryCode()
    {
        return isset($this->country_code);
    }

    public function clearCountryCode()
    {
        unset($this->country_code);
    }

    /**
     * The ISO-3166-1 alpha-2 country code associated with the category.
     *
     * Generated from protobuf field <code>optional string country_code = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setCountryCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->country_code = $var;

        return $this;
    }

    /**
     * ISO 639-1 code of the language associated with the category.
     *
     * Generated from protobuf field <code>optional string language_code = 5;</code>
     * @return string
     */
    public function getLanguageCode()
    {
        return isset($this->language_code) ? $this->language_code : '';
    }

    public function hasLanguageCode()
    {
        return isset($this->language_code);
    }

    public function clearLanguageCode()
    {
        unset($this->language_code);
    }

    /**
     * ISO 639-1 code of the language associated with the category.
     *
     * Generated from protobuf field <code>optional string language_code = 5;</code>
     * @param string $var
     * @return $this
     */
    public function setLanguageCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->language_code = $var;

        return $this;
    }

}

