Class MatchOptions
Optional filter for matching emails based on fields. For instance filter results to only include emails whose SUBJECT
value does CONTAIN
given match value. An example payload would be { matches: [{ field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }] }
. You can also pass conditions such as HAS_ATTACHMENT
. If you wish to extract regex matches inside the email content see the getEmailContentMatch
method in the EmailController.
Inherited Members
Namespace: mailslurp.Model
Assembly: mailslurp.dll
Syntax
[DataContract(Name = "MatchOptions")]
public class MatchOptions : IEquatable<MatchOptions>, IValidatableObject
Constructors
View SourceMatchOptions(List<MatchOption>, List<ConditionOption>)
Initializes a new instance of the MatchOptions class.
Declaration
public MatchOptions(List<MatchOption> matches = null, List<ConditionOption> conditions = null)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<T><MatchOption> | matches | Zero or more match options such as |
System.Collections.Generic.List<T><ConditionOption> | conditions | Zero or more conditions such as |
Properties
View SourceConditions
Zero or more conditions such as { condition: 'HAS_ATTACHMENTS', value: 'TRUE' }
. Note the values are the strings TRUE|FALSE
not booleans.
Declaration
[DataMember(Name = "conditions", EmitDefaultValue = true)]
public List<ConditionOption> Conditions { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<T><ConditionOption> | Zero or more conditions such as |
Matches
Zero or more match options such as { field: 'SUBJECT', should: 'CONTAIN', value: 'Welcome' }
. Options are additive so if one does not match the email is excluded from results
Declaration
[DataMember(Name = "matches", EmitDefaultValue = true)]
public List<MatchOption> Matches { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<T><MatchOption> | Zero or more match options such as |
Methods
View SourceEquals(MatchOptions)
Returns true if MatchOptions instances are equal
Declaration
public bool Equals(MatchOptions input)
Parameters
Type | Name | Description |
---|---|---|
MatchOptions | input | Instance of MatchOptions 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 |