public static class Attachments.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder(java.lang.String fileName,
java.io.InputStream content)
Construct a new attachment builder.
|
Builder(java.lang.String fileName,
java.lang.String content)
Construct a new attachment builder.
|
Modifier and Type | Method and Description |
---|---|
Attachments |
build()
Construct the attachments object.
|
Attachments.Builder |
withContentId(java.lang.String contentId)
Set the content ID of this attachment builder.
|
Attachments.Builder |
withDisposition(java.lang.String disposition)
Set the disposition of this attachment builder.
|
Attachments.Builder |
withType(java.lang.String type)
Set the type of this attachment builder.
|
public Builder(java.lang.String fileName, java.io.InputStream content)
fileName
- the filename to include.content
- an input stream for the content.java.lang.IllegalArgumentException
- in case either the fileName or the content is null.public Builder(java.lang.String fileName, java.lang.String content)
fileName
- the filename to include.content
- an input string for the content.java.lang.IllegalArgumentException
- in case either the fileName or the content is null.public Attachments.Builder withType(java.lang.String type)
type
- the attachment type.public Attachments.Builder withDisposition(java.lang.String disposition)
disposition
- the disposition.public Attachments.Builder withContentId(java.lang.String contentId)
contentId
- the content ID.public Attachments build()