<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/recommender/v1/recommendation.proto

namespace Google\Cloud\Recommender\V1;

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

/**
 * Group of operations that need to be performed atomically.
 *
 * Generated from protobuf message <code>google.cloud.recommender.v1.OperationGroup</code>
 */
class OperationGroup extends \Google\Protobuf\Internal\Message
{
    /**
     * List of operations across one or more resources that belong to this group.
     * Loosely based on RFC6902 and should be performed in the order they appear.
     *
     * Generated from protobuf field <code>repeated .google.cloud.recommender.v1.Operation operations = 1;</code>
     */
    private $operations;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Recommender\V1\Operation[]|\Google\Protobuf\Internal\RepeatedField $operations
     *           List of operations across one or more resources that belong to this group.
     *           Loosely based on RFC6902 and should be performed in the order they appear.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Recommender\V1\Recommendation::initOnce();
        parent::__construct($data);
    }

    /**
     * List of operations across one or more resources that belong to this group.
     * Loosely based on RFC6902 and should be performed in the order they appear.
     *
     * Generated from protobuf field <code>repeated .google.cloud.recommender.v1.Operation operations = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getOperations()
    {
        return $this->operations;
    }

    /**
     * List of operations across one or more resources that belong to this group.
     * Loosely based on RFC6902 and should be performed in the order they appear.
     *
     * Generated from protobuf field <code>repeated .google.cloud.recommender.v1.Operation operations = 1;</code>
     * @param \Google\Cloud\Recommender\V1\Operation[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setOperations($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Recommender\V1\Operation::class);
        $this->operations = $arr;

        return $this;
    }

}

