Class PostChangesOptions

java.lang.Object
com.ibm.cloud.sdk.core.service.model.GenericModel
com.ibm.cloud.cloudant.v1.model.PostChangesOptions
All Implemented Interfaces:
com.ibm.cloud.sdk.core.service.model.ObjectModel

public class PostChangesOptions extends com.ibm.cloud.sdk.core.service.model.GenericModel
The postChanges options.
  • Method Details

    • newBuilder

      public PostChangesOptions.Builder newBuilder()
      New builder.
      Returns:
      a PostChangesOptions builder
    • db

      public String db()
      Gets the db. Path parameter to specify the database name.
      Returns:
      the db
    • docIds

      public List<String> docIds()
      Gets the docIds. Schema for a list of document IDs.
      Returns:
      the docIds
    • fields

      public List<String> fields()
      Gets the fields. JSON array that uses the field syntax. Use this parameter to specify which fields of a document must be returned. If it is omitted or empty, the entire document is returned.
      Returns:
      the fields
    • selector

      public Map<String,Object> selector()
      Gets the selector. JSON object describing criteria used to select documents. The selector specifies fields in the document, and provides an expression to evaluate with the field content or other data. The selector object must: * Be structured as valid JSON. * Contain a valid query expression. Using a selector is significantly more efficient than using a JavaScript filter function, and is the recommended option if filtering on document attributes only. Elementary selector syntax requires you to specify one or more fields, and the corresponding values required for those fields. You can create more complex selector expressions by combining operators. Operators are identified by the use of a dollar sign `$` prefix in the name field. There are two core types of operators in the selector syntax: * Combination operators: applied at the topmost level of selection. They are used to combine selectors. A combination operator takes a single argument. The argument is either another selector, or an array of selectors. * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied argument. See [the Cloudant Docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operators) for a list of all available combination and conditional operators. * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis of a query. You should include at least one of these in a selector. For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
      Returns:
      the selector
    • lastEventId

      public String lastEventId()
      Gets the lastEventId. Header parameter to specify the ID of the last events received by the server on a previous connection. Overrides `since` query parameter.
      Returns:
      the lastEventId
    • attEncodingInfo

      public Boolean attEncodingInfo()
      Gets the attEncodingInfo. Query parameter to specify whether to include the encoding information in attachment stubs if the particular attachment is compressed.
      Returns:
      the attEncodingInfo
    • attachments

      public Boolean attachments()
      Gets the attachments. Query parameter to specify whether to include attachments bodies in a response.
      Returns:
      the attachments
    • conflicts

      public Boolean conflicts()
      Gets the conflicts. Query parameter to specify whether to include a list of conflicted revisions in each returned document. Active only when `include_docs` is `true`.
      Returns:
      the conflicts
    • descending

      public Boolean descending()
      Gets the descending. Query parameter to specify whether to return the documents in descending by key order.
      Returns:
      the descending
    • feed

      public String feed()
      Gets the feed. Query parameter to specify the changes feed type.
      Returns:
      the feed
    • filter

      public String filter()
      Gets the filter. Query parameter to specify a filter to emit only specific events from the changes stream. The built-in filter types are: * `_design` - Returns only changes to design documents. * `_doc_ids` - Returns changes for documents with an ID matching one specified in `doc_ids` request body parameter. (`POST` only) * `_selector` - Returns changes for documents that match the `selector` request body parameter. The selector syntax is the same as used for `_find`. (`POST` only) * `_view` - Returns changes for documents that match an existing map function in the view specified by the query parameter `view`. Additionally, the value can be the name of a JS filter function from a design document. For example: `design_doc/filtername`. **Note:** For better performance use the built-in `_selector`, `_design` or `_doc_ids` filters rather than JS based `_view` or design document filters. If you need to pass values to change the filtered content use the `_selector` filter type.
      Returns:
      the filter
    • heartbeat

      public Long heartbeat()
      Gets the heartbeat. Query parameter to specify the period in milliseconds after which an empty line is sent in the results. Off by default and only applicable for `continuous` and `eventsource` feeds. Overrides any timeout to keep the feed alive indefinitely. May also be `true` to use a value of `60000`. **Note:** Delivery of heartbeats cannot be relied on at specific intervals. If your application runs in an environment where idle network connections may break, `heartbeat` is not suitable as a keepalive mechanism. Instead, consider one of the following options: * Use the `timeout` parameter with a value that is compatible with your network environment. * Switch to scheduled usage of one of the non-continuous changes feed types (`normal` or `longpoll`). * Use TCP keepalive.
      Returns:
      the heartbeat
    • includeDocs

      public Boolean includeDocs()
      Gets the includeDocs. Query parameter to specify whether to include the full content of the documents in the response.
      Returns:
      the includeDocs
    • limit

      public Long limit()
      Gets the limit. Query parameter to specify the number of returned documents to limit the result to.
      Returns:
      the limit
    • seqInterval

      public Long seqInterval()
      Gets the seqInterval. Query parameter to specify that the update seq should only be calculated with every Nth result returned. When fetching changes in a batch, setting <code>seq_interval=&lt;batch size&gt;</code>, where &lt;batch size&gt; is the number of results requested per batch, load can be reduced on the source database as computing the seq value across many shards (especially in highly-sharded databases) is expensive.
      Returns:
      the seqInterval
    • since

      public String since()
      Gets the since. Query parameter to specify to start the results from the change immediately after the given update sequence. Can be a valid update sequence or `now` value. Default is `0` i.e. all changes.
      Returns:
      the since
    • style

      public String style()
      Gets the style. Query parameter to specify how many revisions are returned in the changes array. The default, `main_only`, will only return the current "winning" revision; all_docs will return all leaf revisions (including conflicts and deleted former conflicts).
      Returns:
      the style
    • timeout

      public Long timeout()
      Gets the timeout. Query parameter to specify the maximum period in milliseconds to wait for a change before the response is sent, even if there are no results. Only applicable for `longpoll` or `continuous` feeds. Default value is specified by `httpd/changes_timeout` configuration option. Note that `60000` value is also the default maximum timeout to prevent undetected dead connections.
      Returns:
      the timeout
    • view

      public String view()
      Gets the view. Query parameter to specify a view function as a filter. Documents pass the filter if the view's map function emits at least one record for them.
      Returns:
      the view