Package com.dropbox.core.v2.filerequests
Class FileRequest
java.lang.Object
com.dropbox.core.v2.filerequests.FileRequest
A file request for receiving
files into the user's Dropbox account.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFileRequest(String id, String url, String title, Date created, boolean isOpen, long fileCount) A file request for receiving files into the user's Dropbox account.FileRequest(String id, String url, String title, Date created, boolean isOpen, long fileCount, String destination, FileRequestDeadline deadline, String description, String videoProjectId) A file request for receiving files into the user's Dropbox account. -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhen this file request was created.The deadline for this file request.A description of the file request.The path of the folder in the Dropbox where uploaded files will be sent.longThe number of files this file request has received.getId()The ID of the file request.booleanWhether or not the file request is open.getTitle()The title of the file request.getUrl()The URL of the file request.If this request was created from video project, its id.inthashCode()static FileRequest.BuildernewBuilder(String id, String url, String title, Date created, boolean isOpen, long fileCount) Returns a new builder for creating an instance of this class.toString()Returns a String representation of this object formatted for easier readability.
-
Field Details
-
id
-
url
-
title
-
destination
-
created
-
deadline
-
isOpen
protected final boolean isOpen -
fileCount
protected final long fileCount -
description
-
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 benull.url- The URL of the file request. Must have length of at least 1 and not benull.title- The title of the file request. Must have length of at least 1 and not benull.created- When this file request was created. Must not benull.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 benullif 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 benull.url- The URL of the file request. Must have length of at least 1 and not benull.title- The title of the file request. Must have length of at least 1 and not benull.created- When this file request was created. Must not benull.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
The ID of the file request.- Returns:
- value for this field, never
null.
-
getUrl
The URL of the file request.- Returns:
- value for this field, never
null.
-
getTitle
The title of the file request.- Returns:
- value for this field, never
null.
-
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
The path of the folder in the Dropbox where uploaded files will be sent. This can benullif 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
nullif not present.
-
getDeadline
The deadline for this file request. Only set if the request has a deadline.- Returns:
- value for this field, or
nullif not present.
-
getDescription
A description of the file request.- Returns:
- value for this field, or
nullif not present.
-
getVideoProjectId
If this request was created from video project, its id.- Returns:
- value for this field, or
nullif 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 benull.url- The URL of the file request. Must have length of at least 1 and not benull.title- The title of the file request. Must have length of at least 1 and not benull.created- When this file request was created. Must not benull.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() -
equals
-
toString
-
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
-