Class Attachment

    • Method Detail

      • rawContent

        public final SdkBytes rawContent()

        The raw data of the attachment. It needs to be base64-encoded if you are accessing Amazon SES directly through the HTTPS interface. If you are accessing Amazon SES using an Amazon Web Services SDK, the SDK takes care of the base 64-encoding for you.

        Returns:
        The raw data of the attachment. It needs to be base64-encoded if you are accessing Amazon SES directly through the HTTPS interface. If you are accessing Amazon SES using an Amazon Web Services SDK, the SDK takes care of the base 64-encoding for you.
      • contentDispositionAsString

        public final String contentDispositionAsString()

        A standard descriptor indicating how the attachment should be rendered in the email. Supported values: ATTACHMENT or INLINE.

        If the service returns an enum value that is not available in the current SDK version, contentDisposition will return AttachmentContentDisposition.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from contentDispositionAsString().

        Returns:
        A standard descriptor indicating how the attachment should be rendered in the email. Supported values: ATTACHMENT or INLINE.
        See Also:
        AttachmentContentDisposition
      • fileName

        public final String fileName()

        The file name for the attachment as it will appear in the email. Amazon SES restricts certain file extensions. To ensure attachments are accepted, check the Unsupported attachment types in the Amazon SES Developer Guide.

        Returns:
        The file name for the attachment as it will appear in the email. Amazon SES restricts certain file extensions. To ensure attachments are accepted, check the Unsupported attachment types in the Amazon SES Developer Guide.
      • contentDescription

        public final String contentDescription()

        A brief description of the attachment content.

        Returns:
        A brief description of the attachment content.
      • contentId

        public final String contentId()

        Unique identifier for the attachment, used for referencing attachments with INLINE disposition in HTML content.

        Returns:
        Unique identifier for the attachment, used for referencing attachments with INLINE disposition in HTML content.
      • contentType

        public final String contentType()

        The MIME type of the attachment.

        Example: application/pdf, image/jpeg

        Returns:
        The MIME type of the attachment.

        Example: application/pdf, image/jpeg

      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)