Class DownloadAttachmentDto
Content of attachment
Implements
Inherited Members
Namespace: mailslurp.Model
Assembly: mailslurp.dll
Syntax
[DataContract(Name = "DownloadAttachmentDto")]
public class 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 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 |