Class SampleQuery.QueryEntry.Target.Builder (0.45.0)

public static final class SampleQuery.QueryEntry.Target.Builder extends GeneratedMessageV3.Builder<SampleQuery.QueryEntry.Target.Builder> implements SampleQuery.QueryEntry.TargetOrBuilder

Defines the parameters of the query's expected outcome.

Protobuf type google.cloud.discoveryengine.v1beta.SampleQuery.QueryEntry.Target

Static Methods

getDescriptor()

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

Methods

addAllPageNumbers(Iterable<? extends Integer> values)

public SampleQuery.QueryEntry.Target.Builder addAllPageNumbers(Iterable<? extends Integer> values)

Expected page numbers of the target.

Each page number must be non negative.

repeated int32 page_numbers = 2;

Parameter
Name Description
values Iterable<? extends java.lang.Integer>

The pageNumbers to add.

Returns
Type Description
SampleQuery.QueryEntry.Target.Builder

This builder for chaining.

addPageNumbers(int value)

public SampleQuery.QueryEntry.Target.Builder addPageNumbers(int value)

Expected page numbers of the target.

Each page number must be non negative.

repeated int32 page_numbers = 2;

Parameter
Name Description
value int

The pageNumbers to add.

Returns
Type Description
SampleQuery.QueryEntry.Target.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public SampleQuery.QueryEntry.Target.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SampleQuery.QueryEntry.Target.Builder
Overrides

build()

public SampleQuery.QueryEntry.Target build()
Returns
Type Description
SampleQuery.QueryEntry.Target

buildPartial()

public SampleQuery.QueryEntry.Target buildPartial()
Returns
Type Description
SampleQuery.QueryEntry.Target

clear()

public SampleQuery.QueryEntry.Target.Builder clear()
Returns
Type Description
SampleQuery.QueryEntry.Target.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public SampleQuery.QueryEntry.Target.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
SampleQuery.QueryEntry.Target.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public SampleQuery.QueryEntry.Target.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
SampleQuery.QueryEntry.Target.Builder
Overrides

clearPageNumbers()

public SampleQuery.QueryEntry.Target.Builder clearPageNumbers()

Expected page numbers of the target.

Each page number must be non negative.

repeated int32 page_numbers = 2;

Returns
Type Description
SampleQuery.QueryEntry.Target.Builder

This builder for chaining.

clearScore()

public SampleQuery.QueryEntry.Target.Builder clearScore()

Relevance score of the target.

optional double score = 3;

Returns
Type Description
SampleQuery.QueryEntry.Target.Builder

This builder for chaining.

clearUri()

public SampleQuery.QueryEntry.Target.Builder clearUri()

Expected uri of the target.

This field must be a UTF-8 encoded string with a length limit of 2048 characters.

Example of valid uris: https://example.com/abc, gcs://example/example.pdf.

string uri = 1;

Returns
Type Description
SampleQuery.QueryEntry.Target.Builder

This builder for chaining.

clone()

public SampleQuery.QueryEntry.Target.Builder clone()
Returns
Type Description
SampleQuery.QueryEntry.Target.Builder
Overrides

getDefaultInstanceForType()

public SampleQuery.QueryEntry.Target getDefaultInstanceForType()
Returns
Type Description
SampleQuery.QueryEntry.Target

getDescriptorForType()

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

getPageNumbers(int index)

public int getPageNumbers(int index)

Expected page numbers of the target.

Each page number must be non negative.

repeated int32 page_numbers = 2;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
int

The pageNumbers at the given index.

getPageNumbersCount()

public int getPageNumbersCount()

Expected page numbers of the target.

Each page number must be non negative.

repeated int32 page_numbers = 2;

Returns
Type Description
int

The count of pageNumbers.

getPageNumbersList()

public List<Integer> getPageNumbersList()

Expected page numbers of the target.

Each page number must be non negative.

repeated int32 page_numbers = 2;

Returns
Type Description
List<Integer>

A list containing the pageNumbers.

getScore()

public double getScore()

Relevance score of the target.

optional double score = 3;

Returns
Type Description
double

The score.

getUri()

public String getUri()

Expected uri of the target.

This field must be a UTF-8 encoded string with a length limit of 2048 characters.

Example of valid uris: https://example.com/abc, gcs://example/example.pdf.

string uri = 1;

Returns
Type Description
String

The uri.

getUriBytes()

public ByteString getUriBytes()

Expected uri of the target.

This field must be a UTF-8 encoded string with a length limit of 2048 characters.

Example of valid uris: https://example.com/abc, gcs://example/example.pdf.

string uri = 1;

Returns
Type Description
ByteString

The bytes for uri.

hasScore()

public boolean hasScore()

Relevance score of the target.

optional double score = 3;

Returns
Type Description
boolean

Whether the score field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(SampleQuery.QueryEntry.Target other)

public SampleQuery.QueryEntry.Target.Builder mergeFrom(SampleQuery.QueryEntry.Target other)
Parameter
Name Description
other SampleQuery.QueryEntry.Target
Returns
Type Description
SampleQuery.QueryEntry.Target.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public SampleQuery.QueryEntry.Target.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
SampleQuery.QueryEntry.Target.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public SampleQuery.QueryEntry.Target.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
SampleQuery.QueryEntry.Target.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final SampleQuery.QueryEntry.Target.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SampleQuery.QueryEntry.Target.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public SampleQuery.QueryEntry.Target.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
SampleQuery.QueryEntry.Target.Builder
Overrides

setPageNumbers(int index, int value)

public SampleQuery.QueryEntry.Target.Builder setPageNumbers(int index, int value)

Expected page numbers of the target.

Each page number must be non negative.

repeated int32 page_numbers = 2;

Parameters
Name Description
index int

The index to set the value at.

value int

The pageNumbers to set.

Returns
Type Description
SampleQuery.QueryEntry.Target.Builder

This builder for chaining.

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

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

setScore(double value)

public SampleQuery.QueryEntry.Target.Builder setScore(double value)

Relevance score of the target.

optional double score = 3;

Parameter
Name Description
value double

The score to set.

Returns
Type Description
SampleQuery.QueryEntry.Target.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final SampleQuery.QueryEntry.Target.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
SampleQuery.QueryEntry.Target.Builder
Overrides

setUri(String value)

public SampleQuery.QueryEntry.Target.Builder setUri(String value)

Expected uri of the target.

This field must be a UTF-8 encoded string with a length limit of 2048 characters.

Example of valid uris: https://example.com/abc, gcs://example/example.pdf.

string uri = 1;

Parameter
Name Description
value String

The uri to set.

Returns
Type Description
SampleQuery.QueryEntry.Target.Builder

This builder for chaining.

setUriBytes(ByteString value)

public SampleQuery.QueryEntry.Target.Builder setUriBytes(ByteString value)

Expected uri of the target.

This field must be a UTF-8 encoded string with a length limit of 2048 characters.

Example of valid uris: https://example.com/abc, gcs://example/example.pdf.

string uri = 1;

Parameter
Name Description
value ByteString

The bytes for uri to set.

Returns
Type Description
SampleQuery.QueryEntry.Target.Builder

This builder for chaining.