Package com.mailosaur.models
Class MessageListParams
java.lang.Object
com.mailosaur.models.MessageListParams
Parameters for message listing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondir()Optionally limits results based on the direction (`Sent` or `Received`), with the default being `Received`.Gets the limit on the number of results to be returned per page.page()Gets the page index, used in conjunction with `itemsPerPage` to support pagination.Gets the receivedAfter timestamp.server()Gets the identifier of the server hosting the messages.Optionally limits results based on the direction (`Sent` or `Received`), with the default being `Received`.withItemsPerPage(int itemsPerPage) Set the limit on the number of results to be returned per page.withPage(int page) Sets the page index, used in conjunction with `itemsPerPage` to support pagination.withReceivedAfter(long receivedAfter) Limits results to only messages received after this timestamp.withServer(String server) Sets the identifier of the server hosting the messages.
-
Constructor Details
-
MessageListParams
public MessageListParams()
-
-
Method Details
-
server
Gets the identifier of the server hosting the messages.- Returns:
- The identifier of the server hosting the messages.
-
receivedAfter
Gets the receivedAfter timestamp.- Returns:
- The receivedAfter timestamp.
-
page
Gets the page index, used in conjunction with `itemsPerPage` to support pagination.- Returns:
- Gets the page index (for pagination).
-
itemsPerPage
Gets the limit on the number of results to be returned per page. Can be set between 1 and 1000 items, the default is 50.- Returns:
- The number of results to be returned per page.
-
dir
Optionally limits results based on the direction (`Sent` or `Received`), with the default being `Received`.- Returns:
- Either `Sent` or `Received`.
-
withServer
Sets the identifier of the server hosting the messages.- Parameters:
server- The identifier of the server hosting the messages.- Returns:
- the MessageSearchParams object itself.
-
withReceivedAfter
Limits results to only messages received after this timestamp.- Parameters:
receivedAfter- Limits results to only messages received after this timestamp.- Returns:
- the MessageSearchParams object itself.
-
withPage
Sets the page index, used in conjunction with `itemsPerPage` to support pagination.- Parameters:
page- Used in conjunction with `itemsPerPage` to support pagination.- Returns:
- the MessageSearchParams object itself.
-
withItemsPerPage
Set the limit on the number of results to be returned per page. Can be set between 1 and 1000 items, the default is 50.- Parameters:
itemsPerPage- A limit on the number of results to be returned per page. Can be set between 1 and 1000 items, the default is 50.- Returns:
- the MessageSearchParams object itself.
-
withDir
Optionally limits results based on the direction (`Sent` or `Received`), with the default being `Received`.- Parameters:
dir- Can be either `Sent` or `Received`, with the default being `Received`.- Returns:
- the MessageSearchParams object itself.
-