/
model_get_block_details_by_block_height_ribsz2.go
289 lines (242 loc) · 8 KB
/
model_get_block_details_by_block_height_ribsz2.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
/*
CryptoAPIs
Crypto APIs is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of their blockchain applications. Crypto APIs provides unified endpoints and data, raw data, automatic tokens and coins forwardings, callback functionalities, and much more.
API version: 2021-03-20
Contact: developers@cryptoapis.io
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package cryptoapis
import (
"encoding/json"
)
// GetBlockDetailsByBlockHeightRIBSZ2 Zilliqa
type GetBlockDetailsByBlockHeightRIBSZ2 struct {
// Represents a mathematical value of how hard it is to find a valid hash for this block.
Difficulty string `json:"difficulty"`
// Numeric representation of the ds block
DsBlock int32 `json:"dsBlock"`
// Numeric representation of the ds difficulty
DsDifficulty string `json:"dsDifficulty"`
// String representation of the ds leader
DsLeader string `json:"dsLeader"`
// Numeric representation of the block gas_limit
GasLimit int32 `json:"gasLimit"`
// Numeric representation of the block gas_limit
GasUsed int32 `json:"gasUsed"`
MicroBlocks []string `json:"microBlocks"`
}
// NewGetBlockDetailsByBlockHeightRIBSZ2 instantiates a new GetBlockDetailsByBlockHeightRIBSZ2 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 NewGetBlockDetailsByBlockHeightRIBSZ2(difficulty string, dsBlock int32, dsDifficulty string, dsLeader string, gasLimit int32, gasUsed int32, microBlocks []string) *GetBlockDetailsByBlockHeightRIBSZ2 {
this := GetBlockDetailsByBlockHeightRIBSZ2{}
this.Difficulty = difficulty
this.DsBlock = dsBlock
this.DsDifficulty = dsDifficulty
this.DsLeader = dsLeader
this.GasLimit = gasLimit
this.GasUsed = gasUsed
this.MicroBlocks = microBlocks
return &this
}
// NewGetBlockDetailsByBlockHeightRIBSZ2WithDefaults instantiates a new GetBlockDetailsByBlockHeightRIBSZ2 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 NewGetBlockDetailsByBlockHeightRIBSZ2WithDefaults() *GetBlockDetailsByBlockHeightRIBSZ2 {
this := GetBlockDetailsByBlockHeightRIBSZ2{}
return &this
}
// GetDifficulty returns the Difficulty field value
func (o *GetBlockDetailsByBlockHeightRIBSZ2) GetDifficulty() string {
if o == nil {
var ret string
return ret
}
return o.Difficulty
}
// GetDifficultyOk returns a tuple with the Difficulty field value
// and a boolean to check if the value has been set.
func (o *GetBlockDetailsByBlockHeightRIBSZ2) GetDifficultyOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Difficulty, true
}
// SetDifficulty sets field value
func (o *GetBlockDetailsByBlockHeightRIBSZ2) SetDifficulty(v string) {
o.Difficulty = v
}
// GetDsBlock returns the DsBlock field value
func (o *GetBlockDetailsByBlockHeightRIBSZ2) GetDsBlock() int32 {
if o == nil {
var ret int32
return ret
}
return o.DsBlock
}
// GetDsBlockOk returns a tuple with the DsBlock field value
// and a boolean to check if the value has been set.
func (o *GetBlockDetailsByBlockHeightRIBSZ2) GetDsBlockOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.DsBlock, true
}
// SetDsBlock sets field value
func (o *GetBlockDetailsByBlockHeightRIBSZ2) SetDsBlock(v int32) {
o.DsBlock = v
}
// GetDsDifficulty returns the DsDifficulty field value
func (o *GetBlockDetailsByBlockHeightRIBSZ2) GetDsDifficulty() string {
if o == nil {
var ret string
return ret
}
return o.DsDifficulty
}
// GetDsDifficultyOk returns a tuple with the DsDifficulty field value
// and a boolean to check if the value has been set.
func (o *GetBlockDetailsByBlockHeightRIBSZ2) GetDsDifficultyOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DsDifficulty, true
}
// SetDsDifficulty sets field value
func (o *GetBlockDetailsByBlockHeightRIBSZ2) SetDsDifficulty(v string) {
o.DsDifficulty = v
}
// GetDsLeader returns the DsLeader field value
func (o *GetBlockDetailsByBlockHeightRIBSZ2) GetDsLeader() string {
if o == nil {
var ret string
return ret
}
return o.DsLeader
}
// GetDsLeaderOk returns a tuple with the DsLeader field value
// and a boolean to check if the value has been set.
func (o *GetBlockDetailsByBlockHeightRIBSZ2) GetDsLeaderOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DsLeader, true
}
// SetDsLeader sets field value
func (o *GetBlockDetailsByBlockHeightRIBSZ2) SetDsLeader(v string) {
o.DsLeader = v
}
// GetGasLimit returns the GasLimit field value
func (o *GetBlockDetailsByBlockHeightRIBSZ2) GetGasLimit() int32 {
if o == nil {
var ret int32
return ret
}
return o.GasLimit
}
// GetGasLimitOk returns a tuple with the GasLimit field value
// and a boolean to check if the value has been set.
func (o *GetBlockDetailsByBlockHeightRIBSZ2) GetGasLimitOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.GasLimit, true
}
// SetGasLimit sets field value
func (o *GetBlockDetailsByBlockHeightRIBSZ2) SetGasLimit(v int32) {
o.GasLimit = v
}
// GetGasUsed returns the GasUsed field value
func (o *GetBlockDetailsByBlockHeightRIBSZ2) GetGasUsed() int32 {
if o == nil {
var ret int32
return ret
}
return o.GasUsed
}
// GetGasUsedOk returns a tuple with the GasUsed field value
// and a boolean to check if the value has been set.
func (o *GetBlockDetailsByBlockHeightRIBSZ2) GetGasUsedOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.GasUsed, true
}
// SetGasUsed sets field value
func (o *GetBlockDetailsByBlockHeightRIBSZ2) SetGasUsed(v int32) {
o.GasUsed = v
}
// GetMicroBlocks returns the MicroBlocks field value
func (o *GetBlockDetailsByBlockHeightRIBSZ2) GetMicroBlocks() []string {
if o == nil {
var ret []string
return ret
}
return o.MicroBlocks
}
// GetMicroBlocksOk returns a tuple with the MicroBlocks field value
// and a boolean to check if the value has been set.
func (o *GetBlockDetailsByBlockHeightRIBSZ2) GetMicroBlocksOk() ([]string, bool) {
if o == nil {
return nil, false
}
return o.MicroBlocks, true
}
// SetMicroBlocks sets field value
func (o *GetBlockDetailsByBlockHeightRIBSZ2) SetMicroBlocks(v []string) {
o.MicroBlocks = v
}
func (o GetBlockDetailsByBlockHeightRIBSZ2) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["difficulty"] = o.Difficulty
}
if true {
toSerialize["dsBlock"] = o.DsBlock
}
if true {
toSerialize["dsDifficulty"] = o.DsDifficulty
}
if true {
toSerialize["dsLeader"] = o.DsLeader
}
if true {
toSerialize["gasLimit"] = o.GasLimit
}
if true {
toSerialize["gasUsed"] = o.GasUsed
}
if true {
toSerialize["microBlocks"] = o.MicroBlocks
}
return json.Marshal(toSerialize)
}
type NullableGetBlockDetailsByBlockHeightRIBSZ2 struct {
value *GetBlockDetailsByBlockHeightRIBSZ2
isSet bool
}
func (v NullableGetBlockDetailsByBlockHeightRIBSZ2) Get() *GetBlockDetailsByBlockHeightRIBSZ2 {
return v.value
}
func (v *NullableGetBlockDetailsByBlockHeightRIBSZ2) Set(val *GetBlockDetailsByBlockHeightRIBSZ2) {
v.value = val
v.isSet = true
}
func (v NullableGetBlockDetailsByBlockHeightRIBSZ2) IsSet() bool {
return v.isSet
}
func (v *NullableGetBlockDetailsByBlockHeightRIBSZ2) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGetBlockDetailsByBlockHeightRIBSZ2(val *GetBlockDetailsByBlockHeightRIBSZ2) *NullableGetBlockDetailsByBlockHeightRIBSZ2 {
return &NullableGetBlockDetailsByBlockHeightRIBSZ2{value: val, isSet: true}
}
func (v NullableGetBlockDetailsByBlockHeightRIBSZ2) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGetBlockDetailsByBlockHeightRIBSZ2) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}