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 AddDocumentOptions
build()
Builds a AddDocumentOptions.AddDocumentOptions.Builder
collectionId(String collectionId)
Set the collectionId.AddDocumentOptions.Builder
environmentId(String environmentId)
Set the environmentId.AddDocumentOptions.Builder
file(File file)
Set the file.AddDocumentOptions.Builder
file(InputStream file)
Set the file.AddDocumentOptions.Builder
fileContentType(String fileContentType)
Set the fileContentType.AddDocumentOptions.Builder
filename(String filename)
Set the filename.AddDocumentOptions.Builder
metadata(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
-