<?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 top-level message sent by the client for the `ListVoices` method.
 *
 * Generated from protobuf message <code>google.cloud.texttospeech.v1.ListVoicesRequest</code>
 */
class ListVoicesRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Recommended.
     * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
     * If not specified, the API will return all supported voices.
     * If specified, the ListVoices call will only return voices that can be used
     * to synthesize this language_code. For example, if you specify `"en-NZ"`,
     * all `"en-NZ"` voices will be returned. If you specify `"no"`, both
     * `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be
     * returned.
     *
     * Generated from protobuf field <code>string language_code = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $language_code = '';

    /**
     * @param string $languageCode Optional. Recommended.
     *                             [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
     *                             If not specified, the API will return all supported voices.
     *                             If specified, the ListVoices call will only return voices that can be used
     *                             to synthesize this language_code. For example, if you specify `"en-NZ"`,
     *                             all `"en-NZ"` voices will be returned. If you specify `"no"`, both
     *                             `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be
     *                             returned.
     *
     * @return \Google\Cloud\TextToSpeech\V1\ListVoicesRequest
     *
     * @experimental
     */
    public static function build(string $languageCode): self
    {
        return (new self())
            ->setLanguageCode($languageCode);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $language_code
     *           Optional. Recommended.
     *           [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
     *           If not specified, the API will return all supported voices.
     *           If specified, the ListVoices call will only return voices that can be used
     *           to synthesize this language_code. For example, if you specify `"en-NZ"`,
     *           all `"en-NZ"` voices will be returned. If you specify `"no"`, both
     *           `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be
     *           returned.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Texttospeech\V1\CloudTts::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Recommended.
     * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
     * If not specified, the API will return all supported voices.
     * If specified, the ListVoices call will only return voices that can be used
     * to synthesize this language_code. For example, if you specify `"en-NZ"`,
     * all `"en-NZ"` voices will be returned. If you specify `"no"`, both
     * `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be
     * returned.
     *
     * Generated from protobuf field <code>string language_code = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getLanguageCode()
    {
        return $this->language_code;
    }

    /**
     * Optional. Recommended.
     * [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag.
     * If not specified, the API will return all supported voices.
     * If specified, the ListVoices call will only return voices that can be used
     * to synthesize this language_code. For example, if you specify `"en-NZ"`,
     * all `"en-NZ"` voices will be returned. If you specify `"no"`, both
     * `"no-\*"` (Norwegian) and `"nb-\*"` (Norwegian Bokmal) voices will be
     * returned.
     *
     * Generated from protobuf field <code>string language_code = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setLanguageCode($var)
    {
        GPBUtil::checkString($var, True);
        $this->language_code = $var;

        return $this;
    }

}

