Record Class SetWebhook
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.methods.SetWebhook
- All Implemented Interfaces:
ApiMethod<Boolean>,MultiPartApiMethod<Boolean>,MultiPartApiMethodBoolean
public record SetWebhook(@NotNull String url, @Nullable InputFile certificate, @Nullable String ipAddress, @org.checkerframework.common.value.qual.IntRange(from=1L, to=100L) int maxConnections, @Nullable String[] allowedUpdates, boolean dropPendingUpdates, @MatchesRegex("^[A-Za-z0-9_-]{1,256}$") @Nullable String secretToken)
extends Record
implements MultiPartApiMethodBoolean
-
Field Summary
Fields inherited from interface org.teleight.teleightbots.api.ApiMethod
OBJECT_MAPPER -
Constructor Summary
ConstructorsConstructorDescriptionSetWebhook(@NotNull String url, @Nullable InputFile certificate, @Nullable String ipAddress, @org.checkerframework.common.value.qual.IntRange(from=1L, to=100L) int maxConnections, @Nullable String[] allowedUpdates, boolean dropPendingUpdates, @MatchesRegex("^[A-Za-z0-9_-]{1,256}$") @Nullable String secretToken) Creates an instance of aSetWebhookrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable String[]Returns the value of theallowedUpdatesrecord component.@Nullable InputFileReturns the value of thecertificaterecord component.booleanReturns the value of thedropPendingUpdatesrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull StringReturns the endpoint URL for the Telegram Bot API method.Gets the parameters of the multipart API method.final inthashCode()Returns a hash code value for this object.@Nullable StringReturns the value of theipAddressrecord component.@org.checkerframework.common.value.qual.IntRange(from=1L, to=100L) intReturns the value of themaxConnectionsrecord component.static @NotNull lombok.Builder@MatchesRegex("^[A-Za-z0-9_-]{1,256}$") @Nullable StringReturns the value of thesecretTokenrecord component.final StringtoString()Returns a string representation of this record class.@NotNull Stringurl()Returns the value of theurlrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.teleight.teleightbots.api.ApiMethod
deserializeResponse, deserializeResponseArray, deserializeResponseSerializableMethods inherited from interface org.teleight.teleightbots.api.MultiPartApiMethodBoolean
deserializeResponse
-
Constructor Details
-
SetWebhook
public SetWebhook(@NotNull @NotNull String url, @Nullable @Nullable InputFile certificate, @Nullable @Nullable String ipAddress, @org.checkerframework.common.value.qual.IntRange(from=1L, to=100L) int maxConnections, @Nullable @Nullable String[] allowedUpdates, boolean dropPendingUpdates, @Nullable @MatchesRegex("^[A-Za-z0-9_-]{1,256}$") @Nullable String secretToken) Creates an instance of aSetWebhookrecord class.- Parameters:
url- the value for theurlrecord componentcertificate- the value for thecertificaterecord componentipAddress- the value for theipAddressrecord componentmaxConnections- the value for themaxConnectionsrecord componentallowedUpdates- the value for theallowedUpdatesrecord componentdropPendingUpdates- the value for thedropPendingUpdatesrecord componentsecretToken- the value for thesecretTokenrecord component
-
-
Method Details
-
ofBuilder
-
getEndpointURL
Description copied from interface:ApiMethodReturns the endpoint URL for the Telegram Bot API method.- Specified by:
getEndpointURLin interfaceApiMethod<Boolean>- Returns:
- the endpoint URL
-
getParameters
Description copied from interface:MultiPartApiMethodGets the parameters of the multipart API method.- Specified by:
getParametersin interfaceMultiPartApiMethod<Boolean>- Returns:
- a map containing the parameters of the multipart API method
-
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 '=='. -
url
Returns the value of theurlrecord component.- Returns:
- the value of the
urlrecord component
-
certificate
Returns the value of thecertificaterecord component.- Returns:
- the value of the
certificaterecord component
-
ipAddress
Returns the value of theipAddressrecord component.- Returns:
- the value of the
ipAddressrecord component
-
maxConnections
public @org.checkerframework.common.value.qual.IntRange(from=1L, to=100L) int maxConnections()Returns the value of themaxConnectionsrecord component.- Returns:
- the value of the
maxConnectionsrecord component
-
allowedUpdates
Returns the value of theallowedUpdatesrecord component.- Returns:
- the value of the
allowedUpdatesrecord component
-
dropPendingUpdates
public boolean dropPendingUpdates()Returns the value of thedropPendingUpdatesrecord component.- Returns:
- the value of the
dropPendingUpdatesrecord component
-
secretToken
Returns the value of thesecretTokenrecord component.- Returns:
- the value of the
secretTokenrecord component
-