Class FileOrFolderLogInfo

java.lang.Object
com.dropbox.core.v2.teamlog.FileOrFolderLogInfo
Direct Known Subclasses:
FileLogInfo, FolderLogInfo

public class FileOrFolderLogInfo extends Object
Generic information relevant both for files and folders
  • Field Details

    • path

      @Nonnull protected final PathLogInfo path
    • displayName

      @Nullable protected final String displayName
    • fileId

      @Nullable protected final String fileId
    • fileSize

      @Nullable protected final Long fileSize
  • Constructor Details

    • FileOrFolderLogInfo

      public FileOrFolderLogInfo(@Nonnull PathLogInfo path, @Nullable String displayName, @Nullable String fileId, @Nullable Long fileSize)
      Generic information relevant both for files and folders

      Use newBuilder(com.dropbox.core.v2.teamlog.PathLogInfo) to create instances of this class without specifying values for all optional fields.

      Parameters:
      path - Path relative to event context. Must not be null.
      displayName - Display name.
      fileId - Unique ID.
      fileSize - File or folder size in bytes.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • FileOrFolderLogInfo

      public FileOrFolderLogInfo(@Nonnull PathLogInfo path)
      Generic information relevant both for files and folders

      The default values for unset fields will be used.

      Parameters:
      path - Path relative to event context. Must not be null.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
  • Method Details

    • getPath

      @Nonnull public PathLogInfo getPath()
      Path relative to event context.
      Returns:
      value for this field, never null.
    • getDisplayName

      @Nullable public String getDisplayName()
      Display name.
      Returns:
      value for this field, or null if not present.
    • getFileId

      @Nullable public String getFileId()
      Unique ID.
      Returns:
      value for this field, or null if not present.
    • getFileSize

      @Nullable public Long getFileSize()
      File or folder size in bytes.
      Returns:
      value for this field, or null if not present.
    • newBuilder

      public static FileOrFolderLogInfo.Builder newBuilder(PathLogInfo path)
      Returns a new builder for creating an instance of this class.
      Parameters:
      path - Path relative to event context. Must not be null.
      Returns:
      builder for this class.
      Throws:
      IllegalArgumentException - If any argument does not meet its preconditions.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toStringMultiline

      public 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