<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dialogflow/v2/intent.proto

namespace Google\Cloud\Dialogflow\V2\Intent\Message;

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

/**
 * The card for presenting a list of options to select from.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.Intent.Message.ListSelect</code>
 */
class ListSelect extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. The overall title of the list.
     *
     * Generated from protobuf field <code>string title = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $title = '';
    /**
     * Required. List items.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $items;
    /**
     * Optional. Subtitle of the list.
     *
     * Generated from protobuf field <code>string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $subtitle = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $title
     *           Optional. The overall title of the list.
     *     @type array<\Google\Cloud\Dialogflow\V2\Intent\Message\ListSelect\Item>|\Google\Protobuf\Internal\RepeatedField $items
     *           Required. List items.
     *     @type string $subtitle
     *           Optional. Subtitle of the list.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Intent::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The overall title of the list.
     *
     * Generated from protobuf field <code>string title = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getTitle()
    {
        return $this->title;
    }

    /**
     * Optional. The overall title of the list.
     *
     * Generated from protobuf field <code>string title = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setTitle($var)
    {
        GPBUtil::checkString($var, True);
        $this->title = $var;

        return $this;
    }

    /**
     * Required. List items.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getItems()
    {
        return $this->items;
    }

    /**
     * Required. List items.
     *
     * Generated from protobuf field <code>repeated .google.cloud.dialogflow.v2.Intent.Message.ListSelect.Item items = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param array<\Google\Cloud\Dialogflow\V2\Intent\Message\ListSelect\Item>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setItems($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Dialogflow\V2\Intent\Message\ListSelect\Item::class);
        $this->items = $arr;

        return $this;
    }

    /**
     * Optional. Subtitle of the list.
     *
     * Generated from protobuf field <code>string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getSubtitle()
    {
        return $this->subtitle;
    }

    /**
     * Optional. Subtitle of the list.
     *
     * Generated from protobuf field <code>string subtitle = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setSubtitle($var)
    {
        GPBUtil::checkString($var, True);
        $this->subtitle = $var;

        return $this;
    }

}


