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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Configuration for a single speaker in a multi-speaker setup.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.SpeakerVoiceConfig</code>
 */
class SpeakerVoiceConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The name of the speaker. This should be the same as the speaker
     * name used in the prompt.
     *
     * Generated from protobuf field <code>string speaker = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $speaker = '';
    /**
     * Required. The configuration for the voice of this speaker.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.VoiceConfig voice_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $voice_config = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $speaker
     *           Required. The name of the speaker. This should be the same as the speaker
     *           name used in the prompt.
     *     @type \Google\Cloud\AIPlatform\V1\VoiceConfig $voice_config
     *           Required. The configuration for the voice of this speaker.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\Content::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The name of the speaker. This should be the same as the speaker
     * name used in the prompt.
     *
     * Generated from protobuf field <code>string speaker = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getSpeaker()
    {
        return $this->speaker;
    }

    /**
     * Required. The name of the speaker. This should be the same as the speaker
     * name used in the prompt.
     *
     * 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 configuration for the voice of this speaker.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.VoiceConfig voice_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\AIPlatform\V1\VoiceConfig|null
     */
    public function getVoiceConfig()
    {
        return $this->voice_config;
    }

    public function hasVoiceConfig()
    {
        return isset($this->voice_config);
    }

    public function clearVoiceConfig()
    {
        unset($this->voice_config);
    }

    /**
     * Required. The configuration for the voice of this speaker.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.VoiceConfig voice_config = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\AIPlatform\V1\VoiceConfig $var
     * @return $this
     */
    public function setVoiceConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\AIPlatform\V1\VoiceConfig::class);
        $this->voice_config = $var;

        return $this;
    }

}

