Class NearestNeighborQuery.StringFilter.Builder (3.44.0)

public static final class NearestNeighborQuery.StringFilter.Builder extends GeneratedMessageV3.Builder<NearestNeighborQuery.StringFilter.Builder> implements NearestNeighborQuery.StringFilterOrBuilder

String filter is used to search a subset of the entities by using boolean rules on string columns. For example: if a query specifies string filter with 'name = color, allow_tokens = {red, blue}, deny_tokens = {purple}',' then that query will match entities that are red or blue, but if those points are also purple, then they will be excluded even if they are red/blue. Only string filter is supported for now, numeric filter will be supported in the near future.

Protobuf type google.cloud.aiplatform.v1beta1.NearestNeighborQuery.StringFilter

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllAllowTokens(Iterable<String> values)

public NearestNeighborQuery.StringFilter.Builder addAllAllowTokens(Iterable<String> values)

Optional. The allowed tokens.

repeated string allow_tokens = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The allowTokens to add.

Returns
Type Description
NearestNeighborQuery.StringFilter.Builder

This builder for chaining.

addAllDenyTokens(Iterable<String> values)

public NearestNeighborQuery.StringFilter.Builder addAllDenyTokens(Iterable<String> values)

Optional. The denied tokens.

repeated string deny_tokens = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<String>

The denyTokens to add.

Returns
Type Description
NearestNeighborQuery.StringFilter.Builder

This builder for chaining.

addAllowTokens(String value)

public NearestNeighborQuery.StringFilter.Builder addAllowTokens(String value)

Optional. The allowed tokens.

repeated string allow_tokens = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The allowTokens to add.

Returns
Type Description
NearestNeighborQuery.StringFilter.Builder

This builder for chaining.

addAllowTokensBytes(ByteString value)

public NearestNeighborQuery.StringFilter.Builder addAllowTokensBytes(ByteString value)

Optional. The allowed tokens.

repeated string allow_tokens = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the allowTokens to add.

Returns
Type Description
NearestNeighborQuery.StringFilter.Builder

This builder for chaining.

addDenyTokens(String value)

public NearestNeighborQuery.StringFilter.Builder addDenyTokens(String value)

Optional. The denied tokens.

repeated string deny_tokens = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The denyTokens to add.

Returns
Type Description
NearestNeighborQuery.StringFilter.Builder

This builder for chaining.

addDenyTokensBytes(ByteString value)

public NearestNeighborQuery.StringFilter.Builder addDenyTokensBytes(ByteString value)

Optional. The denied tokens.

repeated string deny_tokens = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes of the denyTokens to add.

Returns
Type Description
NearestNeighborQuery.StringFilter.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public NearestNeighborQuery.StringFilter.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
NearestNeighborQuery.StringFilter.Builder
Overrides

build()

public NearestNeighborQuery.StringFilter build()
Returns
Type Description
NearestNeighborQuery.StringFilter

buildPartial()

public NearestNeighborQuery.StringFilter buildPartial()
Returns
Type Description
NearestNeighborQuery.StringFilter

clear()

public NearestNeighborQuery.StringFilter.Builder clear()
Returns
Type Description
NearestNeighborQuery.StringFilter.Builder
Overrides

clearAllowTokens()

public NearestNeighborQuery.StringFilter.Builder clearAllowTokens()

Optional. The allowed tokens.

repeated string allow_tokens = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
NearestNeighborQuery.StringFilter.Builder

This builder for chaining.

clearDenyTokens()

public NearestNeighborQuery.StringFilter.Builder clearDenyTokens()

Optional. The denied tokens.

repeated string deny_tokens = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
NearestNeighborQuery.StringFilter.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public NearestNeighborQuery.StringFilter.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
NearestNeighborQuery.StringFilter.Builder
Overrides

clearName()

public NearestNeighborQuery.StringFilter.Builder clearName()

Required. Column names in BigQuery that used as filters.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
NearestNeighborQuery.StringFilter.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public NearestNeighborQuery.StringFilter.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
NearestNeighborQuery.StringFilter.Builder
Overrides

clone()

public NearestNeighborQuery.StringFilter.Builder clone()
Returns
Type Description
NearestNeighborQuery.StringFilter.Builder
Overrides

getAllowTokens(int index)

public String getAllowTokens(int index)

Optional. The allowed tokens.

repeated string allow_tokens = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The allowTokens at the given index.

getAllowTokensBytes(int index)

public ByteString getAllowTokensBytes(int index)

Optional. The allowed tokens.

repeated string allow_tokens = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the allowTokens at the given index.

getAllowTokensCount()

public int getAllowTokensCount()

Optional. The allowed tokens.

repeated string allow_tokens = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of allowTokens.

getAllowTokensList()

public ProtocolStringList getAllowTokensList()

Optional. The allowed tokens.

repeated string allow_tokens = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the allowTokens.

getDefaultInstanceForType()

public NearestNeighborQuery.StringFilter getDefaultInstanceForType()
Returns
Type Description
NearestNeighborQuery.StringFilter

getDenyTokens(int index)

public String getDenyTokens(int index)

Optional. The denied tokens.

repeated string deny_tokens = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The denyTokens at the given index.

getDenyTokensBytes(int index)

public ByteString getDenyTokensBytes(int index)

Optional. The denied tokens.

repeated string deny_tokens = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the denyTokens at the given index.

getDenyTokensCount()

public int getDenyTokensCount()

Optional. The denied tokens.

repeated string deny_tokens = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of denyTokens.

getDenyTokensList()

public ProtocolStringList getDenyTokensList()

Optional. The denied tokens.

repeated string deny_tokens = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the denyTokens.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getName()

public String getName()

Required. Column names in BigQuery that used as filters.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. Column names in BigQuery that used as filters.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for name.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(NearestNeighborQuery.StringFilter other)

public NearestNeighborQuery.StringFilter.Builder mergeFrom(NearestNeighborQuery.StringFilter other)
Parameter
Name Description
other NearestNeighborQuery.StringFilter
Returns
Type Description
NearestNeighborQuery.StringFilter.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public NearestNeighborQuery.StringFilter.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
NearestNeighborQuery.StringFilter.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public NearestNeighborQuery.StringFilter.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
NearestNeighborQuery.StringFilter.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final NearestNeighborQuery.StringFilter.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
NearestNeighborQuery.StringFilter.Builder
Overrides

setAllowTokens(int index, String value)

public NearestNeighborQuery.StringFilter.Builder setAllowTokens(int index, String value)

Optional. The allowed tokens.

repeated string allow_tokens = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The allowTokens to set.

Returns
Type Description
NearestNeighborQuery.StringFilter.Builder

This builder for chaining.

setDenyTokens(int index, String value)

public NearestNeighborQuery.StringFilter.Builder setDenyTokens(int index, String value)

Optional. The denied tokens.

repeated string deny_tokens = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int

The index to set the value at.

value String

The denyTokens to set.

Returns
Type Description
NearestNeighborQuery.StringFilter.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public NearestNeighborQuery.StringFilter.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
NearestNeighborQuery.StringFilter.Builder
Overrides

setName(String value)

public NearestNeighborQuery.StringFilter.Builder setName(String value)

Required. Column names in BigQuery that used as filters.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
NearestNeighborQuery.StringFilter.Builder

This builder for chaining.

setNameBytes(ByteString value)

public NearestNeighborQuery.StringFilter.Builder setNameBytes(ByteString value)

Required. Column names in BigQuery that used as filters.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
NearestNeighborQuery.StringFilter.Builder

This builder for chaining.

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

public NearestNeighborQuery.StringFilter.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
NearestNeighborQuery.StringFilter.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final NearestNeighborQuery.StringFilter.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
NearestNeighborQuery.StringFilter.Builder
Overrides