Class AttachmentMetaData
Meta data associated with an attachment. Attachments are stored as byte blobs so the meta data is stored separately.
Implements
Inherited Members
Namespace: mailslurp.Model
Assembly: mailslurp.dll
Syntax
[DataContract(Name = "AttachmentMetaData")]
public class AttachmentMetaData : IValidatableObject
Constructors
View SourceAttachmentMetaData()
Initializes a new instance of the Attachment
Declaration
[JsonConstructor]
protected AttachmentMetaData()
AttachmentMetaData(string, string, long, string, string)
Initializes a new instance of the Attachment
Declaration
public AttachmentMetaData(string name = null, string contentType = null, long contentLength = 0, string id = null, string contentId = null)
Parameters
Type | Name | Description |
---|---|---|
string | name | Name of attachment if given (required). |
string | contentType | Content type of attachment such as |
long | contentLength | Size of attachment in bytes (required). |
string | id | ID of attachment. Can be used to with attachment controller endpoints to download attachment or with sending methods to attach to an email. (required). |
string | contentId | CID of attachment. |
Properties
View SourceContentId
CID of attachment
Declaration
[DataMember(Name = "contentId", EmitDefaultValue = true)]
public string ContentId { get; set; }
Property Value
Type | Description |
---|---|
string | CID of attachment |
ContentLength
Size of attachment in bytes
Declaration
[DataMember(Name = "contentLength", IsRequired = true, EmitDefaultValue = true)]
public long ContentLength { get; set; }
Property Value
Type | Description |
---|---|
long | Size of attachment in bytes |
ContentType
Content type of attachment such as image/png
Declaration
[DataMember(Name = "contentType", IsRequired = true, EmitDefaultValue = true)]
public string ContentType { get; set; }
Property Value
Type | Description |
---|---|
string | Content type of attachment such as |
Id
ID of attachment. Can be used to with attachment controller endpoints to download attachment or with sending methods to attach to an email.
Declaration
[DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)]
public string Id { get; set; }
Property Value
Type | Description |
---|---|
string | ID of attachment. Can be used to with attachment controller endpoints to download attachment or with sending methods to attach to an email. |
Name
Name of attachment if given
Declaration
[DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)]
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string | Name of attachment if given |
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 |