Package com.dropbox.core.v2.files
Class ExportMetadata
java.lang.Object
com.dropbox.core.v2.files.ExportMetadata
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionExportMetadata(String name, long size) NoneExportMetadata(String name, long size, String exportHash, Long paperRevision) UsenewBuilder(java.lang.String,long)to create instances of this class without specifying values for all optional fields. -
Method Summary
Modifier and TypeMethodDescriptionbooleanA hash based on the exported file content.getName()The last component of the path (including extension).If the file is a Paper doc, this gives the latest doc revision which can be used inDbxUserFilesRequests.paperUpdate(String,ImportFormat,PaperDocUpdatePolicy,Long).longgetSize()The file size in bytes.inthashCode()static ExportMetadata.BuildernewBuilder(String name, long size) Returns a new builder for creating an instance of this class.toString()Returns a String representation of this object formatted for easier readability.
-
Field Details
-
name
-
size
protected final long size -
exportHash
-
paperRevision
-
-
Constructor Details
-
ExportMetadata
public ExportMetadata(@Nonnull String name, long size, @Nullable String exportHash, @Nullable Long paperRevision) UsenewBuilder(java.lang.String,long)to create instances of this class without specifying values for all optional fields.- Parameters:
name- The last component of the path (including extension). This never contains a slash. Must not benull.size- The file size in bytes.exportHash- A hash based on the exported file content. This field can be used to verify data integrity. Similar to content hash. For more information see our Content hash page. Must have length of at least 64 and have length of at most 64.paperRevision- If the file is a Paper doc, this gives the latest doc revision which can be used inDbxUserFilesRequests.paperUpdate(String,ImportFormat,PaperDocUpdatePolicy,Long).- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
ExportMetadata
NoneThe default values for unset fields will be used.
- Parameters:
name- The last component of the path (including extension). This never contains a slash. Must not benull.size- The file size in bytes.- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
-
Method Details
-
getName
The last component of the path (including extension). This never contains a slash.- Returns:
- value for this field, never
null.
-
getSize
public long getSize()The file size in bytes.- Returns:
- value for this field.
-
getExportHash
A hash based on the exported file content. This field can be used to verify data integrity. Similar to content hash. For more information see our Content hash page.- Returns:
- value for this field, or
nullif not present.
-
getPaperRevision
If the file is a Paper doc, this gives the latest doc revision which can be used inDbxUserFilesRequests.paperUpdate(String,ImportFormat,PaperDocUpdatePolicy,Long).- Returns:
- value for this field, or
nullif not present.
-
newBuilder
Returns a new builder for creating an instance of this class.- Parameters:
name- The last component of the path (including extension). This never contains a slash. Must not benull.size- The file size in bytes.- Returns:
- builder for this class.
- Throws:
IllegalArgumentException- If any argument does not meet its preconditions.
-
hashCode
public int hashCode() -
equals
-
toString
-
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
-