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

namespace Temporal\Api\Workflowservice\V1;

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

/**
 * Generated from protobuf message <code>temporal.api.workflowservice.v1.GetWorkflowExecutionHistoryRequest</code>
 */
class GetWorkflowExecutionHistoryRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string namespace = 1;</code>
     */
    protected $namespace = '';
    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkflowExecution execution = 2;</code>
     */
    protected $execution = null;
    /**
     * Generated from protobuf field <code>int32 maximum_page_size = 3;</code>
     */
    protected $maximum_page_size = 0;
    /**
     * If a `GetWorkflowExecutionHistoryResponse` or a `PollWorkflowTaskQueueResponse` had one of
     * these, it should be passed here to fetch the next page.
     *
     * Generated from protobuf field <code>bytes next_page_token = 4;</code>
     */
    protected $next_page_token = '';
    /**
     * If set to true, the RPC call will not resolve until there is a new event which matches
     * the `history_event_filter_type`, or a timeout is hit.
     *
     * Generated from protobuf field <code>bool wait_new_event = 5;</code>
     */
    protected $wait_new_event = false;
    /**
     * Filter returned events such that they match the specified filter type.
     * Default: HISTORY_EVENT_FILTER_TYPE_ALL_EVENT.
     *
     * Generated from protobuf field <code>.temporal.api.enums.v1.HistoryEventFilterType history_event_filter_type = 6;</code>
     */
    protected $history_event_filter_type = 0;
    /**
     * Generated from protobuf field <code>bool skip_archival = 7;</code>
     */
    protected $skip_archival = false;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $namespace
     *     @type \Temporal\Api\Common\V1\WorkflowExecution $execution
     *     @type int $maximum_page_size
     *     @type string $next_page_token
     *           If a `GetWorkflowExecutionHistoryResponse` or a `PollWorkflowTaskQueueResponse` had one of
     *           these, it should be passed here to fetch the next page.
     *     @type bool $wait_new_event
     *           If set to true, the RPC call will not resolve until there is a new event which matches
     *           the `history_event_filter_type`, or a timeout is hit.
     *     @type int $history_event_filter_type
     *           Filter returned events such that they match the specified filter type.
     *           Default: HISTORY_EVENT_FILTER_TYPE_ALL_EVENT.
     *     @type bool $skip_archival
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkflowExecution execution = 2;</code>
     * @return \Temporal\Api\Common\V1\WorkflowExecution|null
     */
    public function getExecution()
    {
        return $this->execution;
    }

    public function hasExecution()
    {
        return isset($this->execution);
    }

    public function clearExecution()
    {
        unset($this->execution);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkflowExecution execution = 2;</code>
     * @param \Temporal\Api\Common\V1\WorkflowExecution $var
     * @return $this
     */
    public function setExecution($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkflowExecution::class);
        $this->execution = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>int32 maximum_page_size = 3;</code>
     * @return int
     */
    public function getMaximumPageSize()
    {
        return $this->maximum_page_size;
    }

    /**
     * Generated from protobuf field <code>int32 maximum_page_size = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setMaximumPageSize($var)
    {
        GPBUtil::checkInt32($var);
        $this->maximum_page_size = $var;

        return $this;
    }

    /**
     * If a `GetWorkflowExecutionHistoryResponse` or a `PollWorkflowTaskQueueResponse` had one of
     * these, it should be passed here to fetch the next page.
     *
     * Generated from protobuf field <code>bytes next_page_token = 4;</code>
     * @return string
     */
    public function getNextPageToken()
    {
        return $this->next_page_token;
    }

    /**
     * If a `GetWorkflowExecutionHistoryResponse` or a `PollWorkflowTaskQueueResponse` had one of
     * these, it should be passed here to fetch the next page.
     *
     * Generated from protobuf field <code>bytes next_page_token = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setNextPageToken($var)
    {
        GPBUtil::checkString($var, False);
        $this->next_page_token = $var;

        return $this;
    }

    /**
     * If set to true, the RPC call will not resolve until there is a new event which matches
     * the `history_event_filter_type`, or a timeout is hit.
     *
     * Generated from protobuf field <code>bool wait_new_event = 5;</code>
     * @return bool
     */
    public function getWaitNewEvent()
    {
        return $this->wait_new_event;
    }

    /**
     * If set to true, the RPC call will not resolve until there is a new event which matches
     * the `history_event_filter_type`, or a timeout is hit.
     *
     * Generated from protobuf field <code>bool wait_new_event = 5;</code>
     * @param bool $var
     * @return $this
     */
    public function setWaitNewEvent($var)
    {
        GPBUtil::checkBool($var);
        $this->wait_new_event = $var;

        return $this;
    }

    /**
     * Filter returned events such that they match the specified filter type.
     * Default: HISTORY_EVENT_FILTER_TYPE_ALL_EVENT.
     *
     * Generated from protobuf field <code>.temporal.api.enums.v1.HistoryEventFilterType history_event_filter_type = 6;</code>
     * @return int
     */
    public function getHistoryEventFilterType()
    {
        return $this->history_event_filter_type;
    }

    /**
     * Filter returned events such that they match the specified filter type.
     * Default: HISTORY_EVENT_FILTER_TYPE_ALL_EVENT.
     *
     * Generated from protobuf field <code>.temporal.api.enums.v1.HistoryEventFilterType history_event_filter_type = 6;</code>
     * @param int $var
     * @return $this
     */
    public function setHistoryEventFilterType($var)
    {
        GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\HistoryEventFilterType::class);
        $this->history_event_filter_type = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool skip_archival = 7;</code>
     * @return bool
     */
    public function getSkipArchival()
    {
        return $this->skip_archival;
    }

    /**
     * Generated from protobuf field <code>bool skip_archival = 7;</code>
     * @param bool $var
     * @return $this
     */
    public function setSkipArchival($var)
    {
        GPBUtil::checkBool($var);
        $this->skip_archival = $var;

        return $this;
    }

}

