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

namespace Temporal\Api\Batch\V1;

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

/**
 * BatchOperationUnpauseActivities sends unpause requests to batch workflows.
 *
 * Generated from protobuf message <code>temporal.api.batch.v1.BatchOperationUnpauseActivities</code>
 */
class BatchOperationUnpauseActivities extends \Google\Protobuf\Internal\Message
{
    /**
     * The identity of the worker/client.
     *
     * Generated from protobuf field <code>string identity = 1;</code>
     */
    protected $identity = '';
    /**
     * Setting this flag will also reset the number of attempts.
     *
     * Generated from protobuf field <code>bool reset_attempts = 4;</code>
     */
    protected $reset_attempts = false;
    /**
     * Setting this flag will also reset the heartbeat details.
     *
     * Generated from protobuf field <code>bool reset_heartbeat = 5;</code>
     */
    protected $reset_heartbeat = false;
    /**
     * If set, the activity will start at a random time within the specified jitter
     * duration, introducing variability to the start time.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration jitter = 6;</code>
     */
    protected $jitter = null;
    protected $activity;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $identity
     *           The identity of the worker/client.
     *     @type string $type
     *     @type bool $match_all
     *     @type bool $reset_attempts
     *           Setting this flag will also reset the number of attempts.
     *     @type bool $reset_heartbeat
     *           Setting this flag will also reset the heartbeat details.
     *     @type \Google\Protobuf\Duration $jitter
     *           If set, the activity will start at a random time within the specified jitter
     *           duration, introducing variability to the start time.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Batch\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * The identity of the worker/client.
     *
     * Generated from protobuf field <code>string identity = 1;</code>
     * @return string
     */
    public function getIdentity()
    {
        return $this->identity;
    }

    /**
     * The identity of the worker/client.
     *
     * Generated from protobuf field <code>string identity = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setIdentity($var)
    {
        GPBUtil::checkString($var, True);
        $this->identity = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>string type = 2;</code>
     * @return string
     */
    public function getType()
    {
        return $this->readOneof(2);
    }

    public function hasType()
    {
        return $this->hasOneof(2);
    }

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

        return $this;
    }

    /**
     * Generated from protobuf field <code>bool match_all = 3;</code>
     * @return bool
     */
    public function getMatchAll()
    {
        return $this->readOneof(3);
    }

    public function hasMatchAll()
    {
        return $this->hasOneof(3);
    }

    /**
     * Generated from protobuf field <code>bool match_all = 3;</code>
     * @param bool $var
     * @return $this
     */
    public function setMatchAll($var)
    {
        GPBUtil::checkBool($var);
        $this->writeOneof(3, $var);

        return $this;
    }

    /**
     * Setting this flag will also reset the number of attempts.
     *
     * Generated from protobuf field <code>bool reset_attempts = 4;</code>
     * @return bool
     */
    public function getResetAttempts()
    {
        return $this->reset_attempts;
    }

    /**
     * Setting this flag will also reset the number of attempts.
     *
     * Generated from protobuf field <code>bool reset_attempts = 4;</code>
     * @param bool $var
     * @return $this
     */
    public function setResetAttempts($var)
    {
        GPBUtil::checkBool($var);
        $this->reset_attempts = $var;

        return $this;
    }

    /**
     * Setting this flag will also reset the heartbeat details.
     *
     * Generated from protobuf field <code>bool reset_heartbeat = 5;</code>
     * @return bool
     */
    public function getResetHeartbeat()
    {
        return $this->reset_heartbeat;
    }

    /**
     * Setting this flag will also reset the heartbeat details.
     *
     * Generated from protobuf field <code>bool reset_heartbeat = 5;</code>
     * @param bool $var
     * @return $this
     */
    public function setResetHeartbeat($var)
    {
        GPBUtil::checkBool($var);
        $this->reset_heartbeat = $var;

        return $this;
    }

    /**
     * If set, the activity will start at a random time within the specified jitter
     * duration, introducing variability to the start time.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration jitter = 6;</code>
     * @return \Google\Protobuf\Duration|null
     */
    public function getJitter()
    {
        return $this->jitter;
    }

    public function hasJitter()
    {
        return isset($this->jitter);
    }

    public function clearJitter()
    {
        unset($this->jitter);
    }

    /**
     * If set, the activity will start at a random time within the specified jitter
     * duration, introducing variability to the start time.
     *
     * Generated from protobuf field <code>.google.protobuf.Duration jitter = 6;</code>
     * @param \Google\Protobuf\Duration $var
     * @return $this
     */
    public function setJitter($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class);
        $this->jitter = $var;

        return $this;
    }

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

}

