Class AddGrammarOptions.Builder

java.lang.Object
com.ibm.watson.speech_to_text.v1.model.AddGrammarOptions.Builder
Enclosing class:
AddGrammarOptions

public static class AddGrammarOptions.Builder
extends Object
Builder.
  • Constructor Details

    • Builder

      public Builder()
      Instantiates a new builder.
    • Builder

      public Builder​(String customizationId, String grammarName, InputStream grammarFile, String contentType)
      Instantiates a new builder with required properties.
      Parameters:
      customizationId - the customizationId
      grammarName - the grammarName
      grammarFile - the grammarFile
      contentType - the contentType
  • Method Details

    • build

      public AddGrammarOptions build()
      Builds a AddGrammarOptions.
      Returns:
      the new AddGrammarOptions instance
    • customizationId

      public AddGrammarOptions.Builder customizationId​(String customizationId)
      Set the customizationId.
      Parameters:
      customizationId - the customizationId
      Returns:
      the AddGrammarOptions builder
    • grammarName

      public AddGrammarOptions.Builder grammarName​(String grammarName)
      Set the grammarName.
      Parameters:
      grammarName - the grammarName
      Returns:
      the AddGrammarOptions builder
    • grammarFile

      public AddGrammarOptions.Builder grammarFile​(InputStream grammarFile)
      Set the grammarFile.
      Parameters:
      grammarFile - the grammarFile
      Returns:
      the AddGrammarOptions builder
    • contentType

      public AddGrammarOptions.Builder contentType​(String contentType)
      Set the contentType.
      Parameters:
      contentType - the contentType
      Returns:
      the AddGrammarOptions builder
    • allowOverwrite

      public AddGrammarOptions.Builder allowOverwrite​(Boolean allowOverwrite)
      Set the allowOverwrite.
      Parameters:
      allowOverwrite - the allowOverwrite
      Returns:
      the AddGrammarOptions builder
    • grammarFile

      public AddGrammarOptions.Builder grammarFile​(File grammarFile) throws FileNotFoundException
      Set the grammarFile.
      Parameters:
      grammarFile - the grammarFile
      Returns:
      the AddGrammarOptions builder
      Throws:
      FileNotFoundException - if the file could not be found