Module modrinthapi

Record Class Version

java.lang.Object
java.lang.Record
ovh.paulem.modrinthapi.types.version.Version

public record Version(@NotNull String name, @NotNull String versionNumber, @Nullable String changelog, @Nullable List<VersionDependency> dependencies, @NotNull List<String> gameVersions, @NotNull VersionType versionType, @NotNull List<String> loaders, @NotNull Boolean featured, @Nullable ProjectStatus status, @Nullable ProjectRequestedStatus requestedStatus, @NotNull String id, @NotNull String projectId, @NotNull String authorId, @NotNull String datePublished, @NotNull Integer downloads, @Nullable String changelogUrl, @NotNull List<VersionFile> files) extends Record
  • Constructor Details

    • Version

      public Version(@NotNull @NotNull String name, @NotNull @NotNull String versionNumber, @Nullable @Nullable String changelog, @Nullable @Nullable List<VersionDependency> dependencies, @NotNull @NotNull List<String> gameVersions, @NotNull @NotNull VersionType versionType, @NotNull @NotNull List<String> loaders, @NotNull @NotNull Boolean featured, @Nullable @Nullable ProjectStatus status, @Nullable @Nullable ProjectRequestedStatus requestedStatus, @NotNull @NotNull String id, @NotNull @NotNull String projectId, @NotNull @NotNull String authorId, @NotNull @NotNull String datePublished, @NotNull @NotNull Integer downloads, @Deprecated @Nullable @Nullable String changelogUrl, @NotNull @NotNull List<VersionFile> files)
      Creates an instance of a Version record class.
      Parameters:
      name - the value for the name record component
      versionNumber - the value for the versionNumber record component
      changelog - the value for the changelog record component
      dependencies - the value for the dependencies record component
      gameVersions - the value for the gameVersions record component
      versionType - the value for the versionType record component
      loaders - the value for the loaders record component
      featured - the value for the featured record component
      status - the value for the status record component
      requestedStatus - the value for the requestedStatus record component
      id - the value for the id record component
      projectId - the value for the projectId record component
      authorId - the value for the authorId record component
      datePublished - the value for the datePublished record component
      downloads - the value for the downloads record component
      changelogUrl - the value for the changelogUrl record component
      files - the value for the files record component
  • Method Details

    • fromJson

      public static Version fromJson(com.google.gson.JsonElement j)
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • name

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

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

      @Nullable public @Nullable String changelog()
      Returns the value of the changelog record component.
      Returns:
      the value of the changelog record component
    • dependencies

      @Nullable public @Nullable List<VersionDependency> dependencies()
      Returns the value of the dependencies record component.
      Returns:
      the value of the dependencies record component
    • gameVersions

      @NotNull public @NotNull List<String> gameVersions()
      Returns the value of the gameVersions record component.
      Returns:
      the value of the gameVersions record component
    • versionType

      @NotNull public @NotNull VersionType versionType()
      Returns the value of the versionType record component.
      Returns:
      the value of the versionType record component
    • loaders

      @NotNull public @NotNull List<String> loaders()
      Returns the value of the loaders record component.
      Returns:
      the value of the loaders record component
    • featured

      @NotNull public @NotNull Boolean featured()
      Returns the value of the featured record component.
      Returns:
      the value of the featured record component
    • status

      @Nullable public @Nullable ProjectStatus status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • requestedStatus

      @Nullable public @Nullable ProjectRequestedStatus requestedStatus()
      Returns the value of the requestedStatus record component.
      Returns:
      the value of the requestedStatus record component
    • id

      @NotNull public @NotNull String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • projectId

      @NotNull public @NotNull String projectId()
      Returns the value of the projectId record component.
      Returns:
      the value of the projectId record component
    • authorId

      @NotNull public @NotNull String authorId()
      Returns the value of the authorId record component.
      Returns:
      the value of the authorId record component
    • datePublished

      @NotNull public @NotNull String datePublished()
      Returns the value of the datePublished record component.
      Returns:
      the value of the datePublished record component
    • downloads

      @NotNull public @NotNull Integer downloads()
      Returns the value of the downloads record component.
      Returns:
      the value of the downloads record component
    • changelogUrl

      @Deprecated @Nullable public @Nullable String changelogUrl()
      Deprecated.
      Returns the value of the changelogUrl record component.
      Returns:
      the value of the changelogUrl record component
    • files

      @NotNull public @NotNull List<VersionFile> files()
      Returns the value of the files record component.
      Returns:
      the value of the files record component