Package io.github.smootheez.modrinth
Record Class ModrinthMetadata
java.lang.Object
java.lang.Record
io.github.smootheez.modrinth.ModrinthMetadata
- Record Components:
projectId- the unique project ID on Modrinthname- the display name of the versionversionNumber- the semantic or custom version identifierchangelog- the changelog text associated with this versiongameVersions- list of supported game versions (e.g. "1.20.1")loaders- the supported mod loaders (Fabric, Forge, Quilt, etc.)releaseChannel- the release channel (release, beta, alpha)dependencies- dependency metadata for this versionfeatured- whether the version should be featuredstatus- the Modrinth version status (listed, draft, archived, etc.)fileParts- file identifiers used during multipart upload
public record ModrinthMetadata(String projectId, String name, String versionNumber, String changelog, List<String> gameVersions, List<LoaderType> loaders, String releaseChannel, List<DependencyMetadata> dependencies, boolean featured, String status, List<String> fileParts)
extends Record
Represents the complete metadata payload required when uploading a version to Modrinth.
-
Constructor Summary
ConstructorsConstructorDescriptionModrinthMetadata(String projectId, String name, String versionNumber, String changelog, List<String> gameVersions, List<LoaderType> loaders, String releaseChannel, List<DependencyMetadata> dependencies, boolean featured, String status, List<String> fileParts) Creates an instance of aModrinthMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechangelogrecord component.Returns the value of thedependenciesrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanfeatured()Returns the value of thefeaturedrecord component.Returns the value of thefilePartsrecord component.Returns the value of thegameVersionsrecord component.final inthashCode()Returns a hash code value for this object.loaders()Returns the value of theloadersrecord component.name()Returns the value of thenamerecord component.Returns the value of theprojectIdrecord component.Returns the value of thereleaseChannelrecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theversionNumberrecord component.
-
Constructor Details
-
ModrinthMetadata
public ModrinthMetadata(String projectId, String name, String versionNumber, String changelog, List<String> gameVersions, List<LoaderType> loaders, String releaseChannel, List<DependencyMetadata> dependencies, boolean featured, String status, List<String> fileParts) Creates an instance of aModrinthMetadatarecord class.- Parameters:
projectId- the value for theprojectIdrecord componentname- the value for thenamerecord componentversionNumber- the value for theversionNumberrecord componentchangelog- the value for thechangelogrecord componentgameVersions- the value for thegameVersionsrecord componentloaders- the value for theloadersrecord componentreleaseChannel- the value for thereleaseChannelrecord componentdependencies- the value for thedependenciesrecord componentfeatured- the value for thefeaturedrecord componentstatus- the value for thestatusrecord componentfileParts- the value for thefilePartsrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
projectId
Returns the value of theprojectIdrecord component.- Returns:
- the value of the
projectIdrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
versionNumber
Returns the value of theversionNumberrecord component.- Returns:
- the value of the
versionNumberrecord component
-
changelog
Returns the value of thechangelogrecord component.- Returns:
- the value of the
changelogrecord component
-
gameVersions
Returns the value of thegameVersionsrecord component.- Returns:
- the value of the
gameVersionsrecord component
-
loaders
Returns the value of theloadersrecord component.- Returns:
- the value of the
loadersrecord component
-
releaseChannel
Returns the value of thereleaseChannelrecord component.- Returns:
- the value of the
releaseChannelrecord component
-
dependencies
Returns the value of thedependenciesrecord component.- Returns:
- the value of the
dependenciesrecord component
-
featured
@SerializedName("featured") public boolean featured()Returns the value of thefeaturedrecord component.- Returns:
- the value of the
featuredrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
fileParts
Returns the value of thefilePartsrecord component.- Returns:
- the value of the
filePartsrecord component
-