WebhookInfo

data class WebhookInfo(url: String, hasCustomCertificate: Boolean, pendingUpdateCount: Int, ipAddress: String?, lastErrorDate: Int?, lastErrorMessage: String?, maxConnections: Int?, allowedUpdates: List<String>)

Contains information about the current status of a webhook. All types used in the Bot API responses are represented as JSON-objects. It is safe to use 32-bit signed integers for storing all Integer fields unless otherwise noted. Optional fields may be not returned when irrelevant.

Parameters

url

Webhook URL, may be empty if webhook is not set up

hasCustomCertificate

True, if a custom certificate was provided for webhook certificate checks

pendingUpdateCount

Number of updates awaiting delivery

ipAddress

Optional. Currently used webhook IP address

lastErrorDate

Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook

lastErrorMessage

Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook

maxConnections

Optional. Maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery

allowedUpdates

Optional. A list of update types the bot is subscribed to. Defaults to all update types

Constructors

WebhookInfo
Link copied to clipboard
common
fun WebhookInfo(url: String, hasCustomCertificate: Boolean, pendingUpdateCount: Int, ipAddress: String? = null, lastErrorDate: Int? = null, lastErrorMessage: String? = null, maxConnections: Int? = null, allowedUpdates: List<String> = emptyList())
Webhook URL, may be empty if webhook is not set up

Functions

component1
Link copied to clipboard
common
operator fun component1(): String
component2
Link copied to clipboard
common
operator fun component2(): Boolean
component3
Link copied to clipboard
common
operator fun component3(): Int
component4
Link copied to clipboard
common
operator fun component4(): String?
component5
Link copied to clipboard
common
operator fun component5(): Int?
component6
Link copied to clipboard
common
operator fun component6(): String?
component7
Link copied to clipboard
common
operator fun component7(): Int?
component8
Link copied to clipboard
common
operator fun component8(): List<String>
copy
Link copied to clipboard
common
fun copy(url: String, hasCustomCertificate: Boolean, pendingUpdateCount: Int, ipAddress: String? = null, lastErrorDate: Int? = null, lastErrorMessage: String? = null, maxConnections: Int? = null, allowedUpdates: List<String> = emptyList()): WebhookInfo
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
toString
Link copied to clipboard
common
open override fun toString(): String

Properties

allowedUpdates
Link copied to clipboard
common
val allowedUpdates: List<String>
Optional.
hasCustomCertificate
Link copied to clipboard
common
val hasCustomCertificate: Boolean
True, if a custom certificate was provided for webhook certificate checks
ipAddress
Link copied to clipboard
common
val ipAddress: String? = null
Optional.
lastErrorDate
Link copied to clipboard
common
val lastErrorDate: Int? = null
Optional.
lastErrorMessage
Link copied to clipboard
common
val lastErrorMessage: String? = null
Optional.
maxConnections
Link copied to clipboard
common
val maxConnections: Int? = null
Optional.
pendingUpdateCount
Link copied to clipboard
common
val pendingUpdateCount: Int
Number of updates awaiting delivery
url
Link copied to clipboard
common
val url: String
Webhook URL, may be empty if webhook is not set up