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.v2alpha.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()
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 product
string id = 1;
public PredictResponse.PredictionResult.Builder clearMetadata()
clearOneof(Descriptors.OneofDescriptor oneof)
public PredictResponse.PredictionResult.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clone()
public PredictResponse.PredictionResult.Builder clone()
Overrides
public boolean containsMetadata(String key)
Additional product metadata / annotations.
Possible values:
product
: JSON representation of the product. Is set if
returnProduct
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Is set if
returnScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> metadata = 2;
Parameter |
---|
Name | Description |
key | String
|
getDefaultInstanceForType()
public PredictResponse.PredictionResult getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getId()
ID of the recommended product
string id = 1;
Returns |
---|
Type | Description |
String | The id.
|
getIdBytes()
public ByteString getIdBytes()
ID of the recommended product
string id = 1;
public Map<String,Value> getMetadata()
public int getMetadataCount()
Additional product metadata / annotations.
Possible values:
product
: JSON representation of the product. Is set if
returnProduct
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Is set if
returnScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> metadata = 2;
Returns |
---|
Type | Description |
int | |
public Map<String,Value> getMetadataMap()
Additional product metadata / annotations.
Possible values:
product
: JSON representation of the product. Is set if
returnProduct
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Is set if
returnScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> metadata = 2;
public Value getMetadataOrDefault(String key, Value defaultValue)
Additional product metadata / annotations.
Possible values:
product
: JSON representation of the product. Is set if
returnProduct
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Is set if
returnScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> metadata = 2;
Returns |
---|
Type | Description |
Value | |
public Value getMetadataOrThrow(String key)
Additional product metadata / annotations.
Possible values:
product
: JSON representation of the product. Is set if
returnProduct
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Is set if
returnScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> metadata = 2;
Parameter |
---|
Name | Description |
key | String
|
Returns |
---|
Type | Description |
Value | |
public Map<String,Value> getMutableMetadata()
Use alternate mutation accessors instead.
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
Overrides
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 putAllMetadata(Map<String,Value> values)
Additional product metadata / annotations.
Possible values:
product
: JSON representation of the product. Is set if
returnProduct
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Is set if
returnScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> metadata = 2;
public PredictResponse.PredictionResult.Builder putMetadata(String key, Value value)
Additional product metadata / annotations.
Possible values:
product
: JSON representation of the product. Is set if
returnProduct
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Is set if
returnScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> metadata = 2;
public PredictResponse.PredictionResult.Builder removeMetadata(String key)
Additional product metadata / annotations.
Possible values:
product
: JSON representation of the product. Is set if
returnProduct
is set to true in PredictRequest.params
.
score
: Prediction score in double value. Is set if
returnScore
is set to true in PredictRequest.params
.
map<string, .google.protobuf.Value> 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 product
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 product
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