public class LinkPermissions extends Object
Modifier and Type | Class and Description |
---|---|
static class |
LinkPermissions.Builder
Builder for
LinkPermissions . |
Modifier and Type | Field and Description |
---|---|
protected boolean |
canRevoke |
protected RequestedVisibility |
requestedVisibility |
protected ResolvedVisibility |
resolvedVisibility |
protected SharedLinkAccessFailureReason |
revokeFailureReason |
Constructor and Description |
---|
LinkPermissions(boolean canRevoke)
None
|
LinkPermissions(boolean canRevoke,
ResolvedVisibility resolvedVisibility,
RequestedVisibility requestedVisibility,
SharedLinkAccessFailureReason revokeFailureReason)
Use
newBuilder to create instances of this class without
specifying values for all optional fields. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
boolean |
getCanRevoke()
Whether the caller can revoke the shared link
|
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.
|
String |
toString() |
String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
protected final ResolvedVisibility resolvedVisibility
protected final RequestedVisibility requestedVisibility
protected final boolean canRevoke
protected final SharedLinkAccessFailureReason revokeFailureReason
public LinkPermissions(boolean canRevoke, ResolvedVisibility resolvedVisibility, RequestedVisibility requestedVisibility, SharedLinkAccessFailureReason revokeFailureReason)
newBuilder
to create instances of this class without
specifying values for all optional fields.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).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 in getResolvedVisibility()
. This is shown only if the
caller is the link's owner.revokeFailureReason
- The failure reason for revoking the link.
This field will only be present if the getCanRevoke()
is false
.public LinkPermissions(boolean canRevoke)
The default values for unset fields will be used.
canRevoke
- Whether the caller can revoke the shared link.public boolean getCanRevoke()
public ResolvedVisibility getResolvedVisibility()
null
if not present.public RequestedVisibility getRequestedVisibility()
getResolvedVisibility()
. This is shown only if the caller
is the link's owner.null
if not present.public SharedLinkAccessFailureReason getRevokeFailureReason()
getCanRevoke()
is false
.null
if not present.public static LinkPermissions.Builder newBuilder(boolean canRevoke)
canRevoke
- Whether the caller can revoke the shared link.public String toStringMultiline()
The returned String may contain newlines.