<?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.StartBatchOperationRequest</code>
 */
class StartBatchOperationRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Namespace that contains the batch operation
     *
     * Generated from protobuf field <code>string namespace = 1;</code>
     */
    protected $namespace = '';
    /**
     * Visibility query defines the the group of workflow to apply the batch operation
     * This field and `executions` are mutually exclusive
     *
     * Generated from protobuf field <code>string visibility_query = 2;</code>
     */
    protected $visibility_query = '';
    /**
     * Job ID defines the unique ID for the batch job
     *
     * Generated from protobuf field <code>string job_id = 3;</code>
     */
    protected $job_id = '';
    /**
     * Reason to perform the batch operation
     *
     * Generated from protobuf field <code>string reason = 4;</code>
     */
    protected $reason = '';
    /**
     * Executions to apply the batch operation
     * This field and `visibility_query` are mutually exclusive
     *
     * Generated from protobuf field <code>repeated .temporal.api.common.v1.WorkflowExecution executions = 5;</code>
     */
    private $executions;
    /**
     * Limit for the number of operations processed per second within this batch.
     * Its purpose is to reduce the stress on the system caused by batch operations, which helps to prevent system
     * overload and minimize potential delays in executing ongoing tasks for user workers.
     * Note that when no explicit limit is provided, the server will operate according to its limit defined by the
     * dynamic configuration key `worker.batcherRPS`. This also applies if the value in this field exceeds the
     * server's configured limit.
     *
     * Generated from protobuf field <code>float max_operations_per_second = 6;</code>
     */
    protected $max_operations_per_second = 0.0;
    protected $operation;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $namespace
     *           Namespace that contains the batch operation
     *     @type string $visibility_query
     *           Visibility query defines the the group of workflow to apply the batch operation
     *           This field and `executions` are mutually exclusive
     *     @type string $job_id
     *           Job ID defines the unique ID for the batch job
     *     @type string $reason
     *           Reason to perform the batch operation
     *     @type \Temporal\Api\Common\V1\WorkflowExecution[] $executions
     *           Executions to apply the batch operation
     *           This field and `visibility_query` are mutually exclusive
     *     @type float $max_operations_per_second
     *           Limit for the number of operations processed per second within this batch.
     *           Its purpose is to reduce the stress on the system caused by batch operations, which helps to prevent system
     *           overload and minimize potential delays in executing ongoing tasks for user workers.
     *           Note that when no explicit limit is provided, the server will operate according to its limit defined by the
     *           dynamic configuration key `worker.batcherRPS`. This also applies if the value in this field exceeds the
     *           server's configured limit.
     *     @type \Temporal\Api\Batch\V1\BatchOperationTermination $termination_operation
     *     @type \Temporal\Api\Batch\V1\BatchOperationSignal $signal_operation
     *     @type \Temporal\Api\Batch\V1\BatchOperationCancellation $cancellation_operation
     *     @type \Temporal\Api\Batch\V1\BatchOperationDeletion $deletion_operation
     *     @type \Temporal\Api\Batch\V1\BatchOperationReset $reset_operation
     *     @type \Temporal\Api\Batch\V1\BatchOperationUpdateWorkflowExecutionOptions $update_workflow_options_operation
     *     @type \Temporal\Api\Batch\V1\BatchOperationUnpauseActivities $unpause_activities_operation
     *     @type \Temporal\Api\Batch\V1\BatchOperationResetActivities $reset_activities_operation
     *     @type \Temporal\Api\Batch\V1\BatchOperationUpdateActivityOptions $update_activity_options_operation
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Workflowservice\V1\RequestResponse::initOnce();
        parent::__construct($data);
    }

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

    /**
     * Namespace that contains the batch operation
     *
     * 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;
    }

    /**
     * Visibility query defines the the group of workflow to apply the batch operation
     * This field and `executions` are mutually exclusive
     *
     * Generated from protobuf field <code>string visibility_query = 2;</code>
     * @return string
     */
    public function getVisibilityQuery()
    {
        return $this->visibility_query;
    }

    /**
     * Visibility query defines the the group of workflow to apply the batch operation
     * This field and `executions` are mutually exclusive
     *
     * Generated from protobuf field <code>string visibility_query = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setVisibilityQuery($var)
    {
        GPBUtil::checkString($var, True);
        $this->visibility_query = $var;

        return $this;
    }

    /**
     * Job ID defines the unique ID for the batch job
     *
     * Generated from protobuf field <code>string job_id = 3;</code>
     * @return string
     */
    public function getJobId()
    {
        return $this->job_id;
    }

    /**
     * Job ID defines the unique ID for the batch job
     *
     * Generated from protobuf field <code>string job_id = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setJobId($var)
    {
        GPBUtil::checkString($var, True);
        $this->job_id = $var;

        return $this;
    }

    /**
     * Reason to perform the batch operation
     *
     * Generated from protobuf field <code>string reason = 4;</code>
     * @return string
     */
    public function getReason()
    {
        return $this->reason;
    }

    /**
     * Reason to perform the batch operation
     *
     * Generated from protobuf field <code>string reason = 4;</code>
     * @param string $var
     * @return $this
     */
    public function setReason($var)
    {
        GPBUtil::checkString($var, True);
        $this->reason = $var;

        return $this;
    }

    /**
     * Executions to apply the batch operation
     * This field and `visibility_query` are mutually exclusive
     *
     * Generated from protobuf field <code>repeated .temporal.api.common.v1.WorkflowExecution executions = 5;</code>
     * @return RepeatedField<\Temporal\Api\Common\V1\WorkflowExecution>
     */
    public function getExecutions()
    {
        return $this->executions;
    }

    /**
     * Executions to apply the batch operation
     * This field and `visibility_query` are mutually exclusive
     *
     * Generated from protobuf field <code>repeated .temporal.api.common.v1.WorkflowExecution executions = 5;</code>
     * @param \Temporal\Api\Common\V1\WorkflowExecution[] $var
     * @return $this
     */
    public function setExecutions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Common\V1\WorkflowExecution::class);
        $this->executions = $arr;

        return $this;
    }

    /**
     * Limit for the number of operations processed per second within this batch.
     * Its purpose is to reduce the stress on the system caused by batch operations, which helps to prevent system
     * overload and minimize potential delays in executing ongoing tasks for user workers.
     * Note that when no explicit limit is provided, the server will operate according to its limit defined by the
     * dynamic configuration key `worker.batcherRPS`. This also applies if the value in this field exceeds the
     * server's configured limit.
     *
     * Generated from protobuf field <code>float max_operations_per_second = 6;</code>
     * @return float
     */
    public function getMaxOperationsPerSecond()
    {
        return $this->max_operations_per_second;
    }

    /**
     * Limit for the number of operations processed per second within this batch.
     * Its purpose is to reduce the stress on the system caused by batch operations, which helps to prevent system
     * overload and minimize potential delays in executing ongoing tasks for user workers.
     * Note that when no explicit limit is provided, the server will operate according to its limit defined by the
     * dynamic configuration key `worker.batcherRPS`. This also applies if the value in this field exceeds the
     * server's configured limit.
     *
     * Generated from protobuf field <code>float max_operations_per_second = 6;</code>
     * @param float $var
     * @return $this
     */
    public function setMaxOperationsPerSecond($var)
    {
        GPBUtil::checkFloat($var);
        $this->max_operations_per_second = $var;

        return $this;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.batch.v1.BatchOperationTermination termination_operation = 10;</code>
     * @return \Temporal\Api\Batch\V1\BatchOperationTermination|null
     */
    public function getTerminationOperation()
    {
        return $this->readOneof(10);
    }

    public function hasTerminationOperation()
    {
        return $this->hasOneof(10);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.batch.v1.BatchOperationTermination termination_operation = 10;</code>
     * @param \Temporal\Api\Batch\V1\BatchOperationTermination $var
     * @return $this
     */
    public function setTerminationOperation($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Batch\V1\BatchOperationTermination::class);
        $this->writeOneof(10, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.batch.v1.BatchOperationSignal signal_operation = 11;</code>
     * @return \Temporal\Api\Batch\V1\BatchOperationSignal|null
     */
    public function getSignalOperation()
    {
        return $this->readOneof(11);
    }

    public function hasSignalOperation()
    {
        return $this->hasOneof(11);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.batch.v1.BatchOperationSignal signal_operation = 11;</code>
     * @param \Temporal\Api\Batch\V1\BatchOperationSignal $var
     * @return $this
     */
    public function setSignalOperation($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Batch\V1\BatchOperationSignal::class);
        $this->writeOneof(11, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.batch.v1.BatchOperationCancellation cancellation_operation = 12;</code>
     * @return \Temporal\Api\Batch\V1\BatchOperationCancellation|null
     */
    public function getCancellationOperation()
    {
        return $this->readOneof(12);
    }

    public function hasCancellationOperation()
    {
        return $this->hasOneof(12);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.batch.v1.BatchOperationCancellation cancellation_operation = 12;</code>
     * @param \Temporal\Api\Batch\V1\BatchOperationCancellation $var
     * @return $this
     */
    public function setCancellationOperation($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Batch\V1\BatchOperationCancellation::class);
        $this->writeOneof(12, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.batch.v1.BatchOperationDeletion deletion_operation = 13;</code>
     * @return \Temporal\Api\Batch\V1\BatchOperationDeletion|null
     */
    public function getDeletionOperation()
    {
        return $this->readOneof(13);
    }

    public function hasDeletionOperation()
    {
        return $this->hasOneof(13);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.batch.v1.BatchOperationDeletion deletion_operation = 13;</code>
     * @param \Temporal\Api\Batch\V1\BatchOperationDeletion $var
     * @return $this
     */
    public function setDeletionOperation($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Batch\V1\BatchOperationDeletion::class);
        $this->writeOneof(13, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.batch.v1.BatchOperationReset reset_operation = 14;</code>
     * @return \Temporal\Api\Batch\V1\BatchOperationReset|null
     */
    public function getResetOperation()
    {
        return $this->readOneof(14);
    }

    public function hasResetOperation()
    {
        return $this->hasOneof(14);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.batch.v1.BatchOperationReset reset_operation = 14;</code>
     * @param \Temporal\Api\Batch\V1\BatchOperationReset $var
     * @return $this
     */
    public function setResetOperation($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Batch\V1\BatchOperationReset::class);
        $this->writeOneof(14, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptions update_workflow_options_operation = 15;</code>
     * @return \Temporal\Api\Batch\V1\BatchOperationUpdateWorkflowExecutionOptions|null
     */
    public function getUpdateWorkflowOptionsOperation()
    {
        return $this->readOneof(15);
    }

    public function hasUpdateWorkflowOptionsOperation()
    {
        return $this->hasOneof(15);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.batch.v1.BatchOperationUpdateWorkflowExecutionOptions update_workflow_options_operation = 15;</code>
     * @param \Temporal\Api\Batch\V1\BatchOperationUpdateWorkflowExecutionOptions $var
     * @return $this
     */
    public function setUpdateWorkflowOptionsOperation($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Batch\V1\BatchOperationUpdateWorkflowExecutionOptions::class);
        $this->writeOneof(15, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.batch.v1.BatchOperationUnpauseActivities unpause_activities_operation = 16;</code>
     * @return \Temporal\Api\Batch\V1\BatchOperationUnpauseActivities|null
     */
    public function getUnpauseActivitiesOperation()
    {
        return $this->readOneof(16);
    }

    public function hasUnpauseActivitiesOperation()
    {
        return $this->hasOneof(16);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.batch.v1.BatchOperationUnpauseActivities unpause_activities_operation = 16;</code>
     * @param \Temporal\Api\Batch\V1\BatchOperationUnpauseActivities $var
     * @return $this
     */
    public function setUnpauseActivitiesOperation($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Batch\V1\BatchOperationUnpauseActivities::class);
        $this->writeOneof(16, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.batch.v1.BatchOperationResetActivities reset_activities_operation = 17;</code>
     * @return \Temporal\Api\Batch\V1\BatchOperationResetActivities|null
     */
    public function getResetActivitiesOperation()
    {
        return $this->readOneof(17);
    }

    public function hasResetActivitiesOperation()
    {
        return $this->hasOneof(17);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.batch.v1.BatchOperationResetActivities reset_activities_operation = 17;</code>
     * @param \Temporal\Api\Batch\V1\BatchOperationResetActivities $var
     * @return $this
     */
    public function setResetActivitiesOperation($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Batch\V1\BatchOperationResetActivities::class);
        $this->writeOneof(17, $var);

        return $this;
    }

    /**
     * Generated from protobuf field <code>.temporal.api.batch.v1.BatchOperationUpdateActivityOptions update_activity_options_operation = 18;</code>
     * @return \Temporal\Api\Batch\V1\BatchOperationUpdateActivityOptions|null
     */
    public function getUpdateActivityOptionsOperation()
    {
        return $this->readOneof(18);
    }

    public function hasUpdateActivityOptionsOperation()
    {
        return $this->hasOneof(18);
    }

    /**
     * Generated from protobuf field <code>.temporal.api.batch.v1.BatchOperationUpdateActivityOptions update_activity_options_operation = 18;</code>
     * @param \Temporal\Api\Batch\V1\BatchOperationUpdateActivityOptions $var
     * @return $this
     */
    public function setUpdateActivityOptionsOperation($var)
    {
        GPBUtil::checkMessage($var, \Temporal\Api\Batch\V1\BatchOperationUpdateActivityOptions::class);
        $this->writeOneof(18, $var);

        return $this;
    }

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

}

