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

namespace Google\Cloud\Ces\V1;

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

/**
 * Configuration for how the agent response should be synthesized.
 *
 * Generated from protobuf message <code>google.cloud.ces.v1.SynthesizeSpeechConfig</code>
 */
class SynthesizeSpeechConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. The name of the voice. If not set, the service will choose a
     * voice based on the other parameters such as language_code.
     * For the list of available voices, please refer to [Supported voices and
     * languages](https://cloud.google.com/text-to-speech/docs/voices) from Cloud
     * Text-to-Speech.
     *
     * Generated from protobuf field <code>string voice = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $voice = '';
    /**
     * Optional. The speaking rate/speed in the range [0.25, 2.0]. 1.0 is the
     * normal native speed supported by the specific voice. 2.0 is twice as fast,
     * and 0.5 is half as fast. Values outside of the range [0.25, 2.0] will
     * return an error.
     *
     * Generated from protobuf field <code>double speaking_rate = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $speaking_rate = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $voice
     *           Optional. The name of the voice. If not set, the service will choose a
     *           voice based on the other parameters such as language_code.
     *           For the list of available voices, please refer to [Supported voices and
     *           languages](https://cloud.google.com/text-to-speech/docs/voices) from Cloud
     *           Text-to-Speech.
     *     @type float $speaking_rate
     *           Optional. The speaking rate/speed in the range [0.25, 2.0]. 1.0 is the
     *           normal native speed supported by the specific voice. 2.0 is twice as fast,
     *           and 0.5 is half as fast. Values outside of the range [0.25, 2.0] will
     *           return an error.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Ces\V1\App::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The name of the voice. If not set, the service will choose a
     * voice based on the other parameters such as language_code.
     * For the list of available voices, please refer to [Supported voices and
     * languages](https://cloud.google.com/text-to-speech/docs/voices) from Cloud
     * Text-to-Speech.
     *
     * Generated from protobuf field <code>string voice = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getVoice()
    {
        return $this->voice;
    }

    /**
     * Optional. The name of the voice. If not set, the service will choose a
     * voice based on the other parameters such as language_code.
     * For the list of available voices, please refer to [Supported voices and
     * languages](https://cloud.google.com/text-to-speech/docs/voices) from Cloud
     * Text-to-Speech.
     *
     * Generated from protobuf field <code>string voice = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setVoice($var)
    {
        GPBUtil::checkString($var, True);
        $this->voice = $var;

        return $this;
    }

    /**
     * Optional. The speaking rate/speed in the range [0.25, 2.0]. 1.0 is the
     * normal native speed supported by the specific voice. 2.0 is twice as fast,
     * and 0.5 is half as fast. Values outside of the range [0.25, 2.0] will
     * return an error.
     *
     * Generated from protobuf field <code>double speaking_rate = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return float
     */
    public function getSpeakingRate()
    {
        return $this->speaking_rate;
    }

    /**
     * Optional. The speaking rate/speed in the range [0.25, 2.0]. 1.0 is the
     * normal native speed supported by the specific voice. 2.0 is twice as fast,
     * and 0.5 is half as fast. Values outside of the range [0.25, 2.0] will
     * return an error.
     *
     * Generated from protobuf field <code>double speaking_rate = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param float $var
     * @return $this
     */
    public function setSpeakingRate($var)
    {
        GPBUtil::checkDouble($var);
        $this->speaking_rate = $var;

        return $this;
    }

}

