public static final class CompletionSuggestion.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<CompletionSuggestion.Builder> implements CompletionSuggestionOrBuilder
Autocomplete suggestions that are imported from Customer.Protobuf type
google.cloud.discoveryengine.v1alpha.CompletionSuggestion| Modifier and Type | Method and Description |
|---|---|
CompletionSuggestion.Builder |
addAllAlternativePhrases(Iterable<String> values)
Alternative matching phrases for this suggestion.
|
CompletionSuggestion.Builder |
addAlternativePhrases(String value)
Alternative matching phrases for this suggestion.
|
CompletionSuggestion.Builder |
addAlternativePhrasesBytes(com.google.protobuf.ByteString value)
Alternative matching phrases for this suggestion.
|
CompletionSuggestion.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
CompletionSuggestion |
build() |
CompletionSuggestion |
buildPartial() |
CompletionSuggestion.Builder |
clear() |
CompletionSuggestion.Builder |
clearAlternativePhrases()
Alternative matching phrases for this suggestion.
|
CompletionSuggestion.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
CompletionSuggestion.Builder |
clearFrequency()
Frequency of this suggestion.
|
CompletionSuggestion.Builder |
clearGlobalScore()
Global score of this suggestion.
|
CompletionSuggestion.Builder |
clearGroupId()
If two suggestions have the same groupId, they will not be
returned together.
|
CompletionSuggestion.Builder |
clearGroupScore()
The score of this suggestion within its group.
|
CompletionSuggestion.Builder |
clearLanguageCode()
BCP-47 language code of this suggestion.
|
CompletionSuggestion.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
CompletionSuggestion.Builder |
clearRankingInfo() |
CompletionSuggestion.Builder |
clearSuggestion()
Required.
|
CompletionSuggestion.Builder |
clone() |
String |
getAlternativePhrases(int index)
Alternative matching phrases for this suggestion.
|
com.google.protobuf.ByteString |
getAlternativePhrasesBytes(int index)
Alternative matching phrases for this suggestion.
|
int |
getAlternativePhrasesCount()
Alternative matching phrases for this suggestion.
|
com.google.protobuf.ProtocolStringList |
getAlternativePhrasesList()
Alternative matching phrases for this suggestion.
|
CompletionSuggestion |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
long |
getFrequency()
Frequency of this suggestion.
|
double |
getGlobalScore()
Global score of this suggestion.
|
String |
getGroupId()
If two suggestions have the same groupId, they will not be
returned together.
|
com.google.protobuf.ByteString |
getGroupIdBytes()
If two suggestions have the same groupId, they will not be
returned together.
|
double |
getGroupScore()
The score of this suggestion within its group.
|
String |
getLanguageCode()
BCP-47 language code of this suggestion.
|
com.google.protobuf.ByteString |
getLanguageCodeBytes()
BCP-47 language code of this suggestion.
|
CompletionSuggestion.RankingInfoCase |
getRankingInfoCase() |
String |
getSuggestion()
Required.
|
com.google.protobuf.ByteString |
getSuggestionBytes()
Required.
|
boolean |
hasFrequency()
Frequency of this suggestion.
|
boolean |
hasGlobalScore()
Global score of this suggestion.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
CompletionSuggestion.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
CompletionSuggestion.Builder |
mergeFrom(CompletionSuggestion other) |
CompletionSuggestion.Builder |
mergeFrom(com.google.protobuf.Message other) |
CompletionSuggestion.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
CompletionSuggestion.Builder |
setAlternativePhrases(int index,
String value)
Alternative matching phrases for this suggestion.
|
CompletionSuggestion.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
CompletionSuggestion.Builder |
setFrequency(long value)
Frequency of this suggestion.
|
CompletionSuggestion.Builder |
setGlobalScore(double value)
Global score of this suggestion.
|
CompletionSuggestion.Builder |
setGroupId(String value)
If two suggestions have the same groupId, they will not be
returned together.
|
CompletionSuggestion.Builder |
setGroupIdBytes(com.google.protobuf.ByteString value)
If two suggestions have the same groupId, they will not be
returned together.
|
CompletionSuggestion.Builder |
setGroupScore(double value)
The score of this suggestion within its group.
|
CompletionSuggestion.Builder |
setLanguageCode(String value)
BCP-47 language code of this suggestion.
|
CompletionSuggestion.Builder |
setLanguageCodeBytes(com.google.protobuf.ByteString value)
BCP-47 language code of this suggestion.
|
CompletionSuggestion.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
CompletionSuggestion.Builder |
setSuggestion(String value)
Required.
|
CompletionSuggestion.Builder |
setSuggestionBytes(com.google.protobuf.ByteString value)
Required.
|
CompletionSuggestion.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<CompletionSuggestion.Builder>public CompletionSuggestion.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<CompletionSuggestion.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<CompletionSuggestion.Builder>public CompletionSuggestion getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic CompletionSuggestion build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic CompletionSuggestion buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic CompletionSuggestion.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<CompletionSuggestion.Builder>public CompletionSuggestion.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<CompletionSuggestion.Builder>public CompletionSuggestion.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<CompletionSuggestion.Builder>public CompletionSuggestion.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<CompletionSuggestion.Builder>public CompletionSuggestion.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<CompletionSuggestion.Builder>public CompletionSuggestion.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<CompletionSuggestion.Builder>public CompletionSuggestion.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<CompletionSuggestion.Builder>public CompletionSuggestion.Builder mergeFrom(CompletionSuggestion other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<CompletionSuggestion.Builder>public CompletionSuggestion.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<CompletionSuggestion.Builder>IOExceptionpublic CompletionSuggestion.RankingInfoCase getRankingInfoCase()
getRankingInfoCase in interface CompletionSuggestionOrBuilderpublic CompletionSuggestion.Builder clearRankingInfo()
public boolean hasGlobalScore()
Global score of this suggestion. Control how this suggestion would be scored / ranked.
double global_score = 2;hasGlobalScore in interface CompletionSuggestionOrBuilderpublic double getGlobalScore()
Global score of this suggestion. Control how this suggestion would be scored / ranked.
double global_score = 2;getGlobalScore in interface CompletionSuggestionOrBuilderpublic CompletionSuggestion.Builder setGlobalScore(double value)
Global score of this suggestion. Control how this suggestion would be scored / ranked.
double global_score = 2;value - The globalScore to set.public CompletionSuggestion.Builder clearGlobalScore()
Global score of this suggestion. Control how this suggestion would be scored / ranked.
double global_score = 2;public boolean hasFrequency()
Frequency of this suggestion. Will be used to rank suggestions when score is not available.
int64 frequency = 3;hasFrequency in interface CompletionSuggestionOrBuilderpublic long getFrequency()
Frequency of this suggestion. Will be used to rank suggestions when score is not available.
int64 frequency = 3;getFrequency in interface CompletionSuggestionOrBuilderpublic CompletionSuggestion.Builder setFrequency(long value)
Frequency of this suggestion. Will be used to rank suggestions when score is not available.
int64 frequency = 3;value - The frequency to set.public CompletionSuggestion.Builder clearFrequency()
Frequency of this suggestion. Will be used to rank suggestions when score is not available.
int64 frequency = 3;public String getSuggestion()
Required. The suggestion text.
string suggestion = 1 [(.google.api.field_behavior) = REQUIRED];getSuggestion in interface CompletionSuggestionOrBuilderpublic com.google.protobuf.ByteString getSuggestionBytes()
Required. The suggestion text.
string suggestion = 1 [(.google.api.field_behavior) = REQUIRED];getSuggestionBytes in interface CompletionSuggestionOrBuilderpublic CompletionSuggestion.Builder setSuggestion(String value)
Required. The suggestion text.
string suggestion = 1 [(.google.api.field_behavior) = REQUIRED];value - The suggestion to set.public CompletionSuggestion.Builder clearSuggestion()
Required. The suggestion text.
string suggestion = 1 [(.google.api.field_behavior) = REQUIRED];public CompletionSuggestion.Builder setSuggestionBytes(com.google.protobuf.ByteString value)
Required. The suggestion text.
string suggestion = 1 [(.google.api.field_behavior) = REQUIRED];value - The bytes for suggestion to set.public String getLanguageCode()
BCP-47 language code of this suggestion.
string language_code = 4;getLanguageCode in interface CompletionSuggestionOrBuilderpublic com.google.protobuf.ByteString getLanguageCodeBytes()
BCP-47 language code of this suggestion.
string language_code = 4;getLanguageCodeBytes in interface CompletionSuggestionOrBuilderpublic CompletionSuggestion.Builder setLanguageCode(String value)
BCP-47 language code of this suggestion.
string language_code = 4;value - The languageCode to set.public CompletionSuggestion.Builder clearLanguageCode()
BCP-47 language code of this suggestion.
string language_code = 4;public CompletionSuggestion.Builder setLanguageCodeBytes(com.google.protobuf.ByteString value)
BCP-47 language code of this suggestion.
string language_code = 4;value - The bytes for languageCode to set.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;getGroupId in interface CompletionSuggestionOrBuilderpublic 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;getGroupIdBytes in interface CompletionSuggestionOrBuilderpublic CompletionSuggestion.Builder setGroupId(String value)
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;value - The groupId to set.public CompletionSuggestion.Builder clearGroupId()
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;public CompletionSuggestion.Builder setGroupIdBytes(com.google.protobuf.ByteString value)
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;value - The bytes for groupId to set.public double getGroupScore()
The score of this suggestion within its group.
double group_score = 6;getGroupScore in interface CompletionSuggestionOrBuilderpublic CompletionSuggestion.Builder setGroupScore(double value)
The score of this suggestion within its group.
double group_score = 6;value - The groupScore to set.public CompletionSuggestion.Builder clearGroupScore()
The score of this suggestion within its group.
double group_score = 6;public com.google.protobuf.ProtocolStringList getAlternativePhrasesList()
Alternative matching phrases for this suggestion.
repeated string alternative_phrases = 7;getAlternativePhrasesList in interface CompletionSuggestionOrBuilderpublic int getAlternativePhrasesCount()
Alternative matching phrases for this suggestion.
repeated string alternative_phrases = 7;getAlternativePhrasesCount in interface CompletionSuggestionOrBuilderpublic String getAlternativePhrases(int index)
Alternative matching phrases for this suggestion.
repeated string alternative_phrases = 7;getAlternativePhrases in interface CompletionSuggestionOrBuilderindex - The index of the element to return.public com.google.protobuf.ByteString getAlternativePhrasesBytes(int index)
Alternative matching phrases for this suggestion.
repeated string alternative_phrases = 7;getAlternativePhrasesBytes in interface CompletionSuggestionOrBuilderindex - The index of the value to return.public CompletionSuggestion.Builder setAlternativePhrases(int index, String value)
Alternative matching phrases for this suggestion.
repeated string alternative_phrases = 7;index - The index to set the value at.value - The alternativePhrases to set.public CompletionSuggestion.Builder addAlternativePhrases(String value)
Alternative matching phrases for this suggestion.
repeated string alternative_phrases = 7;value - The alternativePhrases to add.public CompletionSuggestion.Builder addAllAlternativePhrases(Iterable<String> values)
Alternative matching phrases for this suggestion.
repeated string alternative_phrases = 7;values - The alternativePhrases to add.public CompletionSuggestion.Builder clearAlternativePhrases()
Alternative matching phrases for this suggestion.
repeated string alternative_phrases = 7;public CompletionSuggestion.Builder addAlternativePhrasesBytes(com.google.protobuf.ByteString value)
Alternative matching phrases for this suggestion.
repeated string alternative_phrases = 7;value - The bytes of the alternativePhrases to add.public final CompletionSuggestion.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<CompletionSuggestion.Builder>public final CompletionSuggestion.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<CompletionSuggestion.Builder>Copyright © 2024 Google LLC. All rights reserved.