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

namespace Temporal\Api\Workflow\V1;

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

/**
 * RequestIdInfo contains details of a request ID.
 *
 * Generated from protobuf message <code>temporal.api.workflow.v1.RequestIdInfo</code>
 */
class RequestIdInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * The event type of the history event generated by the request.
     *
     * Generated from protobuf field <code>.temporal.api.enums.v1.EventType event_type = 1;</code>
     */
    protected $event_type = 0;
    /**
     * The event id of the history event generated by the request. It's possible the event ID is not
     * known (unflushed buffered event). In this case, the value will be zero or a negative value,
     * representing an invalid ID.
     *
     * Generated from protobuf field <code>int64 event_id = 2;</code>
     */
    protected $event_id = 0;
    /**
     * Indicate if the request is still buffered. If so, the event ID is not known and its value
     * will be an invalid event ID.
     *
     * Generated from protobuf field <code>bool buffered = 3;</code>
     */
    protected $buffered = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $event_type
     *           The event type of the history event generated by the request.
     *     @type int|string $event_id
     *           The event id of the history event generated by the request. It's possible the event ID is not
     *           known (unflushed buffered event). In this case, the value will be zero or a negative value,
     *           representing an invalid ID.
     *     @type bool $buffered
     *           Indicate if the request is still buffered. If so, the event ID is not known and its value
     *           will be an invalid event ID.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflow\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * The event type of the history event generated by the request.
     *
     * Generated from protobuf field <code>.temporal.api.enums.v1.EventType event_type = 1;</code>
     * @return int
     */
    public function getEventType()
    {
        return $this->event_type;
    }

    /**
     * The event type of the history event generated by the request.
     *
     * Generated from protobuf field <code>.temporal.api.enums.v1.EventType event_type = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setEventType($var)
    {
        GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\EventType::class);
        $this->event_type = $var;

        return $this;
    }

    /**
     * The event id of the history event generated by the request. It's possible the event ID is not
     * known (unflushed buffered event). In this case, the value will be zero or a negative value,
     * representing an invalid ID.
     *
     * Generated from protobuf field <code>int64 event_id = 2;</code>
     * @return int|string
     */
    public function getEventId()
    {
        return $this->event_id;
    }

    /**
     * The event id of the history event generated by the request. It's possible the event ID is not
     * known (unflushed buffered event). In this case, the value will be zero or a negative value,
     * representing an invalid ID.
     *
     * Generated from protobuf field <code>int64 event_id = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setEventId($var)
    {
        GPBUtil::checkInt64($var);
        $this->event_id = $var;

        return $this;
    }

    /**
     * Indicate if the request is still buffered. If so, the event ID is not known and its value
     * will be an invalid event ID.
     *
     * Generated from protobuf field <code>bool buffered = 3;</code>
     * @return bool
     */
    public function getBuffered()
    {
        return $this->buffered;
    }

    /**
     * Indicate if the request is still buffered. If so, the event ID is not known and its value
     * will be an invalid event ID.
     *
     * Generated from protobuf field <code>bool buffered = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setBuffered($var)
    {
        GPBUtil::checkBool($var);
        $this->buffered = $var;

        return $this;
    }

}

