Class NearestNeighbors.Builder (3.41.0)

public static final class NearestNeighbors.Builder extends GeneratedMessageV3.Builder<NearestNeighbors.Builder> implements NearestNeighborsOrBuilder

Nearest neighbors for one query.

Protobuf type google.cloud.aiplatform.v1.NearestNeighbors

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllNeighbors(Iterable<? extends NearestNeighbors.Neighbor> values)

public NearestNeighbors.Builder addAllNeighbors(Iterable<? extends NearestNeighbors.Neighbor> values)

All its neighbors.

repeated .google.cloud.aiplatform.v1.NearestNeighbors.Neighbor neighbors = 1;

Parameter
NameDescription
valuesIterable<? extends com.google.cloud.aiplatform.v1.NearestNeighbors.Neighbor>
Returns
TypeDescription
NearestNeighbors.Builder

addNeighbors(NearestNeighbors.Neighbor value)

public NearestNeighbors.Builder addNeighbors(NearestNeighbors.Neighbor value)

All its neighbors.

repeated .google.cloud.aiplatform.v1.NearestNeighbors.Neighbor neighbors = 1;

Parameter
NameDescription
valueNearestNeighbors.Neighbor
Returns
TypeDescription
NearestNeighbors.Builder

addNeighbors(NearestNeighbors.Neighbor.Builder builderForValue)

public NearestNeighbors.Builder addNeighbors(NearestNeighbors.Neighbor.Builder builderForValue)

All its neighbors.

repeated .google.cloud.aiplatform.v1.NearestNeighbors.Neighbor neighbors = 1;

Parameter
NameDescription
builderForValueNearestNeighbors.Neighbor.Builder
Returns
TypeDescription
NearestNeighbors.Builder

addNeighbors(int index, NearestNeighbors.Neighbor value)

public NearestNeighbors.Builder addNeighbors(int index, NearestNeighbors.Neighbor value)

All its neighbors.

repeated .google.cloud.aiplatform.v1.NearestNeighbors.Neighbor neighbors = 1;

Parameters
NameDescription
indexint
valueNearestNeighbors.Neighbor
Returns
TypeDescription
NearestNeighbors.Builder

addNeighbors(int index, NearestNeighbors.Neighbor.Builder builderForValue)

public NearestNeighbors.Builder addNeighbors(int index, NearestNeighbors.Neighbor.Builder builderForValue)

All its neighbors.

repeated .google.cloud.aiplatform.v1.NearestNeighbors.Neighbor neighbors = 1;

Parameters
NameDescription
indexint
builderForValueNearestNeighbors.Neighbor.Builder
Returns
TypeDescription
NearestNeighbors.Builder

addNeighborsBuilder()

public NearestNeighbors.Neighbor.Builder addNeighborsBuilder()

All its neighbors.

repeated .google.cloud.aiplatform.v1.NearestNeighbors.Neighbor neighbors = 1;

Returns
TypeDescription
NearestNeighbors.Neighbor.Builder

addNeighborsBuilder(int index)

public NearestNeighbors.Neighbor.Builder addNeighborsBuilder(int index)

All its neighbors.

repeated .google.cloud.aiplatform.v1.NearestNeighbors.Neighbor neighbors = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
NearestNeighbors.Neighbor.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public NearestNeighbors.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
NearestNeighbors.Builder
Overrides

build()

public NearestNeighbors build()
Returns
TypeDescription
NearestNeighbors

buildPartial()

public NearestNeighbors buildPartial()
Returns
TypeDescription
NearestNeighbors

clear()

public NearestNeighbors.Builder clear()
Returns
TypeDescription
NearestNeighbors.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public NearestNeighbors.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
NearestNeighbors.Builder
Overrides

clearNeighbors()

public NearestNeighbors.Builder clearNeighbors()

All its neighbors.

repeated .google.cloud.aiplatform.v1.NearestNeighbors.Neighbor neighbors = 1;

Returns
TypeDescription
NearestNeighbors.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public NearestNeighbors.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
NearestNeighbors.Builder
Overrides

clone()

public NearestNeighbors.Builder clone()
Returns
TypeDescription
NearestNeighbors.Builder
Overrides

getDefaultInstanceForType()

public NearestNeighbors getDefaultInstanceForType()
Returns
TypeDescription
NearestNeighbors

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getNeighbors(int index)

public NearestNeighbors.Neighbor getNeighbors(int index)

All its neighbors.

repeated .google.cloud.aiplatform.v1.NearestNeighbors.Neighbor neighbors = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
NearestNeighbors.Neighbor

getNeighborsBuilder(int index)

public NearestNeighbors.Neighbor.Builder getNeighborsBuilder(int index)

All its neighbors.

repeated .google.cloud.aiplatform.v1.NearestNeighbors.Neighbor neighbors = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
NearestNeighbors.Neighbor.Builder

getNeighborsBuilderList()

public List<NearestNeighbors.Neighbor.Builder> getNeighborsBuilderList()

All its neighbors.

repeated .google.cloud.aiplatform.v1.NearestNeighbors.Neighbor neighbors = 1;

Returns
TypeDescription
List<Builder>

getNeighborsCount()

public int getNeighborsCount()

All its neighbors.

repeated .google.cloud.aiplatform.v1.NearestNeighbors.Neighbor neighbors = 1;

Returns
TypeDescription
int

getNeighborsList()

public List<NearestNeighbors.Neighbor> getNeighborsList()

All its neighbors.

repeated .google.cloud.aiplatform.v1.NearestNeighbors.Neighbor neighbors = 1;

Returns
TypeDescription
List<Neighbor>

getNeighborsOrBuilder(int index)

public NearestNeighbors.NeighborOrBuilder getNeighborsOrBuilder(int index)

All its neighbors.

repeated .google.cloud.aiplatform.v1.NearestNeighbors.Neighbor neighbors = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
NearestNeighbors.NeighborOrBuilder

getNeighborsOrBuilderList()

public List<? extends NearestNeighbors.NeighborOrBuilder> getNeighborsOrBuilderList()

All its neighbors.

repeated .google.cloud.aiplatform.v1.NearestNeighbors.Neighbor neighbors = 1;

Returns
TypeDescription
List<? extends com.google.cloud.aiplatform.v1.NearestNeighbors.NeighborOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(NearestNeighbors other)

public NearestNeighbors.Builder mergeFrom(NearestNeighbors other)
Parameter
NameDescription
otherNearestNeighbors
Returns
TypeDescription
NearestNeighbors.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public NearestNeighbors.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
NearestNeighbors.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public NearestNeighbors.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
NearestNeighbors.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final NearestNeighbors.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
NearestNeighbors.Builder
Overrides

removeNeighbors(int index)

public NearestNeighbors.Builder removeNeighbors(int index)

All its neighbors.

repeated .google.cloud.aiplatform.v1.NearestNeighbors.Neighbor neighbors = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
NearestNeighbors.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public NearestNeighbors.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
NearestNeighbors.Builder
Overrides

setNeighbors(int index, NearestNeighbors.Neighbor value)

public NearestNeighbors.Builder setNeighbors(int index, NearestNeighbors.Neighbor value)

All its neighbors.

repeated .google.cloud.aiplatform.v1.NearestNeighbors.Neighbor neighbors = 1;

Parameters
NameDescription
indexint
valueNearestNeighbors.Neighbor
Returns
TypeDescription
NearestNeighbors.Builder

setNeighbors(int index, NearestNeighbors.Neighbor.Builder builderForValue)

public NearestNeighbors.Builder setNeighbors(int index, NearestNeighbors.Neighbor.Builder builderForValue)

All its neighbors.

repeated .google.cloud.aiplatform.v1.NearestNeighbors.Neighbor neighbors = 1;

Parameters
NameDescription
indexint
builderForValueNearestNeighbors.Neighbor.Builder
Returns
TypeDescription
NearestNeighbors.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public NearestNeighbors.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
NearestNeighbors.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final NearestNeighbors.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
NearestNeighbors.Builder
Overrides