Class RecommendResponse.RecommendationResult (0.36.0)

public static final class RecommendResponse.RecommendationResult extends GeneratedMessageV3 implements RecommendResponse.RecommendationResultOrBuilder

RecommendationResult represents a generic recommendation result with associated metadata.

Protobuf type google.cloud.discoveryengine.v1alpha.RecommendResponse.RecommendationResult

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > RecommendResponse.RecommendationResult

Static Fields

DOCUMENT_FIELD_NUMBER

public static final int DOCUMENT_FIELD_NUMBER
Field Value
TypeDescription
int

ID_FIELD_NUMBER

public static final int ID_FIELD_NUMBER
Field Value
TypeDescription
int

METADATA_FIELD_NUMBER

public static final int METADATA_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static RecommendResponse.RecommendationResult getDefaultInstance()
Returns
TypeDescription
RecommendResponse.RecommendationResult

getDescriptor()

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

newBuilder()

public static RecommendResponse.RecommendationResult.Builder newBuilder()
Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder

newBuilder(RecommendResponse.RecommendationResult prototype)

public static RecommendResponse.RecommendationResult.Builder newBuilder(RecommendResponse.RecommendationResult prototype)
Parameter
NameDescription
prototypeRecommendResponse.RecommendationResult
Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder

parseDelimitedFrom(InputStream input)

public static RecommendResponse.RecommendationResult parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
RecommendResponse.RecommendationResult
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static RecommendResponse.RecommendationResult parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RecommendResponse.RecommendationResult
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static RecommendResponse.RecommendationResult parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
RecommendResponse.RecommendationResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static RecommendResponse.RecommendationResult parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RecommendResponse.RecommendationResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static RecommendResponse.RecommendationResult parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
RecommendResponse.RecommendationResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static RecommendResponse.RecommendationResult parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RecommendResponse.RecommendationResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static RecommendResponse.RecommendationResult parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
RecommendResponse.RecommendationResult
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static RecommendResponse.RecommendationResult parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RecommendResponse.RecommendationResult
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static RecommendResponse.RecommendationResult parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
RecommendResponse.RecommendationResult
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static RecommendResponse.RecommendationResult parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RecommendResponse.RecommendationResult
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static RecommendResponse.RecommendationResult parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
RecommendResponse.RecommendationResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static RecommendResponse.RecommendationResult parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RecommendResponse.RecommendationResult
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<RecommendResponse.RecommendationResult> parser()
Returns
TypeDescription
Parser<RecommendationResult>

Methods

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

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

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

getDocument()

public Document getDocument()

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

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

Returns
TypeDescription
Document

The document.

getDocumentOrBuilder()

public DocumentOrBuilder getDocumentOrBuilder()

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

.google.cloud.discoveryengine.v1alpha.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() (deprecated)

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

getParserForType()

public Parser<RecommendResponse.RecommendationResult> getParserForType()
Returns
TypeDescription
Parser<RecommendationResult>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hasDocument()

public boolean hasDocument()

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

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

Returns
TypeDescription
boolean

Whether the document field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected RecommendResponse.RecommendationResult.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
RecommendResponse.RecommendationResult.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException