Class RecommendResponse.RecommendationResult.Builder (0.3.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.v1beta.RecommendResponse.RecommendationResult

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public RecommendResponse.RecommendationResult.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder
Overrides

build()

public RecommendResponse.RecommendationResult build()
Returns
TypeDescription
RecommendResponse.RecommendationResult

buildPartial()

public RecommendResponse.RecommendationResult buildPartial()
Returns
TypeDescription
RecommendResponse.RecommendationResult

clear()

public RecommendResponse.RecommendationResult.Builder clear()
Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder
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
TypeDescription
RecommendResponse.RecommendationResult.Builder

clearField(Descriptors.FieldDescriptor field)

public RecommendResponse.RecommendationResult.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder
Overrides

clearId()

public RecommendResponse.RecommendationResult.Builder clearId()

Resource ID of the recommended Document.

string id = 1;

Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder

This builder for chaining.

clearMetadata()

public RecommendResponse.RecommendationResult.Builder clearMetadata()
Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public RecommendResponse.RecommendationResult.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder
Overrides

clone()

public RecommendResponse.RecommendationResult.Builder clone()
Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder
Overrides

containsMetadata(String key)

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
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public RecommendResponse.RecommendationResult getDefaultInstanceForType()
Returns
TypeDescription
RecommendResponse.RecommendationResult

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDocument()

public Document getDocument()

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

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

Returns
TypeDescription
Document

The document.

getDocumentBuilder()

public Document.Builder getDocumentBuilder()

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

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

Returns
TypeDescription
Document.Builder

getDocumentOrBuilder()

public DocumentOrBuilder getDocumentOrBuilder()

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

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

Returns
TypeDescription
DocumentOrBuilder

getId()

public String getId()

Resource ID of the recommended Document.

string id = 1;

Returns
TypeDescription
String

The id.

getIdBytes()

public ByteString getIdBytes()

Resource ID of the recommended Document.

string id = 1;

Returns
TypeDescription
ByteString

The bytes for id.

getMetadata()

public Map<String,Value> getMetadata()

Use #getMetadataMap() instead.

Returns
TypeDescription
Map<String,Value>

getMetadataCount()

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
TypeDescription
int

getMetadataMap()

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
TypeDescription
Map<String,Value>

getMetadataOrDefault(String key, Value defaultValue)

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
NameDescription
keyString
defaultValueValue
Returns
TypeDescription
Value

getMetadataOrThrow(String key)

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
NameDescription
keyString
Returns
TypeDescription
Value

getMutableMetadata()

public Map<String,Value> getMutableMetadata()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,Value>

hasDocument()

public boolean hasDocument()

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

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

Returns
TypeDescription
boolean

Whether the document field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
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.v1beta.Document document = 2;

Parameter
NameDescription
valueDocument
Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder

mergeFrom(RecommendResponse.RecommendationResult other)

public RecommendResponse.RecommendationResult.Builder mergeFrom(RecommendResponse.RecommendationResult other)
Parameter
NameDescription
otherRecommendResponse.RecommendationResult
Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public RecommendResponse.RecommendationResult.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public RecommendResponse.RecommendationResult.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final RecommendResponse.RecommendationResult.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder
Overrides

putAllMetadata(Map<String,Value> values)

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
NameDescription
valuesMap<String,Value>
Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder

putMetadata(String key, Value value)

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
NameDescription
keyString
valueValue
Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder

removeMetadata(String key)

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
NameDescription
keyString
Returns
TypeDescription
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.v1beta.Document document = 2;

Parameter
NameDescription
valueDocument
Returns
TypeDescription
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.v1beta.Document document = 2;

Parameter
NameDescription
builderForValueDocument.Builder
Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public RecommendResponse.RecommendationResult.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder
Overrides

setId(String value)

public RecommendResponse.RecommendationResult.Builder setId(String value)

Resource ID of the recommended Document.

string id = 1;

Parameter
NameDescription
valueString

The id to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for id to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final RecommendResponse.RecommendationResult.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder
Overrides