Package com.dropbox.core.v2.files
Class SharedLinkFileInfo
- java.lang.Object
-
- com.dropbox.core.v2.files.SharedLinkFileInfo
-
public class SharedLinkFileInfo extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SharedLinkFileInfo.Builder
Builder forSharedLinkFileInfo
.
-
Constructor Summary
Constructors Constructor Description SharedLinkFileInfo(java.lang.String url)
NoneSharedLinkFileInfo(java.lang.String url, java.lang.String path, java.lang.String password)
UsenewBuilder(java.lang.String)
to create instances of this class without specifying values for all optional fields.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.String
getPassword()
Password for the shared link.java.lang.String
getPath()
The path corresponding to a file in a shared link to a folder.java.lang.String
getUrl()
The shared link corresponding to either a file or shared link to a folder.int
hashCode()
static SharedLinkFileInfo.Builder
newBuilder(java.lang.String url)
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.
-
-
-
Constructor Detail
-
SharedLinkFileInfo
public SharedLinkFileInfo(@Nonnull java.lang.String url, @Nullable java.lang.String path, @Nullable java.lang.String password)
UsenewBuilder(java.lang.String)
to create instances of this class without specifying values for all optional fields.- Parameters:
url
- The shared link corresponding to either a file or shared link to a folder. If it is for a folder shared link, we use the path param to determine for which file in the folder the view is for. Must not benull
.path
- The path corresponding to a file in a shared link to a folder. Required for shared links to folders.password
- Password for the shared link. Required for password-protected shared links to files unless it can be read from a cookie.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
SharedLinkFileInfo
public SharedLinkFileInfo(@Nonnull java.lang.String url)
NoneThe default values for unset fields will be used.
- Parameters:
url
- The shared link corresponding to either a file or shared link to a folder. If it is for a folder shared link, we use the path param to determine for which file in the folder the view is for. Must not benull
.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
-
Method Detail
-
getUrl
@Nonnull public java.lang.String getUrl()
The shared link corresponding to either a file or shared link to a folder. If it is for a folder shared link, we use the path param to determine for which file in the folder the view is for.- Returns:
- value for this field, never
null
.
-
getPath
@Nullable public java.lang.String getPath()
The path corresponding to a file in a shared link to a folder. Required for shared links to folders.- Returns:
- value for this field, or
null
if not present.
-
getPassword
@Nullable public java.lang.String getPassword()
Password for the shared link. Required for password-protected shared links to files unless it can be read from a cookie.- Returns:
- value for this field, or
null
if not present.
-
newBuilder
public static SharedLinkFileInfo.Builder newBuilder(java.lang.String url)
Returns a new builder for creating an instance of this class.- Parameters:
url
- The shared link corresponding to either a file or shared link to a folder. If it is for a folder shared link, we use the path param to determine for which file in the folder the view is for. Must not benull
.- Returns:
- builder for this class.
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in 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
-
-