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 Summary
-
Method Summary
Modifier and Type Method Description AddGrammarOptions.Builder
allowOverwrite(Boolean allowOverwrite)
Set the allowOverwrite.AddGrammarOptions
build()
Builds a AddGrammarOptions.AddGrammarOptions.Builder
contentType(String contentType)
Set the contentType.AddGrammarOptions.Builder
customizationId(String customizationId)
Set the customizationId.AddGrammarOptions.Builder
grammarFile(File grammarFile)
Set the grammarFile.AddGrammarOptions.Builder
grammarFile(InputStream grammarFile)
Set the grammarFile.AddGrammarOptions.Builder
grammarName(String grammarName)
Set the grammarName.
-
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 customizationIdgrammarName
- the grammarNamegrammarFile
- the grammarFilecontentType
- the contentType
-
-
Method Details
-
build
Builds a AddGrammarOptions.- Returns:
- the new AddGrammarOptions instance
-
customizationId
Set the customizationId.- Parameters:
customizationId
- the customizationId- Returns:
- the AddGrammarOptions builder
-
grammarName
Set the grammarName.- Parameters:
grammarName
- the grammarName- Returns:
- the AddGrammarOptions builder
-
grammarFile
Set the grammarFile.- Parameters:
grammarFile
- the grammarFile- Returns:
- the AddGrammarOptions builder
-
contentType
Set the contentType.- Parameters:
contentType
- the contentType- Returns:
- the AddGrammarOptions builder
-
allowOverwrite
Set the allowOverwrite.- Parameters:
allowOverwrite
- the allowOverwrite- Returns:
- the AddGrammarOptions builder
-
grammarFile
Set the grammarFile.- Parameters:
grammarFile
- the grammarFile- Returns:
- the AddGrammarOptions builder
- Throws:
FileNotFoundException
- if the file could not be found
-