Class AddAudioOptions.Builder

java.lang.Object
com.ibm.watson.speech_to_text.v1.model.AddAudioOptions.Builder
Enclosing class:
AddAudioOptions

public static class AddAudioOptions.Builder
extends Object
Builder.
  • Constructor Details

    • Builder

      public Builder()
      Instantiates a new builder.
    • Builder

      public Builder​(String customizationId, String audioName, InputStream audioResource)
      Instantiates a new builder with required properties.
      Parameters:
      customizationId - the customizationId
      audioName - the audioName
      audioResource - the audioResource
  • Method Details

    • build

      public AddAudioOptions build()
      Builds a AddAudioOptions.
      Returns:
      the new AddAudioOptions instance
    • customizationId

      public AddAudioOptions.Builder customizationId​(String customizationId)
      Set the customizationId.
      Parameters:
      customizationId - the customizationId
      Returns:
      the AddAudioOptions builder
    • audioName

      public AddAudioOptions.Builder audioName​(String audioName)
      Set the audioName.
      Parameters:
      audioName - the audioName
      Returns:
      the AddAudioOptions builder
    • audioResource

      public AddAudioOptions.Builder audioResource​(InputStream audioResource)
      Set the audioResource.
      Parameters:
      audioResource - the audioResource
      Returns:
      the AddAudioOptions builder
    • contentType

      public AddAudioOptions.Builder contentType​(String contentType)
      Set the contentType.
      Parameters:
      contentType - the contentType
      Returns:
      the AddAudioOptions builder
    • containedContentType

      public AddAudioOptions.Builder containedContentType​(String containedContentType)
      Set the containedContentType.
      Parameters:
      containedContentType - the containedContentType
      Returns:
      the AddAudioOptions builder
    • allowOverwrite

      public AddAudioOptions.Builder allowOverwrite​(Boolean allowOverwrite)
      Set the allowOverwrite.
      Parameters:
      allowOverwrite - the allowOverwrite
      Returns:
      the AddAudioOptions builder
    • audioResource

      public AddAudioOptions.Builder audioResource​(File audioResource) throws FileNotFoundException
      Set the audioResource.
      Parameters:
      audioResource - the audioResource
      Returns:
      the AddAudioOptions builder
      Throws:
      FileNotFoundException - if the file could not be found