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

namespace Google\Cloud\GeminiDataAnalytics\V1beta;

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

/**
 * Looker Query Object
 * [Looker API
 * documentation](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 string[] $fields
     *           Optional. The fields to retrieve from the explore.
     *     @type \Google\Cloud\GeminiDataAnalytics\V1beta\LookerQuery\Filter[] $filters
     *           Optional. The filters to apply to the explore.
     *     @type string[] $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\Context::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 RepeatedField<string>
     */
    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 string[] $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 RepeatedField<\Google\Cloud\GeminiDataAnalytics\V1beta\LookerQuery\Filter>
     */
    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 \Google\Cloud\GeminiDataAnalytics\V1beta\LookerQuery\Filter[] $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 RepeatedField<string>
     */
    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 string[] $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;
    }

}

