summaryrefslogtreecommitdiff
path: root/src/types/paid_media.zig
blob: 3b5025045314b05d76dcabc0f63802e739495929 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const json = @import("../json.zig");

const PhotoSize = @import("PhotoSize.zig");
const Video = @import("Video.zig");

pub const PaidMedia = union(enum) {
    preview: struct {
        width: ?u64 = null,
        height: ?u64 = null,
        duration: ?u64 = null,
    },
    photo: struct {
        photo: []PhotoSize,
    },
    video: struct {
        video: Video,
    },

    pub const jsonParse = json.makeJsonParse(PaidMedia);
    pub const jsonParseFromValue = json.makeJsonParseFromValue(PaidMedia);
};