Class DefaultFulfillRequestedUploadRequest.BaseBuilder<Request,​Self extends DefaultFulfillRequestedUploadRequest.BaseBuilder<Request,​Self>>

    • Constructor Detail

      • BaseBuilder

        protected BaseBuilder​(UUID uploadRequestUuid)
    • Method Detail

      • addFile

        @CanIgnoreReturnValue
        public Self addFile​(ISerializableFile file)
        Adds a file to the list of files to use for fulfilling the upload request.
        Parameters:
        file - The file to add to the list of files to use for fulfilling the upload request.
        Returns:
        This builder for chaining method calls.
      • attachmentSource

        @CanIgnoreReturnValue
        public Self attachmentSource​(EAttachmentSource attachmentSource)
        Sets the source of the attachments to create. Applies only when the upload request does not reference an upload element (in which case the source is always set to FORM_UPLOAD). Defaults to UNKNOWN.
        Parameters:
        attachmentSource - The source of the attachments to create.
        Returns:
        This builder for chaining method calls.
      • build

        public abstract Request build()
        Creates the data needed to fulfill a pending upload request. Any modifications to the builder will not affect the built request.
        Returns:
        The data needed to fulfill a pending upload request.
      • enforceChat

        @CanIgnoreReturnValue
        public Self enforceChat​(UUID chatUuid)
        When given, enforces that the DefaultFulfillRequestedUploadRequest.uploadRequestUuid() matches the given chat UUID, i.e. that the chat contains the upload request.
        Parameters:
        chatUuid - The UUID of the message to enforce.
        Returns:
        This builder for chaining method calls.
      • enforceExplicitContentType

        @CanIgnoreReturnValue
        public Self enforceExplicitContentType()
      • enforceExplicitContentType

        @CanIgnoreReturnValue
        public Self enforceExplicitContentType​(boolean enforceExplicitContentType)
      • enforceMatchingUser

        @CanIgnoreReturnValue
        public Self enforceMatchingUser()
        Enforces that the user fulfilling the request matches one of the chat members.
        Returns:
        This builder for chaining method calls.
      • enforceMatchingUser

        @CanIgnoreReturnValue
        public Self enforceMatchingUser​(boolean enforceMatchingUser)
        Sets whether to enforce that the user fulfilling the request matches one of the chat members.
        Parameters:
        enforceMatchingUser - Whether to enforce that the user fulfilling the request matches one of the chat members.
        Returns:
        This builder for chaining method calls.
      • enforceMessage

        @CanIgnoreReturnValue
        public Self enforceMessage​(UUID messageUuid)
        When given, enforces that the DefaultFulfillRequestedUploadRequest.uploadRequestUuid() matches the given message UUID, i.e. that the message contains the upload request.
        Parameters:
        messageUuid - The UUID of the message to enforce.
        Returns:
        This builder for chaining method calls.
      • files

        @CanIgnoreReturnValue
        public Self files​(ISerializableFile... files)
        Sets the files to use for fulfilling the upload request.
        Parameters:
        files - The files to use for fulfilling the upload request.
        Returns:
        This builder for chaining method calls.
      • files

        @CanIgnoreReturnValue
        public Self files​(List<ISerializableFile> files)
        Sets the files to use for fulfilling the upload request.
        Parameters:
        files - The files to use for fulfilling the upload request.
        Returns:
        This builder for chaining method calls.
      • initializeResponse

        @CanIgnoreReturnValue
        public Self initializeResponse()
        Initializes all fields in the response entities. Defaults to false.
        Returns:
        This builder for chaining method calls.
      • initializeResponse

        @CanIgnoreReturnValue
        public Self initializeResponse​(boolean initializeResponse)
        Sets whether to initialize all fields in the response entities. Defaults to false.
        Parameters:
        initializeResponse - Whether to initialize all fields in the response entities.
        Returns:
        This builder for chaining method calls.
      • makeFilesAccessibleToEndUser

        @CanIgnoreReturnValue
        public Self makeFilesAccessibleToEndUser()
        Makes the newly created attachments accessible to the end user. Defaults to false.
        Returns:
        This builder for chaining method calls.
      • makeFilesAccessibleToEndUser

        @CanIgnoreReturnValue
        public Self makeFilesAccessibleToEndUser​(boolean makeFilesAccessibleToEndUser)
        Sets whether to make the newly created attachments accessible to the end user. Defaults to false.
        Parameters:
        makeFilesAccessibleToEndUser - Whether to make the newly created attachments accessible to the end user.
        Returns:
        This builder for chaining method calls.
      • oathKeeper

        @CanIgnoreReturnValue
        public Self oathKeeper​(IUser oathKeeper)
        Sets the user who kept the oath by providing uploads to fulfill the request. Optional, but required if enforceMatchingUser is set to true.
        Parameters:
        oathKeeper - The user who provided the upload to fulfill the request.
        Returns:
        This builder for chaining method calls.
      • self

        protected abstract Self self()