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.retail.v2beta.PredictResponse.PredictionResult
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 product
string id = 1;
Returns
public PredictResponse.PredictionResult.Builder clearMetadata()
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 containsMetadata(String key)
Additional product metadata / annotations.
Possible values:
product
: JSON representation of the product. Will be set if
returnProduct
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Will be set if
returnScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> metadata = 2;
Parameter
Returns
getDefaultInstanceForType()
public PredictResponse.PredictionResult getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getId()
ID of the recommended product
string id = 1;
Returns
getIdBytes()
public ByteString getIdBytes()
ID of the recommended product
string id = 1;
Returns
public Map<String,Value> getMetadata()
Returns
public int getMetadataCount()
Additional product metadata / annotations.
Possible values:
product
: JSON representation of the product. Will be set if
returnProduct
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Will be set if
returnScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> metadata = 2;
Returns
public Map<String,Value> getMetadataMap()
Additional product metadata / annotations.
Possible values:
product
: JSON representation of the product. Will be set if
returnProduct
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Will be set if
returnScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> metadata = 2;
Returns
public Value getMetadataOrDefault(String key, Value defaultValue)
Additional product metadata / annotations.
Possible values:
product
: JSON representation of the product. Will be set if
returnProduct
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Will be set if
returnScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> metadata = 2;
Parameters
Returns
public Value getMetadataOrThrow(String key)
Additional product metadata / annotations.
Possible values:
product
: JSON representation of the product. Will be set if
returnProduct
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Will be set if
returnScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> metadata = 2;
Parameter
Returns
public Map<String,Value> getMutableMetadata()
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 putAllMetadata(Map<String,Value> values)
Additional product metadata / annotations.
Possible values:
product
: JSON representation of the product. Will be set if
returnProduct
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Will be set if
returnScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> metadata = 2;
Parameter
Returns
public PredictResponse.PredictionResult.Builder putMetadata(String key, Value value)
Additional product metadata / annotations.
Possible values:
product
: JSON representation of the product. Will be set if
returnProduct
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Will be set if
returnScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> metadata = 2;
Parameters
Returns
public PredictResponse.PredictionResult.Builder removeMetadata(String key)
Additional product metadata / annotations.
Possible values:
product
: JSON representation of the product. Will be set if
returnProduct
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Will be set if
returnScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> 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 product
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 product
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