Package com.dropbox.core.v2.sharing
Class SharedLinkMetadata
- java.lang.Object
-
- com.dropbox.core.v2.sharing.SharedLinkMetadata
-
- Direct Known Subclasses:
FileLinkMetadata,FolderLinkMetadata
public class SharedLinkMetadata extends java.lang.ObjectThe metadata of a shared link.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSharedLinkMetadata.BuilderBuilder forSharedLinkMetadata.
-
Field Summary
Fields Modifier and Type Field Description protected TeamcontentOwnerTeamInfoprotected java.util.Dateexpiresprotected java.lang.Stringidprotected LinkPermissionslinkPermissionsprotected java.lang.Stringnameprotected java.lang.StringpathLowerprotected TeamMemberInfoteamMemberInfoprotected java.lang.Stringurl
-
Constructor Summary
Constructors Constructor Description SharedLinkMetadata(java.lang.String url, java.lang.String name, LinkPermissions linkPermissions)The metadata of a shared link.SharedLinkMetadata(java.lang.String url, java.lang.String name, LinkPermissions linkPermissions, java.lang.String id, java.util.Date expires, java.lang.String pathLower, TeamMemberInfo teamMemberInfo, Team contentOwnerTeamInfo)The metadata of a shared link.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)TeamgetContentOwnerTeamInfo()The team information of the content's owner.java.util.DategetExpires()Expiration time, if set.java.lang.StringgetId()A unique identifier for the linked file.LinkPermissionsgetLinkPermissions()The link's access permissions.java.lang.StringgetName()The linked file name (including extension).java.lang.StringgetPathLower()The lowercased full path in the user's Dropbox.TeamMemberInfogetTeamMemberInfo()The team membership information of the link's owner.java.lang.StringgetUrl()URL of the shared link.inthashCode()static SharedLinkMetadata.BuildernewBuilder(java.lang.String url, java.lang.String name, LinkPermissions linkPermissions)Returns a new builder for creating an instance of this class.java.lang.StringtoString()java.lang.StringtoStringMultiline()Returns a String representation of this object formatted for easier readability.
-
-
-
Field Detail
-
url
@Nonnull protected final java.lang.String url
-
id
@Nullable protected final java.lang.String id
-
name
@Nonnull protected final java.lang.String name
-
expires
@Nullable protected final java.util.Date expires
-
pathLower
@Nullable protected final java.lang.String pathLower
-
linkPermissions
@Nonnull protected final LinkPermissions linkPermissions
-
teamMemberInfo
@Nullable protected final TeamMemberInfo teamMemberInfo
-
contentOwnerTeamInfo
@Nullable protected final Team contentOwnerTeamInfo
-
-
Constructor Detail
-
SharedLinkMetadata
public SharedLinkMetadata(@Nonnull java.lang.String url, @Nonnull java.lang.String name, @Nonnull LinkPermissions linkPermissions, @Nullable java.lang.String id, @Nullable java.util.Date expires, @Nullable java.lang.String pathLower, @Nullable TeamMemberInfo teamMemberInfo, @Nullable Team contentOwnerTeamInfo)The metadata of a shared link.Use
newBuilder(java.lang.String,java.lang.String,com.dropbox.core.v2.sharing.LinkPermissions)to create instances of this class without specifying values for all optional fields.- Parameters:
url- URL of the shared link. Must not benull.name- The linked file name (including extension). This never contains a slash. Must not benull.linkPermissions- The link's access permissions. Must not benull.id- A unique identifier for the linked file. Must have length of at least 1.expires- Expiration time, if set. By default the link won't expire.pathLower- The lowercased full path in the user's Dropbox. This always starts with a slash. This field will only be present only if the linked file is in the authenticated user's dropbox.teamMemberInfo- The team membership information of the link's owner. This field will only be present if the link's owner is a team member.contentOwnerTeamInfo- The team information of the content's owner. This field will only be present if the content's owner is a team member and the content's owner team is different from the link's owner team.- Throws:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
-
SharedLinkMetadata
public SharedLinkMetadata(@Nonnull java.lang.String url, @Nonnull java.lang.String name, @Nonnull LinkPermissions linkPermissions)The metadata of a shared link.The default values for unset fields will be used.
- Parameters:
url- URL of the shared link. Must not benull.name- The linked file name (including extension). This never contains a slash. Must not benull.linkPermissions- The link's access permissions. Must not benull.- Throws:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
-
-
Method Detail
-
getUrl
@Nonnull public java.lang.String getUrl()
URL of the shared link.- Returns:
- value for this field, never
null.
-
getName
@Nonnull public java.lang.String getName()
The linked file name (including extension). This never contains a slash.- Returns:
- value for this field, never
null.
-
getLinkPermissions
@Nonnull public LinkPermissions getLinkPermissions()
The link's access permissions.- Returns:
- value for this field, never
null.
-
getId
@Nullable public java.lang.String getId()
A unique identifier for the linked file.- Returns:
- value for this field, or
nullif not present.
-
getExpires
@Nullable public java.util.Date getExpires()
Expiration time, if set. By default the link won't expire.- Returns:
- value for this field, or
nullif not present.
-
getPathLower
@Nullable public java.lang.String getPathLower()
The lowercased full path in the user's Dropbox. This always starts with a slash. This field will only be present only if the linked file is in the authenticated user's dropbox.- Returns:
- value for this field, or
nullif not present.
-
getTeamMemberInfo
@Nullable public TeamMemberInfo getTeamMemberInfo()
The team membership information of the link's owner. This field will only be present if the link's owner is a team member.- Returns:
- value for this field, or
nullif not present.
-
getContentOwnerTeamInfo
@Nullable public Team getContentOwnerTeamInfo()
The team information of the content's owner. This field will only be present if the content's owner is a team member and the content's owner team is different from the link's owner team.- Returns:
- value for this field, or
nullif not present.
-
newBuilder
public static SharedLinkMetadata.Builder newBuilder(java.lang.String url, java.lang.String name, LinkPermissions linkPermissions)
Returns a new builder for creating an instance of this class.- Parameters:
url- URL of the shared link. Must not benull.name- The linked file name (including extension). This never contains a slash. Must not benull.linkPermissions- The link's access permissions. Must not benull.- Returns:
- builder for this class.
- Throws:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin 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
-
-