Class RecommendResponse.Builder (0.12.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
TypeDescription
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
NameDescription
valuesIterable<String>

The missingIds to add.

Returns
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult>
Returns
TypeDescription
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
NameDescription
valueString

The missingIds to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the missingIds to add.

Returns
TypeDescription
RecommendResponse.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public RecommendResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueRecommendResponse.RecommendationResult
Returns
TypeDescription
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
NameDescription
builderForValueRecommendResponse.RecommendationResult.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueRecommendResponse.RecommendationResult
Returns
TypeDescription
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
NameDescription
indexint
builderForValueRecommendResponse.RecommendationResult.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder

build()

public RecommendResponse build()
Returns
TypeDescription
RecommendResponse

buildPartial()

public RecommendResponse buildPartial()
Returns
TypeDescription
RecommendResponse

clear()

public RecommendResponse.Builder clear()
Returns
TypeDescription
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
TypeDescription
RecommendResponse.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public RecommendResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
RecommendResponse.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public RecommendResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
RecommendResponse.Builder

clearValidateOnly()

public RecommendResponse.Builder clearValidateOnly()

True if RecommendRequest.validate_only was set.

bool validate_only = 4;

Returns
TypeDescription
RecommendResponse.Builder

This builder for chaining.

clone()

public RecommendResponse.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for attributionToken.

getDefaultInstanceForType()

public RecommendResponse getDefaultInstanceForType()
Returns
TypeDescription
RecommendResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

The validateOnly.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(RecommendResponse other)

public RecommendResponse.Builder mergeFrom(RecommendResponse other)
Parameter
NameDescription
otherRecommendResponse
Returns
TypeDescription
RecommendResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final RecommendResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
valueString

The attributionToken to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for attributionToken to set.

Returns
TypeDescription
RecommendResponse.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public RecommendResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
indexint

The index to set the value at.

valueString

The missingIds to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
indexint
valueRecommendResponse.RecommendationResult
Returns
TypeDescription
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
NameDescription
indexint
builderForValueRecommendResponse.RecommendationResult.Builder
Returns
TypeDescription
RecommendResponse.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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

setValidateOnly(boolean value)

public RecommendResponse.Builder setValidateOnly(boolean value)

True if RecommendRequest.validate_only was set.

bool validate_only = 4;

Parameter
NameDescription
valueboolean

The validateOnly to set.

Returns
TypeDescription
RecommendResponse.Builder

This builder for chaining.