Class FileMetadata.Builder

    • Field Detail

      • id

        protected final java.lang.String id
      • clientModified

        protected final java.util.Date clientModified
      • serverModified

        protected final java.util.Date serverModified
      • rev

        protected final java.lang.String rev
      • size

        protected final long size
      • isDownloadable

        protected boolean isDownloadable
      • propertyGroups

        protected java.util.List<PropertyGroup> propertyGroups
      • hasExplicitSharedMembers

        protected java.lang.Boolean hasExplicitSharedMembers
      • contentHash

        protected java.lang.String contentHash
    • Constructor Detail

      • Builder

        protected Builder​(java.lang.String name,
                          java.lang.String id,
                          java.util.Date clientModified,
                          java.util.Date serverModified,
                          java.lang.String rev,
                          long size)
    • Method Detail

      • withSymlinkInfo

        public FileMetadata.Builder withSymlinkInfo​(SymlinkInfo symlinkInfo)
        Set value for optional field.
        Parameters:
        symlinkInfo - Set if this file is a symlink.
        Returns:
        this builder
      • withSharingInfo

        public FileMetadata.Builder withSharingInfo​(FileSharingInfo sharingInfo)
        Set value for optional field.
        Parameters:
        sharingInfo - Set if this file is contained in a shared folder.
        Returns:
        this builder
      • withIsDownloadable

        public FileMetadata.Builder withIsDownloadable​(java.lang.Boolean isDownloadable)
        Set value for optional field.

        If left unset or set to null, defaults to true.

        Parameters:
        isDownloadable - If true, file can be downloaded directly; else the file must be exported. Defaults to true when set to null.
        Returns:
        this builder
      • withPropertyGroups

        public FileMetadata.Builder withPropertyGroups​(java.util.List<PropertyGroup> propertyGroups)
        Set value for optional field.
        Parameters:
        propertyGroups - Additional information if the file has custom properties with the property template specified. Must not contain a null item.
        Returns:
        this builder
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • withHasExplicitSharedMembers

        public FileMetadata.Builder withHasExplicitSharedMembers​(java.lang.Boolean hasExplicitSharedMembers)
        Set value for optional field.
        Parameters:
        hasExplicitSharedMembers - This flag will only be present if include_has_explicit_shared_members is true in DbxUserFilesRequests.listFolder(String) or DbxUserFilesRequests.getMetadata(String). If this flag is present, it will be true if this file has any explicit shared members. This is different from sharing_info in that this could be true in the case where a file has explicit members but is not contained within a shared folder.
        Returns:
        this builder
      • withContentHash

        public FileMetadata.Builder withContentHash​(java.lang.String contentHash)
        Set value for optional field.
        Parameters:
        contentHash - A hash of the file content. This field can be used to verify data integrity. For more information see our Content hash page. Must have length of at least 64 and have length of at most 64.
        Returns:
        this builder
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • withFileLockInfo

        public FileMetadata.Builder withFileLockInfo​(FileLockMetadata fileLockInfo)
        Set value for optional field.
        Parameters:
        fileLockInfo - If present, the metadata associated with the file's current lock.
        Returns:
        this builder
      • withPathLower

        public FileMetadata.Builder withPathLower​(java.lang.String pathLower)
        Set value for optional field.
        Overrides:
        withPathLower in class Metadata.Builder
        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 FileMetadata.Builder withPathDisplay​(java.lang.String pathDisplay)
        Set value for optional field.
        Overrides:
        withPathDisplay in class Metadata.Builder
        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 DbxUserFilesRequests.listFolderContinue(String). This field will be null if the file or folder is not mounted.
        Returns:
        this builder