public class LinkMetadata
extends java.lang.Object
PathLinkMetadata
or
CollectionLinkMetadata
.Modifier and Type | Field and Description |
---|---|
protected java.util.Date |
expires |
protected java.lang.String |
url |
protected Visibility |
visibility |
Constructor and 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.
|
Modifier and Type | Method and 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.
|
protected final java.lang.String url
protected final Visibility visibility
protected final java.util.Date expires
public LinkMetadata(java.lang.String url, Visibility visibility, java.util.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.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public LinkMetadata(java.lang.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
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public java.lang.String getUrl()
null
.public Visibility getVisibility()
null
.public java.util.Date getExpires()
null
if not present.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringMultiline()
The returned String may contain newlines.