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

namespace Google\Cloud\Speech\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 `LongRunningRecognize`
 * method.
 *
 * Generated from protobuf message <code>google.cloud.speech.v1.LongRunningRecognizeRequest</code>
 */
class LongRunningRecognizeRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * *Required* Provides information to the recognizer that specifies how to
     * process the request.
     *
     * Generated from protobuf field <code>.google.cloud.speech.v1.RecognitionConfig config = 1;</code>
     */
    private $config = null;
    /**
     * *Required* The audio data to be recognized.
     *
     * Generated from protobuf field <code>.google.cloud.speech.v1.RecognitionAudio audio = 2;</code>
     */
    private $audio = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Speech\V1\RecognitionConfig $config
     *           *Required* Provides information to the recognizer that specifies how to
     *           process the request.
     *     @type \Google\Cloud\Speech\V1\RecognitionAudio $audio
     *           *Required* The audio data to be recognized.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Speech\V1\CloudSpeech::initOnce();
        parent::__construct($data);
    }

    /**
     * *Required* Provides information to the recognizer that specifies how to
     * process the request.
     *
     * Generated from protobuf field <code>.google.cloud.speech.v1.RecognitionConfig config = 1;</code>
     * @return \Google\Cloud\Speech\V1\RecognitionConfig
     */
    public function getConfig()
    {
        return $this->config;
    }

    /**
     * *Required* Provides information to the recognizer that specifies how to
     * process the request.
     *
     * Generated from protobuf field <code>.google.cloud.speech.v1.RecognitionConfig config = 1;</code>
     * @param \Google\Cloud\Speech\V1\RecognitionConfig $var
     * @return $this
     */
    public function setConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\RecognitionConfig::class);
        $this->config = $var;

        return $this;
    }

    /**
     * *Required* The audio data to be recognized.
     *
     * Generated from protobuf field <code>.google.cloud.speech.v1.RecognitionAudio audio = 2;</code>
     * @return \Google\Cloud\Speech\V1\RecognitionAudio
     */
    public function getAudio()
    {
        return $this->audio;
    }

    /**
     * *Required* The audio data to be recognized.
     *
     * Generated from protobuf field <code>.google.cloud.speech.v1.RecognitionAudio audio = 2;</code>
     * @param \Google\Cloud\Speech\V1\RecognitionAudio $var
     * @return $this
     */
    public function setAudio($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Speech\V1\RecognitionAudio::class);
        $this->audio = $var;

        return $this;
    }

}

