Class WaitForConditions
Conditions to apply to emails that you are waiting for
Inherited Members
Namespace: mailslurp.Model
Assembly: mailslurp.dll
Syntax
[DataContract(Name = "WaitForConditions")]
public class WaitForConditions : IEquatable<WaitForConditions>, IValidatableObject
Constructors
View SourceWaitForConditions()
Initializes a new instance of the WaitForConditions class.
Declaration
[JsonConstructor]
protected WaitForConditions()
WaitForConditions(Guid, int?, long?, long, bool?, CountTypeEnum?, List<MatchOption>, SortDirectionEnum?, DateTime?, DateTime?)
Initializes a new instance of the WaitForConditions class.
Declaration
public WaitForConditions(Guid inboxId = default, int? count = null, long? delayTimeout = null, long timeout = 0, bool? unreadOnly = null, WaitForConditions.CountTypeEnum? countType = null, List<MatchOption> matches = null, WaitForConditions.SortDirectionEnum? sortDirection = null, DateTime? since = null, DateTime? before = null)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | inboxId | ID of inbox to search within and apply conditions to. Essentially filtering the emails found to give a count. (required). |
int? | count | Number of results that should match conditions. Either exactly or at least this amount based on the |
long? | delayTimeout | Max time in milliseconds to wait between retries if a |
long | timeout | Max time in milliseconds to retry the |
bool? | unreadOnly | Apply conditions only to unread emails. All emails begin with |
WaitForConditions.CountTypeEnum? | countType | How result size should be compared with the expected size. Exactly or at-least matching result?. |
System.Collections.Generic.List<T><MatchOption> | matches | Conditions that should be matched for an email to qualify for results. Each condition will be applied in order to each email within an inbox to filter a result list of matching emails you are waiting for.. |
WaitForConditions.SortDirectionEnum? | sortDirection | Direction to sort matching emails by created time. |
DateTime? | since | ISO Date Time earliest time of email to consider. Filter for matching emails that were received after this date. |
DateTime? | before | ISO Date Time latest time of email to consider. Filter for matching emails that were received before this date. |
Properties
View SourceBefore
ISO Date Time latest time of email to consider. Filter for matching emails that were received before this date
Declaration
[DataMember(Name = "before", EmitDefaultValue = true)]
public DateTime? Before { get; set; }
Property Value
Type | Description |
---|---|
DateTime? | ISO Date Time latest time of email to consider. Filter for matching emails that were received before this date |
Count
Number of results that should match conditions. Either exactly or at least this amount based on the countType
. If count condition is not met and the timeout has not been reached the waitFor
method will retry the operation.
Declaration
[DataMember(Name = "count", EmitDefaultValue = true)]
public int? Count { get; set; }
Property Value
Type | Description |
---|---|
int? | Number of results that should match conditions. Either exactly or at least this amount based on the |
CountType
How result size should be compared with the expected size. Exactly or at-least matching result?
Declaration
[DataMember(Name = "countType", EmitDefaultValue = true)]
public WaitForConditions.CountTypeEnum? CountType { get; set; }
Property Value
Type | Description |
---|---|
WaitForConditions.CountTypeEnum? | How result size should be compared with the expected size. Exactly or at-least matching result? |
DelayTimeout
Max time in milliseconds to wait between retries if a timeout
is specified.
Declaration
[DataMember(Name = "delayTimeout", EmitDefaultValue = true)]
public long? DelayTimeout { get; set; }
Property Value
Type | Description |
---|---|
long? | Max time in milliseconds to wait between retries if a |
InboxId
ID of inbox to search within and apply conditions to. Essentially filtering the emails found to give a count.
Declaration
[DataMember(Name = "inboxId", IsRequired = true, EmitDefaultValue = true)]
public Guid InboxId { get; set; }
Property Value
Type | Description |
---|---|
System.Guid | ID of inbox to search within and apply conditions to. Essentially filtering the emails found to give a count. |
Matches
Conditions that should be matched for an email to qualify for results. Each condition will be applied in order to each email within an inbox to filter a result list of matching emails you are waiting for.
Declaration
[DataMember(Name = "matches", EmitDefaultValue = true)]
public List<MatchOption> Matches { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<T><MatchOption> | Conditions that should be matched for an email to qualify for results. Each condition will be applied in order to each email within an inbox to filter a result list of matching emails you are waiting for. |
Since
ISO Date Time earliest time of email to consider. Filter for matching emails that were received after this date
Declaration
[DataMember(Name = "since", EmitDefaultValue = true)]
public DateTime? Since { get; set; }
Property Value
Type | Description |
---|---|
DateTime? | ISO Date Time earliest time of email to consider. Filter for matching emails that were received after this date |
SortDirection
Direction to sort matching emails by created time
Declaration
[DataMember(Name = "sortDirection", EmitDefaultValue = true)]
public WaitForConditions.SortDirectionEnum? SortDirection { get; set; }
Property Value
Type | Description |
---|---|
WaitForConditions.SortDirectionEnum? | Direction to sort matching emails by created time |
Timeout
Max time in milliseconds to retry the waitFor
operation until conditions are met.
Declaration
[DataMember(Name = "timeout", IsRequired = true, EmitDefaultValue = true)]
public long Timeout { get; set; }
Property Value
Type | Description |
---|---|
long | Max time in milliseconds to retry the |
UnreadOnly
Apply conditions only to unread emails. All emails begin with read=false
. An email is marked read=true
when an EmailDto
representation of it has been returned to the user at least once. For example you have called getEmail
or waitForLatestEmail
etc., or you have viewed the email in the dashboard.
Declaration
[DataMember(Name = "unreadOnly", EmitDefaultValue = true)]
public bool? UnreadOnly { get; set; }
Property Value
Type | Description |
---|---|
bool? | Apply conditions only to unread emails. All emails begin with |
Methods
View SourceEquals(WaitForConditions)
Returns true if WaitForConditions instances are equal
Declaration
public bool Equals(WaitForConditions input)
Parameters
Type | Name | Description |
---|---|---|
WaitForConditions | input | Instance of WaitForConditions to be compared |
Returns
Type | Description |
---|---|
bool | Boolean |
Equals(object)
Returns true if objects are equal
Declaration
public override bool Equals(object input)
Parameters
Type | Name | Description |
---|---|---|
object | input | Object to be compared |
Returns
Type | Description |
---|---|
bool | Boolean |
Overrides
View SourceGetHashCode()
Gets the hash code
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | Hash code |
Overrides
View SourceToJson()
Returns the JSON string presentation of the object
Declaration
public virtual string ToJson()
Returns
Type | Description |
---|---|
string | JSON string presentation of the object |
ToString()
Returns the string presentation of the object
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | String presentation of the object |
Overrides
Validate(ValidationContext)
To validate all properties of the instance
Declaration
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
Parameters
Type | Name | Description |
---|---|---|
ValidationContext | validationContext | Validation context |
Returns
Type | Description |
---|---|
IEnumerable<ValidationResult> | Validation Result |