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 AddDocumentOptionsbuild()Builds a AddDocumentOptions.AddDocumentOptions.BuildercollectionId(String collectionId)Set the collectionId.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.AddDocumentOptions.BuilderprojectId(String projectId)Set the projectId.AddDocumentOptions.BuilderxWatsonDiscoveryForce(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
-