Class RecommendResponse.Builder (0.41.0)

public static final class RecommendResponse.Builder extends GeneratedMessageV3.Builder<RecommendResponse.Builder> implements RecommendResponseOrBuilder

Response message for Recommend method.

Protobuf type google.cloud.discoveryengine.v1beta.RecommendResponse

Static Methods

getDescriptor()

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

Methods

addAllMissingIds(Iterable<String> values)

public RecommendResponse.Builder addAllMissingIds(Iterable<String> values)

IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.

repeated string missing_ids = 3;

Parameter
Name Description
values Iterable<String>

The missingIds to add.

Returns
Type Description
RecommendResponse.Builder

This builder for chaining.

addAllResults(Iterable<? extends RecommendResponse.RecommendationResult> values)

public RecommendResponse.Builder addAllResults(Iterable<? extends RecommendResponse.RecommendationResult> values)

A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).

repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;

Parameter
Name Description
values Iterable<? extends com.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult>
Returns
Type Description
RecommendResponse.Builder

addMissingIds(String value)

public RecommendResponse.Builder addMissingIds(String value)

IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.

repeated string missing_ids = 3;

Parameter
Name Description
value String

The missingIds to add.

Returns
Type Description
RecommendResponse.Builder

This builder for chaining.

addMissingIdsBytes(ByteString value)

public RecommendResponse.Builder addMissingIdsBytes(ByteString value)

IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.

repeated string missing_ids = 3;

Parameter
Name Description
value ByteString

The bytes of the missingIds to add.

Returns
Type Description
RecommendResponse.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

addResults(RecommendResponse.RecommendationResult value)

public RecommendResponse.Builder addResults(RecommendResponse.RecommendationResult value)

A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).

repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;

Parameter
Name Description
value RecommendResponse.RecommendationResult
Returns
Type Description
RecommendResponse.Builder

addResults(RecommendResponse.RecommendationResult.Builder builderForValue)

public RecommendResponse.Builder addResults(RecommendResponse.RecommendationResult.Builder builderForValue)

A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).

repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;

Parameter
Name Description
builderForValue RecommendResponse.RecommendationResult.Builder
Returns
Type Description
RecommendResponse.Builder

addResults(int index, RecommendResponse.RecommendationResult value)

public RecommendResponse.Builder addResults(int index, RecommendResponse.RecommendationResult value)

A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).

repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;

Parameters
Name Description
index int
value RecommendResponse.RecommendationResult
Returns
Type Description
RecommendResponse.Builder

addResults(int index, RecommendResponse.RecommendationResult.Builder builderForValue)

public RecommendResponse.Builder addResults(int index, RecommendResponse.RecommendationResult.Builder builderForValue)

A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).

repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;

Parameters
Name Description
index int
builderForValue RecommendResponse.RecommendationResult.Builder
Returns
Type Description
RecommendResponse.Builder

addResultsBuilder()

public RecommendResponse.RecommendationResult.Builder addResultsBuilder()

A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).

repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;

Returns
Type Description
RecommendResponse.RecommendationResult.Builder

addResultsBuilder(int index)

public RecommendResponse.RecommendationResult.Builder addResultsBuilder(int index)

A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).

repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;

Parameter
Name Description
index int
Returns
Type Description
RecommendResponse.RecommendationResult.Builder

build()

public RecommendResponse build()
Returns
Type Description
RecommendResponse

buildPartial()

public RecommendResponse buildPartial()
Returns
Type Description
RecommendResponse

clear()

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

clearAttributionToken()

public RecommendResponse.Builder clearAttributionToken()

A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.

string attribution_token = 2;

Returns
Type Description
RecommendResponse.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearMissingIds()

public RecommendResponse.Builder clearMissingIds()

IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.

repeated string missing_ids = 3;

Returns
Type Description
RecommendResponse.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearResults()

public RecommendResponse.Builder clearResults()

A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).

repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;

Returns
Type Description
RecommendResponse.Builder

clearValidateOnly()

public RecommendResponse.Builder clearValidateOnly()

True if RecommendRequest.validate_only was set.

bool validate_only = 4;

Returns
Type Description
RecommendResponse.Builder

This builder for chaining.

clone()

public RecommendResponse.Builder clone()
Returns
Type Description
RecommendResponse.Builder
Overrides

getAttributionToken()

public String getAttributionToken()

A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.

string attribution_token = 2;

Returns
Type Description
String

The attributionToken.

getAttributionTokenBytes()

public ByteString getAttributionTokenBytes()

A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.

string attribution_token = 2;

Returns
Type Description
ByteString

The bytes for attributionToken.

getDefaultInstanceForType()

public RecommendResponse getDefaultInstanceForType()
Returns
Type Description
RecommendResponse

getDescriptorForType()

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

getMissingIds(int index)

public String getMissingIds(int index)

IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.

repeated string missing_ids = 3;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The missingIds at the given index.

getMissingIdsBytes(int index)

public ByteString getMissingIdsBytes(int index)

IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.

repeated string missing_ids = 3;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the missingIds at the given index.

getMissingIdsCount()

public int getMissingIdsCount()

IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.

repeated string missing_ids = 3;

Returns
Type Description
int

The count of missingIds.

getMissingIdsList()

public ProtocolStringList getMissingIdsList()

IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.

repeated string missing_ids = 3;

Returns
Type Description
ProtocolStringList

A list containing the missingIds.

getResults(int index)

public RecommendResponse.RecommendationResult getResults(int index)

A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).

repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;

Parameter
Name Description
index int
Returns
Type Description
RecommendResponse.RecommendationResult

getResultsBuilder(int index)

public RecommendResponse.RecommendationResult.Builder getResultsBuilder(int index)

A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).

repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;

Parameter
Name Description
index int
Returns
Type Description
RecommendResponse.RecommendationResult.Builder

getResultsBuilderList()

public List<RecommendResponse.RecommendationResult.Builder> getResultsBuilderList()

A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).

repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;

Returns
Type Description
List<Builder>

getResultsCount()

public int getResultsCount()

A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).

repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;

Returns
Type Description
int

getResultsList()

public List<RecommendResponse.RecommendationResult> getResultsList()

A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).

repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;

Returns
Type Description
List<RecommendationResult>

getResultsOrBuilder(int index)

public RecommendResponse.RecommendationResultOrBuilder getResultsOrBuilder(int index)

A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).

repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;

Parameter
Name Description
index int
Returns
Type Description
RecommendResponse.RecommendationResultOrBuilder

getResultsOrBuilderList()

public List<? extends RecommendResponse.RecommendationResultOrBuilder> getResultsOrBuilderList()

A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).

repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;

Returns
Type Description
List<? extends com.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResultOrBuilder>

getValidateOnly()

public boolean getValidateOnly()

True if RecommendRequest.validate_only was set.

bool validate_only = 4;

Returns
Type Description
boolean

The validateOnly.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(RecommendResponse other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeResults(int index)

public RecommendResponse.Builder removeResults(int index)

A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).

repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;

Parameter
Name Description
index int
Returns
Type Description
RecommendResponse.Builder

setAttributionToken(String value)

public RecommendResponse.Builder setAttributionToken(String value)

A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.

string attribution_token = 2;

Parameter
Name Description
value String

The attributionToken to set.

Returns
Type Description
RecommendResponse.Builder

This builder for chaining.

setAttributionTokenBytes(ByteString value)

public RecommendResponse.Builder setAttributionTokenBytes(ByteString value)

A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.

string attribution_token = 2;

Parameter
Name Description
value ByteString

The bytes for attributionToken to set.

Returns
Type Description
RecommendResponse.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setMissingIds(int index, String value)

public RecommendResponse.Builder setMissingIds(int index, String value)

IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.

repeated string missing_ids = 3;

Parameters
Name Description
index int

The index to set the value at.

value String

The missingIds to set.

Returns
Type Description
RecommendResponse.Builder

This builder for chaining.

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

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

setResults(int index, RecommendResponse.RecommendationResult value)

public RecommendResponse.Builder setResults(int index, RecommendResponse.RecommendationResult value)

A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).

repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;

Parameters
Name Description
index int
value RecommendResponse.RecommendationResult
Returns
Type Description
RecommendResponse.Builder

setResults(int index, RecommendResponse.RecommendationResult.Builder builderForValue)

public RecommendResponse.Builder setResults(int index, RecommendResponse.RecommendationResult.Builder builderForValue)

A list of recommended Documents. The order represents the ranking (from the most relevant Document to the least).

repeated .google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult results = 1;

Parameters
Name Description
index int
builderForValue RecommendResponse.RecommendationResult.Builder
Returns
Type Description
RecommendResponse.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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

setValidateOnly(boolean value)

public RecommendResponse.Builder setValidateOnly(boolean value)

True if RecommendRequest.validate_only was set.

bool validate_only = 4;

Parameter
Name Description
value boolean

The validateOnly to set.

Returns
Type Description
RecommendResponse.Builder

This builder for chaining.