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

namespace Google\Cloud\TextToSpeech\V1;

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

/**
 * The message returned to the client by the `ListVoices` method.
 *
 * Generated from protobuf message <code>google.cloud.texttospeech.v1.ListVoicesResponse</code>
 */
class ListVoicesResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The list of voices.
     *
     * Generated from protobuf field <code>repeated .google.cloud.texttospeech.v1.Voice voices = 1;</code>
     */
    private $voices;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\TextToSpeech\V1\Voice>|\Google\Protobuf\Internal\RepeatedField $voices
     *           The list of voices.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce();
        parent::__construct($data);
    }

    /**
     * The list of voices.
     *
     * Generated from protobuf field <code>repeated .google.cloud.texttospeech.v1.Voice voices = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getVoices()
    {
        return $this->voices;
    }

    /**
     * The list of voices.
     *
     * Generated from protobuf field <code>repeated .google.cloud.texttospeech.v1.Voice voices = 1;</code>
     * @param array<\Google\Cloud\TextToSpeech\V1\Voice>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setVoices($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\TextToSpeech\V1\Voice::class);
        $this->voices = $arr;

        return $this;
    }

}

