Record Class ModrinthMetadata

java.lang.Object
java.lang.Record
io.github.smootheez.modrinth.ModrinthMetadata
Record Components:
projectId - the unique project ID on Modrinth
name - the display name of the version
versionNumber - the semantic or custom version identifier
changelog - the changelog text associated with this version
gameVersions - 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 version
featured - whether the version should be featured
status - 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 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 a ModrinthMetadata record class.
      Parameters:
      projectId - the value for the projectId record component
      name - the value for the name record component
      versionNumber - the value for the versionNumber record component
      changelog - the value for the changelog record component
      gameVersions - the value for the gameVersions record component
      loaders - the value for the loaders record component
      releaseChannel - the value for the releaseChannel record component
      dependencies - the value for the dependencies record component
      featured - the value for the featured record component
      status - the value for the status record component
      fileParts - the value for the fileParts record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • projectId

      @SerializedName("project_id") public String projectId()
      Returns the value of the projectId record component.
      Returns:
      the value of the projectId record component
    • name

      @SerializedName("name") public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • versionNumber

      @SerializedName("version_number") public String versionNumber()
      Returns the value of the versionNumber record component.
      Returns:
      the value of the versionNumber record component
    • changelog

      @SerializedName("changelog") public String changelog()
      Returns the value of the changelog record component.
      Returns:
      the value of the changelog record component
    • gameVersions

      @SerializedName("game_versions") public List<String> gameVersions()
      Returns the value of the gameVersions record component.
      Returns:
      the value of the gameVersions record component
    • loaders

      @SerializedName("loaders") public List<LoaderType> loaders()
      Returns the value of the loaders record component.
      Returns:
      the value of the loaders record component
    • releaseChannel

      @SerializedName("release_channel") public String releaseChannel()
      Returns the value of the releaseChannel record component.
      Returns:
      the value of the releaseChannel record component
    • dependencies

      @SerializedName("dependencies") public List<DependencyMetadata> dependencies()
      Returns the value of the dependencies record component.
      Returns:
      the value of the dependencies record component
    • featured

      @SerializedName("featured") public boolean featured()
      Returns the value of the featured record component.
      Returns:
      the value of the featured record component
    • status

      @SerializedName("status") public String status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • fileParts

      @SerializedName("file_parts") public List<String> fileParts()
      Returns the value of the fileParts record component.
      Returns:
      the value of the fileParts record component