<?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;

/**
 * Dimensions' values in a single pivot.
 *
 * Generated from protobuf message <code>google.analytics.data.v1alpha.PivotHeader</code>
 */
class PivotHeader extends \Google\Protobuf\Internal\Message
{
    /**
     * The size is the same as the cardinality of the corresponding dimension
     * combinations.
     *
     * Generated from protobuf field <code>repeated .google.analytics.data.v1alpha.PivotDimensionHeader pivot_dimension_headers = 1;</code>
     */
    private $pivot_dimension_headers;
    /**
     * The cardinality of the pivot as if offset = 0 and limit = -1. The total
     * number of rows for this pivot's fields regardless of how the parameters
     * offset and limit are specified in the request.
     *
     * Generated from protobuf field <code>int32 row_count = 2;</code>
     */
    private $row_count = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Analytics\Data\V1alpha\PivotDimensionHeader[]|\Google\Protobuf\Internal\RepeatedField $pivot_dimension_headers
     *           The size is the same as the cardinality of the corresponding dimension
     *           combinations.
     *     @type int $row_count
     *           The cardinality of the pivot as if offset = 0 and limit = -1. The total
     *           number of rows for this pivot's fields regardless of how the parameters
     *           offset and limit are specified in the request.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Analytics\Data\V1Alpha\Data::initOnce();
        parent::__construct($data);
    }

    /**
     * The size is the same as the cardinality of the corresponding dimension
     * combinations.
     *
     * Generated from protobuf field <code>repeated .google.analytics.data.v1alpha.PivotDimensionHeader pivot_dimension_headers = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPivotDimensionHeaders()
    {
        return $this->pivot_dimension_headers;
    }

    /**
     * The size is the same as the cardinality of the corresponding dimension
     * combinations.
     *
     * Generated from protobuf field <code>repeated .google.analytics.data.v1alpha.PivotDimensionHeader pivot_dimension_headers = 1;</code>
     * @param \Google\Analytics\Data\V1alpha\PivotDimensionHeader[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPivotDimensionHeaders($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Analytics\Data\V1alpha\PivotDimensionHeader::class);
        $this->pivot_dimension_headers = $arr;

        return $this;
    }

    /**
     * The cardinality of the pivot as if offset = 0 and limit = -1. The total
     * number of rows for this pivot's fields regardless of how the parameters
     * offset and limit are specified in the request.
     *
     * Generated from protobuf field <code>int32 row_count = 2;</code>
     * @return int
     */
    public function getRowCount()
    {
        return $this->row_count;
    }

    /**
     * The cardinality of the pivot as if offset = 0 and limit = -1. The total
     * number of rows for this pivot's fields regardless of how the parameters
     * offset and limit are specified in the request.
     *
     * Generated from protobuf field <code>int32 row_count = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setRowCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->row_count = $var;

        return $this;
    }

}

