Class Metadata.Builder

java.lang.Object
com.dropbox.core.v2.files.Metadata.Builder
Direct Known Subclasses:
DeletedMetadata.Builder, FileMetadata.Builder, FolderMetadata.Builder
Enclosing class:
Metadata

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

    • name

      protected final String name
    • pathLower

      protected String pathLower
    • pathDisplay

      protected String pathDisplay
    • parentSharedFolderId

      protected String parentSharedFolderId
    • previewUrl

      protected String previewUrl
  • Constructor Details

    • Builder

      protected Builder(String name)
  • Method Details

    • withPathLower

      public Metadata.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 be null if the file or folder is not mounted.
      Returns:
      this builder
    • withPathDisplay

      public Metadata.Builder withPathDisplay(String pathDisplay)
      Set value for optional field.
      Parameters:
      pathDisplay - The cased path to be used for display purposes only. In rare instances the casing will not correctly match the user's filesystem, but this behavior will match the path provided in the Core API v1, and at least the last path component will have the correct casing. Changes to only the casing of paths won't be returned by DbxAppFilesRequests.listFolderContinue(String). This field will be null if the file or folder is not mounted.
      Returns:
      this builder
    • withParentSharedFolderId

      @Deprecated public Metadata.Builder withParentSharedFolderId(String parentSharedFolderId)
      Deprecated.
      Set value for optional field.
      Parameters:
      parentSharedFolderId - Field is deprecated. Please use FileSharingInfo.getParentSharedFolderId() or FolderSharingInfo.getParentSharedFolderId() instead. Must match pattern "[-_0-9a-zA-Z:]+".
      Returns:
      this builder
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • withPreviewUrl

      public Metadata.Builder withPreviewUrl(String previewUrl)
      Set value for optional field.
      Parameters:
      previewUrl - The preview URL of the file.
      Returns:
      this builder
    • build

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