Package com.ibm.cloud.cloudant.v1.model
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PostChangesOptions.Builder
Builder.static interface
PostChangesOptions.Feed
Query parameter to specify the changes feed type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Boolean
attachments()
Gets the attachments.Boolean
attEncodingInfo()
Gets the attEncodingInfo.Boolean
conflicts()
Gets the conflicts.String
db()
Gets the db.Boolean
descending()
Gets the descending.List<String>
docIds()
Gets the docIds.String
feed()
Gets the feed.List<String>
fields()
Gets the fields.String
filter()
Gets the filter.Long
heartbeat()
Gets the heartbeat.Boolean
includeDocs()
Gets the includeDocs.String
lastEventId()
Gets the lastEventId.Long
limit()
Gets the limit.PostChangesOptions.Builder
newBuilder()
New builder.Map<String,Object>
selector()
Gets the selector.Long
seqInterval()
Gets the seqInterval.String
since()
Gets the since.String
style()
Gets the style.Long
timeout()
Gets the timeout.String
view()
Gets the view.
-
-
-
Method Detail
-
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, 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. In addition to the common boolean operators (`$and`, `$or`, `$not`, `$nor`) there are three combination operators: `$all`, `$elemMatch`, and `$allMatch`. 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.- 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 the `_conflicts` property of the returned document. Ignored if `include_docs` isn't `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 function from a design document that will filter the changes stream emitting only filtered events. For example: `design_doc/filtername`. Additionally, some keywords are reserved for built-in filters: * `_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. * `_selector` - Returns changes for documents that match the `selector` request body parameter. The selector syntax is the same as used for `_find`. * `_view` - Returns changes for documents that match an existing map function in the view specified by the query parameter `view`.- 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. Only applicable for longpoll, continuous, and eventsource feeds. Overrides any timeout to keep the feed alive indefinitely. May also be `true` to use default value of 60000.- 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=<batch size></code>, where <batch size> 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
-
-