<?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;

/**
 * NewWorkflowExecutionInfo is a shared message that encapsulates all the
 * required arguments to starting a workflow in different contexts.
 *
 * Generated from protobuf message <code>temporal.api.workflow.v1.NewWorkflowExecutionInfo</code>
 */
class NewWorkflowExecutionInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string workflow_id = 1;</code>
     */
    protected $workflow_id = '';
    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkflowType workflow_type = 2;</code>
     */
    protected $workflow_type = null;
    /**
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.TaskQueue task_queue = 3;</code>
     */
    protected $task_queue = null;
    /**
     * Serialized arguments to the workflow.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Payloads input = 4;</code>
     */
    protected $input = null;
    /**
     * Total workflow execution timeout including retries and continue as new.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration workflow_execution_timeout = 5;</code>
     */
    protected $workflow_execution_timeout = null;
    /**
     * Timeout of a single workflow run.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration workflow_run_timeout = 6;</code>
     */
    protected $workflow_run_timeout = null;
    /**
     * Timeout of a single workflow task.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration workflow_task_timeout = 7;</code>
     */
    protected $workflow_task_timeout = null;
    /**
     * Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.
     *
     * Generated from protobuf field <code>.temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 8;</code>
     */
    protected $workflow_id_reuse_policy = 0;
    /**
     * The retry policy for the workflow. Will never exceed `workflow_execution_timeout`.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.RetryPolicy retry_policy = 9;</code>
     */
    protected $retry_policy = null;
    /**
     * See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/
     *
     * Generated from protobuf field <code>string cron_schedule = 10;</code>
     */
    protected $cron_schedule = '';
    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.Memo memo = 11;</code>
     */
    protected $memo = null;
    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.SearchAttributes search_attributes = 12;</code>
     */
    protected $search_attributes = null;
    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.Header header = 13;</code>
     */
    protected $header = null;
    /**
     * Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionConfig
     * for use by user interfaces to display the fixed as-of-start summary and details of the
     * workflow.
     *
     * Generated from protobuf field <code>.temporal.api.sdk.v1.UserMetadata user_metadata = 14;</code>
     */
    protected $user_metadata = null;
    /**
     * If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
     * To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions.
     *
     * Generated from protobuf field <code>.temporal.api.workflow.v1.VersioningOverride versioning_override = 15;</code>
     */
    protected $versioning_override = null;
    /**
     * Priority metadata
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Priority priority = 16;</code>
     */
    protected $priority = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $workflow_id
     *     @type \Temporal\Api\Common\V1\WorkflowType $workflow_type
     *     @type \Temporal\Api\Taskqueue\V1\TaskQueue $task_queue
     *     @type \Temporal\Api\Common\V1\Payloads $input
     *           Serialized arguments to the workflow.
     *     @type \Google\Protobuf\Duration $workflow_execution_timeout
     *           Total workflow execution timeout including retries and continue as new.
     *     @type \Google\Protobuf\Duration $workflow_run_timeout
     *           Timeout of a single workflow run.
     *     @type \Google\Protobuf\Duration $workflow_task_timeout
     *           Timeout of a single workflow task.
     *     @type int $workflow_id_reuse_policy
     *           Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.
     *     @type \Temporal\Api\Common\V1\RetryPolicy $retry_policy
     *           The retry policy for the workflow. Will never exceed `workflow_execution_timeout`.
     *     @type string $cron_schedule
     *           See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/
     *     @type \Temporal\Api\Common\V1\Memo $memo
     *     @type \Temporal\Api\Common\V1\SearchAttributes $search_attributes
     *     @type \Temporal\Api\Common\V1\Header $header
     *     @type \Temporal\Api\Sdk\V1\UserMetadata $user_metadata
     *           Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionConfig
     *           for use by user interfaces to display the fixed as-of-start summary and details of the
     *           workflow.
     *     @type \Temporal\Api\Workflow\V1\VersioningOverride $versioning_override
     *           If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
     *           To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions.
     *     @type \Temporal\Api\Common\V1\Priority $priority
     *           Priority metadata
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflow\V1\Message::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

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

    public function hasWorkflowType()
    {
        return isset($this->workflow_type);
    }

    public function clearWorkflowType()
    {
        unset($this->workflow_type);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.TaskQueue task_queue = 3;</code>
     * @return \Temporal\Api\Taskqueue\V1\TaskQueue|null
     */
    public function getTaskQueue()
    {
        return $this->task_queue;
    }

    public function hasTaskQueue()
    {
        return isset($this->task_queue);
    }

    public function clearTaskQueue()
    {
        unset($this->task_queue);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.taskqueue.v1.TaskQueue task_queue = 3;</code>
     * @param \Temporal\Api\Taskqueue\V1\TaskQueue $var
     * @return $this
     */
    public function setTaskQueue($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Taskqueue\V1\TaskQueue::class);
        $this->task_queue = $var;

        return $this;
    }

    /**
     * Serialized arguments to the workflow.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Payloads input = 4;</code>
     * @return \Temporal\Api\Common\V1\Payloads|null
     */
    public function getInput()
    {
        return $this->input;
    }

    public function hasInput()
    {
        return isset($this->input);
    }

    public function clearInput()
    {
        unset($this->input);
    }

    /**
     * Serialized arguments to the workflow.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Payloads input = 4;</code>
     * @param \Temporal\Api\Common\V1\Payloads $var
     * @return $this
     */
    public function setInput($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\Payloads::class);
        $this->input = $var;

        return $this;
    }

    /**
     * Total workflow execution timeout including retries and continue as new.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration workflow_execution_timeout = 5;</code>
     * @return \Google\Protobuf\Duration|null
     */
    public function getWorkflowExecutionTimeout()
    {
        return $this->workflow_execution_timeout;
    }

    public function hasWorkflowExecutionTimeout()
    {
        return isset($this->workflow_execution_timeout);
    }

    public function clearWorkflowExecutionTimeout()
    {
        unset($this->workflow_execution_timeout);
    }

    /**
     * Total workflow execution timeout including retries and continue as new.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration workflow_execution_timeout = 5;</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setWorkflowExecutionTimeout($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->workflow_execution_timeout = $var;

        return $this;
    }

    /**
     * Timeout of a single workflow run.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration workflow_run_timeout = 6;</code>
     * @return \Google\Protobuf\Duration|null
     */
    public function getWorkflowRunTimeout()
    {
        return $this->workflow_run_timeout;
    }

    public function hasWorkflowRunTimeout()
    {
        return isset($this->workflow_run_timeout);
    }

    public function clearWorkflowRunTimeout()
    {
        unset($this->workflow_run_timeout);
    }

    /**
     * Timeout of a single workflow run.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration workflow_run_timeout = 6;</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setWorkflowRunTimeout($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->workflow_run_timeout = $var;

        return $this;
    }

    /**
     * Timeout of a single workflow task.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration workflow_task_timeout = 7;</code>
     * @return \Google\Protobuf\Duration|null
     */
    public function getWorkflowTaskTimeout()
    {
        return $this->workflow_task_timeout;
    }

    public function hasWorkflowTaskTimeout()
    {
        return isset($this->workflow_task_timeout);
    }

    public function clearWorkflowTaskTimeout()
    {
        unset($this->workflow_task_timeout);
    }

    /**
     * Timeout of a single workflow task.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration workflow_task_timeout = 7;</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setWorkflowTaskTimeout($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->workflow_task_timeout = $var;

        return $this;
    }

    /**
     * Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.
     *
     * Generated from protobuf field <code>.temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 8;</code>
     * @return int
     */
    public function getWorkflowIdReusePolicy()
    {
        return $this->workflow_id_reuse_policy;
    }

    /**
     * Default: WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE.
     *
     * Generated from protobuf field <code>.temporal.api.enums.v1.WorkflowIdReusePolicy workflow_id_reuse_policy = 8;</code>
     * @param int $var
     * @return $this
     */
    public function setWorkflowIdReusePolicy($var)
    {
        GPBUtil::checkEnum($var, \Temporal\Api\Enums\V1\WorkflowIdReusePolicy::class);
        $this->workflow_id_reuse_policy = $var;

        return $this;
    }

    /**
     * The retry policy for the workflow. Will never exceed `workflow_execution_timeout`.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.RetryPolicy retry_policy = 9;</code>
     * @return \Temporal\Api\Common\V1\RetryPolicy|null
     */
    public function getRetryPolicy()
    {
        return $this->retry_policy;
    }

    public function hasRetryPolicy()
    {
        return isset($this->retry_policy);
    }

    public function clearRetryPolicy()
    {
        unset($this->retry_policy);
    }

    /**
     * The retry policy for the workflow. Will never exceed `workflow_execution_timeout`.
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.RetryPolicy retry_policy = 9;</code>
     * @param \Temporal\Api\Common\V1\RetryPolicy $var
     * @return $this
     */
    public function setRetryPolicy($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\RetryPolicy::class);
        $this->retry_policy = $var;

        return $this;
    }

    /**
     * See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/
     *
     * Generated from protobuf field <code>string cron_schedule = 10;</code>
     * @return string
     */
    public function getCronSchedule()
    {
        return $this->cron_schedule;
    }

    /**
     * See https://docs.temporal.io/docs/content/what-is-a-temporal-cron-job/
     *
     * Generated from protobuf field <code>string cron_schedule = 10;</code>
     * @param string $var
     * @return $this
     */
    public function setCronSchedule($var)
    {
        GPBUtil::checkString($var, True);
        $this->cron_schedule = $var;

        return $this;
    }

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

    public function hasMemo()
    {
        return isset($this->memo);
    }

    public function clearMemo()
    {
        unset($this->memo);
    }

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

        return $this;
    }

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

    public function hasSearchAttributes()
    {
        return isset($this->search_attributes);
    }

    public function clearSearchAttributes()
    {
        unset($this->search_attributes);
    }

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

        return $this;
    }

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

    public function hasHeader()
    {
        return isset($this->header);
    }

    public function clearHeader()
    {
        unset($this->header);
    }

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

        return $this;
    }

    /**
     * Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionConfig
     * for use by user interfaces to display the fixed as-of-start summary and details of the
     * workflow.
     *
     * Generated from protobuf field <code>.temporal.api.sdk.v1.UserMetadata user_metadata = 14;</code>
     * @return \Temporal\Api\Sdk\V1\UserMetadata|null
     */
    public function getUserMetadata()
    {
        return $this->user_metadata;
    }

    public function hasUserMetadata()
    {
        return isset($this->user_metadata);
    }

    public function clearUserMetadata()
    {
        unset($this->user_metadata);
    }

    /**
     * Metadata on the workflow if it is started. This is carried over to the WorkflowExecutionConfig
     * for use by user interfaces to display the fixed as-of-start summary and details of the
     * workflow.
     *
     * Generated from protobuf field <code>.temporal.api.sdk.v1.UserMetadata user_metadata = 14;</code>
     * @param \Temporal\Api\Sdk\V1\UserMetadata $var
     * @return $this
     */
    public function setUserMetadata($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Sdk\V1\UserMetadata::class);
        $this->user_metadata = $var;

        return $this;
    }

    /**
     * If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
     * To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions.
     *
     * Generated from protobuf field <code>.temporal.api.workflow.v1.VersioningOverride versioning_override = 15;</code>
     * @return \Temporal\Api\Workflow\V1\VersioningOverride|null
     */
    public function getVersioningOverride()
    {
        return $this->versioning_override;
    }

    public function hasVersioningOverride()
    {
        return isset($this->versioning_override);
    }

    public function clearVersioningOverride()
    {
        unset($this->versioning_override);
    }

    /**
     * If set, takes precedence over the Versioning Behavior sent by the SDK on Workflow Task completion.
     * To unset the override after the workflow is running, use UpdateWorkflowExecutionOptions.
     *
     * Generated from protobuf field <code>.temporal.api.workflow.v1.VersioningOverride versioning_override = 15;</code>
     * @param \Temporal\Api\Workflow\V1\VersioningOverride $var
     * @return $this
     */
    public function setVersioningOverride($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Workflow\V1\VersioningOverride::class);
        $this->versioning_override = $var;

        return $this;
    }

    /**
     * Priority metadata
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Priority priority = 16;</code>
     * @return \Temporal\Api\Common\V1\Priority|null
     */
    public function getPriority()
    {
        return $this->priority;
    }

    public function hasPriority()
    {
        return isset($this->priority);
    }

    public function clearPriority()
    {
        unset($this->priority);
    }

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

        return $this;
    }

}

