forked from go-telegram/bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpassport_element_error.go
202 lines (163 loc) · 5.48 KB
/
passport_element_error.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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
package models
import (
"encoding/json"
)
// PassportElementError https://core.telegram.org/bots/api#passportelementerror
type PassportElementError interface {
passportElementErrorTag()
MarshalCustom() ([]byte, error)
}
// PassportElementErrorDataField https://core.telegram.org/bots/api#passportelementerrordatafield
type PassportElementErrorDataField struct {
Type string `json:"type"`
FieldName string `json:"field_name"`
DataHash string `json:"data_hash"`
Message string `json:"message"`
}
func (PassportElementErrorDataField) passportElementErrorTag() {}
func (m *PassportElementErrorDataField) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*PassportElementErrorDataField
}{
Type: "data",
PassportElementErrorDataField: m,
}
return json.Marshal(&ret)
}
// PassportElementErrorFrontSide https://core.telegram.org/bots/api#passportelementerrorfrontside
type PassportElementErrorFrontSide struct {
Type string `json:"type"`
FileHash string `json:"file_hash"`
Message string `json:"message"`
}
func (PassportElementErrorFrontSide) passportElementErrorTag() {}
func (m *PassportElementErrorFrontSide) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*PassportElementErrorFrontSide
}{
Type: "front_side",
PassportElementErrorFrontSide: m,
}
return json.Marshal(&ret)
}
// PassportElementErrorReverseSide https://core.telegram.org/bots/api#passportelementerrorreverseside
type PassportElementErrorReverseSide struct {
Type string `json:"type"`
FileHash string `json:"file_hash"`
Message string `json:"message"`
}
func (PassportElementErrorReverseSide) passportElementErrorTag() {}
func (m *PassportElementErrorReverseSide) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*PassportElementErrorReverseSide
}{
Type: "reverse_side",
PassportElementErrorReverseSide: m,
}
return json.Marshal(&ret)
}
// PassportElementErrorSelfie https://core.telegram.org/bots/api#passportelementerrorselfie
type PassportElementErrorSelfie struct {
Type string `json:"type"`
FileHash string `json:"file_hash"`
Message string `json:"message"`
}
func (PassportElementErrorSelfie) passportElementErrorTag() {}
func (m *PassportElementErrorSelfie) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*PassportElementErrorSelfie
}{
Type: "selfie",
PassportElementErrorSelfie: m,
}
return json.Marshal(&ret)
}
// PassportElementErrorFile https://core.telegram.org/bots/api#passportelementerrorfile
type PassportElementErrorFile struct {
Type string `json:"type"`
FileHash string `json:"file_hash"`
Message string `json:"message"`
}
func (PassportElementErrorFile) passportElementErrorTag() {}
func (m *PassportElementErrorFile) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*PassportElementErrorFile
}{
Type: "file",
PassportElementErrorFile: m,
}
return json.Marshal(&ret)
}
// PassportElementErrorFiles https://core.telegram.org/bots/api#passportelementerrorfiles
type PassportElementErrorFiles struct {
Type string `json:"type"`
FileHashes []string `json:"file_hashes"`
Message string `json:"message"`
}
func (PassportElementErrorFiles) passportElementErrorTag() {}
func (m *PassportElementErrorFiles) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*PassportElementErrorFiles
}{
Type: "files",
PassportElementErrorFiles: m,
}
return json.Marshal(&ret)
}
// PassportElementErrorTranslationFile https://core.telegram.org/bots/api#passportelementerrortranslationfile
type PassportElementErrorTranslationFile struct {
Type string `json:"type"`
FileHash string `json:"file_hash"`
Message string `json:"message"`
}
func (PassportElementErrorTranslationFile) passportElementErrorTag() {}
func (m *PassportElementErrorTranslationFile) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*PassportElementErrorTranslationFile
}{
Type: "translation_file",
PassportElementErrorTranslationFile: m,
}
return json.Marshal(&ret)
}
// PassportElementErrorTranslationFiles https://core.telegram.org/bots/api#passportelementerrortranslationfiles
type PassportElementErrorTranslationFiles struct {
Type string `json:"type"`
FileHashes []string `json:"file_hashes"`
Message string `json:"message"`
}
func (PassportElementErrorTranslationFiles) passportElementErrorTag() {}
func (m *PassportElementErrorTranslationFiles) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*PassportElementErrorTranslationFiles
}{
Type: "translation_files",
PassportElementErrorTranslationFiles: m,
}
return json.Marshal(&ret)
}
// PassportElementErrorUnspecified https://core.telegram.org/bots/api#passportelementerrorunspecified
type PassportElementErrorUnspecified struct {
Type string `json:"type"`
ElementHash string `json:"element_hash"`
Message string `json:"message"`
}
func (PassportElementErrorUnspecified) passportElementErrorTag() {}
func (m *PassportElementErrorUnspecified) MarshalCustom() ([]byte, error) {
ret := struct {
Type string `json:"type"`
*PassportElementErrorUnspecified
}{
Type: "unspecified",
PassportElementErrorUnspecified: m,
}
return json.Marshal(&ret)
}