<?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;

/**
 * Metadata about the recognition request and response.
 *
 * Generated from protobuf message <code>google.cloud.speech.v2.RecognitionResponseMetadata</code>
 */
class RecognitionResponseMetadata extends \Google\Protobuf\Internal\Message
{
    /**
     * When available, billed audio seconds for the corresponding request.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration total_billed_duration = 6;</code>
     */
    private $total_billed_duration = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Protobuf\Duration $total_billed_duration
     *           When available, billed audio seconds for the corresponding request.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Speech\V2\CloudSpeech::initOnce();
        parent::__construct($data);
    }

    /**
     * When available, billed audio seconds for the corresponding request.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration total_billed_duration = 6;</code>
     * @return \Google\Protobuf\Duration|null
     */
    public function getTotalBilledDuration()
    {
        return $this->total_billed_duration;
    }

    public function hasTotalBilledDuration()
    {
        return isset($this->total_billed_duration);
    }

    public function clearTotalBilledDuration()
    {
        unset($this->total_billed_duration);
    }

    /**
     * When available, billed audio seconds for the corresponding request.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration total_billed_duration = 6;</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setTotalBilledDuration($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->total_billed_duration = $var;

        return $this;
    }

}

