<?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;

/**
 * Overrides for example-based explanations.
 *
 * Generated from protobuf message <code>google.cloud.aiplatform.v1.ExamplesOverride</code>
 */
class ExamplesOverride extends \Google\Protobuf\Internal\Message
{
    /**
     * The number of neighbors to return.
     *
     * Generated from protobuf field <code>int32 neighbor_count = 1;</code>
     */
    private $neighbor_count = 0;
    /**
     * The number of neighbors to return that have the same crowding tag.
     *
     * Generated from protobuf field <code>int32 crowding_count = 2;</code>
     */
    private $crowding_count = 0;
    /**
     * Restrict the resulting nearest neighbors to respect these constraints.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.ExamplesRestrictionsNamespace restrictions = 3;</code>
     */
    private $restrictions;
    /**
     * If true, return the embeddings instead of neighbors.
     *
     * Generated from protobuf field <code>bool return_embeddings = 4;</code>
     */
    private $return_embeddings = false;
    /**
     * The format of the data being provided with each call.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ExamplesOverride.DataFormat data_format = 5;</code>
     */
    private $data_format = 0;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $neighbor_count
     *           The number of neighbors to return.
     *     @type int $crowding_count
     *           The number of neighbors to return that have the same crowding tag.
     *     @type array<\Google\Cloud\AIPlatform\V1\ExamplesRestrictionsNamespace>|\Google\Protobuf\Internal\RepeatedField $restrictions
     *           Restrict the resulting nearest neighbors to respect these constraints.
     *     @type bool $return_embeddings
     *           If true, return the embeddings instead of neighbors.
     *     @type int $data_format
     *           The format of the data being provided with each call.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Aiplatform\V1\Explanation::initOnce();
        parent::__construct($data);
    }

    /**
     * The number of neighbors to return.
     *
     * Generated from protobuf field <code>int32 neighbor_count = 1;</code>
     * @return int
     */
    public function getNeighborCount()
    {
        return $this->neighbor_count;
    }

    /**
     * The number of neighbors to return.
     *
     * Generated from protobuf field <code>int32 neighbor_count = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setNeighborCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->neighbor_count = $var;

        return $this;
    }

    /**
     * The number of neighbors to return that have the same crowding tag.
     *
     * Generated from protobuf field <code>int32 crowding_count = 2;</code>
     * @return int
     */
    public function getCrowdingCount()
    {
        return $this->crowding_count;
    }

    /**
     * The number of neighbors to return that have the same crowding tag.
     *
     * Generated from protobuf field <code>int32 crowding_count = 2;</code>
     * @param int $var
     * @return $this
     */
    public function setCrowdingCount($var)
    {
        GPBUtil::checkInt32($var);
        $this->crowding_count = $var;

        return $this;
    }

    /**
     * Restrict the resulting nearest neighbors to respect these constraints.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.ExamplesRestrictionsNamespace restrictions = 3;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getRestrictions()
    {
        return $this->restrictions;
    }

    /**
     * Restrict the resulting nearest neighbors to respect these constraints.
     *
     * Generated from protobuf field <code>repeated .google.cloud.aiplatform.v1.ExamplesRestrictionsNamespace restrictions = 3;</code>
     * @param array<\Google\Cloud\AIPlatform\V1\ExamplesRestrictionsNamespace>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setRestrictions($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\AIPlatform\V1\ExamplesRestrictionsNamespace::class);
        $this->restrictions = $arr;

        return $this;
    }

    /**
     * If true, return the embeddings instead of neighbors.
     *
     * Generated from protobuf field <code>bool return_embeddings = 4;</code>
     * @return bool
     */
    public function getReturnEmbeddings()
    {
        return $this->return_embeddings;
    }

    /**
     * If true, return the embeddings instead of neighbors.
     *
     * Generated from protobuf field <code>bool return_embeddings = 4;</code>
     * @param bool $var
     * @return $this
     */
    public function setReturnEmbeddings($var)
    {
        GPBUtil::checkBool($var);
        $this->return_embeddings = $var;

        return $this;
    }

    /**
     * The format of the data being provided with each call.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ExamplesOverride.DataFormat data_format = 5;</code>
     * @return int
     */
    public function getDataFormat()
    {
        return $this->data_format;
    }

    /**
     * The format of the data being provided with each call.
     *
     * Generated from protobuf field <code>.google.cloud.aiplatform.v1.ExamplesOverride.DataFormat data_format = 5;</code>
     * @param int $var
     * @return $this
     */
    public function setDataFormat($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\AIPlatform\V1\ExamplesOverride\DataFormat::class);
        $this->data_format = $var;

        return $this;
    }

}

