InlineQueryResultDocument constructor
const
InlineQueryResultDocument({
- @JsonKey(name: 'id') required String id,
- @JsonKey(name: 'type') @Default(InlineQueryResultType.document) InlineQueryResultType type,
- @JsonKey(name: 'title') required String title,
- @JsonKey(name: 'document_url') required String documentUrl,
- @JsonKey(name: 'mime_type') required String mimeType,
- @JsonKey(name: 'caption') String? caption,
- @JsonKey(name: 'parse_mode') ParseMode? parseMode,
- @JsonKey(name: 'caption_entities') List<
MessageEntity> ? captionEntities, - @JsonKey(name: 'description') String? description,
- @JsonKey(name: 'reply_markup') InlineKeyboardMarkup? replyMarkup,
- @JsonKey(name: 'input_message_content') @InputMessageContentConverter() InputMessageContent? inputMessageContent,
- @JsonKey(name: 'thumbnail_url') String? thumbnailUrl,
- @JsonKey(name: 'thumbnail_width') int? thumbnailWidth,
- @JsonKey(name: 'thumbnail_height') int? thumbnailHeight,
Constructs an InlineQueryResultDocument object
Implementation
const factory InlineQueryResultDocument({
/// Unique identifier for this result, 1-64 Bytes
@JsonKey(name: 'id') required String id,
/// Type of the result, always [InlineQueryResultType.document]
@JsonKey(name: 'type')
@Default(InlineQueryResultType.document)
InlineQueryResultType type,
/// Title for the result
@JsonKey(name: 'title') required String title,
/// A valid URL for the file
@JsonKey(name: 'document_url') required String documentUrl,
/// MIME type of the content of the file, either "application/pdf" or
/// "application/zip"
@JsonKey(name: 'mime_type') required String mimeType,
/// Optional. Caption of the document to be sent, 0-1024 characters after
/// entities parsing
@JsonKey(name: 'caption') String? caption,
/// Optional. Mode for parsing entities in the document 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. Short description of the result
@JsonKey(name: 'description') String? description,
/// Optional. Inline keyboard attached to the message
@JsonKey(name: 'reply_markup') InlineKeyboardMarkup? replyMarkup,
/// Optional. Content of the message to be sent instead of the file
@JsonKey(name: 'input_message_content')
@InputMessageContentConverter()
InputMessageContent? inputMessageContent,
/// Optional. URL of the thumbnail (JPEG only) for the file
@JsonKey(name: 'thumbnail_url') String? thumbnailUrl,
/// Optional. Thumbnail width
@JsonKey(name: 'thumbnail_width') int? thumbnailWidth,
/// Optional. Thumbnail height
@JsonKey(name: 'thumbnail_height') int? thumbnailHeight,
}) = _InlineQueryResultDocument;