WebhookInfo class abstract

Describes the current status of a webhook.

Available extensions
Annotations
  • @freezed

Constructors

WebhookInfo({@JsonKey.new(name: 'url') required String url, @JsonKey.new(name: 'has_custom_certificate') required bool hasCustomCertificate, @JsonKey.new(name: 'pending_update_count') required int pendingUpdateCount, @JsonKey.new(name: 'ip_address') String? ipAddress, @JsonKey.new(name: 'last_error_date') int? lastErrorDate, @JsonKey.new(name: 'last_error_message') String? lastErrorMessage, @JsonKey.new(name: 'last_error_network_date') int? lastErrorNetworkDate, @JsonKey.new(name: 'max_connections') int? maxConnections, @JsonKey.new(name: 'allowed_updates') List<String>? allowedUpdates})
Constructs a WebhookInfo object.
const
factory
WebhookInfo.fromJson(Map<String, dynamic> json)
Creates a WebhookInfo object from json String.
factory

Properties

allowedUpdates → List<String>?
Optional. A list of update types the bot is subscribed to. Defaults to all update types except chat_member
no setterinherited
copyWith → $WebhookInfoCopyWith<WebhookInfo>
Create a copy of WebhookInfo with the given fields replaced by the non-null parameter values.
no setterinherited
hasCustomCertificate → bool
True, if a custom certificate was provided for webhook certificate checks
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
ipAddress → String?
Optional. Currently used webhook IP address
no setterinherited
lastErrorDate → int?
Optional. Unix time for the most recent error that happened when trying to deliver an update via webhook
no setterinherited
lastErrorMessage → String?
Optional. Error message in human-readable format for the most recent error that happened when trying to deliver an update via webhook
no setterinherited
lastErrorNetworkDate → int?
Optional. Unix time of the most recent error that happened when trying to synchronize available updates with Telegram datacenters
no setterinherited
maxConnections → int?
Optional. The maximum allowed number of simultaneous HTTPS connections to the webhook for update delivery
no setterinherited
pendingUpdateCount → int
Number of updates awaiting delivery
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
url → String
Webhook URL, may be empty if webhook is not set up
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_WebhookInfo value)) → TResult

Available on WebhookInfo, provided by the WebhookInfoPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_WebhookInfo value)?) → TResult?

Available on WebhookInfo, provided by the WebhookInfoPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_WebhookInfo value)?, {required TResult orElse()}) → TResult

Available on WebhookInfo, provided by the WebhookInfoPatterns extension

A variant of map that fallback to returning orElse.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serializes this WebhookInfo to a JSON map.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited