Package com.dropbox.core.v2.sharing
Class SharedContentLinkMetadataBase
- java.lang.Object
-
- com.dropbox.core.v2.sharing.SharedContentLinkMetadataBase
-
- Direct Known Subclasses:
ExpectedSharedContentLinkMetadata
,SharedContentLinkMetadata
public class SharedContentLinkMetadataBase extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SharedContentLinkMetadataBase.Builder
Builder forSharedContentLinkMetadataBase
.
-
Field Summary
Fields Modifier and Type Field Description protected AccessLevel
accessLevel
protected java.util.List<LinkAudience>
audienceOptions
protected AudienceRestrictingSharedFolder
audienceRestrictingSharedFolder
protected LinkAudience
currentAudience
protected java.util.Date
expiry
protected java.util.List<LinkPermission>
linkPermissions
protected boolean
passwordProtected
-
Constructor Summary
Constructors Constructor Description SharedContentLinkMetadataBase(java.util.List<LinkAudience> audienceOptions, LinkAudience currentAudience, java.util.List<LinkPermission> linkPermissions, boolean passwordProtected)
NoneSharedContentLinkMetadataBase(java.util.List<LinkAudience> audienceOptions, LinkAudience currentAudience, java.util.List<LinkPermission> linkPermissions, boolean passwordProtected, AccessLevel accessLevel, AudienceRestrictingSharedFolder audienceRestrictingSharedFolder, java.util.Date expiry)
UsenewBuilder(java.util.List<com.dropbox.core.v2.sharing.LinkAudience>,com.dropbox.core.v2.sharing.LinkAudience,java.util.List<com.dropbox.core.v2.sharing.LinkPermission>,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)
AccessLevel
getAccessLevel()
The access level on the link for this file.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.int
hashCode()
static SharedContentLinkMetadataBase.Builder
newBuilder(java.util.List<LinkAudience> audienceOptions, LinkAudience currentAudience, java.util.List<LinkPermission> linkPermissions, boolean passwordProtected)
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
-
accessLevel
@Nullable protected final AccessLevel accessLevel
-
audienceOptions
@Nonnull protected final java.util.List<LinkAudience> audienceOptions
-
audienceRestrictingSharedFolder
@Nullable protected final AudienceRestrictingSharedFolder audienceRestrictingSharedFolder
-
currentAudience
@Nonnull protected final LinkAudience currentAudience
-
expiry
@Nullable protected final java.util.Date expiry
-
linkPermissions
@Nonnull protected final java.util.List<LinkPermission> linkPermissions
-
passwordProtected
protected final boolean passwordProtected
-
-
Constructor Detail
-
SharedContentLinkMetadataBase
public SharedContentLinkMetadataBase(@Nonnull java.util.List<LinkAudience> audienceOptions, @Nonnull LinkAudience currentAudience, @Nonnull java.util.List<LinkPermission> linkPermissions, boolean passwordProtected, @Nullable AccessLevel accessLevel, @Nullable AudienceRestrictingSharedFolder audienceRestrictingSharedFolder, @Nullable java.util.Date expiry)
UsenewBuilder(java.util.List<com.dropbox.core.v2.sharing.LinkAudience>,com.dropbox.core.v2.sharing.LinkAudience,java.util.List<com.dropbox.core.v2.sharing.LinkPermission>,boolean)
to create instances of this class without specifying values for all optional fields.- Parameters:
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 anull
item and not benull
.currentAudience
- The current audience of the link. Must not benull
.linkPermissions
- A list of permissions for actions you can perform on the link. Must not contain anull
item and not benull
.passwordProtected
- Whether the link is protected by a password.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.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
SharedContentLinkMetadataBase
public SharedContentLinkMetadataBase(@Nonnull java.util.List<LinkAudience> audienceOptions, @Nonnull LinkAudience currentAudience, @Nonnull java.util.List<LinkPermission> linkPermissions, boolean passwordProtected)
NoneThe default values for unset fields will be used.
- Parameters:
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 anull
item and not benull
.currentAudience
- The current audience of the link. Must not benull
.linkPermissions
- A list of permissions for actions you can perform on the link. Must not contain anull
item and not benull
.passwordProtected
- Whether the link is protected by a password.- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
-
Method Detail
-
getAudienceOptions
@Nonnull public java.util.List<LinkAudience> getAudienceOptions()
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.- Returns:
- value for this field, never
null
.
-
getCurrentAudience
@Nonnull public LinkAudience getCurrentAudience()
The current audience of the link.- Returns:
- value for this field, never
null
.
-
getLinkPermissions
@Nonnull public java.util.List<LinkPermission> getLinkPermissions()
A list of permissions for actions you can perform on the link.- Returns:
- value for this field, never
null
.
-
getPasswordProtected
public boolean getPasswordProtected()
Whether the link is protected by a password.- Returns:
- value for this field.
-
getAccessLevel
@Nullable public AccessLevel getAccessLevel()
The access level on the link for this file.- Returns:
- value for this field, or
null
if not present.
-
getAudienceRestrictingSharedFolder
@Nullable public AudienceRestrictingSharedFolder getAudienceRestrictingSharedFolder()
The shared folder that prevents the link audience for this link from being more restrictive.- Returns:
- value for this field, or
null
if not present.
-
getExpiry
@Nullable public java.util.Date getExpiry()
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.- Returns:
- value for this field, or
null
if not present.
-
newBuilder
public static SharedContentLinkMetadataBase.Builder newBuilder(java.util.List<LinkAudience> audienceOptions, LinkAudience currentAudience, java.util.List<LinkPermission> linkPermissions, boolean passwordProtected)
Returns a new builder for creating an instance of this class.- Parameters:
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 anull
item and not benull
.currentAudience
- The current audience of the link. Must not benull
.linkPermissions
- A list of permissions for actions you can perform on the link. Must not contain anull
item and not benull
.passwordProtected
- Whether the link is protected by a password.- Returns:
- builder for this class.
- Throws:
java.lang.IllegalArgumentException
- If any argument does not meet its preconditions.
-
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
-
-