public class LinkMetadata extends Object
PathLinkMetadata
or
CollectionLinkMetadata
.Modifier and Type | Field and Description |
---|---|
protected Date |
expires |
protected String |
url |
protected Visibility |
visibility |
Constructor and Description |
---|
LinkMetadata(String url,
Visibility visibility)
Metadata for a shared link.
|
LinkMetadata(String url,
Visibility visibility,
Date expires)
Metadata for a shared link.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Date |
getExpires()
Expiration time, if set.
|
String |
getUrl()
URL of the shared link.
|
Visibility |
getVisibility()
Who can access the link.
|
int |
hashCode() |
String |
toString() |
String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
protected final String url
protected final Visibility visibility
protected final Date expires
public LinkMetadata(String url, Visibility visibility, Date expires)
PathLinkMetadata
or CollectionLinkMetadata
.url
- URL of the shared link. Must not be null
.visibility
- Who can access the link. Must not be null
.expires
- Expiration time, if set. By default the link won't
expire.IllegalArgumentException
- If any argument does not meet its
preconditions.public LinkMetadata(String url, Visibility visibility)
PathLinkMetadata
or CollectionLinkMetadata
.
The default values for unset fields will be used.
url
- URL of the shared link. Must not be null
.visibility
- Who can access the link. Must not be null
.IllegalArgumentException
- If any argument does not meet its
preconditions.public String getUrl()
null
.public Visibility getVisibility()
null
.public Date getExpires()
null
if not present.public String toStringMultiline()
The returned String may contain newlines.