<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/analytics/data/v1alpha/data.proto

namespace Google\Analytics\Data\V1alpha;

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

/**
 * Breakdowns add a dimension to the funnel table sub report response.
 *
 * Generated from protobuf message <code>google.analytics.data.v1alpha.FunnelBreakdown</code>
 */
class FunnelBreakdown extends \Google\Protobuf\Internal\Message
{
    /**
     * The dimension column added to the funnel table sub report response. The
     * breakdown dimension breaks down each funnel step. A valid
     * `breakdownDimension` is required if `funnelBreakdown` is specified.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.Dimension breakdown_dimension = 1;</code>
     */
    private $breakdown_dimension = null;
    /**
     * The maximum number of distinct values of the breakdown dimension to return
     * in the response. A `limit` of `5` is used if limit is not specified. Limit
     * must exceed zero and cannot exceed 15.
     *
     * Generated from protobuf field <code>optional int64 limit = 2;</code>
     */
    private $limit = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Analytics\Data\V1alpha\Dimension $breakdown_dimension
     *           The dimension column added to the funnel table sub report response. The
     *           breakdown dimension breaks down each funnel step. A valid
     *           `breakdownDimension` is required if `funnelBreakdown` is specified.
     *     @type int|string $limit
     *           The maximum number of distinct values of the breakdown dimension to return
     *           in the response. A `limit` of `5` is used if limit is not specified. Limit
     *           must exceed zero and cannot exceed 15.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Analytics\Data\V1Alpha\Data::initOnce();
        parent::__construct($data);
    }

    /**
     * The dimension column added to the funnel table sub report response. The
     * breakdown dimension breaks down each funnel step. A valid
     * `breakdownDimension` is required if `funnelBreakdown` is specified.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.Dimension breakdown_dimension = 1;</code>
     * @return \Google\Analytics\Data\V1alpha\Dimension|null
     */
    public function getBreakdownDimension()
    {
        return $this->breakdown_dimension;
    }

    public function hasBreakdownDimension()
    {
        return isset($this->breakdown_dimension);
    }

    public function clearBreakdownDimension()
    {
        unset($this->breakdown_dimension);
    }

    /**
     * The dimension column added to the funnel table sub report response. The
     * breakdown dimension breaks down each funnel step. A valid
     * `breakdownDimension` is required if `funnelBreakdown` is specified.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1alpha.Dimension breakdown_dimension = 1;</code>
     * @param \Google\Analytics\Data\V1alpha\Dimension $var
     * @return $this
     */
    public function setBreakdownDimension($var)
    {
        GPBUtil::checkMessage($var, \Google\Analytics\Data\V1alpha\Dimension::class);
        $this->breakdown_dimension = $var;

        return $this;
    }

    /**
     * The maximum number of distinct values of the breakdown dimension to return
     * in the response. A `limit` of `5` is used if limit is not specified. Limit
     * must exceed zero and cannot exceed 15.
     *
     * Generated from protobuf field <code>optional int64 limit = 2;</code>
     * @return int|string
     */
    public function getLimit()
    {
        return isset($this->limit) ? $this->limit : 0;
    }

    public function hasLimit()
    {
        return isset($this->limit);
    }

    public function clearLimit()
    {
        unset($this->limit);
    }

    /**
     * The maximum number of distinct values of the breakdown dimension to return
     * in the response. A `limit` of `5` is used if limit is not specified. Limit
     * must exceed zero and cannot exceed 15.
     *
     * Generated from protobuf field <code>optional int64 limit = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setLimit($var)
    {
        GPBUtil::checkInt64($var);
        $this->limit = $var;

        return $this;
    }

}

