Class FileRequest

java.lang.Object
com.dropbox.core.v2.filerequests.FileRequest

public class FileRequest extends Object
A file request for receiving files into the user's Dropbox account.
  • Field Details

    • id

      @Nonnull protected final String id
    • url

      @Nonnull protected final String url
    • title

      @Nonnull protected final String title
    • destination

      @Nullable protected final String destination
    • created

      @Nonnull protected final Date created
    • deadline

      @Nullable protected final FileRequestDeadline deadline
    • isOpen

      protected final boolean isOpen
    • fileCount

      protected final long fileCount
    • description

      @Nullable protected final String description
    • videoProjectId

      @Nullable protected final String videoProjectId
  • Constructor Details

    • FileRequest

      public FileRequest(@Nonnull String id, @Nonnull String url, @Nonnull String title, @Nonnull Date created, boolean isOpen, long fileCount, @Nullable String destination, @Nullable FileRequestDeadline deadline, @Nullable String description, @Nullable String videoProjectId)
      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.
      videoProjectId - If this request was created from video project, its id.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • FileRequest

      public FileRequest(@Nonnull String id, @Nonnull String url, @Nonnull String title, @Nonnull 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:
      IllegalArgumentException - If any argument does not meet its preconditions.
  • Method Details

    • getId

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

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

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

      @Nonnull public 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

      @Nullable public 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

      @Nullable 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

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

      @Nullable public String getVideoProjectId()
      If this request was created from video project, its id.
      Returns:
      value for this field, or null if not present.
    • newBuilder

      public static FileRequest.Builder newBuilder(String id, String url, String title, 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:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • hashCode

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

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

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

      public 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