Class ContentMatchOptions
Options for matching content using regex patterns based on Java Pattern syntax
Inherited Members
Namespace: mailslurp.Model
Assembly: mailslurp.dll
Syntax
[DataContract(Name = "ContentMatchOptions")]
public class ContentMatchOptions : IEquatable<ContentMatchOptions>, IValidatableObject
Constructors
View SourceContentMatchOptions()
Initializes a new instance of the ContentMatchOptions class.
Declaration
[JsonConstructor]
protected ContentMatchOptions()
ContentMatchOptions(string)
Initializes a new instance of the ContentMatchOptions class.
Declaration
public ContentMatchOptions(string pattern = null)
Parameters
Type | Name | Description |
---|---|---|
string | pattern | Java style regex pattern. Do not include the typical |
Properties
View SourcePattern
Java style regex pattern. Do not include the typical /
at start or end of regex in some languages. Given an example your code is: 12345
the pattern to extract match looks like code is: (\\d{6})
. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: ['code is: 123456', '123456']
See https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html for more information of available patterns.
Declaration
[DataMember(Name = "pattern", IsRequired = true, EmitDefaultValue = true)]
public string Pattern { get; set; }
Property Value
Type | Description |
---|---|
string | Java style regex pattern. Do not include the typical |
Methods
View SourceEquals(ContentMatchOptions)
Returns true if ContentMatchOptions instances are equal
Declaration
public bool Equals(ContentMatchOptions input)
Parameters
Type | Name | Description |
---|---|---|
ContentMatchOptions | input | Instance of ContentMatchOptions 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 |