Class RecommendResponse.RecommendationResult.Builder (0.41.0)

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.v1.RecommendResponse.RecommendationResult

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public RecommendResponse.RecommendationResult.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
RecommendResponse.RecommendationResult.Builder
Overrides

build()

public RecommendResponse.RecommendationResult build()
Returns
Type Description
RecommendResponse.RecommendationResult

buildPartial()

public RecommendResponse.RecommendationResult buildPartial()
Returns
Type Description
RecommendResponse.RecommendationResult

clear()

public RecommendResponse.RecommendationResult.Builder clear()
Returns
Type Description
RecommendResponse.RecommendationResult.Builder
Overrides

clearDocument()

public RecommendResponse.RecommendationResult.Builder clearDocument()

Set if returnDocument is set to true in RecommendRequest.params.

.google.cloud.discoveryengine.v1.Document document = 2;

Returns
Type Description
RecommendResponse.RecommendationResult.Builder

clearField(Descriptors.FieldDescriptor field)

public RecommendResponse.RecommendationResult.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
RecommendResponse.RecommendationResult.Builder
Overrides

clearId()

public RecommendResponse.RecommendationResult.Builder clearId()

Resource ID of the recommended Document.

string id = 1;

Returns
Type Description
RecommendResponse.RecommendationResult.Builder

This builder for chaining.

clearMetadata()

public RecommendResponse.RecommendationResult.Builder clearMetadata()
Returns
Type Description
RecommendResponse.RecommendationResult.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public RecommendResponse.RecommendationResult.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
RecommendResponse.RecommendationResult.Builder
Overrides

clone()

public RecommendResponse.RecommendationResult.Builder clone()
Returns
Type Description
RecommendResponse.RecommendationResult.Builder
Overrides

containsMetadata(String key)

public boolean containsMetadata(String key)

Additional Document metadata or 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
boolean

getDefaultInstanceForType()

public RecommendResponse.RecommendationResult getDefaultInstanceForType()
Returns
Type Description
RecommendResponse.RecommendationResult

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDocument()

public Document getDocument()

Set if returnDocument is set to true in RecommendRequest.params.

.google.cloud.discoveryengine.v1.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.v1.Document document = 2;

Returns
Type Description
Document.Builder

getDocumentOrBuilder()

public DocumentOrBuilder getDocumentOrBuilder()

Set if returnDocument is set to true in RecommendRequest.params.

.google.cloud.discoveryengine.v1.Document document = 2;

Returns
Type Description
DocumentOrBuilder

getId()

public String 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;

Returns
Type Description
ByteString

The bytes for id.

getMetadata() (deprecated)

public Map<String,Value> getMetadata()

Use #getMetadataMap() instead.

Returns
Type Description
Map<String,Value>

getMetadataCount()

public int getMetadataCount()

Additional Document metadata or 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

getMetadataMap()

public Map<String,Value> getMetadataMap()

Additional Document metadata or 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
Map<String,Value>

getMetadataOrDefault(String key, Value defaultValue)

public Value getMetadataOrDefault(String key, Value defaultValue)

Additional Document metadata or 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
Name Description
key String
defaultValue Value
Returns
Type Description
Value

getMetadataOrThrow(String key)

public Value getMetadataOrThrow(String key)

Additional Document metadata or 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

getMutableMetadata() (deprecated)

public Map<String,Value> getMutableMetadata()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,Value>

hasDocument()

public boolean hasDocument()

Set if returnDocument is set to true in RecommendRequest.params.

.google.cloud.discoveryengine.v1.Document document = 2;

Returns
Type Description
boolean

Whether the document field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
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()
Returns
Type Description
boolean
Overrides

mergeDocument(Document value)

public RecommendResponse.RecommendationResult.Builder mergeDocument(Document value)

Set if returnDocument is set to true in RecommendRequest.params.

.google.cloud.discoveryengine.v1.Document document = 2;

Parameter
Name Description
value Document
Returns
Type Description
RecommendResponse.RecommendationResult.Builder

mergeFrom(RecommendResponse.RecommendationResult other)

public RecommendResponse.RecommendationResult.Builder mergeFrom(RecommendResponse.RecommendationResult other)
Parameter
Name Description
other RecommendResponse.RecommendationResult
Returns
Type Description
RecommendResponse.RecommendationResult.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public RecommendResponse.RecommendationResult.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
RecommendResponse.RecommendationResult.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public RecommendResponse.RecommendationResult.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
RecommendResponse.RecommendationResult.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final RecommendResponse.RecommendationResult.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
RecommendResponse.RecommendationResult.Builder
Overrides

putAllMetadata(Map<String,Value> values)

public RecommendResponse.RecommendationResult.Builder putAllMetadata(Map<String,Value> values)

Additional Document metadata or 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
values Map<String,Value>
Returns
Type Description
RecommendResponse.RecommendationResult.Builder

putMetadata(String key, Value value)

public RecommendResponse.RecommendationResult.Builder putMetadata(String key, Value value)

Additional Document metadata or 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
Name Description
key String
value Value
Returns
Type Description
RecommendResponse.RecommendationResult.Builder

putMetadataBuilderIfAbsent(String key)

public Value.Builder putMetadataBuilderIfAbsent(String key)

Additional Document metadata or 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
Builder

removeMetadata(String key)

public RecommendResponse.RecommendationResult.Builder removeMetadata(String key)

Additional Document metadata or 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
RecommendResponse.RecommendationResult.Builder

setDocument(Document value)

public RecommendResponse.RecommendationResult.Builder setDocument(Document value)

Set if returnDocument is set to true in RecommendRequest.params.

.google.cloud.discoveryengine.v1.Document document = 2;

Parameter
Name Description
value Document
Returns
Type Description
RecommendResponse.RecommendationResult.Builder

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.v1.Document document = 2;

Parameter
Name Description
builderForValue Document.Builder
Returns
Type Description
RecommendResponse.RecommendationResult.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public RecommendResponse.RecommendationResult.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
RecommendResponse.RecommendationResult.Builder
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
Type Description
RecommendResponse.RecommendationResult.Builder

This builder for chaining.

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
Type Description
RecommendResponse.RecommendationResult.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public RecommendResponse.RecommendationResult.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
RecommendResponse.RecommendationResult.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final RecommendResponse.RecommendationResult.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
RecommendResponse.RecommendationResult.Builder
Overrides