-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmodel_forex_candles.go
338 lines (284 loc) · 7.65 KB
/
model_forex_candles.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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
/*
Finnhub API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package finnhub
import (
"encoding/json"
)
// ForexCandles struct for ForexCandles
type ForexCandles struct {
// List of open prices for returned candles.
O *[]float32 `json:"o,omitempty"`
// List of high prices for returned candles.
H *[]float32 `json:"h,omitempty"`
// List of low prices for returned candles.
L *[]float32 `json:"l,omitempty"`
// List of close prices for returned candles.
C *[]float32 `json:"c,omitempty"`
// List of volume data for returned candles.
V *[]float32 `json:"v,omitempty"`
// List of timestamp for returned candles.
T *[]float32 `json:"t,omitempty"`
// Status of the response. This field can either be ok or no_data.
S *string `json:"s,omitempty"`
}
// NewForexCandles instantiates a new ForexCandles object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewForexCandles() *ForexCandles {
this := ForexCandles{}
return &this
}
// NewForexCandlesWithDefaults instantiates a new ForexCandles object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewForexCandlesWithDefaults() *ForexCandles {
this := ForexCandles{}
return &this
}
// GetO returns the O field value if set, zero value otherwise.
func (o *ForexCandles) GetO() []float32 {
if o == nil || o.O == nil {
var ret []float32
return ret
}
return *o.O
}
// GetOOk returns a tuple with the O field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ForexCandles) GetOOk() (*[]float32, bool) {
if o == nil || o.O == nil {
return nil, false
}
return o.O, true
}
// HasO returns a boolean if a field has been set.
func (o *ForexCandles) HasO() bool {
if o != nil && o.O != nil {
return true
}
return false
}
// SetO gets a reference to the given []float32 and assigns it to the O field.
func (o *ForexCandles) SetO(v []float32) {
o.O = &v
}
// GetH returns the H field value if set, zero value otherwise.
func (o *ForexCandles) GetH() []float32 {
if o == nil || o.H == nil {
var ret []float32
return ret
}
return *o.H
}
// GetHOk returns a tuple with the H field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ForexCandles) GetHOk() (*[]float32, bool) {
if o == nil || o.H == nil {
return nil, false
}
return o.H, true
}
// HasH returns a boolean if a field has been set.
func (o *ForexCandles) HasH() bool {
if o != nil && o.H != nil {
return true
}
return false
}
// SetH gets a reference to the given []float32 and assigns it to the H field.
func (o *ForexCandles) SetH(v []float32) {
o.H = &v
}
// GetL returns the L field value if set, zero value otherwise.
func (o *ForexCandles) GetL() []float32 {
if o == nil || o.L == nil {
var ret []float32
return ret
}
return *o.L
}
// GetLOk returns a tuple with the L field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ForexCandles) GetLOk() (*[]float32, bool) {
if o == nil || o.L == nil {
return nil, false
}
return o.L, true
}
// HasL returns a boolean if a field has been set.
func (o *ForexCandles) HasL() bool {
if o != nil && o.L != nil {
return true
}
return false
}
// SetL gets a reference to the given []float32 and assigns it to the L field.
func (o *ForexCandles) SetL(v []float32) {
o.L = &v
}
// GetC returns the C field value if set, zero value otherwise.
func (o *ForexCandles) GetC() []float32 {
if o == nil || o.C == nil {
var ret []float32
return ret
}
return *o.C
}
// GetCOk returns a tuple with the C field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ForexCandles) GetCOk() (*[]float32, bool) {
if o == nil || o.C == nil {
return nil, false
}
return o.C, true
}
// HasC returns a boolean if a field has been set.
func (o *ForexCandles) HasC() bool {
if o != nil && o.C != nil {
return true
}
return false
}
// SetC gets a reference to the given []float32 and assigns it to the C field.
func (o *ForexCandles) SetC(v []float32) {
o.C = &v
}
// GetV returns the V field value if set, zero value otherwise.
func (o *ForexCandles) GetV() []float32 {
if o == nil || o.V == nil {
var ret []float32
return ret
}
return *o.V
}
// GetVOk returns a tuple with the V field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ForexCandles) GetVOk() (*[]float32, bool) {
if o == nil || o.V == nil {
return nil, false
}
return o.V, true
}
// HasV returns a boolean if a field has been set.
func (o *ForexCandles) HasV() bool {
if o != nil && o.V != nil {
return true
}
return false
}
// SetV gets a reference to the given []float32 and assigns it to the V field.
func (o *ForexCandles) SetV(v []float32) {
o.V = &v
}
// GetT returns the T field value if set, zero value otherwise.
func (o *ForexCandles) GetT() []float32 {
if o == nil || o.T == nil {
var ret []float32
return ret
}
return *o.T
}
// GetTOk returns a tuple with the T field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ForexCandles) GetTOk() (*[]float32, bool) {
if o == nil || o.T == nil {
return nil, false
}
return o.T, true
}
// HasT returns a boolean if a field has been set.
func (o *ForexCandles) HasT() bool {
if o != nil && o.T != nil {
return true
}
return false
}
// SetT gets a reference to the given []float32 and assigns it to the T field.
func (o *ForexCandles) SetT(v []float32) {
o.T = &v
}
// GetS returns the S field value if set, zero value otherwise.
func (o *ForexCandles) GetS() string {
if o == nil || o.S == nil {
var ret string
return ret
}
return *o.S
}
// GetSOk returns a tuple with the S field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ForexCandles) GetSOk() (*string, bool) {
if o == nil || o.S == nil {
return nil, false
}
return o.S, true
}
// HasS returns a boolean if a field has been set.
func (o *ForexCandles) HasS() bool {
if o != nil && o.S != nil {
return true
}
return false
}
// SetS gets a reference to the given string and assigns it to the S field.
func (o *ForexCandles) SetS(v string) {
o.S = &v
}
func (o ForexCandles) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.O != nil {
toSerialize["o"] = o.O
}
if o.H != nil {
toSerialize["h"] = o.H
}
if o.L != nil {
toSerialize["l"] = o.L
}
if o.C != nil {
toSerialize["c"] = o.C
}
if o.V != nil {
toSerialize["v"] = o.V
}
if o.T != nil {
toSerialize["t"] = o.T
}
if o.S != nil {
toSerialize["s"] = o.S
}
return json.Marshal(toSerialize)
}
type NullableForexCandles struct {
value *ForexCandles
isSet bool
}
func (v NullableForexCandles) Get() *ForexCandles {
return v.value
}
func (v *NullableForexCandles) Set(val *ForexCandles) {
v.value = val
v.isSet = true
}
func (v NullableForexCandles) IsSet() bool {
return v.isSet
}
func (v *NullableForexCandles) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableForexCandles(val *ForexCandles) *NullableForexCandles {
return &NullableForexCandles{value: val, isSet: true}
}
func (v NullableForexCandles) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableForexCandles) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}