public class SharedContentLinkMetadata extends SharedContentLinkMetadataBase
Modifier and Type | Class and Description |
---|---|
static class |
SharedContentLinkMetadata.Builder
Builder for
SharedContentLinkMetadata . |
Modifier and Type | Field and Description |
---|---|
protected AudienceExceptions |
audienceExceptions |
protected java.lang.String |
url |
accessLevel, audienceOptions, audienceRestrictingSharedFolder, currentAudience, expiry, linkPermissions, passwordProtected
Constructor and Description |
---|
SharedContentLinkMetadata(java.util.List<LinkAudience> audienceOptions,
LinkAudience currentAudience,
java.util.List<LinkPermission> linkPermissions,
boolean passwordProtected,
java.lang.String url)
Metadata of a shared link for a file or folder.
|
SharedContentLinkMetadata(java.util.List<LinkAudience> audienceOptions,
LinkAudience currentAudience,
java.util.List<LinkPermission> linkPermissions,
boolean passwordProtected,
java.lang.String url,
AccessLevel accessLevel,
AudienceRestrictingSharedFolder audienceRestrictingSharedFolder,
java.util.Date expiry,
AudienceExceptions audienceExceptions)
Metadata of a shared link for a file or folder.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
AccessLevel |
getAccessLevel()
The access level on the link for this file.
|
AudienceExceptions |
getAudienceExceptions()
The content inside this folder with link audience different than this
folder's.
|
java.util.List<LinkAudience> |
getAudienceOptions()
The audience options that are available for the content.
|
AudienceRestrictingSharedFolder |
getAudienceRestrictingSharedFolder()
The shared folder that prevents the link audience for this link from
being more restrictive.
|
LinkAudience |
getCurrentAudience()
The current audience of the link.
|
java.util.Date |
getExpiry()
Whether the link has an expiry set on it.
|
java.util.List<LinkPermission> |
getLinkPermissions()
A list of permissions for actions you can perform on the link.
|
boolean |
getPasswordProtected()
Whether the link is protected by a password.
|
java.lang.String |
getUrl()
The URL of the link.
|
int |
hashCode() |
static SharedContentLinkMetadata.Builder |
newBuilder(java.util.List<LinkAudience> audienceOptions,
LinkAudience currentAudience,
java.util.List<LinkPermission> linkPermissions,
boolean passwordProtected,
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.
|
newBuilder
protected final AudienceExceptions audienceExceptions
protected final java.lang.String url
public SharedContentLinkMetadata(java.util.List<LinkAudience> audienceOptions, LinkAudience currentAudience, java.util.List<LinkPermission> linkPermissions, boolean passwordProtected, java.lang.String url, AccessLevel accessLevel, AudienceRestrictingSharedFolder audienceRestrictingSharedFolder, java.util.Date expiry, AudienceExceptions audienceExceptions)
Use newBuilder
to create instances of this class without
specifying values for all optional fields.
audienceOptions
- The audience options that are available for the
content. Some audience options may be unavailable. For example,
team_only may be unavailable if the content is not owned by a user on
a team. The 'default' audience option is always available if the user
can modify link settings. Must not contain a null
item and
not be null
.currentAudience
- The current audience of the link. Must not be
null
.linkPermissions
- A list of permissions for actions you can perform
on the link. Must not contain a null
item and not be null
.passwordProtected
- Whether the link is protected by a password.url
- The URL of the link. Must not be null
.accessLevel
- The access level on the link for this file.audienceRestrictingSharedFolder
- The shared folder that prevents
the link audience for this link from being more restrictive.expiry
- Whether the link has an expiry set on it. A link with an
expiry will have its audience changed to members when the expiry is
reached.audienceExceptions
- The content inside this folder with link
audience different than this folder's. This is only returned when an
endpoint that returns metadata for a single shared folder is called,
e.g. /get_folder_metadata.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public SharedContentLinkMetadata(java.util.List<LinkAudience> audienceOptions, LinkAudience currentAudience, java.util.List<LinkPermission> linkPermissions, boolean passwordProtected, java.lang.String url)
The default values for unset fields will be used.
audienceOptions
- The audience options that are available for the
content. Some audience options may be unavailable. For example,
team_only may be unavailable if the content is not owned by a user on
a team. The 'default' audience option is always available if the user
can modify link settings. Must not contain a null
item and
not be null
.currentAudience
- The current audience of the link. Must not be
null
.linkPermissions
- A list of permissions for actions you can perform
on the link. Must not contain a null
item and not be null
.passwordProtected
- Whether the link is protected by a password.url
- The URL of the link. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public java.util.List<LinkAudience> getAudienceOptions()
getAudienceOptions
in class SharedContentLinkMetadataBase
null
.public LinkAudience getCurrentAudience()
getCurrentAudience
in class SharedContentLinkMetadataBase
null
.public java.util.List<LinkPermission> getLinkPermissions()
getLinkPermissions
in class SharedContentLinkMetadataBase
null
.public boolean getPasswordProtected()
getPasswordProtected
in class SharedContentLinkMetadataBase
public java.lang.String getUrl()
null
.public AccessLevel getAccessLevel()
getAccessLevel
in class SharedContentLinkMetadataBase
null
if not present.public AudienceRestrictingSharedFolder getAudienceRestrictingSharedFolder()
getAudienceRestrictingSharedFolder
in class SharedContentLinkMetadataBase
null
if not present.public java.util.Date getExpiry()
getExpiry
in class SharedContentLinkMetadataBase
null
if not present.public AudienceExceptions getAudienceExceptions()
null
if not present.public static SharedContentLinkMetadata.Builder newBuilder(java.util.List<LinkAudience> audienceOptions, LinkAudience currentAudience, java.util.List<LinkPermission> linkPermissions, boolean passwordProtected, java.lang.String url)
audienceOptions
- The audience options that are available for the
content. Some audience options may be unavailable. For example,
team_only may be unavailable if the content is not owned by a user on
a team. The 'default' audience option is always available if the user
can modify link settings. Must not contain a null
item and
not be null
.currentAudience
- The current audience of the link. Must not be
null
.linkPermissions
- A list of permissions for actions you can perform
on the link. Must not contain a null
item and not be null
.passwordProtected
- Whether the link is protected by a password.url
- The URL of the link. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public int hashCode()
hashCode
in class SharedContentLinkMetadataBase
public boolean equals(java.lang.Object obj)
equals
in class SharedContentLinkMetadataBase
public java.lang.String toString()
toString
in class SharedContentLinkMetadataBase
public java.lang.String toStringMultiline()
The returned String may contain newlines.
toStringMultiline
in class SharedContentLinkMetadataBase