java.lang.Object
java.lang.Record
ovh.paulem.modrinthapi.types.classes.GalleryImage
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull Stringcreated()Returns the value of thecreatedrecord component.@Nullable StringReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull Booleanfeatured()Returns the value of thefeaturedrecord component.static GalleryImagefromJson(com.google.gson.JsonElement json) final inthashCode()Returns a hash code value for this object.@Nullable Integerordering()Returns the value of theorderingrecord component.@Nullable Stringtitle()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.@NotNull Stringurl()Returns the value of theurlrecord component.
-
Constructor Details
-
GalleryImage
public GalleryImage(@NotNull @NotNull String url, @NotNull @NotNull String created, @NotNull @NotNull Boolean featured, @Nullable @Nullable String title, @Nullable @Nullable String description, @Nullable @Nullable Integer ordering) Creates an instance of aGalleryImagerecord class.- Parameters:
url- the value for theurlrecord componentcreated- the value for thecreatedrecord componentfeatured- the value for thefeaturedrecord componenttitle- the value for thetitlerecord componentdescription- the value for thedescriptionrecord componentordering- the value for theorderingrecord 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). -
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
created
Returns the value of thecreatedrecord component.- Returns:
- the value of the
createdrecord component
-
featured
Returns the value of thefeaturedrecord component.- Returns:
- the value of the
featuredrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
ordering
Returns the value of theorderingrecord component.- Returns:
- the value of the
orderingrecord component
-