<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/configdelivery/v1beta/config_delivery.proto

namespace Google\Cloud\ConfigDelivery\V1beta;

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

/**
 * RollingStrategy causes a specified number of clusters to be updated
 * concurrently until all clusters are updated.
 *
 * Generated from protobuf message <code>google.cloud.configdelivery.v1beta.RollingStrategy</code>
 */
class RollingStrategy extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Maximum number of clusters to update the resource bundle on
     * concurrently.
     *
     * Generated from protobuf field <code>int32 max_concurrent = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $max_concurrent = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $max_concurrent
     *           Optional. Maximum number of clusters to update the resource bundle on
     *           concurrently.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Configdelivery\V1Beta\ConfigDelivery::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Maximum number of clusters to update the resource bundle on
     * concurrently.
     *
     * Generated from protobuf field <code>int32 max_concurrent = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return int
     */
    public function getMaxConcurrent()
    {
        return $this->max_concurrent;
    }

    /**
     * Optional. Maximum number of clusters to update the resource bundle on
     * concurrently.
     *
     * Generated from protobuf field <code>int32 max_concurrent = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param int $var
     * @return $this
     */
    public function setMaxConcurrent($var)
    {
        GPBUtil::checkInt32($var);
        $this->max_concurrent = $var;

        return $this;
    }

}

