Record Class Link.Metadata
java.lang.Object
java.lang.Record
io.github.yvasyliev.telegramforwarderbot.reddit.dto.Link.Metadata
- Record Components:
status
- the status of the metadata (e.g., valid)type
- the type of the post (e.g., image, animated image)format
- the format of the post (e.g., image/gif, image/jpg, image/png)resolutions
- the list of resolutions available for the postsource
- the source resolution of the postid
- the unique identifier of the post
- Enclosing class:
Link
public static record Link.Metadata(Link.Metadata.Status status, Link.Metadata.Type type, Link.Metadata.Format format, List<Link.Resolution> resolutions, Link.Resolution source, String id)
extends Record
Represents metadata for a Reddit post, including its status, type, format, resolutions, source resolution, and
ID.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Represents the format of the post's media.static enum
Represents the status of the metadata.static enum
Represents the type of the post's media. -
Constructor Summary
ConstructorsConstructorDescriptionMetadata
(Link.Metadata.Status status, Link.Metadata.Type type, Link.Metadata.Format format, List<Link.Resolution> resolutions, Link.Resolution source, String id) Creates an instance of aMetadata
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.format()
Returns the value of theformat
record component.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.Returns the value of theresolutions
record component.source()
Returns the value of thesource
record component.status()
Returns the value of thestatus
record component.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record component.
-
Constructor Details
-
Metadata
public Metadata(Link.Metadata.Status status, Link.Metadata.Type type, Link.Metadata.Format format, List<Link.Resolution> resolutions, Link.Resolution source, String id) Creates an instance of aMetadata
record class.- Parameters:
status
- the value for thestatus
record componenttype
- the value for thetype
record componentformat
- the value for theformat
record componentresolutions
- the value for theresolutions
record componentsource
- the value for thesource
record componentid
- the value for theid
record component
-
-
Method Details
-
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)
. -
status
Returns the value of thestatus
record component.- Returns:
- the value of the
status
record component
-
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-
format
Returns the value of theformat
record component.- Returns:
- the value of the
format
record component
-
resolutions
Returns the value of theresolutions
record component.- Returns:
- the value of the
resolutions
record component
-
source
Returns the value of thesource
record component.- Returns:
- the value of the
source
record component
-
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-