Class SearchEmailsOptions
SearchEmailsOptions
Inherited Members
Namespace: mailslurp.Model
Assembly: mailslurp.dll
Syntax
[DataContract(Name = "SearchEmailsOptions")]
public class SearchEmailsOptions : IEquatable<SearchEmailsOptions>, IValidatableObject
Constructors
View SourceSearchEmailsOptions(List<Guid>, int, int, SortDirectionEnum?, bool, string, DateTime, DateTime)
Initializes a new instance of the SearchEmailsOptions class.
Declaration
public SearchEmailsOptions(List<Guid> inboxIds = null, int pageIndex = 0, int pageSize = 0, SearchEmailsOptions.SortDirectionEnum? sortDirection = null, bool unreadOnly = false, string searchFilter = null, DateTime since = default, DateTime before = default)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<T><System.Guid> | inboxIds | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account.. |
int | pageIndex | Optional page index in email list pagination. |
int | pageSize | Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results. |
SearchEmailsOptions.SortDirectionEnum? | sortDirection | Optional createdAt sort direction ASC or DESC. |
bool | unreadOnly | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly. |
string | searchFilter | Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body. |
DateTime | since | Optional filter emails received after given date time. |
DateTime | before | Optional filter emails received before given date time. |
Properties
View SourceBefore
Optional filter emails received before given date time
Declaration
[DataMember(Name = "before", EmitDefaultValue = false)]
public DateTime Before { get; set; }
Property Value
Type | Description |
---|---|
DateTime | Optional filter emails received before given date time |
InboxIds
Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account.
Declaration
[DataMember(Name = "inboxIds", EmitDefaultValue = false)]
public List<Guid> InboxIds { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<T><System.Guid> | Optional inbox ids to filter by. Can be repeated. By default will use all inboxes belonging to your account. |
PageIndex
Optional page index in email list pagination
Declaration
[DataMember(Name = "pageIndex", EmitDefaultValue = false)]
public int PageIndex { get; set; }
Property Value
Type | Description |
---|---|
int | Optional page index in email list pagination |
PageSize
Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results
Declaration
[DataMember(Name = "pageSize", EmitDefaultValue = false)]
public int PageSize { get; set; }
Property Value
Type | Description |
---|---|
int | Optional page size in email list pagination. Maximum size is 100. Use page index and sort to page through larger results |
SearchFilter
Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body
Declaration
[DataMember(Name = "searchFilter", EmitDefaultValue = false)]
public string SearchFilter { get; set; }
Property Value
Type | Description |
---|---|
string | Optional search filter. Searches email recipients, sender, subject, email address and ID. Does not search email body |
Since
Optional filter emails received after given date time
Declaration
[DataMember(Name = "since", EmitDefaultValue = false)]
public DateTime Since { get; set; }
Property Value
Type | Description |
---|---|
DateTime | Optional filter emails received after given date time |
SortDirection
Optional createdAt sort direction ASC or DESC
Declaration
[DataMember(Name = "sortDirection", EmitDefaultValue = false)]
public SearchEmailsOptions.SortDirectionEnum? SortDirection { get; set; }
Property Value
Type | Description |
---|---|
SearchEmailsOptions.SortDirectionEnum? | Optional createdAt sort direction ASC or DESC |
UnreadOnly
Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly
Declaration
[DataMember(Name = "unreadOnly", EmitDefaultValue = true)]
public bool UnreadOnly { get; set; }
Property Value
Type | Description |
---|---|
bool | Optional filter for unread emails only. All emails are considered unread until they are viewed in the dashboard or requested directly |
Methods
View SourceEquals(SearchEmailsOptions)
Returns true if SearchEmailsOptions instances are equal
Declaration
public bool Equals(SearchEmailsOptions input)
Parameters
Type | Name | Description |
---|---|---|
SearchEmailsOptions | input | Instance of SearchEmailsOptions 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 |