Class AddDocumentOptions.Builder
java.lang.Object
com.ibm.watson.discovery.v1.model.AddDocumentOptions.Builder
- Enclosing class:
- AddDocumentOptions
public static class AddDocumentOptions.Builder extends Object
Builder.
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description AddDocumentOptionsbuild()Builds a AddDocumentOptions.AddDocumentOptions.BuildercollectionId(String collectionId)Set the collectionId.AddDocumentOptions.BuilderenvironmentId(String environmentId)Set the environmentId.AddDocumentOptions.Builderfile(File file)Set the file.AddDocumentOptions.Builderfile(InputStream file)Set the file.AddDocumentOptions.BuilderfileContentType(String fileContentType)Set the fileContentType.AddDocumentOptions.Builderfilename(String filename)Set the filename.AddDocumentOptions.Buildermetadata(String metadata)Set the metadata.
-
Constructor Details
-
Builder
public Builder()Instantiates a new builder. -
Builder
Instantiates a new builder with required properties.- Parameters:
environmentId- the environmentIdcollectionId- the collectionId
-
-
Method Details
-
build
Builds a AddDocumentOptions.- Returns:
- the new AddDocumentOptions instance
-
environmentId
Set the environmentId.- Parameters:
environmentId- the environmentId- Returns:
- the AddDocumentOptions builder
-
collectionId
Set the collectionId.- Parameters:
collectionId- the collectionId- Returns:
- the AddDocumentOptions builder
-
file
Set the file.- Parameters:
file- the file- Returns:
- the AddDocumentOptions builder
-
filename
Set the filename.- Parameters:
filename- the filename- Returns:
- the AddDocumentOptions builder
-
fileContentType
Set the fileContentType.- Parameters:
fileContentType- the fileContentType- Returns:
- the AddDocumentOptions builder
-
metadata
Set the metadata.- Parameters:
metadata- the metadata- Returns:
- the AddDocumentOptions builder
-
file
Set the file.- Parameters:
file- the file- Returns:
- the AddDocumentOptions builder
- Throws:
FileNotFoundException- if the file could not be found
-