-
Notifications
You must be signed in to change notification settings - Fork 0
/
oas_schemas_gen.go
248 lines (202 loc) · 4.83 KB
/
oas_schemas_gen.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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
// Code generated by ogen, DO NOT EDIT.
package api
import (
"io"
)
// Ref: #/components/schemas/batch
type Batch struct {
// Keys list.
Keys []string `json:"keys"`
// Cursor used for pagination.
Cursor int64 `json:"cursor"`
}
// GetKeys returns the value of Keys.
func (s *Batch) GetKeys() []string {
return s.Keys
}
// GetCursor returns the value of Cursor.
func (s *Batch) GetCursor() int64 {
return s.Cursor
}
// SetKeys sets the value of Keys.
func (s *Batch) SetKeys(val []string) {
s.Keys = val
}
// SetCursor sets the value of Cursor.
func (s *Batch) SetCursor(val int64) {
s.Cursor = val
}
// DeleteNamespaceNoContent is response for DeleteNamespace operation.
type DeleteNamespaceNoContent struct{}
// DeleteNoContent is response for Delete operation.
type DeleteNoContent struct{}
// GetNotFound is response for Get operation.
type GetNotFound struct{}
func (*GetNotFound) getRes() {}
type GetOK struct {
Data io.Reader
}
// Read reads data from the Data reader.
//
// Kept to satisfy the io.Reader interface.
func (s GetOK) Read(p []byte) (n int, err error) {
if s.Data == nil {
return 0, io.EOF
}
return s.Data.Read(p)
}
// GetOKHeaders wraps GetOK with response headers.
type GetOKHeaders struct {
XContentType string
XTTL OptFloat64
Response GetOK
}
// GetXContentType returns the value of XContentType.
func (s *GetOKHeaders) GetXContentType() string {
return s.XContentType
}
// GetXTTL returns the value of XTTL.
func (s *GetOKHeaders) GetXTTL() OptFloat64 {
return s.XTTL
}
// GetResponse returns the value of Response.
func (s *GetOKHeaders) GetResponse() GetOK {
return s.Response
}
// SetXContentType sets the value of XContentType.
func (s *GetOKHeaders) SetXContentType(val string) {
s.XContentType = val
}
// SetXTTL sets the value of XTTL.
func (s *GetOKHeaders) SetXTTL(val OptFloat64) {
s.XTTL = val
}
// SetResponse sets the value of Response.
func (s *GetOKHeaders) SetResponse(val GetOK) {
s.Response = val
}
func (*GetOKHeaders) getRes() {}
type HeaderAuth struct {
APIKey string
}
// GetAPIKey returns the value of APIKey.
func (s *HeaderAuth) GetAPIKey() string {
return s.APIKey
}
// SetAPIKey sets the value of APIKey.
func (s *HeaderAuth) SetAPIKey(val string) {
s.APIKey = val
}
// NewOptFloat64 returns new OptFloat64 with value set to v.
func NewOptFloat64(v float64) OptFloat64 {
return OptFloat64{
Value: v,
Set: true,
}
}
// OptFloat64 is optional float64.
type OptFloat64 struct {
Value float64
Set bool
}
// IsSet returns true if OptFloat64 was set.
func (o OptFloat64) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptFloat64) Reset() {
var v float64
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptFloat64) SetTo(v float64) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptFloat64) Get() (v float64, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptFloat64) Or(d float64) float64 {
if v, ok := o.Get(); ok {
return v
}
return d
}
// NewOptInt64 returns new OptInt64 with value set to v.
func NewOptInt64(v int64) OptInt64 {
return OptInt64{
Value: v,
Set: true,
}
}
// OptInt64 is optional int64.
type OptInt64 struct {
Value int64
Set bool
}
// IsSet returns true if OptInt64 was set.
func (o OptInt64) IsSet() bool { return o.Set }
// Reset unsets value.
func (o *OptInt64) Reset() {
var v int64
o.Value = v
o.Set = false
}
// SetTo sets value to v.
func (o *OptInt64) SetTo(v int64) {
o.Set = true
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o OptInt64) Get() (v int64, ok bool) {
if !o.Set {
return v, false
}
return o.Value, true
}
// Or returns value if set, or given parameter if does not.
func (o OptInt64) Or(d int64) int64 {
if v, ok := o.Get(); ok {
return v
}
return d
}
// SetNoContent is response for Set operation.
type SetNoContent struct{}
type SetReq struct {
Data io.Reader
}
// Read reads data from the Data reader.
//
// Kept to satisfy the io.Reader interface.
func (s SetReq) Read(p []byte) (n int, err error) {
if s.Data == nil {
return 0, io.EOF
}
return s.Data.Read(p)
}
// SetReqWithContentType wraps SetReq with Content-Type.
type SetReqWithContentType struct {
ContentType string
Content SetReq
}
// GetContentType returns the value of ContentType.
func (s *SetReqWithContentType) GetContentType() string {
return s.ContentType
}
// GetContent returns the value of Content.
func (s *SetReqWithContentType) GetContent() SetReq {
return s.Content
}
// SetContentType sets the value of ContentType.
func (s *SetReqWithContentType) SetContentType(val string) {
s.ContentType = val
}
// SetContent sets the value of Content.
func (s *SetReqWithContentType) SetContent(val SetReq) {
s.Content = val
}