<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/geminidataanalytics/v1beta/data_chat_service.proto

namespace Google\Cloud\GeminiDataAnalytics\V1beta;

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

/**
 * A query for retrieving data from a Looker Explore. See
 * [Run Inline
 * Query](https://cloud.google.com/looker/docs/reference/looker-api/latest/methods/Query/run_inline_query).
 *
 * Generated from protobuf message <code>google.cloud.geminidataanalytics.v1beta.LookerQuery</code>
 */
class LookerQuery extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The LookML model used to generate the query.
     *
     * Generated from protobuf field <code>string model = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $model = '';
    /**
     * Required. The LookML Explore used to generate the query.
     *
     * Generated from protobuf field <code>string explore = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $explore = '';
    /**
     * Optional. The fields to retrieve from the Explore.
     *
     * Generated from protobuf field <code>repeated string fields = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $fields;
    /**
     * Optional. The filters to apply to the Explore.
     *
     * Generated from protobuf field <code>repeated .google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $filters;
    /**
     * Optional. The sorts to apply to the Explore.
     *
     * Generated from protobuf field <code>repeated string sorts = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $sorts;
    /**
     * Optional. Limit in the query.
     *
     * Generated from protobuf field <code>optional string limit = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $limit = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $model
     *           Required. The LookML model used to generate the query.
     *     @type string $explore
     *           Required. The LookML Explore used to generate the query.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $fields
     *           Optional. The fields to retrieve from the Explore.
     *     @type array<\Google\Cloud\GeminiDataAnalytics\V1beta\LookerQuery\Filter>|\Google\Protobuf\Internal\RepeatedField $filters
     *           Optional. The filters to apply to the Explore.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $sorts
     *           Optional. The sorts to apply to the Explore.
     *     @type string $limit
     *           Optional. Limit in the query.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Geminidataanalytics\V1Beta\DataChatService::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The LookML model used to generate the query.
     *
     * Generated from protobuf field <code>string model = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getModel()
    {
        return $this->model;
    }

    /**
     * Required. The LookML model used to generate the query.
     *
     * Generated from protobuf field <code>string model = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setModel($var)
    {
        GPBUtil::checkString($var, True);
        $this->model = $var;

        return $this;
    }

    /**
     * Required. The LookML Explore used to generate the query.
     *
     * Generated from protobuf field <code>string explore = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getExplore()
    {
        return $this->explore;
    }

    /**
     * Required. The LookML Explore used to generate the query.
     *
     * Generated from protobuf field <code>string explore = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setExplore($var)
    {
        GPBUtil::checkString($var, True);
        $this->explore = $var;

        return $this;
    }

    /**
     * Optional. The fields to retrieve from the Explore.
     *
     * Generated from protobuf field <code>repeated string fields = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFields()
    {
        return $this->fields;
    }

    /**
     * Optional. The fields to retrieve from the Explore.
     *
     * Generated from protobuf field <code>repeated string fields = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFields($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->fields = $arr;

        return $this;
    }

    /**
     * Optional. The filters to apply to the Explore.
     *
     * Generated from protobuf field <code>repeated .google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFilters()
    {
        return $this->filters;
    }

    /**
     * Optional. The filters to apply to the Explore.
     *
     * Generated from protobuf field <code>repeated .google.cloud.geminidataanalytics.v1beta.LookerQuery.Filter filters = 4 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<\Google\Cloud\GeminiDataAnalytics\V1beta\LookerQuery\Filter>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFilters($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\GeminiDataAnalytics\V1beta\LookerQuery\Filter::class);
        $this->filters = $arr;

        return $this;
    }

    /**
     * Optional. The sorts to apply to the Explore.
     *
     * Generated from protobuf field <code>repeated string sorts = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSorts()
    {
        return $this->sorts;
    }

    /**
     * Optional. The sorts to apply to the Explore.
     *
     * Generated from protobuf field <code>repeated string sorts = 5 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSorts($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->sorts = $arr;

        return $this;
    }

    /**
     * Optional. Limit in the query.
     *
     * Generated from protobuf field <code>optional string limit = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getLimit()
    {
        return isset($this->limit) ? $this->limit : '';
    }

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

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

    /**
     * Optional. Limit in the query.
     *
     * Generated from protobuf field <code>optional string limit = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setLimit($var)
    {
        GPBUtil::checkString($var, True);
        $this->limit = $var;

        return $this;
    }

}

