<?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.ExecuteMultiOperationRequest</code>
 */
class ExecuteMultiOperationRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>string namespace = 1;</code>
     */
    protected $namespace = '';
    /**
     * List of operations to execute within a single workflow.
     * Preconditions:
     * - The list of operations must not be empty.
     * - The workflow ids must match across operations.
     * - The only valid list of operations at this time is [StartWorkflow, UpdateWorkflow], in this order.
     * Note that additional operation-specific restrictions have to be considered.
     *
     * Generated from protobuf field <code>repeated .temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation operations = 2;</code>
     */
    private $operations;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $namespace
     *     @type \Temporal\Api\Workflowservice\V1\ExecuteMultiOperationRequest\Operation[] $operations
     *           List of operations to execute within a single workflow.
     *           Preconditions:
     *           - The list of operations must not be empty.
     *           - The workflow ids must match across operations.
     *           - The only valid list of operations at this time is [StartWorkflow, UpdateWorkflow], in this order.
     *           Note that additional operation-specific restrictions have to be considered.
     * }
     */
    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;
    }

    /**
     * List of operations to execute within a single workflow.
     * Preconditions:
     * - The list of operations must not be empty.
     * - The workflow ids must match across operations.
     * - The only valid list of operations at this time is [StartWorkflow, UpdateWorkflow], in this order.
     * Note that additional operation-specific restrictions have to be considered.
     *
     * Generated from protobuf field <code>repeated .temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation operations = 2;</code>
     * @return RepeatedField<\Temporal\Api\Workflowservice\V1\ExecuteMultiOperationRequest\Operation>
     */
    public function getOperations()
    {
        return $this->operations;
    }

    /**
     * List of operations to execute within a single workflow.
     * Preconditions:
     * - The list of operations must not be empty.
     * - The workflow ids must match across operations.
     * - The only valid list of operations at this time is [StartWorkflow, UpdateWorkflow], in this order.
     * Note that additional operation-specific restrictions have to be considered.
     *
     * Generated from protobuf field <code>repeated .temporal.api.workflowservice.v1.ExecuteMultiOperationRequest.Operation operations = 2;</code>
     * @param \Temporal\Api\Workflowservice\V1\ExecuteMultiOperationRequest\Operation[] $var
     * @return $this
     */
    public function setOperations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Workflowservice\V1\ExecuteMultiOperationRequest\Operation::class);
        $this->operations = $arr;

        return $this;
    }

}

