<?php

# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/analytics/data/v1beta/data.proto
namespace Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Data\V1beta\OrderBy;

use Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\GPBType;
use Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\RepeatedField;
use Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\GPBUtil;
/**
 * Sorts by dimension values.
 *
 * Generated from protobuf message <code>google.analytics.data.v1beta.OrderBy.DimensionOrderBy</code>
 */
class DimensionOrderBy extends \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Protobuf\Internal\Message
{
    /**
     * A dimension name in the request to order by.
     *
     * Generated from protobuf field <code>string dimension_name = 1;</code>
     */
    private $dimension_name = '';
    /**
     * Controls the rule for dimension value ordering.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType order_type = 2;</code>
     */
    private $order_type = 0;
    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $dimension_name
     *           A dimension name in the request to order by.
     *     @type int $order_type
     *           Controls the rule for dimension value ordering.
     * }
     */
    public function __construct($data = NULL)
    {
        \Matomo\Dependencies\GoogleAnalyticsImporter\GPBMetadata\Google\Analytics\Data\V1Beta\Data::initOnce();
        parent::__construct($data);
    }
    /**
     * A dimension name in the request to order by.
     *
     * Generated from protobuf field <code>string dimension_name = 1;</code>
     * @return string
     */
    public function getDimensionName()
    {
        return $this->dimension_name;
    }
    /**
     * A dimension name in the request to order by.
     *
     * Generated from protobuf field <code>string dimension_name = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setDimensionName($var)
    {
        GPBUtil::checkString($var, True);
        $this->dimension_name = $var;
        return $this;
    }
    /**
     * Controls the rule for dimension value ordering.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType order_type = 2;</code>
     * @return int
     */
    public function getOrderType()
    {
        return $this->order_type;
    }
    /**
     * Controls the rule for dimension value ordering.
     *
     * Generated from protobuf field <code>.google.analytics.data.v1beta.OrderBy.DimensionOrderBy.OrderType order_type = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setOrderType($var)
    {
        GPBUtil::checkEnum($var, \Matomo\Dependencies\GoogleAnalyticsImporter\Google\Analytics\Data\V1beta\OrderBy\DimensionOrderBy\OrderType::class);
        $this->order_type = $var;
        return $this;
    }
}
