Class LinkPermissions.Builder

    • Constructor Detail

      • Builder

        protected Builder​(boolean canRevoke)
    • Method Detail

      • withResolvedVisibility

        public LinkPermissions.Builder withResolvedVisibility​(ResolvedVisibility resolvedVisibility)
        Set value for optional field.
        Parameters:
        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.
        Returns:
        this builder
      • withRequestedVisibility

        public LinkPermissions.Builder withRequestedVisibility​(RequestedVisibility requestedVisibility)
        Set value for optional field.
        Parameters:
        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 and resolved_visibility is returned instead of effective_audience.
        Returns:
        this builder
      • withEffectiveAudience

        public LinkPermissions.Builder withEffectiveAudience​(LinkAudience effectiveAudience)
        Set value for optional field.
        Parameters:
        effectiveAudience - The type of audience who can benefit from the access level specified by the `link_access_level` field.
        Returns:
        this builder
      • withLinkAccessLevel

        public LinkPermissions.Builder withLinkAccessLevel​(LinkAccessLevel linkAccessLevel)
        Set value for optional field.
        Parameters:
        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.
        Returns:
        this builder