<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/contactcenterinsights/v1/resources.proto

namespace Google\Cloud\ContactCenterInsights\V1\RuntimeAnnotation;

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

/**
 * Explicit input used for generating the answer
 *
 * Generated from protobuf message <code>google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput</code>
 */
class UserInput extends \Google\Protobuf\Internal\Message
{
    /**
     * Query text. Article Search uses this to store the input query used
     * to generate the search results.
     *
     * Generated from protobuf field <code>string query = 1;</code>
     */
    protected $query = '';
    /**
     * The resource name of associated generator. Format:
     * `projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>`
     *
     * Generated from protobuf field <code>string generator_name = 2;</code>
     */
    protected $generator_name = '';
    /**
     * Query source for the answer.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource query_source = 3;</code>
     */
    protected $query_source = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $query
     *           Query text. Article Search uses this to store the input query used
     *           to generate the search results.
     *     @type string $generator_name
     *           The resource name of associated generator. Format:
     *           `projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>`
     *     @type int $query_source
     *           Query source for the answer.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Query text. Article Search uses this to store the input query used
     * to generate the search results.
     *
     * Generated from protobuf field <code>string query = 1;</code>
     * @return string
     */
    public function getQuery()
    {
        return $this->query;
    }

    /**
     * Query text. Article Search uses this to store the input query used
     * to generate the search results.
     *
     * Generated from protobuf field <code>string query = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setQuery($var)
    {
        GPBUtil::checkString($var, True);
        $this->query = $var;

        return $this;
    }

    /**
     * The resource name of associated generator. Format:
     * `projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>`
     *
     * Generated from protobuf field <code>string generator_name = 2;</code>
     * @return string
     */
    public function getGeneratorName()
    {
        return $this->generator_name;
    }

    /**
     * The resource name of associated generator. Format:
     * `projects/<Project ID>/locations/<Location ID>/generators/<Generator ID>`
     *
     * Generated from protobuf field <code>string generator_name = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setGeneratorName($var)
    {
        GPBUtil::checkString($var, True);
        $this->generator_name = $var;

        return $this;
    }

    /**
     * Query source for the answer.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource query_source = 3;</code>
     * @return int
     */
    public function getQuerySource()
    {
        return $this->query_source;
    }

    /**
     * Query source for the answer.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource query_source = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setQuerySource($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\ContactCenterInsights\V1\RuntimeAnnotation\UserInput\QuerySource::class);
        $this->query_source = $var;

        return $this;
    }

}

