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

namespace Google\Ads\GoogleAds\V23\Common;

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

/**
 * A criterion to represent a single item group rule in Vertical Ads.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.common.VerticalAdsItemGroupRuleInfo</code>
 */
class VerticalAdsItemGroupRuleInfo extends \Google\Protobuf\Internal\Message
{
    protected $dimension;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $item_code
     *           The id specifying a particular Vertical Ad listing.
     *     @type string $country_criterion_id
     *           The resource name of the Geo Target Constant for the country.
     *     @type string $region_criterion_id
     *           The resource name of the Geo Target Constant for the region.
     *     @type string $city_criterion_id
     *           The resource name of the Geo Target Constant for the city.
     *     @type int|string $hotel_class
     *           Integer value specifying the class rating for a hotel. Ranges from 1 to 5
     *           stars.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Common\Criteria::initOnce();
        parent::__construct($data);
    }

    /**
     * The id specifying a particular Vertical Ad listing.
     *
     * Generated from protobuf field <code>string item_code = 1;</code>
     * @return string
     */
    public function getItemCode()
    {
        return $this->readOneof(1);
    }

    public function hasItemCode()
    {
        return $this->hasOneof(1);
    }

    /**
     * The id specifying a particular Vertical Ad listing.
     *
     * Generated from protobuf field <code>string item_code = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setItemCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * The resource name of the Geo Target Constant for the country.
     *
     * Generated from protobuf field <code>string country_criterion_id = 2;</code>
     * @return string
     */
    public function getCountryCriterionId()
    {
        return $this->readOneof(2);
    }

    public function hasCountryCriterionId()
    {
        return $this->hasOneof(2);
    }

    /**
     * The resource name of the Geo Target Constant for the country.
     *
     * Generated from protobuf field <code>string country_criterion_id = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setCountryCriterionId($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * The resource name of the Geo Target Constant for the region.
     *
     * Generated from protobuf field <code>string region_criterion_id = 3;</code>
     * @return string
     */
    public function getRegionCriterionId()
    {
        return $this->readOneof(3);
    }

    public function hasRegionCriterionId()
    {
        return $this->hasOneof(3);
    }

    /**
     * The resource name of the Geo Target Constant for the region.
     *
     * Generated from protobuf field <code>string region_criterion_id = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setRegionCriterionId($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * The resource name of the Geo Target Constant for the city.
     *
     * Generated from protobuf field <code>string city_criterion_id = 4;</code>
     * @return string
     */
    public function getCityCriterionId()
    {
        return $this->readOneof(4);
    }

    public function hasCityCriterionId()
    {
        return $this->hasOneof(4);
    }

    /**
     * The resource name of the Geo Target Constant for the city.
     *
     * Generated from protobuf field <code>string city_criterion_id = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setCityCriterionId($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(4, $var);

        return $this;
    }

    /**
     * Integer value specifying the class rating for a hotel. Ranges from 1 to 5
     * stars.
     *
     * Generated from protobuf field <code>int64 hotel_class = 6;</code>
     * @return int|string
     */
    public function getHotelClass()
    {
        return $this->readOneof(6);
    }

    public function hasHotelClass()
    {
        return $this->hasOneof(6);
    }

    /**
     * Integer value specifying the class rating for a hotel. Ranges from 1 to 5
     * stars.
     *
     * Generated from protobuf field <code>int64 hotel_class = 6;</code>
     * @param int|string $var
     * @return $this
     */
    public function setHotelClass($var)
    {
        GPBUtil::checkInt64($var);
        $this->writeOneof(6, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getDimension()
    {
        return $this->whichOneof("dimension");
    }

}

