Package io.vertx.reactivex.ext.mail

## Class MailAttachment

- java.lang.Object
- - io.vertx.reactivex.ext.mail.MailAttachment

- All Implemented Interfaces:
    `io.vertx.lang.rx.RxDelegate`

      public class MailAttachment
      extends Object
      implements io.vertx.lang.rx.RxDelegate

  Represent a mail attachment that can be used in a MailMessage.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static io.vertx.lang.rx.TypeArg<MailAttachment>` | `__TYPE_ARG` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `MailAttachment​(MailAttachment delegate)` |
    `MailAttachment​(Object delegate)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `MailAttachment` | `addHeader​(String key, String value)` | Add an header to this attachment.
    `static MailAttachment` | `create()` | construct an empty MailAttachment object that can be filled with the setters
    `static MailAttachment` | `create​(JsonObject json)` | create a MailAttachment object from a JsonObject representation
    `static MailAttachment` | `create​(MailAttachment other)` | create a copy of a MailAttachment object
    `boolean` | `equals​(Object o)` |
    `String` | `getContentId()` | get the Content-ID field
    `String` | `getContentType()` | get the Content-Type
    `Buffer` | `getData()` | get the data
    `MailAttachment` | `getDelegate()` |
    `String` | `getDescription()` | get the description field
    `String` | `getDisposition()` | get the disposition field
    `MultiMap` | `getHeaders()` | Get the headers to be added for this attachment.
    `String` | `getName()` | get the name
    `int` | `getSize()` | Gets the size of the attachment.
    `ReadStream<Buffer>` | `getStream()` | Gets the data stream.
    `int` | `hashCode()` |
    `static MailAttachment` | `newInstance​(MailAttachment arg)` |
    `MailAttachment` | `setContentId​(String contentId)` | set the Content-ID field to be used in the attachment
    `MailAttachment` | `setContentType​(String contentType)` | set the Content-Type
    `MailAttachment` | `setData​(Buffer data)` | set the data
    `MailAttachment` | `setDescription​(String description)` | set the description field to be used in the attachment
    `MailAttachment` | `setDisposition​(String disposition)` | set the disposition field to be used in the attachment
    `MailAttachment` | `setHeaders​(MultiMap headers)` | Set the headers to be added for this attachment.
    `MailAttachment` | `setName​(String name)` | set the name
    `MailAttachment` | `setSize​(int size)` | Sets the size of the attachment.
    `MailAttachment` | `setStream​(Flowable<Buffer> stream)` | Sets the data stream.
    `MailAttachment` | `setStream​(ReadStream<Buffer> stream)` | Sets the data stream.
    `JsonObject` | `toJson()` | convert this object to JSON representation
    `String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<MailAttachment> __TYPE_ARG

  - ### Constructor Detail

    - #### MailAttachment

          public MailAttachment​(MailAttachment delegate)

    - #### MailAttachment

          public MailAttachment​(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals​(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public MailAttachment getDelegate()

      Specified by:
        `getDelegate` in interface `io.vertx.lang.rx.RxDelegate`

    - #### create

          public static MailAttachment create()

      construct an empty MailAttachment object that can be filled with the setters
      Returns:

    - #### create

          public static MailAttachment create​(JsonObject json)

      create a MailAttachment object from a JsonObject representation
      Parameters:
        `json` - object to be copied
      Returns:

    - #### create

          public static MailAttachment create​(MailAttachment other)

      create a copy of a MailAttachment object
      Parameters:
        `other` - object to be copied
      Returns:

    - #### getData

          public Buffer getData()

      get the data
      Returns:
        the data

    - #### setData

          public MailAttachment setData​(Buffer data)

      set the data
      Parameters:
        `data` - Buffer of bytes to be used at attachment
      Returns:
        this to be able to use it fluently

    - #### getStream

          public ReadStream<Buffer> getStream()

      Gets the data stream.
      Returns:
        the data stream

    - #### setStream

          public MailAttachment setStream​(ReadStream<Buffer> stream)

      Sets the data stream.
      Parameters:
        `stream` - data stream to be used at attachment
      Returns:
        this to be able to use it fluently

    - #### setStream

          public MailAttachment setStream​(Flowable<Buffer> stream)

      Sets the data stream.
      Parameters:
        `stream` - data stream to be used at attachment
      Returns:
        this to be able to use it fluently

    - #### getSize

          public int getSize()

      Gets the size of the attachment.
      Returns:
        the size of the attachment

    - #### setSize

          public MailAttachment setSize​(int size)

      Sets the size of the attachment.

      It is needed when using ReadStream for the MailAttachement.

      Parameters:
        `size` - the size of the attachment
      Returns:
        this to be able to use it fluently

    - #### getName

          public String getName()

      get the name
      Returns:
        the name

    - #### setName

          public MailAttachment setName​(String name)

      set the name
      Parameters:
        `name` - name of the attachment file
      Returns:
        this to be able to use it fluently

        name is the descriptive filename that will be put into the mail i.e. usually a local filename without path this can be set to "" to omit the filename attribute

    - #### getContentType

          public String getContentType()

      get the Content-Type
      Returns:
        the contentType

    - #### setContentType

          public MailAttachment setContentType​(String contentType)

      set the Content-Type
      Parameters:
        `contentType` - the contentType
      Returns:
        this to be able to use it fluently

    - #### getDisposition

          public String getDisposition()

      get the disposition field
      Returns:
        the disposition

    - #### setDisposition

          public MailAttachment setDisposition​(String disposition)

      set the disposition field to be used in the attachment
      Parameters:
        `disposition` - the disposition
      Returns:
        this to be able to use it fluently

    - #### getDescription

          public String getDescription()

      get the description field
      Returns:
        the description

    - #### setDescription

          public MailAttachment setDescription​(String description)

      set the description field to be used in the attachment
      Parameters:
        `description` - the description
      Returns:
        this to be able to use it fluently

    - #### getContentId

          public String getContentId()

      get the Content-ID field
      Returns:
        the content id

    - #### setContentId

          public MailAttachment setContentId​(String contentId)

      set the Content-ID field to be used in the attachment
      Parameters:
        `contentId` - the content id
      Returns:
        this to be able to use it fluently

    - #### addHeader

          public MailAttachment addHeader​(String key,
                                          String value)

      Add an header to this attachment.
      Parameters:
        `key` - the header key
        `value` - the header value
      Returns:
        a reference to this, so the API can be used fluently

    - #### getHeaders

          public MultiMap getHeaders()

      Get the headers to be added for this attachment.
      Returns:
        the headers

    - #### setHeaders

          public MailAttachment setHeaders​(MultiMap headers)

      Set the headers to be added for this attachment.
      Parameters:
        `headers` - the headers to be added
      Returns:
        this to be able to use it fluently

    - #### toJson

          public JsonObject toJson()

      convert this object to JSON representation
      Returns:
        the JSON object

    - #### newInstance

          public static MailAttachment newInstance​(MailAttachment arg)