Class FileRequest


  • public class FileRequest
    extends java.lang.Object
    A file request for receiving files into the user's Dropbox account.
    • Constructor Summary

      Constructors 
      Constructor Description
      FileRequest​(java.lang.String id, java.lang.String url, java.lang.String title, java.util.Date created, boolean isOpen, long fileCount)
      A file request for receiving files into the user's Dropbox account.
      FileRequest​(java.lang.String id, java.lang.String url, java.lang.String title, java.util.Date created, boolean isOpen, long fileCount, java.lang.String destination, FileRequestDeadline deadline, java.lang.String description)
      A file request for receiving files into the user's Dropbox account.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.util.Date getCreated()
      When this file request was created.
      FileRequestDeadline getDeadline()
      The deadline for this file request.
      java.lang.String getDescription()
      A description of the file request.
      java.lang.String getDestination()
      The path of the folder in the Dropbox where uploaded files will be sent.
      long getFileCount()
      The number of files this file request has received.
      java.lang.String getId()
      The ID of the file request.
      boolean getIsOpen()
      Whether or not the file request is open.
      java.lang.String getTitle()
      The title of the file request.
      java.lang.String getUrl()
      The URL of the file request.
      int hashCode()  
      static FileRequest.Builder newBuilder​(java.lang.String id, java.lang.String url, java.lang.String title, java.util.Date created, boolean isOpen, long fileCount)
      Returns a new builder for creating an instance of this class.
      java.lang.String toString()  
      java.lang.String toStringMultiline()
      Returns a String representation of this object formatted for easier readability.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • id

        protected final java.lang.String id
      • url

        protected final java.lang.String url
      • title

        protected final java.lang.String title
      • destination

        protected final java.lang.String destination
      • created

        protected final java.util.Date created
      • isOpen

        protected final boolean isOpen
      • fileCount

        protected final long fileCount
      • description

        protected final java.lang.String description
    • Constructor Detail

      • FileRequest

        public FileRequest​(java.lang.String id,
                           java.lang.String url,
                           java.lang.String title,
                           java.util.Date created,
                           boolean isOpen,
                           long fileCount,
                           java.lang.String destination,
                           FileRequestDeadline deadline,
                           java.lang.String description)
        A file request for receiving files into the user's Dropbox account.

        Use newBuilder(java.lang.String,java.lang.String,java.lang.String,java.util.Date,boolean,long) to create instances of this class without specifying values for all optional fields.

        Parameters:
        id - The ID of the file request. Must have length of at least 1, match pattern "[-_0-9a-zA-Z]+", and not be null.
        url - The URL of the file request. Must have length of at least 1 and not be null.
        title - The title of the file request. Must have length of at least 1 and not be null.
        created - When this file request was created. Must not be null.
        isOpen - Whether or not the file request is open. If the file request is closed, it will not accept any more file submissions.
        fileCount - The number of files this file request has received.
        destination - The path of the folder in the Dropbox where uploaded files will be sent. This can be null if the destination was removed. For apps with the app folder permission, this will be relative to the app folder. Must match pattern " /(.|[\\r\\n])*".
        deadline - The deadline for this file request. Only set if the request has a deadline.
        description - A description of the file request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • FileRequest

        public FileRequest​(java.lang.String id,
                           java.lang.String url,
                           java.lang.String title,
                           java.util.Date created,
                           boolean isOpen,
                           long fileCount)
        A file request for receiving files into the user's Dropbox account.

        The default values for unset fields will be used.

        Parameters:
        id - The ID of the file request. Must have length of at least 1, match pattern "[-_0-9a-zA-Z]+", and not be null.
        url - The URL of the file request. Must have length of at least 1 and not be null.
        title - The title of the file request. Must have length of at least 1 and not be null.
        created - When this file request was created. Must not be null.
        isOpen - Whether or not the file request is open. If the file request is closed, it will not accept any more file submissions.
        fileCount - The number of files this file request has received.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
    • Method Detail

      • getId

        public java.lang.String getId()
        The ID of the file request.
        Returns:
        value for this field, never null.
      • getUrl

        public java.lang.String getUrl()
        The URL of the file request.
        Returns:
        value for this field, never null.
      • getTitle

        public java.lang.String getTitle()
        The title of the file request.
        Returns:
        value for this field, never null.
      • getCreated

        public java.util.Date getCreated()
        When this file request was created.
        Returns:
        value for this field, never null.
      • getIsOpen

        public boolean getIsOpen()
        Whether or not the file request is open. If the file request is closed, it will not accept any more file submissions.
        Returns:
        value for this field.
      • getFileCount

        public long getFileCount()
        The number of files this file request has received.
        Returns:
        value for this field.
      • getDestination

        public java.lang.String getDestination()
        The path of the folder in the Dropbox where uploaded files will be sent. This can be null if the destination was removed. For apps with the app folder permission, this will be relative to the app folder.
        Returns:
        value for this field, or null if not present.
      • getDeadline

        public FileRequestDeadline getDeadline()
        The deadline for this file request. Only set if the request has a deadline.
        Returns:
        value for this field, or null if not present.
      • getDescription

        public java.lang.String getDescription()
        A description of the file request.
        Returns:
        value for this field, or null if not present.
      • newBuilder

        public static FileRequest.Builder newBuilder​(java.lang.String id,
                                                     java.lang.String url,
                                                     java.lang.String title,
                                                     java.util.Date created,
                                                     boolean isOpen,
                                                     long fileCount)
        Returns a new builder for creating an instance of this class.
        Parameters:
        id - The ID of the file request. Must have length of at least 1, match pattern "[-_0-9a-zA-Z]+", and not be null.
        url - The URL of the file request. Must have length of at least 1 and not be null.
        title - The title of the file request. Must have length of at least 1 and not be null.
        created - When this file request was created. Must not be null.
        isOpen - Whether or not the file request is open. If the file request is closed, it will not accept any more file submissions.
        fileCount - The number of files this file request has received.
        Returns:
        builder for this class.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toStringMultiline

        public java.lang.String toStringMultiline()
        Returns a String representation of this object formatted for easier readability.

        The returned String may contain newlines.

        Returns:
        Formatted, multiline String representation of this object