Search Results for

    Show / Hide Table of Contents

    Class DownloadAttachmentDto

    Content of attachment

    Inheritance
    object
    DownloadAttachmentDto
    Implements
    IEquatable<DownloadAttachmentDto>
    System.ComponentModel.DataAnnotations.IValidatableObject
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: mailslurp.Model
    Assembly: mailslurp.dll
    Syntax
    [DataContract(Name = "DownloadAttachmentDto")]
    public class DownloadAttachmentDto : IEquatable<DownloadAttachmentDto>, IValidatableObject

    Constructors

    View Source

    DownloadAttachmentDto()

    Initializes a new instance of the DownloadAttachmentDto class.

    Declaration
    [JsonConstructor]
    protected DownloadAttachmentDto()
    View Source

    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 text/html you can read the contents directly by converting it to string using utf-8 encoding. (required).

    string contentType

    Content type of attachment. Examples are image/png, application/msword, text/csv etc. (required).

    long sizeBytes

    Size in bytes of attachment content (required).

    Properties

    View Source

    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 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 text/html you can read the contents directly by converting it to string using utf-8 encoding.

    View Source

    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 image/png, application/msword, text/csv etc.

    View Source

    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 Source

    Equals(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

    View Source

    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
    Object.Equals(Object)
    View Source

    GetHashCode()

    Gets the hash code

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    Hash code

    Overrides
    Object.GetHashCode()
    View Source

    ToJson()

    Returns the JSON string presentation of the object

    Declaration
    public virtual string ToJson()
    Returns
    Type Description
    string

    JSON string presentation of the object

    View Source

    ToString()

    Returns the string presentation of the object

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    String presentation of the object

    Overrides
    object.ToString()
    View Source

    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

    Implements

    System.IEquatable<T>
    System.ComponentModel.DataAnnotations.IValidatableObject
    • View Source
    In This Article
    Back to top See MailSlurp website for more information.