java.lang.Object
java.lang.Record
io.github._4drian3d.jdwebhooks.Embed
- Record Components:
title- the title of this embedtype- the type of this embeddescription- description of this embedurl- title urltimestamp- timestamp of this embed contentcolor- color code of the embed- footer information of this embedimage- provided image of this embedthumbnail- provided thumbnail of this embedvideo- provided video of this embedprovider- the provider of the embed- the author of this embedfields- fields of this embed
public record Embed(@Nullable String title, @Nullable String type, @Nullable String description, @Nullable String url, @Nullable OffsetDateTime timestamp, @Nullable Integer color, @Nullable Embed.Footer footer, @Nullable Embed.Image image, @Nullable Embed.Thumbnail thumbnail, @Nullable Embed.Video video, @Nullable Embed.Provider provider, @Nullable Embed.Author author, @Nullable Embed.Field[] fields)
extends Record
Special formatted cell that can contain various elements, such as images, links and so on.
Any param can be null
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThe author of the Embed.static final classEmbed builderstatic final recordAn Embed Fieldstatic final recordstatic interfaceAn Embed Graphic Elementstatic final recordImage Graphic Element.static final recordProvider Element.static final recordThumbnail Graphic Element.static final recordVideo Graphic Element. -
Constructor Summary
ConstructorsConstructorDescriptionEmbed(@Nullable String title, @Nullable String type, @Nullable String description, @Nullable String url, @Nullable OffsetDateTime timestamp, @Nullable Integer color, @Nullable Embed.Footer footer, @Nullable Embed.Image image, @Nullable Embed.Thumbnail thumbnail, @Nullable Embed.Video video, @Nullable Embed.Provider provider, @Nullable Embed.Author author, @Nullable Embed.Field[] fields) Creates an instance of aEmbedrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Embed.Authorauthor()Returns the value of theauthorrecord component.static Embed.Builderbuilder()Creates a new Embed Builder.@Nullable Integercolor()Returns the value of thecolorrecord component.@Nullable StringReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable Embed.Field[]fields()Returns the value of thefieldsrecord component.@Nullable Embed.Footerfooter()Returns the value of thefooterrecord component.final inthashCode()Returns a hash code value for this object.@Nullable Embed.Imageimage()Returns the value of theimagerecord component.@Nullable Embed.Providerprovider()Returns the value of theproviderrecord component.@Nullable Embed.ThumbnailReturns the value of thethumbnailrecord component.@Nullable OffsetDateTimeReturns the value of thetimestamprecord component.@Nullable Stringtitle()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.@Nullable Stringtype()Returns the value of thetyperecord component.@Nullable Stringurl()Returns the value of theurlrecord component.@Nullable Embed.Videovideo()Returns the value of thevideorecord component.
-
Constructor Details
-
Method Details
-
builder
Creates a new Embed Builder.- Returns:
- a new Embed builder
-
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). -
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
timestamp
Returns the value of thetimestamprecord component.- Returns:
- the value of the
timestamprecord component
-
color
Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
image
Returns the value of theimagerecord component.- Returns:
- the value of the
imagerecord component
-
thumbnail
Returns the value of thethumbnailrecord component.- Returns:
- the value of the
thumbnailrecord component
-
video
Returns the value of thevideorecord component.- Returns:
- the value of the
videorecord component
-
provider
Returns the value of theproviderrecord component.- Returns:
- the value of the
providerrecord component
-
author
Returns the value of theauthorrecord component.- Returns:
- the value of the
authorrecord component
-
fields
Returns the value of thefieldsrecord component.- Returns:
- the value of the
fieldsrecord component
-