InlineQueryResultVideo constructor

const InlineQueryResultVideo({
  1. @JsonKey(name: 'type') @Default(InlineQueryResultType.video) InlineQueryResultType type,
  2. @JsonKey(name: 'id') required String id,
  3. @JsonKey(name: 'video_url') required String videoUrl,
  4. @JsonKey(name: 'mime_type') required String mimeType,
  5. @JsonKey(name: 'thumbnail_url') required String thumbnailUrl,
  6. @JsonKey(name: 'title') required String title,
  7. @JsonKey(name: 'caption') String? caption,
  8. @JsonKey(name: 'parse_mode') ParseMode? parseMode,
  9. @JsonKey(name: 'caption_entities') List<MessageEntity>? captionEntities,
  10. @JsonKey(name: 'video_width') int? videoWidth,
  11. @JsonKey(name: 'video_height') int? videoHeight,
  12. @JsonKey(name: 'video_duration') int? videoDuration,
  13. @JsonKey(name: 'description') String? description,
  14. @JsonKey(name: 'reply_markup') InlineKeyboardMarkup? replyMarkup,
  15. @JsonKey(name: 'input_message_content') @InputMessageContentConverter() InputMessageContent? inputMessageContent,
  16. @JsonKey(name: 'show_caption_above_media') bool? showCaptionAboveMedia,
})

Creates an instance of InlineQueryResultVideo.

Implementation

const factory InlineQueryResultVideo({
  /// Type of the result, always [InlineQueryResultType.video]
  @JsonKey(name: 'type')
  @Default(InlineQueryResultType.video)
  InlineQueryResultType type,

  /// Unique identifier for this result, 1-64 Bytes
  @JsonKey(name: 'id') required String id,

  /// A valid URL for the embedded video player or video file
  @JsonKey(name: 'video_url') required String videoUrl,

  /// MIME type of the content of the video URL, "text/html" or "video/mp4"
  @JsonKey(name: 'mime_type') required String mimeType,

  /// URL of the thumbnail (JPEG only) for the video
  @JsonKey(name: 'thumbnail_url') required String thumbnailUrl,

  /// Title for the result
  @JsonKey(name: 'title') required String title,

  /// Optional. Caption of the video to be sent, 0-1024 characters after
  /// entities parsing
  @JsonKey(name: 'caption') String? caption,

  /// Optional. Mode for parsing entities in the video 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. Video width
  @JsonKey(name: 'video_width') int? videoWidth,

  /// Optional. Video height
  @JsonKey(name: 'video_height') int? videoHeight,

  /// Optional. Video duration in seconds
  @JsonKey(name: 'video_duration') int? videoDuration,

  /// 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 video. This
  /// field is required if InlineQueryResultVideo is used to send an HTML-page
  /// as a result (e.g., a YouTube video).
  @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,
}) = _InlineQueryResultVideo;