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 enumRepresents the format of the post's media.static enumRepresents the status of the metadata.static enumRepresents 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 aMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.format()Returns the value of theformatrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theresolutionsrecord component.source()Returns the value of thesourcerecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord 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 aMetadatarecord class.- Parameters:
status- the value for thestatusrecord componenttype- the value for thetyperecord componentformat- the value for theformatrecord componentresolutions- the value for theresolutionsrecord componentsource- the value for thesourcerecord componentid- the value for theidrecord 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 thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
format
Returns the value of theformatrecord component.- Returns:
- the value of the
formatrecord component
-
resolutions
Returns the value of theresolutionsrecord component.- Returns:
- the value of the
resolutionsrecord component
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-