Class SharedLinkMetadata.Builder

java.lang.Object
com.dropbox.core.v2.sharing.SharedLinkMetadata.Builder
Direct Known Subclasses:
FileLinkMetadata.Builder, FolderLinkMetadata.Builder
Enclosing class:
SharedLinkMetadata

public static class SharedLinkMetadata.Builder extends Object
Builder for SharedLinkMetadata.
  • Field Details

    • url

      protected final String url
    • name

      protected final String name
    • linkPermissions

      protected final LinkPermissions linkPermissions
    • id

      protected String id
    • expires

      protected Date expires
    • pathLower

      protected String pathLower
    • teamMemberInfo

      protected TeamMemberInfo teamMemberInfo
    • contentOwnerTeamInfo

      protected Team contentOwnerTeamInfo
  • Constructor Details

  • Method Details

    • withId

      public SharedLinkMetadata.Builder withId(String id)
      Set value for optional field.
      Parameters:
      id - A unique identifier for the linked file. Must have length of at least 1.
      Returns:
      this builder
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • withExpires

      public SharedLinkMetadata.Builder withExpires(Date expires)
      Set value for optional field.
      Parameters:
      expires - Expiration time, if set. By default the link won't expire.
      Returns:
      this builder
    • withPathLower

      public SharedLinkMetadata.Builder withPathLower(String pathLower)
      Set value for optional field.
      Parameters:
      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 and the user is the owner of the link.
      Returns:
      this builder
    • withTeamMemberInfo

      public SharedLinkMetadata.Builder withTeamMemberInfo(TeamMemberInfo teamMemberInfo)
      Set value for optional field.
      Parameters:
      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.
      Returns:
      this builder
    • withContentOwnerTeamInfo

      public SharedLinkMetadata.Builder withContentOwnerTeamInfo(Team contentOwnerTeamInfo)
      Set value for optional field.
      Parameters:
      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.
      Returns:
      this builder
    • build

      public SharedLinkMetadata build()
      Builds an instance of SharedLinkMetadata configured with this builder's values
      Returns:
      new instance of SharedLinkMetadata