Package com.dropbox.core.v2.files
Class MinimalFileLinkMetadata
- java.lang.Object
-
- com.dropbox.core.v2.files.MinimalFileLinkMetadata
-
public class MinimalFileLinkMetadata extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MinimalFileLinkMetadata.Builder
Builder forMinimalFileLinkMetadata
.
-
Constructor Summary
Constructors Constructor Description MinimalFileLinkMetadata(java.lang.String url, java.lang.String rev)
NoneMinimalFileLinkMetadata(java.lang.String url, java.lang.String rev, java.lang.String id, java.lang.String path)
UsenewBuilder(java.lang.String,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
getId()
Unique identifier for the linked file.java.lang.String
getPath()
Full path in the user's Dropbox.java.lang.String
getRev()
A unique identifier for the current revision of a file.java.lang.String
getUrl()
URL of the shared link.int
hashCode()
static MinimalFileLinkMetadata.Builder
newBuilder(java.lang.String url, java.lang.String rev)
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
-
MinimalFileLinkMetadata
public MinimalFileLinkMetadata(@Nonnull java.lang.String url, @Nonnull java.lang.String rev, @Nullable java.lang.String id, @Nullable java.lang.String path)
UsenewBuilder(java.lang.String,java.lang.String)
to create instances of this class without specifying values for all optional fields.- Parameters:
url
- URL of the shared link. Must not benull
.rev
- A unique identifier for the current revision of a file. This field is the same rev as elsewhere in the API and can be used to detect changes and avoid conflicts. Must have length of at least 9, match pattern "[0-9a-f]+
", and not benull
.id
- Unique identifier for the linked file. Must have length of at least 1.path
- Full path in the user's Dropbox. This always starts with a slash. This field will only be present only if the linked file is in the authenticated user's Dropbox.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
MinimalFileLinkMetadata
public MinimalFileLinkMetadata(@Nonnull java.lang.String url, @Nonnull java.lang.String rev)
NoneThe default values for unset fields will be used.
- Parameters:
url
- URL of the shared link. Must not benull
.rev
- A unique identifier for the current revision of a file. This field is the same rev as elsewhere in the API and can be used to detect changes and avoid conflicts. Must have length of at least 9, match pattern "[0-9a-f]+
", and not benull
.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
-
Method Detail
-
getUrl
@Nonnull public java.lang.String getUrl()
URL of the shared link.- Returns:
- value for this field, never
null
.
-
getRev
@Nonnull public java.lang.String getRev()
A unique identifier for the current revision of a file. This field is the same rev as elsewhere in the API and can be used to detect changes and avoid conflicts.- Returns:
- value for this field, never
null
.
-
getId
@Nullable public java.lang.String getId()
Unique identifier for the linked file.- Returns:
- value for this field, or
null
if not present.
-
getPath
@Nullable public java.lang.String getPath()
Full path in the user's Dropbox. This always starts with a slash. This field will only be present only if the linked file is in the authenticated user's Dropbox.- Returns:
- value for this field, or
null
if not present.
-
newBuilder
public static MinimalFileLinkMetadata.Builder newBuilder(java.lang.String url, java.lang.String rev)
Returns a new builder for creating an instance of this class.- Parameters:
url
- URL of the shared link. Must not benull
.rev
- A unique identifier for the current revision of a file. This field is the same rev as elsewhere in the API and can be used to detect changes and avoid conflicts. Must have length of at least 9, match pattern "[0-9a-f]+
", and 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
-
-