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.v1alpha.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()
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public RecommendResponse.RecommendationResult.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public RecommendResponse.RecommendationResult build()
buildPartial()
public RecommendResponse.RecommendationResult buildPartial()
clear()
public RecommendResponse.RecommendationResult.Builder clear()
Overrides
clearDocument()
public RecommendResponse.RecommendationResult.Builder clearDocument()
Set if returnDocument
is set to true in
RecommendRequest.params.
.google.cloud.discoveryengine.v1alpha.Document document = 2;
clearField(Descriptors.FieldDescriptor field)
public RecommendResponse.RecommendationResult.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearId()
public RecommendResponse.RecommendationResult.Builder clearId()
Resource ID of the recommended Document.
string id = 1;
public RecommendResponse.RecommendationResult.Builder clearMetadata()
clearOneof(Descriptors.OneofDescriptor oneof)
public RecommendResponse.RecommendationResult.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clone()
public RecommendResponse.RecommendationResult.Builder clone()
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 |
---|
Name | Description |
key | String
|
getDefaultInstanceForType()
public RecommendResponse.RecommendationResult getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getDocument()
public Document getDocument()
Set if returnDocument
is set to true in
RecommendRequest.params.
.google.cloud.discoveryengine.v1alpha.Document document = 2;
Returns |
---|
Type | Description |
Document | The document.
|
getDocumentBuilder()
public Document.Builder getDocumentBuilder()
Set if returnDocument
is set to true in
RecommendRequest.params.
.google.cloud.discoveryengine.v1alpha.Document document = 2;
getDocumentOrBuilder()
public DocumentOrBuilder getDocumentOrBuilder()
Set if returnDocument
is set to true in
RecommendRequest.params.
.google.cloud.discoveryengine.v1alpha.Document document = 2;
getId()
Resource ID of the recommended Document.
string id = 1;
Returns |
---|
Type | Description |
String | The id.
|
getIdBytes()
public ByteString getIdBytes()
Resource ID of the recommended Document.
string id = 1;
public Map<String,Value> getMetadata()
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 |
---|
Type | Description |
int | |
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;
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;
Returns |
---|
Type | Description |
Value | |
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 |
---|
Name | Description |
key | String
|
Returns |
---|
Type | Description |
Value | |
public Map<String,Value> getMutableMetadata()
Use alternate mutation accessors instead.
hasDocument()
public boolean hasDocument()
Set if returnDocument
is set to true in
RecommendRequest.params.
.google.cloud.discoveryengine.v1alpha.Document document = 2;
Returns |
---|
Type | Description |
boolean | Whether the document field is set.
|
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
mergeDocument(Document value)
public RecommendResponse.RecommendationResult.Builder mergeDocument(Document value)
Set if returnDocument
is set to true in
RecommendRequest.params.
.google.cloud.discoveryengine.v1alpha.Document document = 2;
mergeFrom(RecommendResponse.RecommendationResult other)
public RecommendResponse.RecommendationResult.Builder mergeFrom(RecommendResponse.RecommendationResult other)
public RecommendResponse.RecommendationResult.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public RecommendResponse.RecommendationResult.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final RecommendResponse.RecommendationResult.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
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;
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;
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 |
---|
Name | Description |
key | String
|
setDocument(Document value)
public RecommendResponse.RecommendationResult.Builder setDocument(Document value)
Set if returnDocument
is set to true in
RecommendRequest.params.
.google.cloud.discoveryengine.v1alpha.Document document = 2;
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.v1alpha.Document document = 2;
setField(Descriptors.FieldDescriptor field, Object value)
public RecommendResponse.RecommendationResult.Builder setField(Descriptors.FieldDescriptor field, Object value)
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.
|
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.
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public RecommendResponse.RecommendationResult.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final RecommendResponse.RecommendationResult.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides