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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Nearest neighbors for one query.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.NearestNeighbors</code>
 */
class NearestNeighbors extends \Google\Protobuf\Internal\Message
{
    /**
     * All its neighbors.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.NearestNeighbors.Neighbor neighbors = 1;</code>
     */
    private $neighbors;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\AIPlatform\V1\NearestNeighbors\Neighbor>|\Google\Protobuf\Internal\RepeatedField $neighbors
     *           All its neighbors.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\FeatureOnlineStoreService::initOnce();
        parent::__construct($data);
    }

    /**
     * All its neighbors.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.NearestNeighbors.Neighbor neighbors = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getNeighbors()
    {
        return $this->neighbors;
    }

    /**
     * All its neighbors.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.NearestNeighbors.Neighbor neighbors = 1;</code>
     * @param array<\Google\Cloud\AIPlatform\V1\NearestNeighbors\Neighbor>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setNeighbors($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\NearestNeighbors\Neighbor::class);
        $this->neighbors = $arr;

        return $this;
    }

}

