Class TemplateVariable
Variable for use with email template
Inherited Members
Namespace: mailslurp.Model
Assembly: mailslurp.dll
Syntax
[DataContract(Name = "TemplateVariable")]
public class TemplateVariable : IEquatable<TemplateVariable>, IValidatableObject
Constructors
View SourceTemplateVariable()
Initializes a new instance of the TemplateVariable class.
Declaration
[JsonConstructor]
protected TemplateVariable()
TemplateVariable(string, VariableTypeEnum)
Initializes a new instance of the TemplateVariable class.
Declaration
public TemplateVariable(string name = null, TemplateVariable.VariableTypeEnum variableType = (TemplateVariable.VariableTypeEnum)0)
Parameters
Type | Name | Description |
---|---|---|
string | name | Name of variable. This can be used in a template as {{name}} (required). |
TemplateVariable.VariableTypeEnum | variableType | The type of variable (required). |
Properties
View SourceName
Name of variable. This can be used in a template as {{name}}
Declaration
[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string | Name of variable. This can be used in a template as {{name}} |
VariableType
The type of variable
Declaration
[DataMember(Name = "variableType", IsRequired = true, EmitDefaultValue = true)]
public TemplateVariable.VariableTypeEnum VariableType { get; set; }
Property Value
Type | Description |
---|---|
TemplateVariable.VariableTypeEnum | The type of variable |
Methods
View SourceEquals(TemplateVariable)
Returns true if TemplateVariable instances are equal
Declaration
public bool Equals(TemplateVariable input)
Parameters
Type | Name | Description |
---|---|---|
TemplateVariable | input | Instance of TemplateVariable 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 |