<?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;

/**
 * Description of a voice supported by the TTS service.
 *
 * Generated from protobuf message <code>google.cloud.texttospeech.v1.Voice</code>
 */
class Voice extends \Google\Protobuf\Internal\Message
{
    /**
     * The languages that this voice supports, expressed as
     * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
     * "en-US", "es-419", "cmn-tw").
     *
     * Generated from protobuf field <code>repeated string language_codes = 1;</code>
     */
    private $language_codes;
    /**
     * The name of this voice.  Each distinct voice has a unique name.
     *
     * Generated from protobuf field <code>string name = 2;</code>
     */
    private $name = '';
    /**
     * The gender of this voice.
     *
     * Generated from protobuf field <code>.google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3;</code>
     */
    private $ssml_gender = 0;
    /**
     * The natural sample rate (in hertz) for this voice.
     *
     * Generated from protobuf field <code>int32 natural_sample_rate_hertz = 4;</code>
     */
    private $natural_sample_rate_hertz = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $language_codes
     *           The languages that this voice supports, expressed as
     *           [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
     *           "en-US", "es-419", "cmn-tw").
     *     @type string $name
     *           The name of this voice.  Each distinct voice has a unique name.
     *     @type int $ssml_gender
     *           The gender of this voice.
     *     @type int $natural_sample_rate_hertz
     *           The natural sample rate (in hertz) for this voice.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce();
        parent::__construct($data);
    }

    /**
     * The languages that this voice supports, expressed as
     * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
     * "en-US", "es-419", "cmn-tw").
     *
     * Generated from protobuf field <code>repeated string language_codes = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getLanguageCodes()
    {
        return $this->language_codes;
    }

    /**
     * The languages that this voice supports, expressed as
     * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
     * "en-US", "es-419", "cmn-tw").
     *
     * Generated from protobuf field <code>repeated string language_codes = 1;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setLanguageCodes($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->language_codes = $arr;

        return $this;
    }

    /**
     * The name of this voice.  Each distinct voice has a unique name.
     *
     * Generated from protobuf field <code>string name = 2;</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * The name of this voice.  Each distinct voice has a unique name.
     *
     * Generated from protobuf field <code>string name = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * The gender of this voice.
     *
     * Generated from protobuf field <code>.google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3;</code>
     * @return int
     */
    public function getSsmlGender()
    {
        return $this->ssml_gender;
    }

    /**
     * The gender of this voice.
     *
     * Generated from protobuf field <code>.google.cloud.texttospeech.v1.SsmlVoiceGender ssml_gender = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setSsmlGender($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\TextToSpeech\V1\SsmlVoiceGender::class);
        $this->ssml_gender = $var;

        return $this;
    }

    /**
     * The natural sample rate (in hertz) for this voice.
     *
     * Generated from protobuf field <code>int32 natural_sample_rate_hertz = 4;</code>
     * @return int
     */
    public function getNaturalSampleRateHertz()
    {
        return $this->natural_sample_rate_hertz;
    }

    /**
     * The natural sample rate (in hertz) for this voice.
     *
     * Generated from protobuf field <code>int32 natural_sample_rate_hertz = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setNaturalSampleRateHertz($var)
    {
        GPBUtil::checkInt32($var);
        $this->natural_sample_rate_hertz = $var;

        return $this;
    }

}

