<?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 listing group criterion.
 *
 * Generated from protobuf message <code>google.ads.googleads.v23.common.ListingGroupInfo</code>
 */
class ListingGroupInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Type of the listing group.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.ListingGroupTypeEnum.ListingGroupType type = 1;</code>
     */
    protected $type = 0;
    /**
     * Dimension value with which this listing group is refining its parent.
     * Undefined for the root group.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.ListingDimensionInfo case_value = 2;</code>
     */
    protected $case_value = null;
    /**
     * Resource name of ad group criterion which is the parent listing group
     * subdivision. Null for the root group.
     *
     * Generated from protobuf field <code>optional string parent_ad_group_criterion = 4;</code>
     */
    protected $parent_ad_group_criterion = null;
    /**
     * The path of dimensions defining this listing group.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v23.common.ListingDimensionPath path = 5;</code>
     */
    protected $path = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $type
     *           Type of the listing group.
     *     @type \Google\Ads\GoogleAds\V23\Common\ListingDimensionInfo $case_value
     *           Dimension value with which this listing group is refining its parent.
     *           Undefined for the root group.
     *     @type string $parent_ad_group_criterion
     *           Resource name of ad group criterion which is the parent listing group
     *           subdivision. Null for the root group.
     *     @type \Google\Ads\GoogleAds\V23\Common\ListingDimensionPath $path
     *           The path of dimensions defining this listing group.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Ads\GoogleAds\V23\Common\Criteria::initOnce();
        parent::__construct($data);
    }

    /**
     * Type of the listing group.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.ListingGroupTypeEnum.ListingGroupType type = 1;</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Type of the listing group.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.enums.ListingGroupTypeEnum.ListingGroupType type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Ads\GoogleAds\V23\Enums\ListingGroupTypeEnum\ListingGroupType::class);
        $this->type = $var;

        return $this;
    }

    /**
     * Dimension value with which this listing group is refining its parent.
     * Undefined for the root group.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.ListingDimensionInfo case_value = 2;</code>
     * @return \Google\Ads\GoogleAds\V23\Common\ListingDimensionInfo|null
     */
    public function getCaseValue()
    {
        return $this->case_value;
    }

    public function hasCaseValue()
    {
        return isset($this->case_value);
    }

    public function clearCaseValue()
    {
        unset($this->case_value);
    }

    /**
     * Dimension value with which this listing group is refining its parent.
     * Undefined for the root group.
     *
     * Generated from protobuf field <code>.google.ads.googleads.v23.common.ListingDimensionInfo case_value = 2;</code>
     * @param \Google\Ads\GoogleAds\V23\Common\ListingDimensionInfo $var
     * @return $this
     */
    public function setCaseValue($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Common\ListingDimensionInfo::class);
        $this->case_value = $var;

        return $this;
    }

    /**
     * Resource name of ad group criterion which is the parent listing group
     * subdivision. Null for the root group.
     *
     * Generated from protobuf field <code>optional string parent_ad_group_criterion = 4;</code>
     * @return string
     */
    public function getParentAdGroupCriterion()
    {
        return isset($this->parent_ad_group_criterion) ? $this->parent_ad_group_criterion : '';
    }

    public function hasParentAdGroupCriterion()
    {
        return isset($this->parent_ad_group_criterion);
    }

    public function clearParentAdGroupCriterion()
    {
        unset($this->parent_ad_group_criterion);
    }

    /**
     * Resource name of ad group criterion which is the parent listing group
     * subdivision. Null for the root group.
     *
     * Generated from protobuf field <code>optional string parent_ad_group_criterion = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setParentAdGroupCriterion($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent_ad_group_criterion = $var;

        return $this;
    }

    /**
     * The path of dimensions defining this listing group.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v23.common.ListingDimensionPath path = 5;</code>
     * @return \Google\Ads\GoogleAds\V23\Common\ListingDimensionPath|null
     */
    public function getPath()
    {
        return $this->path;
    }

    public function hasPath()
    {
        return isset($this->path);
    }

    public function clearPath()
    {
        unset($this->path);
    }

    /**
     * The path of dimensions defining this listing group.
     *
     * Generated from protobuf field <code>optional .google.ads.googleads.v23.common.ListingDimensionPath path = 5;</code>
     * @param \Google\Ads\GoogleAds\V23\Common\ListingDimensionPath $var
     * @return $this
     */
    public function setPath($var)
    {
        GPBUtil::checkMessage($var, \Google\Ads\GoogleAds\V23\Common\ListingDimensionPath::class);
        $this->path = $var;

        return $this;
    }

}

