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

namespace Google\Cloud\Batch\V1;

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

/**
 * Status event
 *
 * Generated from protobuf message <code>google.cloud.batch.v1.StatusEvent</code>
 */
class StatusEvent extends \Google\Protobuf\Internal\Message
{
    /**
     * Type of the event.
     *
     * Generated from protobuf field <code>string type = 3;</code>
     */
    private $type = '';
    /**
     * Description of the event.
     *
     * Generated from protobuf field <code>string description = 1;</code>
     */
    private $description = '';
    /**
     * The time this event occurred.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp event_time = 2;</code>
     */
    private $event_time = null;
    /**
     * Task Execution
     *
     * Generated from protobuf field <code>.google.cloud.batch.v1.TaskExecution task_execution = 4;</code>
     */
    private $task_execution = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $type
     *           Type of the event.
     *     @type string $description
     *           Description of the event.
     *     @type \Google\Protobuf\Timestamp $event_time
     *           The time this event occurred.
     *     @type \Google\Cloud\Batch\V1\TaskExecution $task_execution
     *           Task Execution
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Batch\V1\Task::initOnce();
        parent::__construct($data);
    }

    /**
     * Type of the event.
     *
     * Generated from protobuf field <code>string type = 3;</code>
     * @return string
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Type of the event.
     *
     * Generated from protobuf field <code>string type = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkString($var, True);
        $this->type = $var;

        return $this;
    }

    /**
     * Description of the event.
     *
     * Generated from protobuf field <code>string description = 1;</code>
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }

    /**
     * Description of the event.
     *
     * Generated from protobuf field <code>string description = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setDescription($var)
    {
        GPBUtil::checkString($var, True);
        $this->description = $var;

        return $this;
    }

    /**
     * The time this event occurred.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp event_time = 2;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getEventTime()
    {
        return $this->event_time;
    }

    public function hasEventTime()
    {
        return isset($this->event_time);
    }

    public function clearEventTime()
    {
        unset($this->event_time);
    }

    /**
     * The time this event occurred.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp event_time = 2;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setEventTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->event_time = $var;

        return $this;
    }

    /**
     * Task Execution
     *
     * Generated from protobuf field <code>.google.cloud.batch.v1.TaskExecution task_execution = 4;</code>
     * @return \Google\Cloud\Batch\V1\TaskExecution|null
     */
    public function getTaskExecution()
    {
        return $this->task_execution;
    }

    public function hasTaskExecution()
    {
        return isset($this->task_execution);
    }

    public function clearTaskExecution()
    {
        unset($this->task_execution);
    }

    /**
     * Task Execution
     *
     * Generated from protobuf field <code>.google.cloud.batch.v1.TaskExecution task_execution = 4;</code>
     * @param \Google\Cloud\Batch\V1\TaskExecution $var
     * @return $this
     */
    public function setTaskExecution($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Batch\V1\TaskExecution::class);
        $this->task_execution = $var;

        return $this;
    }

}

