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 Summary
ConstructorsConstructorDescriptionVersion(@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) Creates an instance of aVersionrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull StringauthorId()Returns the value of theauthorIdrecord component.@Nullable StringReturns the value of thechangelogrecord component.@Nullable StringDeprecated.@NotNull StringReturns the value of thedatePublishedrecord component.@Nullable List<VersionDependency>Returns the value of thedependenciesrecord component.@NotNull IntegerReturns the value of thedownloadsrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull Booleanfeatured()Returns the value of thefeaturedrecord component.@NotNull List<VersionFile>files()Returns the value of thefilesrecord component.static VersionfromJson(com.google.gson.JsonElement j) Returns the value of thegameVersionsrecord component.final inthashCode()Returns a hash code value for this object.@NotNull Stringid()Returns the value of theidrecord component.loaders()Returns the value of theloadersrecord component.@NotNull Stringname()Returns the value of thenamerecord component.@NotNull StringReturns the value of theprojectIdrecord component.@Nullable ProjectRequestedStatusReturns the value of therequestedStatusrecord component.@Nullable ProjectStatusstatus()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.@NotNull StringReturns the value of theversionNumberrecord component.@NotNull VersionTypeReturns the value of theversionTyperecord component.
-
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 aVersionrecord class.- Parameters:
name- the value for thenamerecord componentversionNumber- the value for theversionNumberrecord componentchangelog- the value for thechangelogrecord componentdependencies- the value for thedependenciesrecord componentgameVersions- the value for thegameVersionsrecord componentversionType- the value for theversionTyperecord componentloaders- the value for theloadersrecord componentfeatured- the value for thefeaturedrecord componentstatus- the value for thestatusrecord componentrequestedStatus- the value for therequestedStatusrecord componentid- the value for theidrecord componentprojectId- the value for theprojectIdrecord componentauthorId- the value for theauthorIdrecord componentdatePublished- the value for thedatePublishedrecord componentdownloads- the value for thedownloadsrecord componentchangelogUrl- the value for thechangelogUrlrecord componentfiles- the value for thefilesrecord component
-
-
Method Details
-
fromJson
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
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
-
dependencies
Returns the value of thedependenciesrecord component.- Returns:
- the value of the
dependenciesrecord component
-
gameVersions
Returns the value of thegameVersionsrecord component.- Returns:
- the value of the
gameVersionsrecord component
-
versionType
Returns the value of theversionTyperecord component.- Returns:
- the value of the
versionTyperecord component
-
loaders
Returns the value of theloadersrecord component.- Returns:
- the value of the
loadersrecord component
-
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
-
requestedStatus
Returns the value of therequestedStatusrecord component.- Returns:
- the value of the
requestedStatusrecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
projectId
Returns the value of theprojectIdrecord component.- Returns:
- the value of the
projectIdrecord component
-
authorId
Returns the value of theauthorIdrecord component.- Returns:
- the value of the
authorIdrecord component
-
datePublished
Returns the value of thedatePublishedrecord component.- Returns:
- the value of the
datePublishedrecord component
-
downloads
Returns the value of thedownloadsrecord component.- Returns:
- the value of the
downloadsrecord component
-
changelogUrl
Deprecated.Returns the value of thechangelogUrlrecord component.- Returns:
- the value of the
changelogUrlrecord component
-
files
Returns the value of thefilesrecord component.- Returns:
- the value of the
filesrecord component
-