Record Class CurseforgeMetadata

java.lang.Object
java.lang.Record
io.github.smootheez.curseforge.CurseforgeMetadata
Record Components:
changelog - the changelog text for this upload
changelogType - the format used to interpret the changelog (text, markdown, html)
displayName - the display name of the uploaded file
gameVersions - numeric CurseForge game version identifiers
releaseType - the release channel (release, beta, alpha)
isMarkedForManualRelease - whether the upload requires manual approval
relations - dependency relationships declared for this upload

public record CurseforgeMetadata(String changelog, ChangelogType changelogType, String displayName, List<Integer> gameVersions, String releaseType, boolean isMarkedForManualRelease, Projects relations) extends Record
Represents the metadata payload sent when uploading a file to CurseForge.
  • Constructor Details

    • CurseforgeMetadata

      public CurseforgeMetadata(String changelog, ChangelogType changelogType, String displayName, List<Integer> gameVersions, String releaseType, boolean isMarkedForManualRelease, Projects relations)
      Creates an instance of a CurseforgeMetadata record class.
      Parameters:
      changelog - the value for the changelog record component
      changelogType - the value for the changelogType record component
      displayName - the value for the displayName record component
      gameVersions - the value for the gameVersions record component
      releaseType - the value for the releaseType record component
      isMarkedForManualRelease - the value for the isMarkedForManualRelease record component
      relations - the value for the relations 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.
    • changelog

      public String changelog()
      Returns the value of the changelog record component.
      Returns:
      the value of the changelog record component
    • changelogType

      public ChangelogType changelogType()
      Returns the value of the changelogType record component.
      Returns:
      the value of the changelogType record component
    • displayName

      public String displayName()
      Returns the value of the displayName record component.
      Returns:
      the value of the displayName record component
    • gameVersions

      public List<Integer> gameVersions()
      Returns the value of the gameVersions record component.
      Returns:
      the value of the gameVersions record component
    • releaseType

      public String releaseType()
      Returns the value of the releaseType record component.
      Returns:
      the value of the releaseType record component
    • isMarkedForManualRelease

      public boolean isMarkedForManualRelease()
      Returns the value of the isMarkedForManualRelease record component.
      Returns:
      the value of the isMarkedForManualRelease record component
    • relations

      public Projects relations()
      Returns the value of the relations record component.
      Returns:
      the value of the relations record component