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

namespace Temporal\Api\Errordetails\V1;

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

/**
 * Generated from protobuf message <code>temporal.api.errordetails.v1.MultiOperationExecutionFailure</code>
 */
class MultiOperationExecutionFailure extends \Google\Protobuf\Internal\Message
{
    /**
     * One status for each requested operation from the failed MultiOperation. The failed
     * operation(s) have the same error details as if it was executed separately. All other operations have the
     * status code `Aborted` and `MultiOperationExecutionAborted` is added to the details field.
     *
     * Generated from protobuf field <code>repeated .temporal.api.errordetails.v1.MultiOperationExecutionFailure.OperationStatus statuses = 1;</code>
     */
    private $statuses;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Temporal\Api\Errordetails\V1\MultiOperationExecutionFailure\OperationStatus[] $statuses
     *           One status for each requested operation from the failed MultiOperation. The failed
     *           operation(s) have the same error details as if it was executed separately. All other operations have the
     *           status code `Aborted` and `MultiOperationExecutionAborted` is added to the details field.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Temporal\Api\Errordetails\V1\Message::initOnce();
        parent::__construct($data);
    }

    /**
     * One status for each requested operation from the failed MultiOperation. The failed
     * operation(s) have the same error details as if it was executed separately. All other operations have the
     * status code `Aborted` and `MultiOperationExecutionAborted` is added to the details field.
     *
     * Generated from protobuf field <code>repeated .temporal.api.errordetails.v1.MultiOperationExecutionFailure.OperationStatus statuses = 1;</code>
     * @return RepeatedField<\Temporal\Api\Errordetails\V1\MultiOperationExecutionFailure\OperationStatus>
     */
    public function getStatuses()
    {
        return $this->statuses;
    }

    /**
     * One status for each requested operation from the failed MultiOperation. The failed
     * operation(s) have the same error details as if it was executed separately. All other operations have the
     * status code `Aborted` and `MultiOperationExecutionAborted` is added to the details field.
     *
     * Generated from protobuf field <code>repeated .temporal.api.errordetails.v1.MultiOperationExecutionFailure.OperationStatus statuses = 1;</code>
     * @param \Temporal\Api\Errordetails\V1\MultiOperationExecutionFailure\OperationStatus[] $var
     * @return $this
     */
    public function setStatuses($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Temporal\Api\Errordetails\V1\MultiOperationExecutionFailure\OperationStatus::class);
        $this->statuses = $arr;

        return $this;
    }

}

