Class CodeCandidate
Candidate verification code extracted from content
Implements
Inherited Members
Namespace: mailslurp.Model
Assembly: mailslurp.dll
Syntax
[DataContract(Name = "CodeCandidate")]
public class CodeCandidate : IValidatableObject
Constructors
View SourceCodeCandidate()
Initializes a new instance of the CodeCandidate class.
Declaration
[JsonConstructor]
protected CodeCandidate()
CodeCandidate(string, double, MethodEnum, string, string)
Initializes a new instance of the CodeCandidate class.
Declaration
public CodeCandidate(string code = null, double confidence = 0, CodeCandidate.MethodEnum method = (CodeCandidate.MethodEnum)0, string source = null, string context = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | code | Extracted code value (required). |
| double | confidence | Relative confidence score from 0 to 1 (required). |
| CodeCandidate.MethodEnum | method | Extraction strategy for verification codes. Unsupported strategies may fall back when allowFallback is true. (required). |
| string | source | Source fragment used for extraction, for example RAW_TEXT_PART or SMS_BODY (required). |
| string | context | Nearby text context useful for debugging extraction decisions. |
Properties
View SourceCode
Extracted code value
Declaration
[DataMember(Name = "code", IsRequired = true, EmitDefaultValue = true)]
public string Code { get; set; }
Property Value
| Type | Description |
|---|---|
| string | Extracted code value |
Confidence
Relative confidence score from 0 to 1
Declaration
[DataMember(Name = "confidence", IsRequired = true, EmitDefaultValue = true)]
public double Confidence { get; set; }
Property Value
| Type | Description |
|---|---|
| double | Relative confidence score from 0 to 1 |
Context
Nearby text context useful for debugging extraction decisions
Declaration
[DataMember(Name = "context", EmitDefaultValue = true)]
public string Context { get; set; }
Property Value
| Type | Description |
|---|---|
| string | Nearby text context useful for debugging extraction decisions |
Method
Extraction strategy for verification codes. Unsupported strategies may fall back when allowFallback is true.
Declaration
[DataMember(Name = "method", IsRequired = true, EmitDefaultValue = true)]
public CodeCandidate.MethodEnum Method { get; set; }
Property Value
| Type | Description |
|---|---|
| CodeCandidate.MethodEnum | Extraction strategy for verification codes. Unsupported strategies may fall back when allowFallback is true. |
Source
Source fragment used for extraction, for example RAW_TEXT_PART or SMS_BODY
Declaration
[DataMember(Name = "source", IsRequired = true, EmitDefaultValue = true)]
public string Source { get; set; }
Property Value
| Type | Description |
|---|---|
| string | Source fragment used for extraction, for example RAW_TEXT_PART or SMS_BODY |
Methods
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 |