Class Attachment.Builder

    • Method Detail

      • id

        public Attachment.Builder id​(String id)
        Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
        Overrides:
        id in class Element.Builder
        Parameters:
        id - Unique id for inter-element referencing
        Returns:
        A reference to this Builder instance
      • extension

        public Attachment.Builder extension​(Extension... extension)
        May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

        Adds new element(s) to the existing list

        Overrides:
        extension in class Element.Builder
        Parameters:
        extension - Additional content defined by implementations
        Returns:
        A reference to this Builder instance
      • extension

        public Attachment.Builder extension​(Collection<Extension> extension)
        May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.

        Replaces the existing list with a new one containing elements from the Collection

        Overrides:
        extension in class Element.Builder
        Parameters:
        extension - Additional content defined by implementations
        Returns:
        A reference to this Builder instance
      • contentType

        public Attachment.Builder contentType​(Code contentType)
        Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.
        Parameters:
        contentType - Mime type of the content, with charset etc.
        Returns:
        A reference to this Builder instance
      • language

        public Attachment.Builder language​(Code language)
        The human language of the content. The value can be any valid value according to BCP 47.
        Parameters:
        language - Human language of the content (BCP-47)
        Returns:
        A reference to this Builder instance
      • data

        public Attachment.Builder data​(Base64Binary data)
        The actual data of the attachment - a sequence of bytes, base64 encoded.
        Parameters:
        data - Data inline, base64ed
        Returns:
        A reference to this Builder instance
      • url

        public Attachment.Builder url​(Url url)
        A location where the data can be accessed.
        Parameters:
        url - Uri where the data can be found
        Returns:
        A reference to this Builder instance
      • size

        public Attachment.Builder size​(UnsignedInt size)
        The number of bytes of data that make up this attachment (before base64 encoding, if that is done).
        Parameters:
        size - Number of bytes of content (if url provided)
        Returns:
        A reference to this Builder instance
      • hash

        public Attachment.Builder hash​(Base64Binary hash)
        The calculated hash of the data using SHA-1. Represented using base64.
        Parameters:
        hash - Hash of the data (sha-1, base64ed)
        Returns:
        A reference to this Builder instance
      • title

        public Attachment.Builder title​(String title)
        A label or set of text to display in place of the data.
        Parameters:
        title - Label to display in place of the data
        Returns:
        A reference to this Builder instance
      • creation

        public Attachment.Builder creation​(DateTime creation)
        The date that the attachment was first created.
        Parameters:
        creation - Date attachment was first created
        Returns:
        A reference to this Builder instance