PaidMedia.preview constructor
- @Assert.new('type == PaidMediaType.preview', 'type must be PaidMediaType.preview')
- @Default.new(PaidMediaType.preview) @JsonKey.new(name: 'type') PaidMediaType type,
- @JsonKey.new(name: 'width') int? width,
- @JsonKey.new(name: 'height') int? height,
- @JsonKey.new(name: 'duration') int? duration,
Preview of paid media
Implementation
@Assert(
'type == PaidMediaType.preview',
'type must be PaidMediaType.preview',
)
const factory PaidMedia.preview({
/// Type of the paid media, must be "preview"
@Default(PaidMediaType.preview) @JsonKey(name: 'type') PaidMediaType type,
/// Optional. Media width as defined by the sender.
@JsonKey(name: 'width') final int? width,
/// Optional. Media height as defined by the sender.
@JsonKey(name: 'height') final int? height,
/// Optional. Duration of the media in seconds as defined by the sender.
@JsonKey(name: 'duration') final int? duration,
}) = PaidMediaPreview;