public final class CompletionSuggestion extends GeneratedMessageV3 implements CompletionSuggestionOrBuilder
Autocomplete suggestions that are imported from Customer.
Protobuf type google.cloud.discoveryengine.v1.CompletionSuggestion
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
ALTERNATIVE_PHRASES_FIELD_NUMBER
public static final int ALTERNATIVE_PHRASES_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
FREQUENCY_FIELD_NUMBER
public static final int FREQUENCY_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
GLOBAL_SCORE_FIELD_NUMBER
public static final int GLOBAL_SCORE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
GROUP_ID_FIELD_NUMBER
public static final int GROUP_ID_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
GROUP_SCORE_FIELD_NUMBER
public static final int GROUP_SCORE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
LANGUAGE_CODE_FIELD_NUMBER
public static final int LANGUAGE_CODE_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
SUGGESTION_FIELD_NUMBER
public static final int SUGGESTION_FIELD_NUMBER
Field Value |
Type |
Description |
int |
|
Static Methods
getDefaultInstance()
public static CompletionSuggestion getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static CompletionSuggestion.Builder newBuilder()
newBuilder(CompletionSuggestion prototype)
public static CompletionSuggestion.Builder newBuilder(CompletionSuggestion prototype)
public static CompletionSuggestion parseDelimitedFrom(InputStream input)
public static CompletionSuggestion parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static CompletionSuggestion parseFrom(byte[] data)
Parameter |
Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static CompletionSuggestion parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static CompletionSuggestion parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static CompletionSuggestion parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static CompletionSuggestion parseFrom(CodedInputStream input)
public static CompletionSuggestion parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static CompletionSuggestion parseFrom(InputStream input)
public static CompletionSuggestion parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static CompletionSuggestion parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static CompletionSuggestion parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<CompletionSuggestion> parser()
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter |
Name |
Description |
obj |
Object
|
Overrides
getAlternativePhrases(int index)
public String getAlternativePhrases(int index)
Alternative matching phrases for this suggestion.
repeated string alternative_phrases = 7;
Parameter |
Name |
Description |
index |
int
The index of the element to return.
|
Returns |
Type |
Description |
String |
The alternativePhrases at the given index.
|
getAlternativePhrasesBytes(int index)
public ByteString getAlternativePhrasesBytes(int index)
Alternative matching phrases for this suggestion.
repeated string alternative_phrases = 7;
Parameter |
Name |
Description |
index |
int
The index of the value to return.
|
Returns |
Type |
Description |
ByteString |
The bytes of the alternativePhrases at the given index.
|
getAlternativePhrasesCount()
public int getAlternativePhrasesCount()
Alternative matching phrases for this suggestion.
repeated string alternative_phrases = 7;
Returns |
Type |
Description |
int |
The count of alternativePhrases.
|
getAlternativePhrasesList()
public ProtocolStringList getAlternativePhrasesList()
Alternative matching phrases for this suggestion.
repeated string alternative_phrases = 7;
getDefaultInstanceForType()
public CompletionSuggestion getDefaultInstanceForType()
getFrequency()
public long getFrequency()
Frequency of this suggestion. Will be used to rank suggestions when score
is not available.
int64 frequency = 3;
Returns |
Type |
Description |
long |
The frequency.
|
getGlobalScore()
public double getGlobalScore()
Global score of this suggestion. Control how this suggestion would be
scored / ranked.
double global_score = 2;
Returns |
Type |
Description |
double |
The globalScore.
|
getGroupId()
public String getGroupId()
If two suggestions have the same groupId, they will not be
returned together. Instead the one ranked higher will be returned. This can
be used to deduplicate semantically identical suggestions.
string group_id = 5;
Returns |
Type |
Description |
String |
The groupId.
|
getGroupIdBytes()
public ByteString getGroupIdBytes()
If two suggestions have the same groupId, they will not be
returned together. Instead the one ranked higher will be returned. This can
be used to deduplicate semantically identical suggestions.
string group_id = 5;
Returns |
Type |
Description |
ByteString |
The bytes for groupId.
|
getGroupScore()
public double getGroupScore()
The score of this suggestion within its group.
double group_score = 6;
Returns |
Type |
Description |
double |
The groupScore.
|
getLanguageCode()
public String getLanguageCode()
BCP-47 language code of this suggestion.
string language_code = 4;
Returns |
Type |
Description |
String |
The languageCode.
|
getLanguageCodeBytes()
public ByteString getLanguageCodeBytes()
BCP-47 language code of this suggestion.
string language_code = 4;
Returns |
Type |
Description |
ByteString |
The bytes for languageCode.
|
getParserForType()
public Parser<CompletionSuggestion> getParserForType()
Overrides
getRankingInfoCase()
public CompletionSuggestion.RankingInfoCase getRankingInfoCase()
getSerializedSize()
public int getSerializedSize()
Returns |
Type |
Description |
int |
|
Overrides
getSuggestion()
public String getSuggestion()
Required. The suggestion text.
string suggestion = 1 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
String |
The suggestion.
|
getSuggestionBytes()
public ByteString getSuggestionBytes()
Required. The suggestion text.
string suggestion = 1 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
ByteString |
The bytes for suggestion.
|
hasFrequency()
public boolean hasFrequency()
Frequency of this suggestion. Will be used to rank suggestions when score
is not available.
int64 frequency = 3;
Returns |
Type |
Description |
boolean |
Whether the frequency field is set.
|
hasGlobalScore()
public boolean hasGlobalScore()
Global score of this suggestion. Control how this suggestion would be
scored / ranked.
double global_score = 2;
Returns |
Type |
Description |
boolean |
Whether the globalScore field is set.
|
hashCode()
Returns |
Type |
Description |
int |
|
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public CompletionSuggestion.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected CompletionSuggestion.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Returns |
Type |
Description |
Object |
|
Overrides
toBuilder()
public CompletionSuggestion.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides