<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dialogflow/v2/participant.proto

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * Represents the natural language speech audio to be played to the end user.
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.OutputAudio</code>
 */
class OutputAudio extends \Google\Protobuf\Internal\Message
{
    /**
     * Instructs the speech synthesizer how to generate the speech
     * audio.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.OutputAudioConfig config = 1;</code>
     */
    private $config = null;
    /**
     * The natural language speech audio.
     *
     * Generated from protobuf field <code>bytes audio = 2;</code>
     */
    private $audio = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Dialogflow\V2\OutputAudioConfig $config
     *           Instructs the speech synthesizer how to generate the speech
     *           audio.
     *     @type string $audio
     *           The natural language speech audio.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce();
        parent::__construct($data);
    }

    /**
     * Instructs the speech synthesizer how to generate the speech
     * audio.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.OutputAudioConfig config = 1;</code>
     * @return \Google\Cloud\Dialogflow\V2\OutputAudioConfig|null
     */
    public function getConfig()
    {
        return $this->config;
    }

    public function hasConfig()
    {
        return isset($this->config);
    }

    public function clearConfig()
    {
        unset($this->config);
    }

    /**
     * Instructs the speech synthesizer how to generate the speech
     * audio.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.OutputAudioConfig config = 1;</code>
     * @param \Google\Cloud\Dialogflow\V2\OutputAudioConfig $var
     * @return $this
     */
    public function setConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dialogflow\V2\OutputAudioConfig::class);
        $this->config = $var;

        return $this;
    }

    /**
     * The natural language speech audio.
     *
     * Generated from protobuf field <code>bytes audio = 2;</code>
     * @return string
     */
    public function getAudio()
    {
        return $this->audio;
    }

    /**
     * The natural language speech audio.
     *
     * Generated from protobuf field <code>bytes audio = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setAudio($var)
    {
        GPBUtil::checkString($var, False);
        $this->audio = $var;

        return $this;
    }

}

