-
-
Notifications
You must be signed in to change notification settings - Fork 382
/
Copy pathInputPaidMediaVideo.java
85 lines (65 loc) · 2.07 KB
/
InputPaidMediaVideo.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package com.pengrad.telegrambot.model.request;
import com.pengrad.telegrambot.request.ContentTypes;
import java.io.File;
import java.io.Serializable;
public class InputPaidMediaVideo extends InputPaidMedia implements Serializable {
private final static long serialVersionUID = 1L;
private Integer width, height, duration;
private Boolean supports_streaming;
private String thumbnail;
private String cover;
private Integer start_timestamp;
public InputPaidMediaVideo(String media) {
super("video", media);
}
public InputPaidMediaVideo(File media) {
super("video", media);
}
public InputPaidMediaVideo(byte[] media) {
super("video", media);
}
public InputPaidMediaVideo width(Integer width) {
this.width = width;
return this;
}
public InputPaidMediaVideo height(Integer height) {
this.height = height;
return this;
}
public InputPaidMediaVideo duration(Integer duration) {
this.duration = duration;
return this;
}
public InputPaidMediaVideo supportsStreaming(boolean supportsStreaming) {
this.supports_streaming = supportsStreaming;
return this;
}
public InputPaidMediaVideo thumbnail(File thumbnail) {
this.thumbnail = addAttachment(thumbnail);
return this;
}
public InputPaidMediaVideo thumbnail(byte[] thumbnail) {
this.thumbnail = addAttachment(thumbnail);
return this;
}
public InputPaidMediaVideo cover(File cover) {
this.cover = addAttachment(cover);
return this;
}
public InputPaidMediaVideo cover(byte[] cover) {
this.cover = addAttachment(cover);
return this;
}
public InputPaidMediaVideo startTimestamp(Integer startTimestamp) {
this.start_timestamp = startTimestamp;
return this;
}
@Override
public String getDefaultFileName() {
return ContentTypes.VIDEO_FILE_NAME;
}
@Override
public String getDefaultContentType() {
return ContentTypes.VIDEO_MIME_TYPE;
}
}