InlineQueryResultCachedPhoto constructor
const
InlineQueryResultCachedPhoto({
- @JsonKey(name: 'id') required String id,
- @JsonKey(name: 'photo_file_id') required String photoFileId,
- @JsonKey(name: 'type') @Default(InlineQueryResultType.photo) InlineQueryResultType type,
- @JsonKey(name: 'title') String? title,
- @JsonKey(name: 'description') String? description,
- @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,
Constructs an InlineQueryResultCachedPhoto object
Implementation
const factory InlineQueryResultCachedPhoto({
/// Unique identifier for this result, 1-64 Bytes
@JsonKey(name: 'id') required String id,
/// A valid file identifier of the photo
@JsonKey(name: 'photo_file_id') required String photoFileId,
/// Type of the result, always [InlineQueryResultType.photo]
@JsonKey(name: 'type')
@Default(InlineQueryResultType.photo)
InlineQueryResultType type,
/// Optional. Title for the result
@JsonKey(name: 'title') String? title,
/// Optional. Short description of the result
@JsonKey(name: 'description') String? description,
/// Optional. Caption of the photo to be sent, 0-1024 characters after
/// entities parsing
@JsonKey(name: 'caption') String? caption,
/// Optional. Mode for parsing entities in the photo 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 photo
@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,
}) = _InlineQueryResultCachedPhoto;