<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/tasks/v2beta3/cloudtasks.proto

namespace Google\Cloud\Tasks\V2beta3;

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

/**
 * Response message for
 * [BufferTask][google.cloud.tasks.v2beta3.CloudTasks.BufferTask].
 *
 * Generated from protobuf message <code>google.cloud.tasks.v2beta3.BufferTaskResponse</code>
 */
class BufferTaskResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The created task.
     *
     * Generated from protobuf field <code>.google.cloud.tasks.v2beta3.Task task = 1;</code>
     */
    private $task = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Tasks\V2beta3\Task $task
     *           The created task.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Tasks\V2Beta3\Cloudtasks::initOnce();
        parent::__construct($data);
    }

    /**
     * The created task.
     *
     * Generated from protobuf field <code>.google.cloud.tasks.v2beta3.Task task = 1;</code>
     * @return \Google\Cloud\Tasks\V2beta3\Task|null
     */
    public function getTask()
    {
        return $this->task;
    }

    public function hasTask()
    {
        return isset($this->task);
    }

    public function clearTask()
    {
        unset($this->task);
    }

    /**
     * The created task.
     *
     * Generated from protobuf field <code>.google.cloud.tasks.v2beta3.Task task = 1;</code>
     * @param \Google\Cloud\Tasks\V2beta3\Task $var
     * @return $this
     */
    public function setTask($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Tasks\V2beta3\Task::class);
        $this->task = $var;

        return $this;
    }

}

