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

namespace Google\Cloud\AIPlatform\V1;

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

/**
 * Neighbors for example-based explanations.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.Neighbor</code>
 */
class Neighbor extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The neighbor id.
     *
     * Generated from protobuf field <code>string neighbor_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $neighbor_id = '';
    /**
     * Output only. The neighbor distance.
     *
     * Generated from protobuf field <code>double neighbor_distance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $neighbor_distance = 0.0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $neighbor_id
     *           Output only. The neighbor id.
     *     @type float $neighbor_distance
     *           Output only. The neighbor distance.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\Explanation::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The neighbor id.
     *
     * Generated from protobuf field <code>string neighbor_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getNeighborId()
    {
        return $this->neighbor_id;
    }

    /**
     * Output only. The neighbor id.
     *
     * Generated from protobuf field <code>string neighbor_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setNeighborId($var)
    {
        GPBUtil::checkString($var, True);
        $this->neighbor_id = $var;

        return $this;
    }

    /**
     * Output only. The neighbor distance.
     *
     * Generated from protobuf field <code>double neighbor_distance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return float
     */
    public function getNeighborDistance()
    {
        return $this->neighbor_distance;
    }

    /**
     * Output only. The neighbor distance.
     *
     * Generated from protobuf field <code>double neighbor_distance = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param float $var
     * @return $this
     */
    public function setNeighborDistance($var)
    {
        GPBUtil::checkDouble($var);
        $this->neighbor_distance = $var;

        return $this;
    }

}

