InlineQueryResultGif constructor
const
InlineQueryResultGif({
- @JsonKey(name: 'type') @Default(InlineQueryResultType.gif) InlineQueryResultType type,
- @JsonKey(name: 'id') required String id,
- @JsonKey(name: 'gif_url') required String gifUrl,
- @JsonKey(name: 'thumbnail_url') required String thumbnailUrl,
- @JsonKey(name: 'gif_width') int? gifWidth,
- @JsonKey(name: 'gif_height') int? gifHeight,
- @JsonKey(name: 'gif_duration') int? gifDuration,
- @JsonKey(name: 'thumbnail_mime_type') String? thumbnailMimeType,
- @JsonKey(name: 'title') String? title,
- @JsonKey(name: 'caption') String? caption,
- @JsonKey(name: 'parse_mode') ParseMode? parseMode,
- @JsonKey(name: 'caption_entities') List<
MessageEntity> ? captionEntities, - @JsonKey(name: 'reply_markup') InlineKeyboardMarkup? replyMarkup,
- @JsonKey(name: 'input_message_content') @InputMessageContentConverter() InputMessageContent? inputMessageContent,
- @JsonKey(name: 'show_caption_above_media') bool? showCaptionAboveMedia,
Creates an InlineQueryResultGif object
Implementation
const factory InlineQueryResultGif({
/// Type of the result, always [InlineQueryResultType.gif]
@JsonKey(name: 'type')
@Default(InlineQueryResultType.gif)
InlineQueryResultType type,
/// Unique identifier for this result, 1-64 Bytes
@JsonKey(name: 'id') required String id,
/// A valid URL for the GIF file. File size must not exceed 1MB
@JsonKey(name: 'gif_url') required String gifUrl,
/// URL of the static (JPEG or GIF) or animated (MPEG4) thumbnail for the result
@JsonKey(name: 'thumbnail_url') required String thumbnailUrl,
/// Optional. Width of the GIF
@JsonKey(name: 'gif_width') int? gifWidth,
/// Optional. Height of the GIF
@JsonKey(name: 'gif_height') int? gifHeight,
/// Optional. Duration of the GIF in seconds
@JsonKey(name: 'gif_duration') int? gifDuration,
/// Optional. MIME type of the thumbnail, must be one of "image/jpeg", "image/gif", or "video/mp4". Defaults to "image/jpeg"
@JsonKey(name: 'thumbnail_mime_type') String? thumbnailMimeType,
/// Optional. Title for the result
@JsonKey(name: 'title') String? title,
/// Optional. Caption of the GIF file to be sent, 0-1024 characters after entities parsing
@JsonKey(name: 'caption') String? caption,
/// Optional. Mode for parsing entities in the caption. See formatting options for more details.
@JsonKey(name: 'parse_mode') ParseMode? parseMode,
/// Optional. List of special entities that appear in the caption, which can be specified instead of parse_mode
@JsonKey(name: 'caption_entities') List<MessageEntity>? captionEntities,
/// Optional. Inline keyboard attached to the message
@JsonKey(name: 'reply_markup') InlineKeyboardMarkup? replyMarkup,
/// Optional. Content of the message to be sent instead of the GIF animation
@JsonKey(name: 'input_message_content')
@InputMessageContentConverter()
InputMessageContent? inputMessageContent,
/// Optional. True, if the caption must be shown above the message media
@JsonKey(name: 'show_caption_above_media') bool? showCaptionAboveMedia,
}) = _InlineQueryResultGif;