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

/**
 * Generated from protobuf message <code>temporal.api.workflow.v1.PendingActivityInfo</code>
 */
class PendingActivityInfo extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string activity_id = 1;</code>
     */
    protected $activity_id = '';
    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.ActivityType activity_type = 2;</code>
     */
    protected $activity_type = null;
    /**
     * Generated from protobuf field <code>.temporal.api.enums.v1.PendingActivityState state = 3;</code>
     */
    protected $state = 0;
    /**
     * Generated from protobuf field <code>.temporal.api.common.v1.Payloads heartbeat_details = 4;</code>
     */
    protected $heartbeat_details = null;
    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_heartbeat_time = 5;</code>
     */
    protected $last_heartbeat_time = null;
    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_started_time = 6;</code>
     */
    protected $last_started_time = null;
    /**
     * Generated from protobuf field <code>int32 attempt = 7;</code>
     */
    protected $attempt = 0;
    /**
     * Generated from protobuf field <code>int32 maximum_attempts = 8;</code>
     */
    protected $maximum_attempts = 0;
    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp scheduled_time = 9;</code>
     */
    protected $scheduled_time = null;
    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp expiration_time = 10;</code>
     */
    protected $expiration_time = null;
    /**
     * Generated from protobuf field <code>.temporal.api.failure.v1.Failure last_failure = 11;</code>
     */
    protected $last_failure = null;
    /**
     * Generated from protobuf field <code>string last_worker_identity = 12;</code>
     */
    protected $last_worker_identity = '';
    /**
     * Deprecated. The version stamp of the worker to whom this activity was most recently dispatched
     * This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkerVersionStamp last_worker_version_stamp = 15 [deprecated = true];</code>
     * @deprecated
     */
    protected $last_worker_version_stamp = null;
    /**
     * The time activity will wait until the next retry.
     * If activity is currently running it will be next retry interval if activity failed.
     * If activity is currently waiting it will be current retry interval.
     * If there will be no retry it will be null.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration current_retry_interval = 16;</code>
     */
    protected $current_retry_interval = null;
    /**
     * The time when the last activity attempt was completed. If activity has not been completed yet then it will be null.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_attempt_complete_time = 17;</code>
     */
    protected $last_attempt_complete_time = null;
    /**
     * Next time when activity will be scheduled.
     * If activity is currently scheduled or started it will be null.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp next_attempt_schedule_time = 18;</code>
     */
    protected $next_attempt_schedule_time = null;
    /**
     * Indicates if activity is paused.
     *
     * Generated from protobuf field <code>bool paused = 19;</code>
     */
    protected $paused = false;
    /**
     * The deployment this activity was dispatched to most recently. Present only if the activity
     * was dispatched to a versioned worker.
     * Deprecated. Use `last_deployment_version`.
     *
     * Generated from protobuf field <code>.temporal.api.deployment.v1.Deployment last_deployment = 20 [deprecated = true];</code>
     * @deprecated
     */
    protected $last_deployment = null;
    /**
     * The Worker Deployment Version this activity was dispatched to most recently.
     * Deprecated. Use `last_deployment_version`.
     *
     * Generated from protobuf field <code>string last_worker_deployment_version = 21 [deprecated = true];</code>
     * @deprecated
     */
    protected $last_worker_deployment_version = '';
    /**
     * The Worker Deployment Version this activity was dispatched to most recently.
     * If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker.
     *
     * Generated from protobuf field <code>.temporal.api.deployment.v1.WorkerDeploymentVersion last_deployment_version = 25;</code>
     */
    protected $last_deployment_version = null;
    /**
     * Priority metadata
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Priority priority = 22;</code>
     */
    protected $priority = null;
    /**
     * Generated from protobuf field <code>.temporal.api.workflow.v1.PendingActivityInfo.PauseInfo pause_info = 23;</code>
     */
    protected $pause_info = null;
    /**
     * Current activity options. May be different from the one used to start the activity.
     *
     * Generated from protobuf field <code>.temporal.api.activity.v1.ActivityOptions activity_options = 24;</code>
     */
    protected $activity_options = null;
    protected $assigned_build_id;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $activity_id
     *     @type \Temporal\Api\Common\V1\ActivityType $activity_type
     *     @type int $state
     *     @type \Temporal\Api\Common\V1\Payloads $heartbeat_details
     *     @type \Google\Protobuf\Timestamp $last_heartbeat_time
     *     @type \Google\Protobuf\Timestamp $last_started_time
     *     @type int $attempt
     *     @type int $maximum_attempts
     *     @type \Google\Protobuf\Timestamp $scheduled_time
     *     @type \Google\Protobuf\Timestamp $expiration_time
     *     @type \Temporal\Api\Failure\V1\Failure $last_failure
     *     @type string $last_worker_identity
     *     @type \Google\Protobuf\GPBEmpty $use_workflow_build_id
     *           Deprecated. When present, it means this activity is assigned to the build ID of its workflow.
     *     @type string $last_independently_assigned_build_id
     *           Deprecated. This means the activity is independently versioned and not bound to the build ID of its workflow.
     *           The activity will use the build id in this field instead.
     *           If the task fails and is scheduled again, the assigned build ID may change according to the latest versioning
     *           rules.
     *     @type \Temporal\Api\Common\V1\WorkerVersionStamp $last_worker_version_stamp
     *           Deprecated. The version stamp of the worker to whom this activity was most recently dispatched
     *           This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
     *     @type \Google\Protobuf\Duration $current_retry_interval
     *           The time activity will wait until the next retry.
     *           If activity is currently running it will be next retry interval if activity failed.
     *           If activity is currently waiting it will be current retry interval.
     *           If there will be no retry it will be null.
     *     @type \Google\Protobuf\Timestamp $last_attempt_complete_time
     *           The time when the last activity attempt was completed. If activity has not been completed yet then it will be null.
     *     @type \Google\Protobuf\Timestamp $next_attempt_schedule_time
     *           Next time when activity will be scheduled.
     *           If activity is currently scheduled or started it will be null.
     *     @type bool $paused
     *           Indicates if activity is paused.
     *     @type \Temporal\Api\Deployment\V1\Deployment $last_deployment
     *           The deployment this activity was dispatched to most recently. Present only if the activity
     *           was dispatched to a versioned worker.
     *           Deprecated. Use `last_deployment_version`.
     *     @type string $last_worker_deployment_version
     *           The Worker Deployment Version this activity was dispatched to most recently.
     *           Deprecated. Use `last_deployment_version`.
     *     @type \Temporal\Api\Deployment\V1\WorkerDeploymentVersion $last_deployment_version
     *           The Worker Deployment Version this activity was dispatched to most recently.
     *           If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker.
     *     @type \Temporal\Api\Common\V1\Priority $priority
     *           Priority metadata
     *     @type \Temporal\Api\Workflow\V1\PendingActivityInfo\PauseInfo $pause_info
     *     @type \Temporal\Api\Activity\V1\ActivityOptions $activity_options
     *           Current activity options. May be different from the one used to start the activity.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflow\V1\Message::initOnce();
        parent::__construct($data);
    }

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

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

        return $this;
    }

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

    public function hasActivityType()
    {
        return isset($this->activity_type);
    }

    public function clearActivityType()
    {
        unset($this->activity_type);
    }

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

        return $this;
    }

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

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

        return $this;
    }

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

    public function hasHeartbeatDetails()
    {
        return isset($this->heartbeat_details);
    }

    public function clearHeartbeatDetails()
    {
        unset($this->heartbeat_details);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_heartbeat_time = 5;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getLastHeartbeatTime()
    {
        return $this->last_heartbeat_time;
    }

    public function hasLastHeartbeatTime()
    {
        return isset($this->last_heartbeat_time);
    }

    public function clearLastHeartbeatTime()
    {
        unset($this->last_heartbeat_time);
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_heartbeat_time = 5;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setLastHeartbeatTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->last_heartbeat_time = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_started_time = 6;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getLastStartedTime()
    {
        return $this->last_started_time;
    }

    public function hasLastStartedTime()
    {
        return isset($this->last_started_time);
    }

    public function clearLastStartedTime()
    {
        unset($this->last_started_time);
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_started_time = 6;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setLastStartedTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->last_started_time = $var;

        return $this;
    }

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

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

        return $this;
    }

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

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp scheduled_time = 9;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getScheduledTime()
    {
        return $this->scheduled_time;
    }

    public function hasScheduledTime()
    {
        return isset($this->scheduled_time);
    }

    public function clearScheduledTime()
    {
        unset($this->scheduled_time);
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp scheduled_time = 9;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setScheduledTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->scheduled_time = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp expiration_time = 10;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getExpirationTime()
    {
        return $this->expiration_time;
    }

    public function hasExpirationTime()
    {
        return isset($this->expiration_time);
    }

    public function clearExpirationTime()
    {
        unset($this->expiration_time);
    }

    /**
     * Generated from protobuf field <code>.google.protobuf.Timestamp expiration_time = 10;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setExpirationTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->expiration_time = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.failure.v1.Failure last_failure = 11;</code>
     * @return \Temporal\Api\Failure\V1\Failure|null
     */
    public function getLastFailure()
    {
        return $this->last_failure;
    }

    public function hasLastFailure()
    {
        return isset($this->last_failure);
    }

    public function clearLastFailure()
    {
        unset($this->last_failure);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>string last_worker_identity = 12;</code>
     * @return string
     */
    public function getLastWorkerIdentity()
    {
        return $this->last_worker_identity;
    }

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

        return $this;
    }

    /**
     * Deprecated. When present, it means this activity is assigned to the build ID of its workflow.
     *
     * Generated from protobuf field <code>.google.protobuf.Empty use_workflow_build_id = 13 [deprecated = true];</code>
     * @return \Google\Protobuf\GPBEmpty|null
     * @deprecated
     */
    public function getUseWorkflowBuildId()
    {
        if ($this->hasOneof(13)) {
            @trigger_error('use_workflow_build_id is deprecated.', E_USER_DEPRECATED);
        }
        return $this->readOneof(13);
    }

    public function hasUseWorkflowBuildId()
    {
        if ($this->hasOneof(13)) {
            @trigger_error('use_workflow_build_id is deprecated.', E_USER_DEPRECATED);
        }
        return $this->hasOneof(13);
    }

    /**
     * Deprecated. When present, it means this activity is assigned to the build ID of its workflow.
     *
     * Generated from protobuf field <code>.google.protobuf.Empty use_workflow_build_id = 13 [deprecated = true];</code>
     * @param \Google\Protobuf\GPBEmpty $var
     * @return $this
     * @deprecated
     */
    public function setUseWorkflowBuildId($var)
    {
        @trigger_error('use_workflow_build_id is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkMessage($var, \Google\Protobuf\GPBEmpty::class);
        $this->writeOneof(13, $var);

        return $this;
    }

    /**
     * Deprecated. This means the activity is independently versioned and not bound to the build ID of its workflow.
     * The activity will use the build id in this field instead.
     * If the task fails and is scheduled again, the assigned build ID may change according to the latest versioning
     * rules.
     *
     * Generated from protobuf field <code>string last_independently_assigned_build_id = 14 [deprecated = true];</code>
     * @return string
     * @deprecated
     */
    public function getLastIndependentlyAssignedBuildId()
    {
        if ($this->hasOneof(14)) {
            @trigger_error('last_independently_assigned_build_id is deprecated.', E_USER_DEPRECATED);
        }
        return $this->readOneof(14);
    }

    public function hasLastIndependentlyAssignedBuildId()
    {
        if ($this->hasOneof(14)) {
            @trigger_error('last_independently_assigned_build_id is deprecated.', E_USER_DEPRECATED);
        }
        return $this->hasOneof(14);
    }

    /**
     * Deprecated. This means the activity is independently versioned and not bound to the build ID of its workflow.
     * The activity will use the build id in this field instead.
     * If the task fails and is scheduled again, the assigned build ID may change according to the latest versioning
     * rules.
     *
     * Generated from protobuf field <code>string last_independently_assigned_build_id = 14 [deprecated = true];</code>
     * @param string $var
     * @return $this
     * @deprecated
     */
    public function setLastIndependentlyAssignedBuildId($var)
    {
        @trigger_error('last_independently_assigned_build_id is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkString($var, True);
        $this->writeOneof(14, $var);

        return $this;
    }

    /**
     * Deprecated. The version stamp of the worker to whom this activity was most recently dispatched
     * This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkerVersionStamp last_worker_version_stamp = 15 [deprecated = true];</code>
     * @return \Temporal\Api\Common\V1\WorkerVersionStamp|null
     * @deprecated
     */
    public function getLastWorkerVersionStamp()
    {
        if (isset($this->last_worker_version_stamp)) {
            @trigger_error('last_worker_version_stamp is deprecated.', E_USER_DEPRECATED);
        }
        return $this->last_worker_version_stamp;
    }

    public function hasLastWorkerVersionStamp()
    {
        if (isset($this->last_worker_version_stamp)) {
            @trigger_error('last_worker_version_stamp is deprecated.', E_USER_DEPRECATED);
        }
        return isset($this->last_worker_version_stamp);
    }

    public function clearLastWorkerVersionStamp()
    {
        @trigger_error('last_worker_version_stamp is deprecated.', E_USER_DEPRECATED);
        unset($this->last_worker_version_stamp);
    }

    /**
     * Deprecated. The version stamp of the worker to whom this activity was most recently dispatched
     * This field should be cleaned up when versioning-2 API is removed. [cleanup-experimental-wv]
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.WorkerVersionStamp last_worker_version_stamp = 15 [deprecated = true];</code>
     * @param \Temporal\Api\Common\V1\WorkerVersionStamp $var
     * @return $this
     * @deprecated
     */
    public function setLastWorkerVersionStamp($var)
    {
        @trigger_error('last_worker_version_stamp is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkMessage($var, \Temporal\Api\Common\V1\WorkerVersionStamp::class);
        $this->last_worker_version_stamp = $var;

        return $this;
    }

    /**
     * The time activity will wait until the next retry.
     * If activity is currently running it will be next retry interval if activity failed.
     * If activity is currently waiting it will be current retry interval.
     * If there will be no retry it will be null.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration current_retry_interval = 16;</code>
     * @return \Google\Protobuf\Duration|null
     */
    public function getCurrentRetryInterval()
    {
        return $this->current_retry_interval;
    }

    public function hasCurrentRetryInterval()
    {
        return isset($this->current_retry_interval);
    }

    public function clearCurrentRetryInterval()
    {
        unset($this->current_retry_interval);
    }

    /**
     * The time activity will wait until the next retry.
     * If activity is currently running it will be next retry interval if activity failed.
     * If activity is currently waiting it will be current retry interval.
     * If there will be no retry it will be null.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration current_retry_interval = 16;</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setCurrentRetryInterval($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->current_retry_interval = $var;

        return $this;
    }

    /**
     * The time when the last activity attempt was completed. If activity has not been completed yet then it will be null.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_attempt_complete_time = 17;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getLastAttemptCompleteTime()
    {
        return $this->last_attempt_complete_time;
    }

    public function hasLastAttemptCompleteTime()
    {
        return isset($this->last_attempt_complete_time);
    }

    public function clearLastAttemptCompleteTime()
    {
        unset($this->last_attempt_complete_time);
    }

    /**
     * The time when the last activity attempt was completed. If activity has not been completed yet then it will be null.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_attempt_complete_time = 17;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setLastAttemptCompleteTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->last_attempt_complete_time = $var;

        return $this;
    }

    /**
     * Next time when activity will be scheduled.
     * If activity is currently scheduled or started it will be null.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp next_attempt_schedule_time = 18;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getNextAttemptScheduleTime()
    {
        return $this->next_attempt_schedule_time;
    }

    public function hasNextAttemptScheduleTime()
    {
        return isset($this->next_attempt_schedule_time);
    }

    public function clearNextAttemptScheduleTime()
    {
        unset($this->next_attempt_schedule_time);
    }

    /**
     * Next time when activity will be scheduled.
     * If activity is currently scheduled or started it will be null.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp next_attempt_schedule_time = 18;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setNextAttemptScheduleTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->next_attempt_schedule_time = $var;

        return $this;
    }

    /**
     * Indicates if activity is paused.
     *
     * Generated from protobuf field <code>bool paused = 19;</code>
     * @return bool
     */
    public function getPaused()
    {
        return $this->paused;
    }

    /**
     * Indicates if activity is paused.
     *
     * Generated from protobuf field <code>bool paused = 19;</code>
     * @param bool $var
     * @return $this
     */
    public function setPaused($var)
    {
        GPBUtil::checkBool($var);
        $this->paused = $var;

        return $this;
    }

    /**
     * The deployment this activity was dispatched to most recently. Present only if the activity
     * was dispatched to a versioned worker.
     * Deprecated. Use `last_deployment_version`.
     *
     * Generated from protobuf field <code>.temporal.api.deployment.v1.Deployment last_deployment = 20 [deprecated = true];</code>
     * @return \Temporal\Api\Deployment\V1\Deployment|null
     * @deprecated
     */
    public function getLastDeployment()
    {
        if (isset($this->last_deployment)) {
            @trigger_error('last_deployment is deprecated.', E_USER_DEPRECATED);
        }
        return $this->last_deployment;
    }

    public function hasLastDeployment()
    {
        if (isset($this->last_deployment)) {
            @trigger_error('last_deployment is deprecated.', E_USER_DEPRECATED);
        }
        return isset($this->last_deployment);
    }

    public function clearLastDeployment()
    {
        @trigger_error('last_deployment is deprecated.', E_USER_DEPRECATED);
        unset($this->last_deployment);
    }

    /**
     * The deployment this activity was dispatched to most recently. Present only if the activity
     * was dispatched to a versioned worker.
     * Deprecated. Use `last_deployment_version`.
     *
     * Generated from protobuf field <code>.temporal.api.deployment.v1.Deployment last_deployment = 20 [deprecated = true];</code>
     * @param \Temporal\Api\Deployment\V1\Deployment $var
     * @return $this
     * @deprecated
     */
    public function setLastDeployment($var)
    {
        @trigger_error('last_deployment is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkMessage($var, \Temporal\Api\Deployment\V1\Deployment::class);
        $this->last_deployment = $var;

        return $this;
    }

    /**
     * The Worker Deployment Version this activity was dispatched to most recently.
     * Deprecated. Use `last_deployment_version`.
     *
     * Generated from protobuf field <code>string last_worker_deployment_version = 21 [deprecated = true];</code>
     * @return string
     * @deprecated
     */
    public function getLastWorkerDeploymentVersion()
    {
        if ($this->last_worker_deployment_version !== '') {
            @trigger_error('last_worker_deployment_version is deprecated.', E_USER_DEPRECATED);
        }
        return $this->last_worker_deployment_version;
    }

    /**
     * The Worker Deployment Version this activity was dispatched to most recently.
     * Deprecated. Use `last_deployment_version`.
     *
     * Generated from protobuf field <code>string last_worker_deployment_version = 21 [deprecated = true];</code>
     * @param string $var
     * @return $this
     * @deprecated
     */
    public function setLastWorkerDeploymentVersion($var)
    {
        @trigger_error('last_worker_deployment_version is deprecated.', E_USER_DEPRECATED);
        GPBUtil::checkString($var, True);
        $this->last_worker_deployment_version = $var;

        return $this;
    }

    /**
     * The Worker Deployment Version this activity was dispatched to most recently.
     * If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker.
     *
     * Generated from protobuf field <code>.temporal.api.deployment.v1.WorkerDeploymentVersion last_deployment_version = 25;</code>
     * @return \Temporal\Api\Deployment\V1\WorkerDeploymentVersion|null
     */
    public function getLastDeploymentVersion()
    {
        return $this->last_deployment_version;
    }

    public function hasLastDeploymentVersion()
    {
        return isset($this->last_deployment_version);
    }

    public function clearLastDeploymentVersion()
    {
        unset($this->last_deployment_version);
    }

    /**
     * The Worker Deployment Version this activity was dispatched to most recently.
     * If nil, the activity has not yet been dispatched or was last dispatched to an unversioned worker.
     *
     * Generated from protobuf field <code>.temporal.api.deployment.v1.WorkerDeploymentVersion last_deployment_version = 25;</code>
     * @param \Temporal\Api\Deployment\V1\WorkerDeploymentVersion $var
     * @return $this
     */
    public function setLastDeploymentVersion($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Deployment\V1\WorkerDeploymentVersion::class);
        $this->last_deployment_version = $var;

        return $this;
    }

    /**
     * Priority metadata
     *
     * Generated from protobuf field <code>.temporal.api.common.v1.Priority priority = 22;</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 = 22;</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;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.workflow.v1.PendingActivityInfo.PauseInfo pause_info = 23;</code>
     * @return \Temporal\Api\Workflow\V1\PendingActivityInfo\PauseInfo|null
     */
    public function getPauseInfo()
    {
        return $this->pause_info;
    }

    public function hasPauseInfo()
    {
        return isset($this->pause_info);
    }

    public function clearPauseInfo()
    {
        unset($this->pause_info);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.workflow.v1.PendingActivityInfo.PauseInfo pause_info = 23;</code>
     * @param \Temporal\Api\Workflow\V1\PendingActivityInfo\PauseInfo $var
     * @return $this
     */
    public function setPauseInfo($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Workflow\V1\PendingActivityInfo\PauseInfo::class);
        $this->pause_info = $var;

        return $this;
    }

    /**
     * Current activity options. May be different from the one used to start the activity.
     *
     * Generated from protobuf field <code>.temporal.api.activity.v1.ActivityOptions activity_options = 24;</code>
     * @return \Temporal\Api\Activity\V1\ActivityOptions|null
     */
    public function getActivityOptions()
    {
        return $this->activity_options;
    }

    public function hasActivityOptions()
    {
        return isset($this->activity_options);
    }

    public function clearActivityOptions()
    {
        unset($this->activity_options);
    }

    /**
     * Current activity options. May be different from the one used to start the activity.
     *
     * Generated from protobuf field <code>.temporal.api.activity.v1.ActivityOptions activity_options = 24;</code>
     * @param \Temporal\Api\Activity\V1\ActivityOptions $var
     * @return $this
     */
    public function setActivityOptions($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Activity\V1\ActivityOptions::class);
        $this->activity_options = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getAssignedBuildId()
    {
        return $this->whichOneof("assigned_build_id");
    }

}

