Class QueryNoticesOptions.Builder

java.lang.Object
com.ibm.watson.discovery.v1.model.QueryNoticesOptions.Builder
Enclosing class:
QueryNoticesOptions

public static class QueryNoticesOptions.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 QueryNoticesOptions build()
      Builds a QueryNoticesOptions.
      Returns:
      the new QueryNoticesOptions instance
    • addReturnField

      public QueryNoticesOptions.Builder addReturnField​(String returnField)
      Adds an returnField to xReturn.
      Parameters:
      returnField - the new returnField
      Returns:
      the QueryNoticesOptions builder
    • addSort

      public QueryNoticesOptions.Builder addSort​(String sort)
      Adds an sort to sort.
      Parameters:
      sort - the new sort
      Returns:
      the QueryNoticesOptions builder
    • addPassagesFields

      public QueryNoticesOptions.Builder addPassagesFields​(String passagesFields)
      Adds an passagesFields to passagesFields.
      Parameters:
      passagesFields - the new passagesFields
      Returns:
      the QueryNoticesOptions builder
    • addSimilarDocumentIds

      public QueryNoticesOptions.Builder addSimilarDocumentIds​(String similarDocumentIds)
      Adds an similarDocumentIds to similarDocumentIds.
      Parameters:
      similarDocumentIds - the new similarDocumentIds
      Returns:
      the QueryNoticesOptions builder
    • addSimilarFields

      public QueryNoticesOptions.Builder addSimilarFields​(String similarFields)
      Adds an similarFields to similarFields.
      Parameters:
      similarFields - the new similarFields
      Returns:
      the QueryNoticesOptions builder
    • environmentId

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

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

      public QueryNoticesOptions.Builder filter​(String filter)
      Set the filter.
      Parameters:
      filter - the filter
      Returns:
      the QueryNoticesOptions builder
    • query

      public QueryNoticesOptions.Builder query​(String query)
      Set the query.
      Parameters:
      query - the query
      Returns:
      the QueryNoticesOptions builder
    • naturalLanguageQuery

      public QueryNoticesOptions.Builder naturalLanguageQuery​(String naturalLanguageQuery)
      Set the naturalLanguageQuery.
      Parameters:
      naturalLanguageQuery - the naturalLanguageQuery
      Returns:
      the QueryNoticesOptions builder
    • passages

      public QueryNoticesOptions.Builder passages​(Boolean passages)
      Set the passages.
      Parameters:
      passages - the passages
      Returns:
      the QueryNoticesOptions builder
    • aggregation

      public QueryNoticesOptions.Builder aggregation​(String aggregation)
      Set the aggregation.
      Parameters:
      aggregation - the aggregation
      Returns:
      the QueryNoticesOptions builder
    • count

      public QueryNoticesOptions.Builder count​(long count)
      Set the count.
      Parameters:
      count - the count
      Returns:
      the QueryNoticesOptions builder
    • xReturn

      public QueryNoticesOptions.Builder xReturn​(List<String> xReturn)
      Set the xReturn. Existing xReturn will be replaced.
      Parameters:
      xReturn - the xReturn
      Returns:
      the QueryNoticesOptions builder
    • offset

      public QueryNoticesOptions.Builder offset​(long offset)
      Set the offset.
      Parameters:
      offset - the offset
      Returns:
      the QueryNoticesOptions builder
    • sort

      public QueryNoticesOptions.Builder sort​(List<String> sort)
      Set the sort. Existing sort will be replaced.
      Parameters:
      sort - the sort
      Returns:
      the QueryNoticesOptions builder
    • highlight

      public QueryNoticesOptions.Builder highlight​(Boolean highlight)
      Set the highlight.
      Parameters:
      highlight - the highlight
      Returns:
      the QueryNoticesOptions builder
    • passagesFields

      public QueryNoticesOptions.Builder passagesFields​(List<String> passagesFields)
      Set the passagesFields. Existing passagesFields will be replaced.
      Parameters:
      passagesFields - the passagesFields
      Returns:
      the QueryNoticesOptions builder
    • passagesCount

      public QueryNoticesOptions.Builder passagesCount​(long passagesCount)
      Set the passagesCount.
      Parameters:
      passagesCount - the passagesCount
      Returns:
      the QueryNoticesOptions builder
    • passagesCharacters

      public QueryNoticesOptions.Builder passagesCharacters​(long passagesCharacters)
      Set the passagesCharacters.
      Parameters:
      passagesCharacters - the passagesCharacters
      Returns:
      the QueryNoticesOptions builder
    • deduplicateField

      public QueryNoticesOptions.Builder deduplicateField​(String deduplicateField)
      Set the deduplicateField.
      Parameters:
      deduplicateField - the deduplicateField
      Returns:
      the QueryNoticesOptions builder
    • similar

      public QueryNoticesOptions.Builder similar​(Boolean similar)
      Set the similar.
      Parameters:
      similar - the similar
      Returns:
      the QueryNoticesOptions builder
    • similarDocumentIds

      public QueryNoticesOptions.Builder similarDocumentIds​(List<String> similarDocumentIds)
      Set the similarDocumentIds. Existing similarDocumentIds will be replaced.
      Parameters:
      similarDocumentIds - the similarDocumentIds
      Returns:
      the QueryNoticesOptions builder
    • similarFields

      public QueryNoticesOptions.Builder similarFields​(List<String> similarFields)
      Set the similarFields. Existing similarFields will be replaced.
      Parameters:
      similarFields - the similarFields
      Returns:
      the QueryNoticesOptions builder