Class SpellingCorrection.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SpellingCorrection.Builder>
com.google.cloud.talent.v4.SpellingCorrection.Builder
All Implemented Interfaces:
SpellingCorrectionOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
SpellingCorrection

public static final class SpellingCorrection.Builder extends com.google.protobuf.GeneratedMessage.Builder<SpellingCorrection.Builder> implements SpellingCorrectionOrBuilder
 Spell check result.
 
Protobuf type google.cloud.talent.v4.SpellingCorrection
  • 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.Builder<SpellingCorrection.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<SpellingCorrection.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<SpellingCorrection.Builder>
    • getDefaultInstanceForType

      public SpellingCorrection getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public SpellingCorrection build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public SpellingCorrection buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public SpellingCorrection.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<SpellingCorrection.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<SpellingCorrection.Builder>
    • mergeFrom

      public SpellingCorrection.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<SpellingCorrection.Builder>
      Throws:
      IOException
    • getCorrected

      public boolean getCorrected()
       Indicates if the query was corrected by the spell checker.
       
      bool corrected = 1;
      Specified by:
      getCorrected in interface SpellingCorrectionOrBuilder
      Returns:
      The corrected.
    • setCorrected

      public SpellingCorrection.Builder setCorrected(boolean value)
       Indicates if the query was corrected by the spell checker.
       
      bool corrected = 1;
      Parameters:
      value - The corrected to set.
      Returns:
      This builder for chaining.
    • clearCorrected

      public SpellingCorrection.Builder clearCorrected()
       Indicates if the query was corrected by the spell checker.
       
      bool corrected = 1;
      Returns:
      This builder for chaining.
    • getCorrectedText

      public String getCorrectedText()
       Correction output consisting of the corrected keyword string.
       
      string corrected_text = 2;
      Specified by:
      getCorrectedText in interface SpellingCorrectionOrBuilder
      Returns:
      The correctedText.
    • getCorrectedTextBytes

      public com.google.protobuf.ByteString getCorrectedTextBytes()
       Correction output consisting of the corrected keyword string.
       
      string corrected_text = 2;
      Specified by:
      getCorrectedTextBytes in interface SpellingCorrectionOrBuilder
      Returns:
      The bytes for correctedText.
    • setCorrectedText

      public SpellingCorrection.Builder setCorrectedText(String value)
       Correction output consisting of the corrected keyword string.
       
      string corrected_text = 2;
      Parameters:
      value - The correctedText to set.
      Returns:
      This builder for chaining.
    • clearCorrectedText

      public SpellingCorrection.Builder clearCorrectedText()
       Correction output consisting of the corrected keyword string.
       
      string corrected_text = 2;
      Returns:
      This builder for chaining.
    • setCorrectedTextBytes

      public SpellingCorrection.Builder setCorrectedTextBytes(com.google.protobuf.ByteString value)
       Correction output consisting of the corrected keyword string.
       
      string corrected_text = 2;
      Parameters:
      value - The bytes for correctedText to set.
      Returns:
      This builder for chaining.
    • getCorrectedHtml

      public String getCorrectedHtml()
       Corrected output with html tags to highlight the corrected words.
       Corrected words are called out with the "<b><i>...</i></b>" html tags.
      
       For example, the user input query is "software enginear", where the second
       word, "enginear," is incorrect. It should be "engineer". When spelling
       correction is enabled, this value is
       "software <b><i>engineer</i></b>".
       
      string corrected_html = 3;
      Specified by:
      getCorrectedHtml in interface SpellingCorrectionOrBuilder
      Returns:
      The correctedHtml.
    • getCorrectedHtmlBytes

      public com.google.protobuf.ByteString getCorrectedHtmlBytes()
       Corrected output with html tags to highlight the corrected words.
       Corrected words are called out with the "<b><i>...</i></b>" html tags.
      
       For example, the user input query is "software enginear", where the second
       word, "enginear," is incorrect. It should be "engineer". When spelling
       correction is enabled, this value is
       "software <b><i>engineer</i></b>".
       
      string corrected_html = 3;
      Specified by:
      getCorrectedHtmlBytes in interface SpellingCorrectionOrBuilder
      Returns:
      The bytes for correctedHtml.
    • setCorrectedHtml

      public SpellingCorrection.Builder setCorrectedHtml(String value)
       Corrected output with html tags to highlight the corrected words.
       Corrected words are called out with the "<b><i>...</i></b>" html tags.
      
       For example, the user input query is "software enginear", where the second
       word, "enginear," is incorrect. It should be "engineer". When spelling
       correction is enabled, this value is
       "software <b><i>engineer</i></b>".
       
      string corrected_html = 3;
      Parameters:
      value - The correctedHtml to set.
      Returns:
      This builder for chaining.
    • clearCorrectedHtml

      public SpellingCorrection.Builder clearCorrectedHtml()
       Corrected output with html tags to highlight the corrected words.
       Corrected words are called out with the "<b><i>...</i></b>" html tags.
      
       For example, the user input query is "software enginear", where the second
       word, "enginear," is incorrect. It should be "engineer". When spelling
       correction is enabled, this value is
       "software <b><i>engineer</i></b>".
       
      string corrected_html = 3;
      Returns:
      This builder for chaining.
    • setCorrectedHtmlBytes

      public SpellingCorrection.Builder setCorrectedHtmlBytes(com.google.protobuf.ByteString value)
       Corrected output with html tags to highlight the corrected words.
       Corrected words are called out with the "<b><i>...</i></b>" html tags.
      
       For example, the user input query is "software enginear", where the second
       word, "enginear," is incorrect. It should be "engineer". When spelling
       correction is enabled, this value is
       "software <b><i>engineer</i></b>".
       
      string corrected_html = 3;
      Parameters:
      value - The bytes for correctedHtml to set.
      Returns:
      This builder for chaining.