Record Class Link.Metadata
java.lang.Object
java.lang.Record
io.github.yvasyliev.forwarder.telegram.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 postvariants- the variants of the post's media (e.g., GIF, MP4)
- 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, Link.Variants variants)
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, Link.Variants variants) 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.variants()Returns the value of thevariantsrecord 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, Link.Variants variants) 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 componentvariants- the value for thevariantsrecord component
-
-
Method Details
-
toString
-
hashCode
-
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
-
type
-
format
-
resolutions
Returns the value of theresolutionsrecord component.- Returns:
- the value of the
resolutionsrecord component
-
source
-
id
-
variants
-