Class CreateSentimentModelOptions.Builder
java.lang.Object
com.ibm.watson.natural_language_understanding.v1.model.CreateSentimentModelOptions.Builder
- Enclosing class:
- CreateSentimentModelOptions
public static class CreateSentimentModelOptions.Builder extends Object
Builder.
-
Constructor Summary
Constructors Constructor Description Builder()
Instantiates a new builder.Builder(String language, InputStream trainingData)
Instantiates a new builder with required properties. -
Method Summary
Modifier and Type Method Description CreateSentimentModelOptions
build()
Builds a CreateSentimentModelOptions.CreateSentimentModelOptions.Builder
description(String description)
Set the description.CreateSentimentModelOptions.Builder
language(String language)
Set the language.CreateSentimentModelOptions.Builder
modelVersion(String modelVersion)
Set the modelVersion.CreateSentimentModelOptions.Builder
name(String name)
Set the name.CreateSentimentModelOptions.Builder
trainingData(File trainingData)
Set the trainingData.CreateSentimentModelOptions.Builder
trainingData(InputStream trainingData)
Set the trainingData.CreateSentimentModelOptions.Builder
userMetadata(Map<String,Object> userMetadata)
Set the userMetadata.CreateSentimentModelOptions.Builder
versionDescription(String versionDescription)
Set the versionDescription.CreateSentimentModelOptions.Builder
workspaceId(String workspaceId)
Set the workspaceId.
-
Constructor Details
-
Builder
public Builder()Instantiates a new builder. -
Builder
Instantiates a new builder with required properties.- Parameters:
language
- the languagetrainingData
- the trainingData
-
-
Method Details
-
build
Builds a CreateSentimentModelOptions.- Returns:
- the new CreateSentimentModelOptions instance
-
language
Set the language.- Parameters:
language
- the language- Returns:
- the CreateSentimentModelOptions builder
-
trainingData
Set the trainingData.- Parameters:
trainingData
- the trainingData- Returns:
- the CreateSentimentModelOptions builder
-
name
Set the name.- Parameters:
name
- the name- Returns:
- the CreateSentimentModelOptions builder
-
userMetadata
Set the userMetadata.- Parameters:
userMetadata
- the userMetadata- Returns:
- the CreateSentimentModelOptions builder
-
description
Set the description.- Parameters:
description
- the description- Returns:
- the CreateSentimentModelOptions builder
-
modelVersion
Set the modelVersion.- Parameters:
modelVersion
- the modelVersion- Returns:
- the CreateSentimentModelOptions builder
-
workspaceId
Set the workspaceId.- Parameters:
workspaceId
- the workspaceId- Returns:
- the CreateSentimentModelOptions builder
-
versionDescription
Set the versionDescription.- Parameters:
versionDescription
- the versionDescription- Returns:
- the CreateSentimentModelOptions builder
-
trainingData
public CreateSentimentModelOptions.Builder trainingData(File trainingData) throws FileNotFoundExceptionSet the trainingData.- Parameters:
trainingData
- the trainingData- Returns:
- the CreateSentimentModelOptions builder
- Throws:
FileNotFoundException
- if the file could not be found
-