<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# NO CHECKED-IN PROTOBUF GENCODE
# source: temporal/api/batch/v1/message.proto

namespace Temporal\Api\Batch\V1;

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

/**
 * Generated from protobuf message <code>temporal.api.batch.v1.BatchOperationInfo</code>
 */
class BatchOperationInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Batch job ID
     *
     * Generated from protobuf field <code>string job_id = 1;</code>
     */
    protected $job_id = '';
    /**
     * Batch operation state
     *
     * Generated from protobuf field <code>.temporal.api.enums.v1.BatchOperationState state = 2;</code>
     */
    protected $state = 0;
    /**
     * Batch operation start time
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp start_time = 3;</code>
     */
    protected $start_time = null;
    /**
     * Batch operation close time
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp close_time = 4;</code>
     */
    protected $close_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $job_id
     *           Batch job ID
     *     @type int $state
     *           Batch operation state
     *     @type \Google\Protobuf\Timestamp $start_time
     *           Batch operation start time
     *     @type \Google\Protobuf\Timestamp $close_time
     *           Batch operation close time
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Batch\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * Batch job ID
     *
     * Generated from protobuf field <code>string job_id = 1;</code>
     * @return string
     */
    public function getJobId()
    {
        return $this->job_id;
    }

    /**
     * Batch job ID
     *
     * Generated from protobuf field <code>string job_id = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setJobId($var)
    {
        GPBUtil::checkString($var, True);
        $this->job_id = $var;

        return $this;
    }

    /**
     * Batch operation state
     *
     * Generated from protobuf field <code>.temporal.api.enums.v1.BatchOperationState state = 2;</code>
     * @return int
     */
    public function getState()
    {
        return $this->state;
    }

    /**
     * Batch operation state
     *
     * Generated from protobuf field <code>.temporal.api.enums.v1.BatchOperationState state = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setState($var)
    {
        GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\BatchOperationState::class);
        $this->state = $var;

        return $this;
    }

    /**
     * Batch operation start time
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp start_time = 3;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getStartTime()
    {
        return $this->start_time;
    }

    public function hasStartTime()
    {
        return isset($this->start_time);
    }

    public function clearStartTime()
    {
        unset($this->start_time);
    }

    /**
     * Batch operation start time
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp start_time = 3;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setStartTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->start_time = $var;

        return $this;
    }

    /**
     * Batch operation close time
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp close_time = 4;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCloseTime()
    {
        return $this->close_time;
    }

    public function hasCloseTime()
    {
        return isset($this->close_time);
    }

    public function clearCloseTime()
    {
        unset($this->close_time);
    }

    /**
     * Batch operation close time
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp close_time = 4;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCloseTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->close_time = $var;

        return $this;
    }

}

