Class RecommendResponse.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<RecommendResponse.Builder>
com.google.cloud.discoveryengine.v1beta.RecommendResponse.Builder
- All Implemented Interfaces:
RecommendResponseOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- RecommendResponse
public static final class RecommendResponse.Builder
extends com.google.protobuf.GeneratedMessage.Builder<RecommendResponse.Builder>
implements RecommendResponseOrBuilder
Response message for Recommend method.Protobuf type
google.cloud.discoveryengine.v1beta.RecommendResponse-
Method Summary
Modifier and TypeMethodDescriptionaddAllMissingIds(Iterable<String> values) IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.addAllResults(Iterable<? extends RecommendResponse.RecommendationResult> values) A list of recommended Documents.addMissingIds(String value) IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.addMissingIdsBytes(com.google.protobuf.ByteString value) IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.addResults(int index, RecommendResponse.RecommendationResult value) A list of recommended Documents.addResults(int index, RecommendResponse.RecommendationResult.Builder builderForValue) A list of recommended Documents.A list of recommended Documents.addResults(RecommendResponse.RecommendationResult.Builder builderForValue) A list of recommended Documents.A list of recommended Documents.addResultsBuilder(int index) A list of recommended Documents.build()clear()A unique attribution token.IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.A list of recommended Documents.True if [RecommendRequest.validate_only][google.cloud.discoveryengine.v1beta.RecommendRequest.validate_only] was set.A unique attribution token.com.google.protobuf.ByteStringA unique attribution token.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetMissingIds(int index) IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.com.google.protobuf.ByteStringgetMissingIdsBytes(int index) IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.intIDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.com.google.protobuf.ProtocolStringListIDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.getResults(int index) A list of recommended Documents.getResultsBuilder(int index) A list of recommended Documents.A list of recommended Documents.intA list of recommended Documents.A list of recommended Documents.getResultsOrBuilder(int index) A list of recommended Documents.A list of recommended Documents.booleanTrue if [RecommendRequest.validate_only][google.cloud.discoveryengine.v1beta.RecommendRequest.validate_only] was set.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(RecommendResponse other) mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) removeResults(int index) A list of recommended Documents.setAttributionToken(String value) A unique attribution token.setAttributionTokenBytes(com.google.protobuf.ByteString value) A unique attribution token.setMissingIds(int index, String value) IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.setResults(int index, RecommendResponse.RecommendationResult value) A list of recommended Documents.setResults(int index, RecommendResponse.RecommendationResult.Builder builderForValue) A list of recommended Documents.setValidateOnly(boolean value) True if [RecommendRequest.validate_only][google.cloud.discoveryengine.v1beta.RecommendRequest.validate_only] was set.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<RecommendResponse.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<RecommendResponse.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<RecommendResponse.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RecommendResponse.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<RecommendResponse.Builder>
-
mergeFrom
public RecommendResponse.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<RecommendResponse.Builder>- Throws:
IOException
-
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;- Specified by:
getResultsListin interfaceRecommendResponseOrBuilder
-
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;- Specified by:
getResultsCountin interfaceRecommendResponseOrBuilder
-
getResults
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;- Specified by:
getResultsin interfaceRecommendResponseOrBuilder
-
setResults
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; -
setResults
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; -
addResults
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; -
addResults
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; -
addResults
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; -
addResults
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; -
addAllResults
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; -
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; -
removeResults
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; -
getResultsBuilder
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; -
getResultsOrBuilder
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;- Specified by:
getResultsOrBuilderin interfaceRecommendResponseOrBuilder
-
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;- Specified by:
getResultsOrBuilderListin interfaceRecommendResponseOrBuilder
-
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; -
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; -
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; -
getAttributionToken
A unique attribution token. This should be included in the [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.
string attribution_token = 2;- Specified by:
getAttributionTokenin interfaceRecommendResponseOrBuilder- Returns:
- The attributionToken.
-
getAttributionTokenBytes
public com.google.protobuf.ByteString getAttributionTokenBytes()A unique attribution token. This should be included in the [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.
string attribution_token = 2;- Specified by:
getAttributionTokenBytesin interfaceRecommendResponseOrBuilder- Returns:
- The bytes for attributionToken.
-
setAttributionToken
A unique attribution token. This should be included in the [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.
string attribution_token = 2;- Parameters:
value- The attributionToken to set.- Returns:
- This builder for chaining.
-
clearAttributionToken
A unique attribution token. This should be included in the [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.
string attribution_token = 2;- Returns:
- This builder for chaining.
-
setAttributionTokenBytes
A unique attribution token. This should be included in the [UserEvent][google.cloud.discoveryengine.v1beta.UserEvent] logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.
string attribution_token = 2;- Parameters:
value- The bytes for attributionToken to set.- Returns:
- This builder for chaining.
-
getMissingIdsList
public com.google.protobuf.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;- Specified by:
getMissingIdsListin interfaceRecommendResponseOrBuilder- Returns:
- A list containing the missingIds.
-
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;- Specified by:
getMissingIdsCountin interfaceRecommendResponseOrBuilder- Returns:
- The count of missingIds.
-
getMissingIds
IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.
repeated string missing_ids = 3;- Specified by:
getMissingIdsin interfaceRecommendResponseOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The missingIds at the given index.
-
getMissingIdsBytes
public com.google.protobuf.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;- Specified by:
getMissingIdsBytesin interfaceRecommendResponseOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the missingIds at the given index.
-
setMissingIds
IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.
repeated string missing_ids = 3;- Parameters:
index- The index to set the value at.value- The missingIds to set.- Returns:
- This builder for chaining.
-
addMissingIds
IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.
repeated string missing_ids = 3;- Parameters:
value- The missingIds to add.- Returns:
- This builder for chaining.
-
addAllMissingIds
IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.
repeated string missing_ids = 3;- Parameters:
values- The missingIds to add.- Returns:
- This builder for chaining.
-
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:
- This builder for chaining.
-
addMissingIdsBytes
IDs of documents in the request that were missing from the default Branch associated with the requested ServingConfig.
repeated string missing_ids = 3;- Parameters:
value- The bytes of the missingIds to add.- Returns:
- This builder for chaining.
-
getValidateOnly
public boolean getValidateOnly()True if [RecommendRequest.validate_only][google.cloud.discoveryengine.v1beta.RecommendRequest.validate_only] was set.
bool validate_only = 4;- Specified by:
getValidateOnlyin interfaceRecommendResponseOrBuilder- Returns:
- The validateOnly.
-
setValidateOnly
True if [RecommendRequest.validate_only][google.cloud.discoveryengine.v1beta.RecommendRequest.validate_only] was set.
bool validate_only = 4;- Parameters:
value- The validateOnly to set.- Returns:
- This builder for chaining.
-
clearValidateOnly
True if [RecommendRequest.validate_only][google.cloud.discoveryengine.v1beta.RecommendRequest.validate_only] was set.
bool validate_only = 4;- Returns:
- This builder for chaining.
-