VersionFile

data class VersionFile(val hashes: MrVersionModel.VersionFile.VersionFileHashes, val url: String, val filename: String, val primary: Boolean, val size: Int, val fileType: String? = null)

Constructors

Link copied to clipboard
constructor(hashes: MrVersionModel.VersionFile.VersionFileHashes, url: String, filename: String, primary: Boolean, size: Int, fileType: String? = null)

Types

Link copied to clipboard
data class VersionFileHashes(val sha512: String, val sha1: String)

Properties

Link copied to clipboard

Name of the file

Link copied to clipboard
val fileType: String? = null

Enum representing the type of the additional file, used mainly for adding resource packs to datapacks: "required-resource-pack", "optional-resource-pack" (nullable)

Link copied to clipboard

Map of hashes of the file. The key is the hashing algorithm and the value is the string version of the hash (object VersionFileHashes)

Link copied to clipboard

Whether this file is the primary one for its version. Only a maximum of one file per version will have this set to true. If there are not any primary files, it can be inferred that the first file is the primary one.

Link copied to clipboard
val size: Int

Size of the file in bytes

Link copied to clipboard
val url: String

Direct link to the file