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

namespace Google\Cloud\TextToSpeech\V1\MultiSpeakerMarkup;

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

/**
 * A Multi-speaker turn.
 *
 * Generated from protobuf message <code>google.cloud.texttospeech.v1.MultiSpeakerMarkup.Turn</code>
 */
class Turn extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer
     * to documentation for available speakers.
     *
     * Generated from protobuf field <code>string speaker = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $speaker = '';
    /**
     * Required. The text to speak.
     *
     * Generated from protobuf field <code>string text = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $text = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $speaker
     *           Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer
     *           to documentation for available speakers.
     *     @type string $text
     *           Required. The text to speak.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer
     * to documentation for available speakers.
     *
     * Generated from protobuf field <code>string speaker = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getSpeaker()
    {
        return $this->speaker;
    }

    /**
     * Required. The speaker of the turn, for example, 'O' or 'Q'. Please refer
     * to documentation for available speakers.
     *
     * Generated from protobuf field <code>string speaker = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setSpeaker($var)
    {
        GPBUtil::checkString($var, True);
        $this->speaker = $var;

        return $this;
    }

    /**
     * Required. The text to speak.
     *
     * Generated from protobuf field <code>string text = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getText()
    {
        return $this->text;
    }

    /**
     * Required. The text to speak.
     *
     * Generated from protobuf field <code>string text = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setText($var)
    {
        GPBUtil::checkString($var, True);
        $this->text = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(Turn::class, \Google\Cloud\TextToSpeech\V1\MultiSpeakerMarkup_Turn::class);

