-
public final class WaitForConditionsConditions that a
waitForXEmailsendpoint operates on. The methods wait until given conditions are met or a timeout is reached. If the conditions are met without needing to wait the results will be returned immediately. Can includeunreadOnlyto ignore already read emails that were returned in an API call or viewing in the dashboard. Can also include matches for emails containingfrom,subject,hasAttachmentsetc.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumWaitForConditions.CountTypeHow should the found count be compared to the expected count. Values: eXACTLY,aTLEAST
public enumWaitForConditions.SortDirectionDirection to sort matching emails by created time Values: aSC,dESC
-
Field Summary
Fields Modifier and Type Field Description private final UUIDinboxIdprivate final Longtimeoutprivate final OffsetDateTimebeforeprivate final Integercountprivate final WaitForConditions.CountTypecountTypeprivate final LongdelayTimeoutprivate final List<MatchOption>matchesprivate final OffsetDateTimesinceprivate final WaitForConditions.SortDirectionsortDirectionprivate final BooleanunreadOnly
-
Constructor Summary
Constructors Constructor Description WaitForConditions(UUID inboxId, Long timeout, OffsetDateTime before, Integer count, WaitForConditions.CountType countType, Long delayTimeout, List<MatchOption> matches, OffsetDateTime since, WaitForConditions.SortDirection sortDirection, Boolean unreadOnly)
-
Method Summary
Modifier and Type Method Description final UUIDgetInboxId()final LonggetTimeout()final OffsetDateTimegetBefore()final IntegergetCount()final WaitForConditions.CountTypegetCountType()final LonggetDelayTimeout()final List<MatchOption>getMatches()final OffsetDateTimegetSince()final WaitForConditions.SortDirectiongetSortDirection()final BooleangetUnreadOnly()-
-
Constructor Detail
-
WaitForConditions
WaitForConditions(UUID inboxId, Long timeout, OffsetDateTime before, Integer count, WaitForConditions.CountType countType, Long delayTimeout, List<MatchOption> matches, OffsetDateTime since, WaitForConditions.SortDirection sortDirection, Boolean unreadOnly)
- Parameters:
inboxId- ID of inbox to search within and apply conditions to.timeout- Max time in milliseconds to retry thewaitForoperation until conditions are met.before- ISO Date Time latest time of email to consider.count- Number of results that should match conditions.countType- How should the found count be compared to the expected count.delayTimeout- Max time in milliseconds to wait between retries if atimeoutis specified.matches- Conditions that should be matched for an email to qualify for results.since- ISO Date Time earliest time of email to consider.sortDirection- Direction to sort matching emails by created timeunreadOnly- Apply conditions only to unread emails.
-
-
Method Detail
-
getInboxId
final UUID getInboxId()
-
getTimeout
final Long getTimeout()
-
getBefore
final OffsetDateTime getBefore()
-
getCountType
final WaitForConditions.CountType getCountType()
-
getDelayTimeout
final Long getDelayTimeout()
-
getMatches
final List<MatchOption> getMatches()
-
getSince
final OffsetDateTime getSince()
-
getSortDirection
final WaitForConditions.SortDirection getSortDirection()
-
getUnreadOnly
final Boolean getUnreadOnly()
-
-
-
-