public static class LinkPermissions.Builder extends Object
LinkPermissions
.Modifier and Type | Field and Description |
---|---|
protected boolean |
canRevoke |
protected RequestedVisibility |
requestedVisibility |
protected ResolvedVisibility |
resolvedVisibility |
protected SharedLinkAccessFailureReason |
revokeFailureReason |
Modifier | Constructor and Description |
---|---|
protected |
Builder(boolean canRevoke) |
Modifier and Type | Method and Description |
---|---|
LinkPermissions |
build()
Builds an instance of
LinkPermissions configured with this
builder's values |
LinkPermissions.Builder |
withRequestedVisibility(RequestedVisibility requestedVisibility)
Set value for optional field.
|
LinkPermissions.Builder |
withResolvedVisibility(ResolvedVisibility resolvedVisibility)
Set value for optional field.
|
LinkPermissions.Builder |
withRevokeFailureReason(SharedLinkAccessFailureReason revokeFailureReason)
Set value for optional field.
|
protected final boolean canRevoke
protected ResolvedVisibility resolvedVisibility
protected RequestedVisibility requestedVisibility
protected SharedLinkAccessFailureReason revokeFailureReason
public LinkPermissions.Builder withResolvedVisibility(ResolvedVisibility resolvedVisibility)
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).public LinkPermissions.Builder withRequestedVisibility(RequestedVisibility requestedVisibility)
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 LinkPermissions.getResolvedVisibility()
. This is
shown only if the caller is the link's owner.public LinkPermissions.Builder withRevokeFailureReason(SharedLinkAccessFailureReason revokeFailureReason)
revokeFailureReason
- The failure reason for revoking the link.
This field will only be present if the LinkPermissions.getCanRevoke()
is false
.public LinkPermissions build()
LinkPermissions
configured with this
builder's valuesLinkPermissions