Class RankingRecord.Builder (0.79.0)

public static final class RankingRecord.Builder extends GeneratedMessage.Builder<RankingRecord.Builder> implements RankingRecordOrBuilder

Record message for RankService.Rank method.

Protobuf type google.cloud.discoveryengine.v1beta.RankingRecord

Static Methods

getDescriptor()

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

Methods

build()

public RankingRecord build()
Returns
Type Description
RankingRecord

buildPartial()

public RankingRecord buildPartial()
Returns
Type Description
RankingRecord

clear()

public RankingRecord.Builder clear()
Returns
Type Description
RankingRecord.Builder
Overrides

clearContent()

public RankingRecord.Builder clearContent()

The content of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.

string content = 3;

Returns
Type Description
RankingRecord.Builder

This builder for chaining.

clearId()

public RankingRecord.Builder clearId()

The unique ID to represent the record.

string id = 1;

Returns
Type Description
RankingRecord.Builder

This builder for chaining.

clearScore()

public RankingRecord.Builder clearScore()

The score of this record based on the given query and selected model.

float score = 4;

Returns
Type Description
RankingRecord.Builder

This builder for chaining.

clearTitle()

public RankingRecord.Builder clearTitle()

The title of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.

string title = 2;

Returns
Type Description
RankingRecord.Builder

This builder for chaining.

getContent()

public String getContent()

The content of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.

string content = 3;

Returns
Type Description
String

The content.

getContentBytes()

public ByteString getContentBytes()

The content of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.

string content = 3;

Returns
Type Description
ByteString

The bytes for content.

getDefaultInstanceForType()

public RankingRecord getDefaultInstanceForType()
Returns
Type Description
RankingRecord

getDescriptorForType()

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

getId()

public String getId()

The unique ID to represent the record.

string id = 1;

Returns
Type Description
String

The id.

getIdBytes()

public ByteString getIdBytes()

The unique ID to represent the record.

string id = 1;

Returns
Type Description
ByteString

The bytes for id.

getScore()

public float getScore()

The score of this record based on the given query and selected model.

float score = 4;

Returns
Type Description
float

The score.

getTitle()

public String getTitle()

The title of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.

string title = 2;

Returns
Type Description
String

The title.

getTitleBytes()

public ByteString getTitleBytes()

The title of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.

string title = 2;

Returns
Type Description
ByteString

The bytes for title.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(RankingRecord other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setContent(String value)

public RankingRecord.Builder setContent(String value)

The content of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.

string content = 3;

Parameter
Name Description
value String

The content to set.

Returns
Type Description
RankingRecord.Builder

This builder for chaining.

setContentBytes(ByteString value)

public RankingRecord.Builder setContentBytes(ByteString value)

The content of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.

string content = 3;

Parameter
Name Description
value ByteString

The bytes for content to set.

Returns
Type Description
RankingRecord.Builder

This builder for chaining.

setId(String value)

public RankingRecord.Builder setId(String value)

The unique ID to represent the record.

string id = 1;

Parameter
Name Description
value String

The id to set.

Returns
Type Description
RankingRecord.Builder

This builder for chaining.

setIdBytes(ByteString value)

public RankingRecord.Builder setIdBytes(ByteString value)

The unique ID to represent the record.

string id = 1;

Parameter
Name Description
value ByteString

The bytes for id to set.

Returns
Type Description
RankingRecord.Builder

This builder for chaining.

setScore(float value)

public RankingRecord.Builder setScore(float value)

The score of this record based on the given query and selected model.

float score = 4;

Parameter
Name Description
value float

The score to set.

Returns
Type Description
RankingRecord.Builder

This builder for chaining.

setTitle(String value)

public RankingRecord.Builder setTitle(String value)

The title of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.

string title = 2;

Parameter
Name Description
value String

The title to set.

Returns
Type Description
RankingRecord.Builder

This builder for chaining.

setTitleBytes(ByteString value)

public RankingRecord.Builder setTitleBytes(ByteString value)

The title of the record. Empty by default. At least one of title or content should be set otherwise an INVALID_ARGUMENT error is thrown.

string title = 2;

Parameter
Name Description
value ByteString

The bytes for title to set.

Returns
Type Description
RankingRecord.Builder

This builder for chaining.