Search Results for

    Show / Hide Table of Contents

    Class AttachmentMetaData

    Meta data associated with an attachment. Attachments are stored as byte blobs so the meta data is stored separately.

    Inheritance
    object
    AttachmentMetaData
    Implements
    IEquatable<AttachmentMetaData>
    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 = "AttachmentMetaData")]
    public class AttachmentMetaData : IEquatable<AttachmentMetaData>, IValidatableObject

    Constructors

    View Source

    AttachmentMetaData()

    Initializes a new instance of the AttachmentMetaData class.

    Declaration
    [JsonConstructor]
    protected AttachmentMetaData()
    View Source

    AttachmentMetaData(string, string, long, string, string)

    Initializes a new instance of the AttachmentMetaData class.

    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 image/png (required).

    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 Source

    ContentId

    CID of attachment

    Declaration
    [DataMember(Name = "contentId", EmitDefaultValue = true)]
    public string ContentId { get; set; }
    Property Value
    Type Description
    string

    CID of attachment

    View Source

    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

    View Source

    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 image/png

    View Source

    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.

    View Source

    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 Source

    Equals(AttachmentMetaData)

    Returns true if AttachmentMetaData instances are equal

    Declaration
    public bool Equals(AttachmentMetaData input)
    Parameters
    Type Name Description
    AttachmentMetaData input

    Instance of AttachmentMetaData 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.