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

namespace Temporal\Api\Update\V1;

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

/**
 * An Update protocol message indicating that a Workflow Update has
 * been accepted (i.e. passed the worker-side validation phase).
 *
 * Generated from protobuf message <code>temporal.api.update.v1.Acceptance</code>
 */
class Acceptance extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string accepted_request_message_id = 1;</code>
     */
    protected $accepted_request_message_id = '';
    /**
     * Generated from protobuf field <code>int64 accepted_request_sequencing_event_id = 2;</code>
     */
    protected $accepted_request_sequencing_event_id = 0;
    /**
     * Generated from protobuf field <code>.temporal.api.update.v1.Request accepted_request = 3;</code>
     */
    protected $accepted_request = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $accepted_request_message_id
     *     @type int|string $accepted_request_sequencing_event_id
     *     @type \Temporal\Api\Update\V1\Request $accepted_request
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Update\V1\Message::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>int64 accepted_request_sequencing_event_id = 2;</code>
     * @return int|string
     */
    public function getAcceptedRequestSequencingEventId()
    {
        return $this->accepted_request_sequencing_event_id;
    }

    /**
     * Generated from protobuf field <code>int64 accepted_request_sequencing_event_id = 2;</code>
     * @param int|string $var
     * @return $this
     */
    public function setAcceptedRequestSequencingEventId($var)
    {
        GPBUtil::checkInt64($var);
        $this->accepted_request_sequencing_event_id = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.update.v1.Request accepted_request = 3;</code>
     * @return \Temporal\Api\Update\V1\Request|null
     */
    public function getAcceptedRequest()
    {
        return $this->accepted_request;
    }

    public function hasAcceptedRequest()
    {
        return isset($this->accepted_request);
    }

    public function clearAcceptedRequest()
    {
        unset($this->accepted_request);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.update.v1.Request accepted_request = 3;</code>
     * @param \Temporal\Api\Update\V1\Request $var
     * @return $this
     */
    public function setAcceptedRequest($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Update\V1\Request::class);
        $this->accepted_request = $var;

        return $this;
    }

}

