Package com.dropbox.core.v2.sharing
Class LinkMetadata
- java.lang.Object
-
- com.dropbox.core.v2.sharing.LinkMetadata
-
- Direct Known Subclasses:
CollectionLinkMetadata
,PathLinkMetadata
public class LinkMetadata extends java.lang.Object
Metadata for a shared link. This can be either aPathLinkMetadata
orCollectionLinkMetadata
.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.Date
expires
protected java.lang.String
url
protected Visibility
visibility
-
Constructor Summary
Constructors Constructor Description LinkMetadata(java.lang.String url, Visibility visibility)
Metadata for a shared link.LinkMetadata(java.lang.String url, Visibility visibility, java.util.Date expires)
Metadata for a shared link.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.util.Date
getExpires()
Expiration time, if set.java.lang.String
getUrl()
URL of the shared link.Visibility
getVisibility()
Who can access the link.int
hashCode()
java.lang.String
toString()
java.lang.String
toStringMultiline()
Returns a String representation of this object formatted for easier readability.
-
-
-
Field Detail
-
url
@Nonnull protected final java.lang.String url
-
visibility
@Nonnull protected final Visibility visibility
-
expires
@Nullable protected final java.util.Date expires
-
-
Constructor Detail
-
LinkMetadata
public LinkMetadata(@Nonnull java.lang.String url, @Nonnull Visibility visibility, @Nullable java.util.Date expires)
Metadata for a shared link. This can be either aPathLinkMetadata
orCollectionLinkMetadata
.- Parameters:
url
- URL of the shared link. Must not benull
.visibility
- Who can access the link. Must not benull
.expires
- Expiration time, if set. By default the link won't expire.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
LinkMetadata
public LinkMetadata(@Nonnull java.lang.String url, @Nonnull Visibility visibility)
Metadata for a shared link. This can be either aPathLinkMetadata
orCollectionLinkMetadata
.The default values for unset fields will be used.
- Parameters:
url
- URL of the shared link. Must not benull
.visibility
- Who can access the link. Must 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
.
-
getVisibility
@Nonnull public Visibility getVisibility()
Who can access the link.- Returns:
- value for this field, never
null
.
-
getExpires
@Nullable public java.util.Date getExpires()
Expiration time, if set. By default the link won't expire.- Returns:
- value for this field, or
null
if not present.
-
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
-
-