Class TemplateDto
Email template
Inherited Members
Namespace: mailslurp.Model
Assembly: mailslurp.dll
Syntax
[DataContract(Name = "TemplateDto")]
public class TemplateDto : IEquatable<TemplateDto>, IValidatableObject
Constructors
View SourceTemplateDto()
Initializes a new instance of the TemplateDto class.
Declaration
[JsonConstructor]
protected TemplateDto()
TemplateDto(Guid, string, List<TemplateVariable>, string, DateTime)
Initializes a new instance of the TemplateDto class.
Declaration
public TemplateDto(Guid id = default, string name = null, List<TemplateVariable> variables = null, string content = null, DateTime createdAt = default)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | id | ID of template (required). |
string | name | Template name (required). |
System.Collections.Generic.List<T><TemplateVariable> | variables | Variables available in template that can be replaced with values (required). |
string | content | Content of the template (required). |
DateTime | createdAt | Created at time (required). |
Properties
View SourceContent
Content of the template
Declaration
[DataMember(Name = "content", IsRequired = true, EmitDefaultValue = true)]
public string Content { get; set; }
Property Value
Type | Description |
---|---|
string | Content of the template |
CreatedAt
Created at time
Declaration
[DataMember(Name = "createdAt", IsRequired = true, EmitDefaultValue = true)]
public DateTime CreatedAt { get; set; }
Property Value
Type | Description |
---|---|
DateTime | Created at time |
Id
ID of template
Declaration
[DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)]
public Guid Id { get; set; }
Property Value
Type | Description |
---|---|
System.Guid | ID of template |
Name
Template name
Declaration
[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string | Template name |
Variables
Variables available in template that can be replaced with values
Declaration
[DataMember(Name = "variables", IsRequired = true, EmitDefaultValue = true)]
public List<TemplateVariable> Variables { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<T><TemplateVariable> | Variables available in template that can be replaced with values |
Methods
View SourceEquals(TemplateDto)
Returns true if TemplateDto instances are equal
Declaration
public bool Equals(TemplateDto input)
Parameters
Type | Name | Description |
---|---|---|
TemplateDto | input | Instance of TemplateDto 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 |