<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: couchbase/routing/v1/routing.proto

namespace Couchbase\Protostellar\Generated\Routing\V1;

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

/**
 * Generated from protobuf message <code>couchbase.routing.v1.VbucketDataRoutingStrategy</code>
 */
class VbucketDataRoutingStrategy extends \Google\Protobuf\Internal\Message
{
    /**
     * Generated from protobuf field <code>repeated .couchbase.routing.v1.DataRoutingEndpoint endpoints = 1;</code>
     */
    private $endpoints;
    /**
     * Generated from protobuf field <code>uint32 num_vbuckets = 3;</code>
     */
    protected $num_vbuckets = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Couchbase\Protostellar\Generated\Routing\V1\DataRoutingEndpoint>|\Google\Protobuf\Internal\RepeatedField $endpoints
     *     @type int $num_vbuckets
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Couchbase\Routing\V1\Routing::initOnce();
        parent::__construct($data);
    }

    /**
     * Generated from protobuf field <code>repeated .couchbase.routing.v1.DataRoutingEndpoint endpoints = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getEndpoints()
    {
        return $this->endpoints;
    }

    /**
     * Generated from protobuf field <code>repeated .couchbase.routing.v1.DataRoutingEndpoint endpoints = 1;</code>
     * @param array<\Couchbase\Protostellar\Generated\Routing\V1\DataRoutingEndpoint>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setEndpoints($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Couchbase\Protostellar\Generated\Routing\V1\DataRoutingEndpoint::class);
        $this->endpoints = $arr;

        return $this;
    }

    /**
     * Generated from protobuf field <code>uint32 num_vbuckets = 3;</code>
     * @return int
     */
    public function getNumVbuckets()
    {
        return $this->num_vbuckets;
    }

    /**
     * Generated from protobuf field <code>uint32 num_vbuckets = 3;</code>
     * @param int $var
     * @return $this
     */
    public function setNumVbuckets($var)
    {
        GPBUtil::checkUint32($var);
        $this->num_vbuckets = $var;

        return $this;
    }

}

