Class DownloadAttachmentDto
Content of attachment
Implements
Inherited Members
Namespace: mailslurp.Model
Assembly: mailslurp.dll
Syntax
[DataContract(Name = "DownloadAttachmentDto")]
public class DownloadAttachmentDto : IEquatable<DownloadAttachmentDto>, IValidatableObject
Constructors
View SourceDownloadAttachmentDto()
Initializes a new instance of the DownloadAttachmentDto class.
Declaration
[JsonConstructor]
protected DownloadAttachmentDto()
DownloadAttachmentDto(string, string, long)
Initializes a new instance of the DownloadAttachmentDto class.
Declaration
public DownloadAttachmentDto(string base64FileContents = null, string contentType = null, long sizeBytes = 0)
Parameters
Type | Name | Description |
---|---|---|
string | base64FileContents | Base64 encoded string of attachment bytes. Decode the base64 encoded string to get the raw contents. If the file has a content type such as |
string | contentType | Content type of attachment. Examples are |
long | sizeBytes | Size in bytes of attachment content (required). |
Properties
View SourceBase64FileContents
Base64 encoded string of attachment bytes. Decode the base64 encoded string to get the raw contents. If the file has a content type such as text/html
you can read the contents directly by converting it to string using utf-8
encoding.
Declaration
[DataMember(Name = "base64FileContents", IsRequired = true, EmitDefaultValue = true)]
public string Base64FileContents { get; set; }
Property Value
Type | Description |
---|---|
string | Base64 encoded string of attachment bytes. Decode the base64 encoded string to get the raw contents. If the file has a content type such as |
ContentType
Content type of attachment. Examples are image/png
, application/msword
, text/csv
etc.
Declaration
[DataMember(Name = "contentType", IsRequired = true, EmitDefaultValue = true)]
public string ContentType { get; set; }
Property Value
Type | Description |
---|---|
string | Content type of attachment. Examples are |
SizeBytes
Size in bytes of attachment content
Declaration
[DataMember(Name = "sizeBytes", IsRequired = true, EmitDefaultValue = true)]
public long SizeBytes { get; set; }
Property Value
Type | Description |
---|---|
long | Size in bytes of attachment content |
Methods
View SourceEquals(DownloadAttachmentDto)
Returns true if DownloadAttachmentDto instances are equal
Declaration
public bool Equals(DownloadAttachmentDto input)
Parameters
Type | Name | Description |
---|---|---|
DownloadAttachmentDto | input | Instance of DownloadAttachmentDto 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 |