Class CompletionSuggestion
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.discoveryengine.v1beta.CompletionSuggestion
- All Implemented Interfaces:
CompletionSuggestionOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class CompletionSuggestion
extends com.google.protobuf.GeneratedMessage
implements CompletionSuggestionOrBuilder
Autocomplete suggestions that are imported from Customer.Protobuf type
google.cloud.discoveryengine.v1beta.CompletionSuggestion- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAutocomplete suggestions that are imported from Customer.static enumNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleangetAlternativePhrases(int index) Alternative matching phrases for this suggestion.com.google.protobuf.ByteStringgetAlternativePhrasesBytes(int index) Alternative matching phrases for this suggestion.intAlternative matching phrases for this suggestion.com.google.protobuf.ProtocolStringListAlternative matching phrases for this suggestion.static CompletionSuggestionstatic final com.google.protobuf.Descriptors.DescriptorlongFrequency of this suggestion.doubleGlobal score of this suggestion.If two suggestions have the same groupId, they will not be returned together.com.google.protobuf.ByteStringIf two suggestions have the same groupId, they will not be returned together.doubleThe score of this suggestion within its group.BCP-47 language code of this suggestion.com.google.protobuf.ByteStringBCP-47 language code of this suggestion.com.google.protobuf.Parser<CompletionSuggestion>intRequired.com.google.protobuf.ByteStringRequired.booleanFrequency of this suggestion.booleanGlobal score of this suggestion.inthashCode()protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic CompletionSuggestion.Builderstatic CompletionSuggestion.BuildernewBuilder(CompletionSuggestion prototype) protected CompletionSuggestion.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static CompletionSuggestionparseDelimitedFrom(InputStream input) static CompletionSuggestionparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CompletionSuggestionparseFrom(byte[] data) static CompletionSuggestionparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CompletionSuggestionparseFrom(com.google.protobuf.ByteString data) static CompletionSuggestionparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CompletionSuggestionparseFrom(com.google.protobuf.CodedInputStream input) static CompletionSuggestionparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CompletionSuggestionparseFrom(InputStream input) static CompletionSuggestionparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static CompletionSuggestionparseFrom(ByteBuffer data) static CompletionSuggestionparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<CompletionSuggestion>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
GLOBAL_SCORE_FIELD_NUMBER
public static final int GLOBAL_SCORE_FIELD_NUMBER- See Also:
-
FREQUENCY_FIELD_NUMBER
public static final int FREQUENCY_FIELD_NUMBER- See Also:
-
SUGGESTION_FIELD_NUMBER
public static final int SUGGESTION_FIELD_NUMBER- See Also:
-
LANGUAGE_CODE_FIELD_NUMBER
public static final int LANGUAGE_CODE_FIELD_NUMBER- See Also:
-
GROUP_ID_FIELD_NUMBER
public static final int GROUP_ID_FIELD_NUMBER- See Also:
-
GROUP_SCORE_FIELD_NUMBER
public static final int GROUP_SCORE_FIELD_NUMBER- See Also:
-
ALTERNATIVE_PHRASES_FIELD_NUMBER
public static final int ALTERNATIVE_PHRASES_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getRankingInfoCase
- Specified by:
getRankingInfoCasein interfaceCompletionSuggestionOrBuilder
-
hasGlobalScore
public boolean hasGlobalScore()Global score of this suggestion. Control how this suggestion would be scored / ranked.
double global_score = 2;- Specified by:
hasGlobalScorein interfaceCompletionSuggestionOrBuilder- Returns:
- Whether the globalScore field is set.
-
getGlobalScore
public double getGlobalScore()Global score of this suggestion. Control how this suggestion would be scored / ranked.
double global_score = 2;- Specified by:
getGlobalScorein interfaceCompletionSuggestionOrBuilder- Returns:
- The globalScore.
-
hasFrequency
public boolean hasFrequency()Frequency of this suggestion. Will be used to rank suggestions when score is not available.
int64 frequency = 3;- Specified by:
hasFrequencyin interfaceCompletionSuggestionOrBuilder- Returns:
- Whether the frequency field is set.
-
getFrequency
public long getFrequency()Frequency of this suggestion. Will be used to rank suggestions when score is not available.
int64 frequency = 3;- Specified by:
getFrequencyin interfaceCompletionSuggestionOrBuilder- Returns:
- The frequency.
-
getSuggestion
Required. The suggestion text.
string suggestion = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getSuggestionin interfaceCompletionSuggestionOrBuilder- Returns:
- The suggestion.
-
getSuggestionBytes
public com.google.protobuf.ByteString getSuggestionBytes()Required. The suggestion text.
string suggestion = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getSuggestionBytesin interfaceCompletionSuggestionOrBuilder- Returns:
- The bytes for suggestion.
-
getLanguageCode
BCP-47 language code of this suggestion.
string language_code = 4;- Specified by:
getLanguageCodein interfaceCompletionSuggestionOrBuilder- Returns:
- The languageCode.
-
getLanguageCodeBytes
public com.google.protobuf.ByteString getLanguageCodeBytes()BCP-47 language code of this suggestion.
string language_code = 4;- Specified by:
getLanguageCodeBytesin interfaceCompletionSuggestionOrBuilder- Returns:
- The bytes for languageCode.
-
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;- Specified by:
getGroupIdin interfaceCompletionSuggestionOrBuilder- Returns:
- The groupId.
-
getGroupIdBytes
public com.google.protobuf.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;- Specified by:
getGroupIdBytesin interfaceCompletionSuggestionOrBuilder- Returns:
- The bytes for groupId.
-
getGroupScore
public double getGroupScore()The score of this suggestion within its group.
double group_score = 6;- Specified by:
getGroupScorein interfaceCompletionSuggestionOrBuilder- Returns:
- The groupScore.
-
getAlternativePhrasesList
public com.google.protobuf.ProtocolStringList getAlternativePhrasesList()Alternative matching phrases for this suggestion.
repeated string alternative_phrases = 7;- Specified by:
getAlternativePhrasesListin interfaceCompletionSuggestionOrBuilder- Returns:
- A list containing the alternativePhrases.
-
getAlternativePhrasesCount
public int getAlternativePhrasesCount()Alternative matching phrases for this suggestion.
repeated string alternative_phrases = 7;- Specified by:
getAlternativePhrasesCountin interfaceCompletionSuggestionOrBuilder- Returns:
- The count of alternativePhrases.
-
getAlternativePhrases
Alternative matching phrases for this suggestion.
repeated string alternative_phrases = 7;- Specified by:
getAlternativePhrasesin interfaceCompletionSuggestionOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The alternativePhrases at the given index.
-
getAlternativePhrasesBytes
public com.google.protobuf.ByteString getAlternativePhrasesBytes(int index) Alternative matching phrases for this suggestion.
repeated string alternative_phrases = 7;- Specified by:
getAlternativePhrasesBytesin interfaceCompletionSuggestionOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the alternativePhrases at the given index.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static CompletionSuggestion parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CompletionSuggestion parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CompletionSuggestion parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CompletionSuggestion parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CompletionSuggestion parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static CompletionSuggestion parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static CompletionSuggestion parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static CompletionSuggestion parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static CompletionSuggestion parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static CompletionSuggestion parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected CompletionSuggestion.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-