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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * The response message for
 * [MatchService.FindNeighbors][google.cloud.aiplatform.v1.MatchService.FindNeighbors].
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.FindNeighborsResponse</code>
 */
class FindNeighborsResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * The nearest neighbors of the query datapoints.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors nearest_neighbors = 1;</code>
     */
    private $nearest_neighbors;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\AIPlatform\V1\FindNeighborsResponse\NearestNeighbors>|\Google\Protobuf\Internal\RepeatedField $nearest_neighbors
     *           The nearest neighbors of the query datapoints.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\MatchService::initOnce();
        parent::__construct($data);
    }

    /**
     * The nearest neighbors of the query datapoints.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors nearest_neighbors = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getNearestNeighbors()
    {
        return $this->nearest_neighbors;
    }

    /**
     * The nearest neighbors of the query datapoints.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.FindNeighborsResponse.NearestNeighbors nearest_neighbors = 1;</code>
     * @param array<\Google\Cloud\AIPlatform\V1\FindNeighborsResponse\NearestNeighbors>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setNearestNeighbors($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\FindNeighborsResponse\NearestNeighbors::class);
        $this->nearest_neighbors = $arr;

        return $this;
    }

}

