<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/bigtable/admin/v2/instance.proto

namespace Google\Cloud\Bigtable\Admin\V2\AppProfile;

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

/**
 * Read/write requests are routed to the nearest cluster in the instance, and
 * will fail over to the nearest cluster that is available in the event of
 * transient errors or delays. Clusters in a region are considered
 * equidistant. Choosing this option sacrifices read-your-writes consistency
 * to improve availability.
 *
 * Generated from protobuf message <code>google.bigtable.admin.v2.AppProfile.MultiClusterRoutingUseAny</code>
 */
class MultiClusterRoutingUseAny extends \Google\Protobuf\Internal\Message
{
    /**
     * The set of clusters to route to. The order is ignored; clusters will be
     * tried in order of distance. If left empty, all clusters are eligible.
     *
     * Generated from protobuf field <code>repeated string cluster_ids = 1;</code>
     */
    private $cluster_ids;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string[]|\Google\Protobuf\Internal\RepeatedField $cluster_ids
     *           The set of clusters to route to. The order is ignored; clusters will be
     *           tried in order of distance. If left empty, all clusters are eligible.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Bigtable\Admin\V2\Instance::initOnce();
        parent::__construct($data);
    }

    /**
     * The set of clusters to route to. The order is ignored; clusters will be
     * tried in order of distance. If left empty, all clusters are eligible.
     *
     * Generated from protobuf field <code>repeated string cluster_ids = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getClusterIds()
    {
        return $this->cluster_ids;
    }

    /**
     * The set of clusters to route to. The order is ignored; clusters will be
     * tried in order of distance. If left empty, all clusters are eligible.
     *
     * Generated from protobuf field <code>repeated string cluster_ids = 1;</code>
     * @param string[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setClusterIds($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->cluster_ids = $arr;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(MultiClusterRoutingUseAny::class, \Google\Cloud\Bigtable\Admin\V2\AppProfile_MultiClusterRoutingUseAny::class);

