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

namespace Google\Cloud\Batch\V1\JobNotification;

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

/**
 * Message details.
 * Describe the attribute that a message should have.
 * Without specified message attributes, no message will be sent by default.
 *
 * Generated from protobuf message <code>google.cloud.batch.v1.JobNotification.Message</code>
 */
class Message extends \Google\Protobuf\Internal\Message
{
    /**
     * The message type.
     *
     * Generated from protobuf field <code>.google.cloud.batch.v1.JobNotification.Type type = 1;</code>
     */
    private $type = 0;
    /**
     * The new job state.
     *
     * Generated from protobuf field <code>.google.cloud.batch.v1.JobStatus.State new_job_state = 2;</code>
     */
    private $new_job_state = 0;
    /**
     * The new task state.
     *
     * Generated from protobuf field <code>.google.cloud.batch.v1.TaskStatus.State new_task_state = 3;</code>
     */
    private $new_task_state = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $type
     *           The message type.
     *     @type int $new_job_state
     *           The new job state.
     *     @type int $new_task_state
     *           The new task state.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Batch\V1\Job::initOnce();
        parent::__construct($data);
    }

    /**
     * The message type.
     *
     * Generated from protobuf field <code>.google.cloud.batch.v1.JobNotification.Type type = 1;</code>
     * @return int
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * The message type.
     *
     * Generated from protobuf field <code>.google.cloud.batch.v1.JobNotification.Type type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\JobNotification\Type::class);
        $this->type = $var;

        return $this;
    }

    /**
     * The new job state.
     *
     * Generated from protobuf field <code>.google.cloud.batch.v1.JobStatus.State new_job_state = 2;</code>
     * @return int
     */
    public function getNewJobState()
    {
        return $this->new_job_state;
    }

    /**
     * The new job state.
     *
     * Generated from protobuf field <code>.google.cloud.batch.v1.JobStatus.State new_job_state = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setNewJobState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\JobStatus\State::class);
        $this->new_job_state = $var;

        return $this;
    }

    /**
     * The new task state.
     *
     * Generated from protobuf field <code>.google.cloud.batch.v1.TaskStatus.State new_task_state = 3;</code>
     * @return int
     */
    public function getNewTaskState()
    {
        return $this->new_task_state;
    }

    /**
     * The new task state.
     *
     * Generated from protobuf field <code>.google.cloud.batch.v1.TaskStatus.State new_task_state = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setNewTaskState($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Batch\V1\TaskStatus\State::class);
        $this->new_task_state = $var;

        return $this;
    }

}


