Class MatchOption
Options for matching emails in an inbox. Each match option object contains a field
, should
and value
property. Together they form logical conditions such as SUBJECT
should CONTAIN
value.
Inherited Members
Namespace: mailslurp.Model
Assembly: mailslurp.dll
Syntax
[DataContract(Name = "MatchOption")]
public class MatchOption : IEquatable<MatchOption>, IValidatableObject
Constructors
View SourceMatchOption()
Initializes a new instance of the MatchOption class.
Declaration
[JsonConstructor]
protected MatchOption()
MatchOption(FieldEnum, ShouldEnum, string)
Initializes a new instance of the MatchOption class.
Declaration
public MatchOption(MatchOption.FieldEnum field = (MatchOption.FieldEnum)0, MatchOption.ShouldEnum should = (MatchOption.ShouldEnum)0, string value = null)
Parameters
Type | Name | Description |
---|---|---|
MatchOption.FieldEnum | field | Fields of an email object that can be used to filter results (required). |
MatchOption.ShouldEnum | should | How the value of the email field specified should be compared to the value given in the match options. (required). |
string | value | The value you wish to compare with the value of the field specified using the |
Properties
View SourceField
Fields of an email object that can be used to filter results
Declaration
[DataMember(Name = "field", IsRequired = true, EmitDefaultValue = true)]
public MatchOption.FieldEnum Field { get; set; }
Property Value
Type | Description |
---|---|
MatchOption.FieldEnum | Fields of an email object that can be used to filter results |
Should
How the value of the email field specified should be compared to the value given in the match options.
Declaration
[DataMember(Name = "should", IsRequired = true, EmitDefaultValue = true)]
public MatchOption.ShouldEnum Should { get; set; }
Property Value
Type | Description |
---|---|
MatchOption.ShouldEnum | How the value of the email field specified should be compared to the value given in the match options. |
Value
The value you wish to compare with the value of the field specified using the should
value passed. For example BODY
should CONTAIN
a value passed.
Declaration
[DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)]
public string Value { get; set; }
Property Value
Type | Description |
---|---|
string | The value you wish to compare with the value of the field specified using the |
Methods
View SourceEquals(MatchOption)
Returns true if MatchOption instances are equal
Declaration
public bool Equals(MatchOption input)
Parameters
Type | Name | Description |
---|---|---|
MatchOption | input | Instance of MatchOption 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 |