-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_xpub_detail.go
374 lines (319 loc) · 9.84 KB
/
model_xpub_detail.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
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
/*
* MicrovisionChain API Document
*
* API definition for MicrovisionChain provided apis
*
* API version: 3.0.11
* Contact: heqiming@metasv.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package mvcapi
import (
"encoding/json"
)
// XpubDetail Registered Xpub detail
type XpubDetail struct {
// String encoded extended pubkey (xpub)
Xpub *string `json:"xpub,omitempty"`
// Next unused receive index, path /0/index
ReceiveIndex *int32 `json:"receiveIndex,omitempty"`
// Max lookahead receive index.
MaxReceiveIndex *int32 `json:"maxReceiveIndex,omitempty"`
// Next unused change index, path /1/index
ChangeIndex *int32 `json:"changeIndex,omitempty"`
// Max lookahead change index.
MaxChangeIndex *int32 `json:"maxChangeIndex,omitempty"`
// Current xpub process mode, 0 means preparing(not ready), 1 means synchronizing(ready)
Mode *int32 `json:"mode,omitempty"`
// Skip blocks before skipHeight while searching transactions. This will speed up sync time.
SkipHeight *int64 `json:"skipHeight,omitempty"`
// Xpub current processed height.
ProcessHeight *int64 `json:"processHeight,omitempty"`
}
// NewXpubDetail instantiates a new XpubDetail 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 NewXpubDetail() *XpubDetail {
this := XpubDetail{}
return &this
}
// NewXpubDetailWithDefaults instantiates a new XpubDetail 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 NewXpubDetailWithDefaults() *XpubDetail {
this := XpubDetail{}
return &this
}
// GetXpub returns the Xpub field value if set, zero value otherwise.
func (o *XpubDetail) GetXpub() string {
if o == nil || o.Xpub == nil {
var ret string
return ret
}
return *o.Xpub
}
// GetXpubOk returns a tuple with the Xpub field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *XpubDetail) GetXpubOk() (*string, bool) {
if o == nil || o.Xpub == nil {
return nil, false
}
return o.Xpub, true
}
// HasXpub returns a boolean if a field has been set.
func (o *XpubDetail) HasXpub() bool {
if o != nil && o.Xpub != nil {
return true
}
return false
}
// SetXpub gets a reference to the given string and assigns it to the Xpub field.
func (o *XpubDetail) SetXpub(v string) {
o.Xpub = &v
}
// GetReceiveIndex returns the ReceiveIndex field value if set, zero value otherwise.
func (o *XpubDetail) GetReceiveIndex() int32 {
if o == nil || o.ReceiveIndex == nil {
var ret int32
return ret
}
return *o.ReceiveIndex
}
// GetReceiveIndexOk returns a tuple with the ReceiveIndex field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *XpubDetail) GetReceiveIndexOk() (*int32, bool) {
if o == nil || o.ReceiveIndex == nil {
return nil, false
}
return o.ReceiveIndex, true
}
// HasReceiveIndex returns a boolean if a field has been set.
func (o *XpubDetail) HasReceiveIndex() bool {
if o != nil && o.ReceiveIndex != nil {
return true
}
return false
}
// SetReceiveIndex gets a reference to the given int32 and assigns it to the ReceiveIndex field.
func (o *XpubDetail) SetReceiveIndex(v int32) {
o.ReceiveIndex = &v
}
// GetMaxReceiveIndex returns the MaxReceiveIndex field value if set, zero value otherwise.
func (o *XpubDetail) GetMaxReceiveIndex() int32 {
if o == nil || o.MaxReceiveIndex == nil {
var ret int32
return ret
}
return *o.MaxReceiveIndex
}
// GetMaxReceiveIndexOk returns a tuple with the MaxReceiveIndex field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *XpubDetail) GetMaxReceiveIndexOk() (*int32, bool) {
if o == nil || o.MaxReceiveIndex == nil {
return nil, false
}
return o.MaxReceiveIndex, true
}
// HasMaxReceiveIndex returns a boolean if a field has been set.
func (o *XpubDetail) HasMaxReceiveIndex() bool {
if o != nil && o.MaxReceiveIndex != nil {
return true
}
return false
}
// SetMaxReceiveIndex gets a reference to the given int32 and assigns it to the MaxReceiveIndex field.
func (o *XpubDetail) SetMaxReceiveIndex(v int32) {
o.MaxReceiveIndex = &v
}
// GetChangeIndex returns the ChangeIndex field value if set, zero value otherwise.
func (o *XpubDetail) GetChangeIndex() int32 {
if o == nil || o.ChangeIndex == nil {
var ret int32
return ret
}
return *o.ChangeIndex
}
// GetChangeIndexOk returns a tuple with the ChangeIndex field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *XpubDetail) GetChangeIndexOk() (*int32, bool) {
if o == nil || o.ChangeIndex == nil {
return nil, false
}
return o.ChangeIndex, true
}
// HasChangeIndex returns a boolean if a field has been set.
func (o *XpubDetail) HasChangeIndex() bool {
if o != nil && o.ChangeIndex != nil {
return true
}
return false
}
// SetChangeIndex gets a reference to the given int32 and assigns it to the ChangeIndex field.
func (o *XpubDetail) SetChangeIndex(v int32) {
o.ChangeIndex = &v
}
// GetMaxChangeIndex returns the MaxChangeIndex field value if set, zero value otherwise.
func (o *XpubDetail) GetMaxChangeIndex() int32 {
if o == nil || o.MaxChangeIndex == nil {
var ret int32
return ret
}
return *o.MaxChangeIndex
}
// GetMaxChangeIndexOk returns a tuple with the MaxChangeIndex field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *XpubDetail) GetMaxChangeIndexOk() (*int32, bool) {
if o == nil || o.MaxChangeIndex == nil {
return nil, false
}
return o.MaxChangeIndex, true
}
// HasMaxChangeIndex returns a boolean if a field has been set.
func (o *XpubDetail) HasMaxChangeIndex() bool {
if o != nil && o.MaxChangeIndex != nil {
return true
}
return false
}
// SetMaxChangeIndex gets a reference to the given int32 and assigns it to the MaxChangeIndex field.
func (o *XpubDetail) SetMaxChangeIndex(v int32) {
o.MaxChangeIndex = &v
}
// GetMode returns the Mode field value if set, zero value otherwise.
func (o *XpubDetail) GetMode() int32 {
if o == nil || o.Mode == nil {
var ret int32
return ret
}
return *o.Mode
}
// GetModeOk returns a tuple with the Mode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *XpubDetail) GetModeOk() (*int32, bool) {
if o == nil || o.Mode == nil {
return nil, false
}
return o.Mode, true
}
// HasMode returns a boolean if a field has been set.
func (o *XpubDetail) HasMode() bool {
if o != nil && o.Mode != nil {
return true
}
return false
}
// SetMode gets a reference to the given int32 and assigns it to the Mode field.
func (o *XpubDetail) SetMode(v int32) {
o.Mode = &v
}
// GetSkipHeight returns the SkipHeight field value if set, zero value otherwise.
func (o *XpubDetail) GetSkipHeight() int64 {
if o == nil || o.SkipHeight == nil {
var ret int64
return ret
}
return *o.SkipHeight
}
// GetSkipHeightOk returns a tuple with the SkipHeight field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *XpubDetail) GetSkipHeightOk() (*int64, bool) {
if o == nil || o.SkipHeight == nil {
return nil, false
}
return o.SkipHeight, true
}
// HasSkipHeight returns a boolean if a field has been set.
func (o *XpubDetail) HasSkipHeight() bool {
if o != nil && o.SkipHeight != nil {
return true
}
return false
}
// SetSkipHeight gets a reference to the given int64 and assigns it to the SkipHeight field.
func (o *XpubDetail) SetSkipHeight(v int64) {
o.SkipHeight = &v
}
// GetProcessHeight returns the ProcessHeight field value if set, zero value otherwise.
func (o *XpubDetail) GetProcessHeight() int64 {
if o == nil || o.ProcessHeight == nil {
var ret int64
return ret
}
return *o.ProcessHeight
}
// GetProcessHeightOk returns a tuple with the ProcessHeight field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *XpubDetail) GetProcessHeightOk() (*int64, bool) {
if o == nil || o.ProcessHeight == nil {
return nil, false
}
return o.ProcessHeight, true
}
// HasProcessHeight returns a boolean if a field has been set.
func (o *XpubDetail) HasProcessHeight() bool {
if o != nil && o.ProcessHeight != nil {
return true
}
return false
}
// SetProcessHeight gets a reference to the given int64 and assigns it to the ProcessHeight field.
func (o *XpubDetail) SetProcessHeight(v int64) {
o.ProcessHeight = &v
}
func (o XpubDetail) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Xpub != nil {
toSerialize["xpub"] = o.Xpub
}
if o.ReceiveIndex != nil {
toSerialize["receiveIndex"] = o.ReceiveIndex
}
if o.MaxReceiveIndex != nil {
toSerialize["maxReceiveIndex"] = o.MaxReceiveIndex
}
if o.ChangeIndex != nil {
toSerialize["changeIndex"] = o.ChangeIndex
}
if o.MaxChangeIndex != nil {
toSerialize["maxChangeIndex"] = o.MaxChangeIndex
}
if o.Mode != nil {
toSerialize["mode"] = o.Mode
}
if o.SkipHeight != nil {
toSerialize["skipHeight"] = o.SkipHeight
}
if o.ProcessHeight != nil {
toSerialize["processHeight"] = o.ProcessHeight
}
return json.Marshal(toSerialize)
}
type NullableXpubDetail struct {
value *XpubDetail
isSet bool
}
func (v NullableXpubDetail) Get() *XpubDetail {
return v.value
}
func (v *NullableXpubDetail) Set(val *XpubDetail) {
v.value = val
v.isSet = true
}
func (v NullableXpubDetail) IsSet() bool {
return v.isSet
}
func (v *NullableXpubDetail) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableXpubDetail(val *XpubDetail) *NullableXpubDetail {
return &NullableXpubDetail{value: val, isSet: true}
}
func (v NullableXpubDetail) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableXpubDetail) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}