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:
  • 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:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getRankingInfoCase

      public CompletionSuggestion.RankingInfoCase getRankingInfoCase()
      Specified by:
      getRankingInfoCase in interface CompletionSuggestionOrBuilder
    • hasGlobalScore

      public boolean hasGlobalScore()
       Global score of this suggestion. Control how this suggestion would be
       scored / ranked.
       
      double global_score = 2;
      Specified by:
      hasGlobalScore in interface CompletionSuggestionOrBuilder
      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:
      getGlobalScore in interface CompletionSuggestionOrBuilder
      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:
      hasFrequency in interface CompletionSuggestionOrBuilder
      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:
      getFrequency in interface CompletionSuggestionOrBuilder
      Returns:
      The frequency.
    • getSuggestion

      public String getSuggestion()
       Required. The suggestion text.
       
      string suggestion = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getSuggestion in interface CompletionSuggestionOrBuilder
      Returns:
      The suggestion.
    • getSuggestionBytes

      public com.google.protobuf.ByteString getSuggestionBytes()
       Required. The suggestion text.
       
      string suggestion = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getSuggestionBytes in interface CompletionSuggestionOrBuilder
      Returns:
      The bytes for suggestion.
    • getLanguageCode

      public String getLanguageCode()
       BCP-47 language code of this suggestion.
       
      string language_code = 4;
      Specified by:
      getLanguageCode in interface CompletionSuggestionOrBuilder
      Returns:
      The languageCode.
    • getLanguageCodeBytes

      public com.google.protobuf.ByteString getLanguageCodeBytes()
       BCP-47 language code of this suggestion.
       
      string language_code = 4;
      Specified by:
      getLanguageCodeBytes in interface CompletionSuggestionOrBuilder
      Returns:
      The bytes for languageCode.
    • 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;
      Specified by:
      getGroupId in interface CompletionSuggestionOrBuilder
      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:
      getGroupIdBytes in interface CompletionSuggestionOrBuilder
      Returns:
      The bytes for groupId.
    • getGroupScore

      public double getGroupScore()
       The score of this suggestion within its group.
       
      double group_score = 6;
      Specified by:
      getGroupScore in interface CompletionSuggestionOrBuilder
      Returns:
      The groupScore.
    • getAlternativePhrasesList

      public com.google.protobuf.ProtocolStringList getAlternativePhrasesList()
       Alternative matching phrases for this suggestion.
       
      repeated string alternative_phrases = 7;
      Specified by:
      getAlternativePhrasesList in interface CompletionSuggestionOrBuilder
      Returns:
      A list containing the alternativePhrases.
    • getAlternativePhrasesCount

      public int getAlternativePhrasesCount()
       Alternative matching phrases for this suggestion.
       
      repeated string alternative_phrases = 7;
      Specified by:
      getAlternativePhrasesCount in interface CompletionSuggestionOrBuilder
      Returns:
      The count of alternativePhrases.
    • getAlternativePhrases

      public String getAlternativePhrases(int index)
       Alternative matching phrases for this suggestion.
       
      repeated string alternative_phrases = 7;
      Specified by:
      getAlternativePhrases in interface CompletionSuggestionOrBuilder
      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:
      getAlternativePhrasesBytes in interface CompletionSuggestionOrBuilder
      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:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.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

      public static CompletionSuggestion parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static CompletionSuggestion parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static CompletionSuggestion parseDelimitedFrom(InputStream input) throws IOException
      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

      public CompletionSuggestion.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static CompletionSuggestion.Builder newBuilder()
    • newBuilder

      public static CompletionSuggestion.Builder newBuilder(CompletionSuggestion prototype)
    • toBuilder

      public CompletionSuggestion.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected CompletionSuggestion.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static CompletionSuggestion getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<CompletionSuggestion> parser()
    • getParserForType

      public com.google.protobuf.Parser<CompletionSuggestion> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public CompletionSuggestion getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder