Package com.dropbox.core.v2.filerequests
Class FileRequest
- java.lang.Object
-
- com.dropbox.core.v2.filerequests.FileRequest
-
public class FileRequest extends java.lang.ObjectA file request for receiving files into the user's Dropbox account.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFileRequest.BuilderBuilder forFileRequest.
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Datecreatedprotected FileRequestDeadlinedeadlineprotected java.lang.Stringdescriptionprotected java.lang.Stringdestinationprotected longfileCountprotected java.lang.Stringidprotected booleanisOpenprotected java.lang.Stringtitleprotected java.lang.Stringurl
-
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 booleanequals(java.lang.Object obj)java.util.DategetCreated()When this file request was created.FileRequestDeadlinegetDeadline()The deadline for this file request.java.lang.StringgetDescription()A description of the file request.java.lang.StringgetDestination()The path of the folder in the Dropbox where uploaded files will be sent.longgetFileCount()The number of files this file request has received.java.lang.StringgetId()The ID of the file request.booleangetIsOpen()Whether or not the file request is open.java.lang.StringgetTitle()The title of the file request.java.lang.StringgetUrl()The URL of the file request.inthashCode()static FileRequest.BuildernewBuilder(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.StringtoString()java.lang.StringtoStringMultiline()Returns a String representation of this object formatted for easier readability.
-
-
-
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
-
deadline
protected final FileRequestDeadline deadline
-
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 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.- 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 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:
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 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
public FileRequestDeadline 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
public java.lang.String getDescription()
A description of the file request.- Returns:
- value for this field, or
nullif 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 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:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.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
-
-