Class MailAttachment

java.lang.Object
io.vertx.mutiny.ext.mail.MailAttachment
All Implemented Interfaces:
MutinyDelegate

public class MailAttachment extends Object implements MutinyDelegate
Represent a mail attachment that can be used in a MailMessage.

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

  • Field Details

  • Constructor Details

    • MailAttachment

      public MailAttachment(io.vertx.ext.mail.MailAttachment delegate)
    • MailAttachment

      public MailAttachment(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.ext.mail.MailAttachment getDelegate()
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate used by this Mutiny object of generated type
    • 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
    • create

      public static MailAttachment create()
      Returns:
    • create

      public static MailAttachment create(io.vertx.core.json.JsonObject json)
      Parameters:
      json - object to be copied
      Returns:
    • create

      public static MailAttachment create(MailAttachment other)
      Parameters:
      other - object to be copied
      Returns:
    • getData

      public Buffer getData()
      Returns:
      the data
    • setData

      public MailAttachment setData(Buffer 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()
      Returns:
      the data stream
    • setStream

      public MailAttachment setStream(ReadStream<Buffer> stream)
      Parameters:
      stream - data stream to be used at attachment
      Returns:
      this to be able to use it fluently
    • setStream

      public MailAttachment setStream(Flow.Publisher<Buffer> stream)
      Parameters:
      stream - data stream to be used at attachment
      Returns:
      this to be able to use it fluently
    • getSize

      public int getSize()
      Returns:
      the size of the attachment
    • setSize

      public MailAttachment setSize(int size)
      Parameters:
      size - the size of the attachment
      Returns:
      this to be able to use it fluently
    • getName

      public String getName()
      Returns:
      the name
    • setName

      public MailAttachment setName(String 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()
      Returns:
      the contentType
    • setContentType

      public MailAttachment setContentType(String contentType)
      Parameters:
      contentType - the contentType
      Returns:
      this to be able to use it fluently
    • getDisposition

      public String getDisposition()
      Returns:
      the disposition
    • setDisposition

      public MailAttachment setDisposition(String disposition)
      Parameters:
      disposition - the disposition
      Returns:
      this to be able to use it fluently
    • getDescription

      public String getDescription()
      Returns:
      the description
    • setDescription

      public MailAttachment setDescription(String description)
      Parameters:
      description - the description
      Returns:
      this to be able to use it fluently
    • getContentId

      public String getContentId()
      Returns:
      the content id
    • setContentId

      public MailAttachment setContentId(String contentId)
      Parameters:
      contentId - the content id
      Returns:
      this to be able to use it fluently
    • addHeader

      public MailAttachment addHeader(String key, String value)
      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()
      Returns:
      the headers
    • setHeaders

      public MailAttachment setHeaders(MultiMap headers)
      Parameters:
      headers - the headers to be added
      Returns:
      this to be able to use it fluently
    • toJson

      public io.vertx.core.json.JsonObject toJson()
      Returns:
      the JSON object
    • newInstance

      public static MailAttachment newInstance(io.vertx.ext.mail.MailAttachment arg)