public class FileOrFolderLogInfo
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
FileOrFolderLogInfo.Builder
Builder for
FileOrFolderLogInfo . |
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
displayName |
protected java.lang.String |
fileId |
protected java.lang.Long |
fileSize |
protected PathLogInfo |
path |
Constructor and Description |
---|
FileOrFolderLogInfo(PathLogInfo path)
Generic information relevant both for files and folders
|
FileOrFolderLogInfo(PathLogInfo path,
java.lang.String displayName,
java.lang.String fileId,
java.lang.Long fileSize)
Generic information relevant both for files and folders
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getDisplayName()
Display name.
|
java.lang.String |
getFileId()
Unique ID.
|
java.lang.Long |
getFileSize()
File or folder size in bytes.
|
PathLogInfo |
getPath()
Path relative to event context.
|
int |
hashCode() |
static FileOrFolderLogInfo.Builder |
newBuilder(PathLogInfo path)
Returns a new builder for creating an instance of this class.
|
java.lang.String |
toString() |
java.lang.String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
protected final PathLogInfo path
protected final java.lang.String displayName
protected final java.lang.String fileId
protected final java.lang.Long fileSize
public FileOrFolderLogInfo(PathLogInfo path, java.lang.String displayName, java.lang.String fileId, java.lang.Long fileSize)
Use newBuilder
to create instances of this class without
specifying values for all optional fields.
path
- Path relative to event context. Must not be null
.displayName
- Display name. Might be missing due to historical data
gap.fileId
- Unique ID. Might be missing due to historical data gap.fileSize
- File or folder size in bytes.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public FileOrFolderLogInfo(PathLogInfo path)
The default values for unset fields will be used.
path
- Path relative to event context. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public PathLogInfo getPath()
null
.public java.lang.String getDisplayName()
null
if not present.public java.lang.String getFileId()
null
if not present.public java.lang.Long getFileSize()
null
if not present.public static FileOrFolderLogInfo.Builder newBuilder(PathLogInfo path)
path
- Path relative to event context. Must not be null
.java.lang.IllegalArgumentException
- If any argument does not meet its
preconditions.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringMultiline()
The returned String may contain newlines.