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

namespace Google\Cloud\Speech\V2;

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

/**
 * Response message for
 * [BatchRecognize][google.cloud.speech.v2.Speech.BatchRecognize] that is
 * packaged into a longrunning [Operation][google.longrunning.Operation].
 *
 * Generated from protobuf message <code>google.cloud.speech.v2.BatchRecognizeResponse</code>
 */
class BatchRecognizeResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Map from filename to the final result for that file.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.speech.v2.BatchRecognizeFileResult> results = 1;</code>
     */
    private $results;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array|\Google\Protobuf\Internal\MapField $results
     *           Map from filename to the final result for that file.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
        parent::__construct($data);
    }

    /**
     * Map from filename to the final result for that file.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.speech.v2.BatchRecognizeFileResult> results = 1;</code>
     * @return \Google\Protobuf\Internal\MapField
     */
    public function getResults()
    {
        return $this->results;
    }

    /**
     * Map from filename to the final result for that file.
     *
     * Generated from protobuf field <code>map<string, .google.cloud.speech.v2.BatchRecognizeFileResult> results = 1;</code>
     * @param array|\Google\Protobuf\Internal\MapField $var
     * @return $this
     */
    public function setResults($var)
    {
        $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Speech\V2\BatchRecognizeFileResult::class);
        $this->results = $arr;

        return $this;
    }

}

