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 Details

    • Builder

      public Builder()
      Instantiates a new builder.
    • Builder

      public Builder​(String environmentId, String collectionId)
      Instantiates a new builder with required properties.
      Parameters:
      environmentId - the environmentId
      collectionId - the collectionId
  • Method Details

    • build

      public AddDocumentOptions build()
      Builds a AddDocumentOptions.
      Returns:
      the new AddDocumentOptions instance
    • environmentId

      public AddDocumentOptions.Builder environmentId​(String environmentId)
      Set the environmentId.
      Parameters:
      environmentId - the environmentId
      Returns:
      the AddDocumentOptions builder
    • collectionId

      public AddDocumentOptions.Builder collectionId​(String collectionId)
      Set the collectionId.
      Parameters:
      collectionId - the collectionId
      Returns:
      the AddDocumentOptions builder
    • file

      public AddDocumentOptions.Builder file​(InputStream file)
      Set the file.
      Parameters:
      file - the file
      Returns:
      the AddDocumentOptions builder
    • filename

      public AddDocumentOptions.Builder filename​(String filename)
      Set the filename.
      Parameters:
      filename - the filename
      Returns:
      the AddDocumentOptions builder
    • fileContentType

      public AddDocumentOptions.Builder fileContentType​(String fileContentType)
      Set the fileContentType.
      Parameters:
      fileContentType - the fileContentType
      Returns:
      the AddDocumentOptions builder
    • metadata

      public AddDocumentOptions.Builder metadata​(String 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