Package com.google.cloud.retail.v2alpha
Class PredictResponse.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<PredictResponse.Builder>
com.google.cloud.retail.v2alpha.PredictResponse.Builder
- All Implemented Interfaces:
PredictResponseOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- PredictResponse
public static final class PredictResponse.Builder
extends com.google.protobuf.GeneratedMessage.Builder<PredictResponse.Builder>
implements PredictResponseOrBuilder
Response message for predict method.Protobuf type
google.cloud.retail.v2alpha.PredictResponse-
Method Summary
Modifier and TypeMethodDescriptionaddAllMissingIds(Iterable<String> values) IDs of products in the request that were missing from the inventory.addAllResults(Iterable<? extends PredictResponse.PredictionResult> values) A list of recommended products.addMissingIds(String value) IDs of products in the request that were missing from the inventory.addMissingIdsBytes(com.google.protobuf.ByteString value) IDs of products in the request that were missing from the inventory.addResults(int index, PredictResponse.PredictionResult value) A list of recommended products.addResults(int index, PredictResponse.PredictionResult.Builder builderForValue) A list of recommended products.A list of recommended products.addResults(PredictResponse.PredictionResult.Builder builderForValue) A list of recommended products.A list of recommended products.addResultsBuilder(int index) A list of recommended products.build()clear()A unique attribution token.IDs of products in the request that were missing from the inventory.A list of recommended products.True if the validateOnly property was set in the request.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 products in the request that were missing from the inventory.com.google.protobuf.ByteStringgetMissingIdsBytes(int index) IDs of products in the request that were missing from the inventory.intIDs of products in the request that were missing from the inventory.com.google.protobuf.ProtocolStringListIDs of products in the request that were missing from the inventory.getResults(int index) A list of recommended products.getResultsBuilder(int index) A list of recommended products.A list of recommended products.intA list of recommended products.A list of recommended products.getResultsOrBuilder(int index) A list of recommended products.List<? extends PredictResponse.PredictionResultOrBuilder>A list of recommended products.booleanTrue if the validateOnly property was set in the request.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(PredictResponse 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 products.setAttributionToken(String value) A unique attribution token.setAttributionTokenBytes(com.google.protobuf.ByteString value) A unique attribution token.setMissingIds(int index, String value) IDs of products in the request that were missing from the inventory.setResults(int index, PredictResponse.PredictionResult value) A list of recommended products.setResults(int index, PredictResponse.PredictionResult.Builder builderForValue) A list of recommended products.setValidateOnly(boolean value) True if the validateOnly property was set in the request.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<PredictResponse.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<PredictResponse.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<PredictResponse.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<PredictResponse.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<PredictResponse.Builder>
-
mergeFrom
public PredictResponse.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<PredictResponse.Builder>- Throws:
IOException
-
getResultsList
A list of recommended products. The order represents the ranking (from the most relevant product to the least).
repeated .google.cloud.retail.v2alpha.PredictResponse.PredictionResult results = 1;- Specified by:
getResultsListin interfacePredictResponseOrBuilder
-
getResultsCount
public int getResultsCount()A list of recommended products. The order represents the ranking (from the most relevant product to the least).
repeated .google.cloud.retail.v2alpha.PredictResponse.PredictionResult results = 1;- Specified by:
getResultsCountin interfacePredictResponseOrBuilder
-
getResults
A list of recommended products. The order represents the ranking (from the most relevant product to the least).
repeated .google.cloud.retail.v2alpha.PredictResponse.PredictionResult results = 1;- Specified by:
getResultsin interfacePredictResponseOrBuilder
-
setResults
A list of recommended products. The order represents the ranking (from the most relevant product to the least).
repeated .google.cloud.retail.v2alpha.PredictResponse.PredictionResult results = 1; -
setResults
public PredictResponse.Builder setResults(int index, PredictResponse.PredictionResult.Builder builderForValue) A list of recommended products. The order represents the ranking (from the most relevant product to the least).
repeated .google.cloud.retail.v2alpha.PredictResponse.PredictionResult results = 1; -
addResults
A list of recommended products. The order represents the ranking (from the most relevant product to the least).
repeated .google.cloud.retail.v2alpha.PredictResponse.PredictionResult results = 1; -
addResults
A list of recommended products. The order represents the ranking (from the most relevant product to the least).
repeated .google.cloud.retail.v2alpha.PredictResponse.PredictionResult results = 1; -
addResults
A list of recommended products. The order represents the ranking (from the most relevant product to the least).
repeated .google.cloud.retail.v2alpha.PredictResponse.PredictionResult results = 1; -
addResults
public PredictResponse.Builder addResults(int index, PredictResponse.PredictionResult.Builder builderForValue) A list of recommended products. The order represents the ranking (from the most relevant product to the least).
repeated .google.cloud.retail.v2alpha.PredictResponse.PredictionResult results = 1; -
addAllResults
public PredictResponse.Builder addAllResults(Iterable<? extends PredictResponse.PredictionResult> values) A list of recommended products. The order represents the ranking (from the most relevant product to the least).
repeated .google.cloud.retail.v2alpha.PredictResponse.PredictionResult results = 1; -
clearResults
A list of recommended products. The order represents the ranking (from the most relevant product to the least).
repeated .google.cloud.retail.v2alpha.PredictResponse.PredictionResult results = 1; -
removeResults
A list of recommended products. The order represents the ranking (from the most relevant product to the least).
repeated .google.cloud.retail.v2alpha.PredictResponse.PredictionResult results = 1; -
getResultsBuilder
A list of recommended products. The order represents the ranking (from the most relevant product to the least).
repeated .google.cloud.retail.v2alpha.PredictResponse.PredictionResult results = 1; -
getResultsOrBuilder
A list of recommended products. The order represents the ranking (from the most relevant product to the least).
repeated .google.cloud.retail.v2alpha.PredictResponse.PredictionResult results = 1;- Specified by:
getResultsOrBuilderin interfacePredictResponseOrBuilder
-
getResultsOrBuilderList
A list of recommended products. The order represents the ranking (from the most relevant product to the least).
repeated .google.cloud.retail.v2alpha.PredictResponse.PredictionResult results = 1;- Specified by:
getResultsOrBuilderListin interfacePredictResponseOrBuilder
-
addResultsBuilder
A list of recommended products. The order represents the ranking (from the most relevant product to the least).
repeated .google.cloud.retail.v2alpha.PredictResponse.PredictionResult results = 1; -
addResultsBuilder
A list of recommended products. The order represents the ranking (from the most relevant product to the least).
repeated .google.cloud.retail.v2alpha.PredictResponse.PredictionResult results = 1; -
getResultsBuilderList
A list of recommended products. The order represents the ranking (from the most relevant product to the least).
repeated .google.cloud.retail.v2alpha.PredictResponse.PredictionResult results = 1; -
getAttributionToken
A unique attribution token. This should be included in the [UserEvent][google.cloud.retail.v2alpha.UserEvent] logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.
string attribution_token = 2;- Specified by:
getAttributionTokenin interfacePredictResponseOrBuilder- Returns:
- The attributionToken.
-
getAttributionTokenBytes
public com.google.protobuf.ByteString getAttributionTokenBytes()A unique attribution token. This should be included in the [UserEvent][google.cloud.retail.v2alpha.UserEvent] logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.
string attribution_token = 2;- Specified by:
getAttributionTokenBytesin interfacePredictResponseOrBuilder- Returns:
- The bytes for attributionToken.
-
setAttributionToken
A unique attribution token. This should be included in the [UserEvent][google.cloud.retail.v2alpha.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.retail.v2alpha.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.retail.v2alpha.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 products in the request that were missing from the inventory.
repeated string missing_ids = 3;- Specified by:
getMissingIdsListin interfacePredictResponseOrBuilder- Returns:
- A list containing the missingIds.
-
getMissingIdsCount
public int getMissingIdsCount()IDs of products in the request that were missing from the inventory.
repeated string missing_ids = 3;- Specified by:
getMissingIdsCountin interfacePredictResponseOrBuilder- Returns:
- The count of missingIds.
-
getMissingIds
IDs of products in the request that were missing from the inventory.
repeated string missing_ids = 3;- Specified by:
getMissingIdsin interfacePredictResponseOrBuilder- 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 products in the request that were missing from the inventory.
repeated string missing_ids = 3;- Specified by:
getMissingIdsBytesin interfacePredictResponseOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the missingIds at the given index.
-
setMissingIds
IDs of products in the request that were missing from the inventory.
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 products in the request that were missing from the inventory.
repeated string missing_ids = 3;- Parameters:
value- The missingIds to add.- Returns:
- This builder for chaining.
-
addAllMissingIds
IDs of products in the request that were missing from the inventory.
repeated string missing_ids = 3;- Parameters:
values- The missingIds to add.- Returns:
- This builder for chaining.
-
clearMissingIds
IDs of products in the request that were missing from the inventory.
repeated string missing_ids = 3;- Returns:
- This builder for chaining.
-
addMissingIdsBytes
IDs of products in the request that were missing from the inventory.
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 the validateOnly property was set in the request.
bool validate_only = 4;- Specified by:
getValidateOnlyin interfacePredictResponseOrBuilder- Returns:
- The validateOnly.
-
setValidateOnly
True if the validateOnly property was set in the request.
bool validate_only = 4;- Parameters:
value- The validateOnly to set.- Returns:
- This builder for chaining.
-
clearValidateOnly
True if the validateOnly property was set in the request.
bool validate_only = 4;- Returns:
- This builder for chaining.
-