Send feedback
Class PredictResponse.PredictionResult.Builder (0.16.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 0.16.0 keyboard_arrow_down
public static final class PredictResponse . PredictionResult . Builder extends GeneratedMessageV3 . Builder<PredictResponse . PredictionResult . Builder > implements PredictResponse . PredictionResultOrBuilder
PredictionResult represents the recommendation prediction results.
Protobuf type
google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public PredictResponse . PredictionResult . Builder addRepeatedField ( Descriptors . FieldDescriptor field , Object value )
Parameters
Returns
Overrides
build()
public PredictResponse . PredictionResult build ()
Returns
buildPartial()
public PredictResponse . PredictionResult buildPartial ()
Returns
clear()
public PredictResponse . PredictionResult . Builder clear ()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public PredictResponse . PredictionResult . Builder clearField ( Descriptors . FieldDescriptor field )
Parameter
Returns
Overrides
clearId()
public PredictResponse . PredictionResult . Builder clearId ()
ID of the recommended catalog item
string id = 1;
Returns
public PredictResponse . PredictionResult . Builder clearItemMetadata ()
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public PredictResponse . PredictionResult . Builder clearOneof ( Descriptors . OneofDescriptor oneof )
Parameter
Returns
Overrides
clone()
public PredictResponse . PredictionResult . Builder clone ()
Returns
Overrides
public boolean containsItemMetadata ( String key )
Additional item metadata / annotations.
Possible values:
catalogItem
: JSON representation of the catalogItem. Will be set if
returnCatalogItem
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Will be set if
returnItemScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> item_metadata = 2;
Parameter
Returns
getDefaultInstanceForType()
public PredictResponse . PredictionResult getDefaultInstanceForType ()
Returns
getDescriptorForType()
public Descriptors . Descriptor getDescriptorForType ()
Returns
Overrides
getId()
ID of the recommended catalog item
string id = 1;
Returns
getIdBytes()
public ByteString getIdBytes ()
ID of the recommended catalog item
string id = 1;
Returns
public Map<String , Value > getItemMetadata ()
Returns
public int getItemMetadataCount ()
Additional item metadata / annotations.
Possible values:
catalogItem
: JSON representation of the catalogItem. Will be set if
returnCatalogItem
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Will be set if
returnItemScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> item_metadata = 2;
Returns
public Map<String , Value > getItemMetadataMap ()
Additional item metadata / annotations.
Possible values:
catalogItem
: JSON representation of the catalogItem. Will be set if
returnCatalogItem
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Will be set if
returnItemScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> item_metadata = 2;
Returns
public Value getItemMetadataOrDefault ( String key , Value defaultValue )
Additional item metadata / annotations.
Possible values:
catalogItem
: JSON representation of the catalogItem. Will be set if
returnCatalogItem
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Will be set if
returnItemScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> item_metadata = 2;
Parameters
Returns
public Value getItemMetadataOrThrow ( String key )
Additional item metadata / annotations.
Possible values:
catalogItem
: JSON representation of the catalogItem. Will be set if
returnCatalogItem
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Will be set if
returnItemScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> item_metadata = 2;
Parameter
Returns
public Map<String , Value > getMutableItemMetadata ()
Use alternate mutation accessors instead.
Returns
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField ( int number )
Parameter
Returns
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField ( int number )
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized ()
Returns
Overrides
mergeFrom(PredictResponse.PredictionResult other)
public PredictResponse . PredictionResult . Builder mergeFrom ( PredictResponse . PredictionResult other )
Parameter
Returns
public PredictResponse . PredictionResult . Builder mergeFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public PredictResponse . PredictionResult . Builder mergeFrom ( Message other )
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final PredictResponse . PredictionResult . Builder mergeUnknownFields ( UnknownFieldSet unknownFields )
Parameter
Returns
Overrides
public PredictResponse . PredictionResult . Builder putAllItemMetadata ( Map<String , Value > values )
Additional item metadata / annotations.
Possible values:
catalogItem
: JSON representation of the catalogItem. Will be set if
returnCatalogItem
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Will be set if
returnItemScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> item_metadata = 2;
Parameter
Returns
public PredictResponse . PredictionResult . Builder putItemMetadata ( String key , Value value )
Additional item metadata / annotations.
Possible values:
catalogItem
: JSON representation of the catalogItem. Will be set if
returnCatalogItem
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Will be set if
returnItemScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> item_metadata = 2;
Parameters
Returns
public PredictResponse . PredictionResult . Builder removeItemMetadata ( String key )
Additional item metadata / annotations.
Possible values:
catalogItem
: JSON representation of the catalogItem. Will be set if
returnCatalogItem
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Will be set if
returnItemScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> item_metadata = 2;
Parameter
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public PredictResponse . PredictionResult . Builder setField ( Descriptors . FieldDescriptor field , Object value )
Parameters
Returns
Overrides
setId(String value)
public PredictResponse . PredictionResult . Builder setId ( String value )
ID of the recommended catalog item
string id = 1;
Parameter
Name Description value
String
The id to set.
Returns
setIdBytes(ByteString value)
public PredictResponse . PredictionResult . Builder setIdBytes ( ByteString value )
ID of the recommended catalog item
string id = 1;
Parameter
Name Description value
ByteString
The bytes for id to set.
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public PredictResponse . PredictionResult . Builder setRepeatedField ( Descriptors . FieldDescriptor field , int index , Object value )
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final PredictResponse . PredictionResult . Builder setUnknownFields ( UnknownFieldSet unknownFields )
Parameter
Returns
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-02-06 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-06 UTC."],[],[]]