Package com.dropbox.core.v2.filerequests
Class FileRequest.Builder
- java.lang.Object
-
- com.dropbox.core.v2.filerequests.FileRequest.Builder
-
- Enclosing class:
- FileRequest
public static class FileRequest.Builder extends java.lang.Object
Builder forFileRequest
.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Date
created
protected FileRequestDeadline
deadline
protected java.lang.String
destination
protected long
fileCount
protected java.lang.String
id
protected boolean
isOpen
protected java.lang.String
title
protected java.lang.String
url
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder(java.lang.String id, java.lang.String url, java.lang.String title, java.util.Date created, boolean isOpen, long fileCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FileRequest
build()
Builds an instance ofFileRequest
configured with this builder's valuesFileRequest.Builder
withDeadline(FileRequestDeadline deadline)
Set value for optional field.FileRequest.Builder
withDestination(java.lang.String destination)
Set value for optional field.
-
-
-
Field Detail
-
id
protected final java.lang.String id
-
url
protected final java.lang.String url
-
title
protected final java.lang.String title
-
created
protected final java.util.Date created
-
isOpen
protected final boolean isOpen
-
fileCount
protected final long fileCount
-
destination
protected java.lang.String destination
-
deadline
protected FileRequestDeadline deadline
-
-
Method Detail
-
withDestination
public FileRequest.Builder withDestination(java.lang.String destination)
Set value for optional field.- Parameters:
destination
- The path of the folder in the Dropbox where uploaded files will be sent. This can benull
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])*
".- Returns:
- this builder
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
withDeadline
public FileRequest.Builder withDeadline(FileRequestDeadline deadline)
Set value for optional field.- Parameters:
deadline
- The deadline for this file request. Only set if the request has a deadline.- Returns:
- this builder
-
build
public FileRequest build()
Builds an instance ofFileRequest
configured with this builder's values- Returns:
- new instance of
FileRequest
-
-