<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/dataflow/v1beta3/messages.proto

namespace Google\Cloud\Dataflow\V1beta3;

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

/**
 * A particular message pertaining to a Dataflow job.
 *
 * Generated from protobuf message <code>google.dataflow.v1beta3.JobMessage</code>
 */
class JobMessage extends \Google\Protobuf\Internal\Message
{
    /**
     * Deprecated.
     *
     * Generated from protobuf field <code>string id = 1;</code>
     */
    private $id = '';
    /**
     * The timestamp of the message.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp time = 2;</code>
     */
    private $time = null;
    /**
     * The text of the message.
     *
     * Generated from protobuf field <code>string message_text = 3;</code>
     */
    private $message_text = '';
    /**
     * Importance level of the message.
     *
     * Generated from protobuf field <code>.google.dataflow.v1beta3.JobMessageImportance message_importance = 4;</code>
     */
    private $message_importance = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $id
     *           Deprecated.
     *     @type \Google\Protobuf\Timestamp $time
     *           The timestamp of the message.
     *     @type string $message_text
     *           The text of the message.
     *     @type int $message_importance
     *           Importance level of the message.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Dataflow\V1Beta3\Messages::initOnce();
        parent::__construct($data);
    }

    /**
     * Deprecated.
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @return string
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Deprecated.
     *
     * Generated from protobuf field <code>string id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setId($var)
    {
        GPBUtil::checkString($var, True);
        $this->id = $var;

        return $this;
    }

    /**
     * The timestamp of the message.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp time = 2;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getTime()
    {
        return $this->time;
    }

    public function hasTime()
    {
        return isset($this->time);
    }

    public function clearTime()
    {
        unset($this->time);
    }

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

        return $this;
    }

    /**
     * The text of the message.
     *
     * Generated from protobuf field <code>string message_text = 3;</code>
     * @return string
     */
    public function getMessageText()
    {
        return $this->message_text;
    }

    /**
     * The text of the message.
     *
     * Generated from protobuf field <code>string message_text = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setMessageText($var)
    {
        GPBUtil::checkString($var, True);
        $this->message_text = $var;

        return $this;
    }

    /**
     * Importance level of the message.
     *
     * Generated from protobuf field <code>.google.dataflow.v1beta3.JobMessageImportance message_importance = 4;</code>
     * @return int
     */
    public function getMessageImportance()
    {
        return $this->message_importance;
    }

    /**
     * Importance level of the message.
     *
     * Generated from protobuf field <code>.google.dataflow.v1beta3.JobMessageImportance message_importance = 4;</code>
     * @param int $var
     * @return $this
     */
    public function setMessageImportance($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dataflow\V1beta3\JobMessageImportance::class);
        $this->message_importance = $var;

        return $this;
    }

}

