-
Notifications
You must be signed in to change notification settings - Fork 101
/
groupCallVideoQuality.go
executable file
·130 lines (104 loc) · 4.32 KB
/
groupCallVideoQuality.go
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
// AUTOGENERATED - DO NOT EDIT
package tdlib
import (
"encoding/json"
"fmt"
)
// GroupCallVideoQuality Describes the quality of a group call video
type GroupCallVideoQuality interface {
GetGroupCallVideoQualityEnum() GroupCallVideoQualityEnum
}
// GroupCallVideoQualityEnum Alias for abstract GroupCallVideoQuality 'Sub-Classes', used as constant-enum here
type GroupCallVideoQualityEnum string
// GroupCallVideoQuality enums
const (
GroupCallVideoQualityThumbnailType GroupCallVideoQualityEnum = "groupCallVideoQualityThumbnail"
GroupCallVideoQualityMediumType GroupCallVideoQualityEnum = "groupCallVideoQualityMedium"
GroupCallVideoQualityFullType GroupCallVideoQualityEnum = "groupCallVideoQualityFull"
)
func unmarshalGroupCallVideoQuality(rawMsg *json.RawMessage) (GroupCallVideoQuality, error) {
if rawMsg == nil {
return nil, nil
}
var objMap map[string]interface{}
err := json.Unmarshal(*rawMsg, &objMap)
if err != nil {
return nil, err
}
switch GroupCallVideoQualityEnum(objMap["@type"].(string)) {
case GroupCallVideoQualityThumbnailType:
var groupCallVideoQualityThumbnail GroupCallVideoQualityThumbnail
err := json.Unmarshal(*rawMsg, &groupCallVideoQualityThumbnail)
return &groupCallVideoQualityThumbnail, err
case GroupCallVideoQualityMediumType:
var groupCallVideoQualityMedium GroupCallVideoQualityMedium
err := json.Unmarshal(*rawMsg, &groupCallVideoQualityMedium)
return &groupCallVideoQualityMedium, err
case GroupCallVideoQualityFullType:
var groupCallVideoQualityFull GroupCallVideoQualityFull
err := json.Unmarshal(*rawMsg, &groupCallVideoQualityFull)
return &groupCallVideoQualityFull, err
default:
return nil, fmt.Errorf("Error UnMarshaling, unknown type:" + objMap["@type"].(string))
}
}
// GroupCallVideoQualityThumbnail The worst available video quality
type GroupCallVideoQualityThumbnail struct {
tdCommon
}
// MessageType return the string telegram-type of GroupCallVideoQualityThumbnail
func (groupCallVideoQualityThumbnail *GroupCallVideoQualityThumbnail) MessageType() string {
return "groupCallVideoQualityThumbnail"
}
// NewGroupCallVideoQualityThumbnail creates a new GroupCallVideoQualityThumbnail
//
func NewGroupCallVideoQualityThumbnail() *GroupCallVideoQualityThumbnail {
groupCallVideoQualityThumbnailTemp := GroupCallVideoQualityThumbnail{
tdCommon: tdCommon{Type: "groupCallVideoQualityThumbnail"},
}
return &groupCallVideoQualityThumbnailTemp
}
// GetGroupCallVideoQualityEnum return the enum type of this object
func (groupCallVideoQualityThumbnail *GroupCallVideoQualityThumbnail) GetGroupCallVideoQualityEnum() GroupCallVideoQualityEnum {
return GroupCallVideoQualityThumbnailType
}
// GroupCallVideoQualityMedium The medium video quality
type GroupCallVideoQualityMedium struct {
tdCommon
}
// MessageType return the string telegram-type of GroupCallVideoQualityMedium
func (groupCallVideoQualityMedium *GroupCallVideoQualityMedium) MessageType() string {
return "groupCallVideoQualityMedium"
}
// NewGroupCallVideoQualityMedium creates a new GroupCallVideoQualityMedium
//
func NewGroupCallVideoQualityMedium() *GroupCallVideoQualityMedium {
groupCallVideoQualityMediumTemp := GroupCallVideoQualityMedium{
tdCommon: tdCommon{Type: "groupCallVideoQualityMedium"},
}
return &groupCallVideoQualityMediumTemp
}
// GetGroupCallVideoQualityEnum return the enum type of this object
func (groupCallVideoQualityMedium *GroupCallVideoQualityMedium) GetGroupCallVideoQualityEnum() GroupCallVideoQualityEnum {
return GroupCallVideoQualityMediumType
}
// GroupCallVideoQualityFull The best available video quality
type GroupCallVideoQualityFull struct {
tdCommon
}
// MessageType return the string telegram-type of GroupCallVideoQualityFull
func (groupCallVideoQualityFull *GroupCallVideoQualityFull) MessageType() string {
return "groupCallVideoQualityFull"
}
// NewGroupCallVideoQualityFull creates a new GroupCallVideoQualityFull
//
func NewGroupCallVideoQualityFull() *GroupCallVideoQualityFull {
groupCallVideoQualityFullTemp := GroupCallVideoQualityFull{
tdCommon: tdCommon{Type: "groupCallVideoQualityFull"},
}
return &groupCallVideoQualityFullTemp
}
// GetGroupCallVideoQualityEnum return the enum type of this object
func (groupCallVideoQualityFull *GroupCallVideoQualityFull) GetGroupCallVideoQualityEnum() GroupCallVideoQualityEnum {
return GroupCallVideoQualityFullType
}