Package com.dropbox.core.v2.sharing
Class LinkPermissions
- java.lang.Object
-
- com.dropbox.core.v2.sharing.LinkPermissions
-
public class LinkPermissions extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LinkPermissions.Builder
Builder forLinkPermissions
.
-
Field Summary
Fields Modifier and Type Field Description protected boolean
canRevoke
protected LinkAudience
effectiveAudience
protected LinkAccessLevel
linkAccessLevel
protected RequestedVisibility
requestedVisibility
protected ResolvedVisibility
resolvedVisibility
protected SharedLinkAccessFailureReason
revokeFailureReason
-
Constructor Summary
Constructors Constructor Description LinkPermissions(boolean canRevoke)
NoneLinkPermissions(boolean canRevoke, ResolvedVisibility resolvedVisibility, RequestedVisibility requestedVisibility, SharedLinkAccessFailureReason revokeFailureReason, LinkAudience effectiveAudience, LinkAccessLevel linkAccessLevel)
UsenewBuilder(boolean)
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)
boolean
getCanRevoke()
Whether the caller can revoke the shared link.LinkAudience
getEffectiveAudience()
The type of audience who can benefit from the access level specified by the `link_access_level` field.LinkAccessLevel
getLinkAccessLevel()
The access level that the link will grant to its users.RequestedVisibility
getRequestedVisibility()
The shared link's requested visibility.ResolvedVisibility
getResolvedVisibility()
The current visibility of the link after considering the shared links policies of the the team (in case the link's owner is part of a team) and the shared folder (in case the linked file is part of a shared folder).SharedLinkAccessFailureReason
getRevokeFailureReason()
The failure reason for revoking the link.int
hashCode()
static LinkPermissions.Builder
newBuilder(boolean canRevoke)
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.
-
-
-
Field Detail
-
resolvedVisibility
protected final ResolvedVisibility resolvedVisibility
-
requestedVisibility
protected final RequestedVisibility requestedVisibility
-
canRevoke
protected final boolean canRevoke
-
revokeFailureReason
protected final SharedLinkAccessFailureReason revokeFailureReason
-
effectiveAudience
protected final LinkAudience effectiveAudience
-
linkAccessLevel
protected final LinkAccessLevel linkAccessLevel
-
-
Constructor Detail
-
LinkPermissions
public LinkPermissions(boolean canRevoke, ResolvedVisibility resolvedVisibility, RequestedVisibility requestedVisibility, SharedLinkAccessFailureReason revokeFailureReason, LinkAudience effectiveAudience, LinkAccessLevel linkAccessLevel)
UsenewBuilder(boolean)
to create instances of this class without specifying values for all optional fields.- Parameters:
canRevoke
- Whether the caller can revoke the shared link.resolvedVisibility
- The current visibility of the link after considering the shared links policies of the the team (in case the link's owner is part of a team) and the shared folder (in case the linked file is part of a shared folder). This field is shown only if the caller has access to this info (the link's owner always has access to this data). For some links, an effective_audience value is returned instead.requestedVisibility
- The shared link's requested visibility. This can be overridden by the team and shared folder policies. The final visibility, after considering these policies, can be found ingetResolvedVisibility()
. This is shown only if the caller is the link's owner and resolved_visibility is returned instead of effective_audience.revokeFailureReason
- The failure reason for revoking the link. This field will only be present if thegetCanRevoke()
isfalse
.effectiveAudience
- The type of audience who can benefit from the access level specified by the `link_access_level` field.linkAccessLevel
- The access level that the link will grant to its users. A link can grant additional rights to a user beyond their current access level. For example, if a user was invited as a viewer to a file, and then opens a link with `link_access_level` set to `editor`, then they will gain editor privileges. The `link_access_level` is a property of the link, and does not depend on who is calling this API. In particular, `link_access_level` does not take into account the API caller's current permissions to the content.
-
LinkPermissions
public LinkPermissions(boolean canRevoke)
NoneThe default values for unset fields will be used.
- Parameters:
canRevoke
- Whether the caller can revoke the shared link.
-
-
Method Detail
-
getCanRevoke
public boolean getCanRevoke()
Whether the caller can revoke the shared link.- Returns:
- value for this field.
-
getResolvedVisibility
public ResolvedVisibility getResolvedVisibility()
The current visibility of the link after considering the shared links policies of the the team (in case the link's owner is part of a team) and the shared folder (in case the linked file is part of a shared folder). This field is shown only if the caller has access to this info (the link's owner always has access to this data). For some links, an effective_audience value is returned instead.- Returns:
- value for this field, or
null
if not present.
-
getRequestedVisibility
public RequestedVisibility getRequestedVisibility()
The shared link's requested visibility. This can be overridden by the team and shared folder policies. The final visibility, after considering these policies, can be found ingetResolvedVisibility()
. This is shown only if the caller is the link's owner and resolved_visibility is returned instead of effective_audience.- Returns:
- value for this field, or
null
if not present.
-
getRevokeFailureReason
public SharedLinkAccessFailureReason getRevokeFailureReason()
The failure reason for revoking the link. This field will only be present if thegetCanRevoke()
isfalse
.- Returns:
- value for this field, or
null
if not present.
-
getEffectiveAudience
public LinkAudience getEffectiveAudience()
The type of audience who can benefit from the access level specified by the `link_access_level` field.- Returns:
- value for this field, or
null
if not present.
-
getLinkAccessLevel
public LinkAccessLevel getLinkAccessLevel()
The access level that the link will grant to its users. A link can grant additional rights to a user beyond their current access level. For example, if a user was invited as a viewer to a file, and then opens a link with `link_access_level` set to `editor`, then they will gain editor privileges. The `link_access_level` is a property of the link, and does not depend on who is calling this API. In particular, `link_access_level` does not take into account the API caller's current permissions to the content.- Returns:
- value for this field, or
null
if not present.
-
newBuilder
public static LinkPermissions.Builder newBuilder(boolean canRevoke)
Returns a new builder for creating an instance of this class.- Parameters:
canRevoke
- Whether the caller can revoke the shared link.- Returns:
- builder for this class.
-
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
-
-