Record Class LinkPreviewOptions
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.LinkPreviewOptions
- All Implemented Interfaces:
Serializable,ApiResult
public record LinkPreviewOptions(boolean isDisabled, @Nullable String url, boolean preferSmallMedia, boolean preferLargeMedia, boolean showAboveText)
extends Record
implements ApiResult
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLinkPreviewOptions(boolean isDisabled, @Nullable String url, boolean preferSmallMedia, boolean preferLargeMedia, boolean showAboveText) Creates an instance of aLinkPreviewOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisDisabledrecord component.booleanReturns the value of thepreferLargeMediarecord component.booleanReturns the value of thepreferSmallMediarecord component.booleanReturns the value of theshowAboveTextrecord component.final StringtoString()Returns a string representation of this record class.@Nullable Stringurl()Returns the value of theurlrecord component.
-
Constructor Details
-
LinkPreviewOptions
public LinkPreviewOptions(boolean isDisabled, @Nullable @Nullable String url, boolean preferSmallMedia, boolean preferLargeMedia, boolean showAboveText) Creates an instance of aLinkPreviewOptionsrecord class.- Parameters:
isDisabled- the value for theisDisabledrecord componenturl- the value for theurlrecord componentpreferSmallMedia- the value for thepreferSmallMediarecord componentpreferLargeMedia- the value for thepreferLargeMediarecord componentshowAboveText- the value for theshowAboveTextrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
isDisabled
public boolean isDisabled()Returns the value of theisDisabledrecord component.- Returns:
- the value of the
isDisabledrecord component
-
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
preferSmallMedia
public boolean preferSmallMedia()Returns the value of thepreferSmallMediarecord component.- Returns:
- the value of the
preferSmallMediarecord component
-
preferLargeMedia
public boolean preferLargeMedia()Returns the value of thepreferLargeMediarecord component.- Returns:
- the value of the
preferLargeMediarecord component
-
showAboveText
public boolean showAboveText()Returns the value of theshowAboveTextrecord component.- Returns:
- the value of the
showAboveTextrecord component
-