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.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
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()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public PredictResponse.PredictionResult.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public PredictResponse.PredictionResult build()
buildPartial()
public PredictResponse.PredictionResult buildPartial()
clear()
public PredictResponse.PredictionResult.Builder clear()
Overrides
clearField(Descriptors.FieldDescriptor field)
public PredictResponse.PredictionResult.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearId()
public PredictResponse.PredictionResult.Builder clearId()
ID of the recommended catalog item
string id = 1;
public PredictResponse.PredictionResult.Builder clearItemMetadata()
clearOneof(Descriptors.OneofDescriptor oneof)
public PredictResponse.PredictionResult.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clone()
public PredictResponse.PredictionResult.Builder clone()
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 |
Name |
Description |
key |
String
|
getDefaultInstanceForType()
public PredictResponse.PredictionResult getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getId()
ID of the recommended catalog item
string id = 1;
Returns |
Type |
Description |
String |
The id.
|
getIdBytes()
public ByteString getIdBytes()
ID of the recommended catalog item
string id = 1;
Returns |
Type |
Description |
ByteString |
The bytes for id.
|
public Map<String,Value> getItemMetadata()
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 |
Type |
Description |
int |
|
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;
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 |
Name |
Description |
key |
String
|
defaultValue |
Value
|
Returns |
Type |
Description |
Value |
|
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 |
Name |
Description |
key |
String
|
Returns |
Type |
Description |
Value |
|
public Map<String,Value> getMutableItemMetadata()
Use alternate mutation accessors instead.
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter |
Name |
Description |
number |
int
|
Returns |
Type |
Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
internalGetMutableMapFieldReflection(int number)
protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter |
Name |
Description |
number |
int
|
Returns |
Type |
Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(PredictResponse.PredictionResult other)
public PredictResponse.PredictionResult.Builder mergeFrom(PredictResponse.PredictionResult other)
public PredictResponse.PredictionResult.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public PredictResponse.PredictionResult.Builder mergeFrom(Message other)
Parameter |
Name |
Description |
other |
Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final PredictResponse.PredictionResult.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
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;
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;
public Value.Builder putItemMetadataBuilderIfAbsent(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 |
Name |
Description |
key |
String
|
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 |
Name |
Description |
key |
String
|
setField(Descriptors.FieldDescriptor field, Object value)
public PredictResponse.PredictionResult.Builder setField(Descriptors.FieldDescriptor field, Object value)
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.
|
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.
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public PredictResponse.PredictionResult.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final PredictResponse.PredictionResult.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides