Class AddDocumentOptions.Builder
java.lang.Object
com.ibm.watson.discovery.v2.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
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.AddDocumentOptions.Builder
projectId(String projectId)
Set the projectId.AddDocumentOptions.Builder
xWatsonDiscoveryForce(Boolean xWatsonDiscoveryForce)
Set the xWatsonDiscoveryForce.
-
Constructor Details
-
Builder
public Builder()Instantiates a new builder. -
Builder
Instantiates a new builder with required properties.- Parameters:
projectId
- the projectIdcollectionId
- the collectionId
-
-
Method Details
-
build
Builds a AddDocumentOptions.- Returns:
- the new AddDocumentOptions instance
-
projectId
Set the projectId.- Parameters:
projectId
- the projectId- 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
-
xWatsonDiscoveryForce
Set the xWatsonDiscoveryForce.- Parameters:
xWatsonDiscoveryForce
- the xWatsonDiscoveryForce- 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
-