public static final class RecommendResponse.RecommendationResult.Builder extends GeneratedMessageV3.Builder<RecommendResponse.RecommendationResult.Builder> implements RecommendResponse.RecommendationResultOrBuilder
RecommendationResult represents a generic recommendation result with
associated metadata.
Protobuf type
google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult
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 RecommendResponse.RecommendationResult.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public RecommendResponse.RecommendationResult build()
Returns
buildPartial()
public RecommendResponse.RecommendationResult buildPartial()
Returns
clear()
public RecommendResponse.RecommendationResult.Builder clear()
Returns
Overrides
clearDocument()
public RecommendResponse.RecommendationResult.Builder clearDocument()
Set if returnDocument
is set to true in
RecommendRequest.params.
.google.cloud.discoveryengine.v1beta.Document document = 2;
Returns
clearField(Descriptors.FieldDescriptor field)
public RecommendResponse.RecommendationResult.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearId()
public RecommendResponse.RecommendationResult.Builder clearId()
Resource ID of the recommended Document.
string id = 1;
Returns
public RecommendResponse.RecommendationResult.Builder clearMetadata()
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public RecommendResponse.RecommendationResult.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clone()
public RecommendResponse.RecommendationResult.Builder clone()
Returns
Overrides
public boolean containsMetadata(String key)
Additional Document metadata / annotations.
Possible values:
score
: Recommendation score in double value. Is set if
returnScore
is set to true in
RecommendRequest.params.
map<string, .google.protobuf.Value> metadata = 3;
Parameter
Returns
getDefaultInstanceForType()
public RecommendResponse.RecommendationResult getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getDocument()
public Document getDocument()
Set if returnDocument
is set to true in
RecommendRequest.params.
.google.cloud.discoveryengine.v1beta.Document document = 2;
Returns
getDocumentBuilder()
public Document.Builder getDocumentBuilder()
Set if returnDocument
is set to true in
RecommendRequest.params.
.google.cloud.discoveryengine.v1beta.Document document = 2;
Returns
getDocumentOrBuilder()
public DocumentOrBuilder getDocumentOrBuilder()
Set if returnDocument
is set to true in
RecommendRequest.params.
.google.cloud.discoveryengine.v1beta.Document document = 2;
Returns
getId()
Resource ID of the recommended Document.
string id = 1;
Returns
getIdBytes()
public ByteString getIdBytes()
Resource ID of the recommended Document.
string id = 1;
Returns
public Map<String,Value> getMetadata()
Returns
public int getMetadataCount()
Additional Document metadata / annotations.
Possible values:
score
: Recommendation score in double value. Is set if
returnScore
is set to true in
RecommendRequest.params.
map<string, .google.protobuf.Value> metadata = 3;
Returns
public Map<String,Value> getMetadataMap()
Additional Document metadata / annotations.
Possible values:
score
: Recommendation score in double value. Is set if
returnScore
is set to true in
RecommendRequest.params.
map<string, .google.protobuf.Value> metadata = 3;
Returns
public Value getMetadataOrDefault(String key, Value defaultValue)
Additional Document metadata / annotations.
Possible values:
score
: Recommendation score in double value. Is set if
returnScore
is set to true in
RecommendRequest.params.
map<string, .google.protobuf.Value> metadata = 3;
Parameters
Returns
public Value getMetadataOrThrow(String key)
Additional Document metadata / annotations.
Possible values:
score
: Recommendation score in double value. Is set if
returnScore
is set to true in
RecommendRequest.params.
map<string, .google.protobuf.Value> metadata = 3;
Parameter
Returns
public Map<String,Value> getMutableMetadata()
Use alternate mutation accessors instead.
Returns
hasDocument()
public boolean hasDocument()
Set if returnDocument
is set to true in
RecommendRequest.params.
.google.cloud.discoveryengine.v1beta.Document document = 2;
Returns
Type | Description |
boolean | Whether the document field is set.
|
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
mergeDocument(Document value)
public RecommendResponse.RecommendationResult.Builder mergeDocument(Document value)
Set if returnDocument
is set to true in
RecommendRequest.params.
.google.cloud.discoveryengine.v1beta.Document document = 2;
Parameter
Returns
mergeFrom(RecommendResponse.RecommendationResult other)
public RecommendResponse.RecommendationResult.Builder mergeFrom(RecommendResponse.RecommendationResult other)
Parameter
Returns
public RecommendResponse.RecommendationResult.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public RecommendResponse.RecommendationResult.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final RecommendResponse.RecommendationResult.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
public RecommendResponse.RecommendationResult.Builder putAllMetadata(Map<String,Value> values)
Additional Document metadata / annotations.
Possible values:
score
: Recommendation score in double value. Is set if
returnScore
is set to true in
RecommendRequest.params.
map<string, .google.protobuf.Value> metadata = 3;
Parameter
Returns
public RecommendResponse.RecommendationResult.Builder putMetadata(String key, Value value)
Additional Document metadata / annotations.
Possible values:
score
: Recommendation score in double value. Is set if
returnScore
is set to true in
RecommendRequest.params.
map<string, .google.protobuf.Value> metadata = 3;
Parameters
Returns
public RecommendResponse.RecommendationResult.Builder removeMetadata(String key)
Additional Document metadata / annotations.
Possible values:
score
: Recommendation score in double value. Is set if
returnScore
is set to true in
RecommendRequest.params.
map<string, .google.protobuf.Value> metadata = 3;
Parameter
Returns
setDocument(Document value)
public RecommendResponse.RecommendationResult.Builder setDocument(Document value)
Set if returnDocument
is set to true in
RecommendRequest.params.
.google.cloud.discoveryengine.v1beta.Document document = 2;
Parameter
Returns
setDocument(Document.Builder builderForValue)
public RecommendResponse.RecommendationResult.Builder setDocument(Document.Builder builderForValue)
Set if returnDocument
is set to true in
RecommendRequest.params.
.google.cloud.discoveryengine.v1beta.Document document = 2;
Parameter
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public RecommendResponse.RecommendationResult.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setId(String value)
public RecommendResponse.RecommendationResult.Builder setId(String value)
Resource ID of the recommended Document.
string id = 1;
Parameter
Name | Description |
value | String
The id to set.
|
Returns
setIdBytes(ByteString value)
public RecommendResponse.RecommendationResult.Builder setIdBytes(ByteString value)
Resource ID of the recommended Document.
string id = 1;
Parameter
Name | Description |
value | ByteString
The bytes for id to set.
|
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public RecommendResponse.RecommendationResult.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final RecommendResponse.RecommendationResult.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides