-
Notifications
You must be signed in to change notification settings - Fork 141
/
model_protocol_parameters.go
285 lines (236 loc) · 7.1 KB
/
model_protocol_parameters.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
/*
Wasp API
REST API for the Wasp node
API version: 0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package apiclient
import (
"encoding/json"
)
// checks if the ProtocolParameters type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProtocolParameters{}
// ProtocolParameters struct for ProtocolParameters
type ProtocolParameters struct {
// The human readable network prefix
Bech32Hrp string `json:"bech32Hrp"`
// The networks max depth
BelowMaxDepth uint32 `json:"belowMaxDepth"`
// The minimal PoW score
MinPowScore uint32 `json:"minPowScore"`
// The network name
NetworkName string `json:"networkName"`
RentStructure RentStructure `json:"rentStructure"`
// The token supply
TokenSupply string `json:"tokenSupply"`
// The protocol version
Version int32 `json:"version"`
}
// NewProtocolParameters instantiates a new ProtocolParameters 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 NewProtocolParameters(bech32Hrp string, belowMaxDepth uint32, minPowScore uint32, networkName string, rentStructure RentStructure, tokenSupply string, version int32) *ProtocolParameters {
this := ProtocolParameters{}
this.Bech32Hrp = bech32Hrp
this.BelowMaxDepth = belowMaxDepth
this.MinPowScore = minPowScore
this.NetworkName = networkName
this.RentStructure = rentStructure
this.TokenSupply = tokenSupply
this.Version = version
return &this
}
// NewProtocolParametersWithDefaults instantiates a new ProtocolParameters 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 NewProtocolParametersWithDefaults() *ProtocolParameters {
this := ProtocolParameters{}
return &this
}
// GetBech32Hrp returns the Bech32Hrp field value
func (o *ProtocolParameters) GetBech32Hrp() string {
if o == nil {
var ret string
return ret
}
return o.Bech32Hrp
}
// GetBech32HrpOk returns a tuple with the Bech32Hrp field value
// and a boolean to check if the value has been set.
func (o *ProtocolParameters) GetBech32HrpOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Bech32Hrp, true
}
// SetBech32Hrp sets field value
func (o *ProtocolParameters) SetBech32Hrp(v string) {
o.Bech32Hrp = v
}
// GetBelowMaxDepth returns the BelowMaxDepth field value
func (o *ProtocolParameters) GetBelowMaxDepth() uint32 {
if o == nil {
var ret uint32
return ret
}
return o.BelowMaxDepth
}
// GetBelowMaxDepthOk returns a tuple with the BelowMaxDepth field value
// and a boolean to check if the value has been set.
func (o *ProtocolParameters) GetBelowMaxDepthOk() (*uint32, bool) {
if o == nil {
return nil, false
}
return &o.BelowMaxDepth, true
}
// SetBelowMaxDepth sets field value
func (o *ProtocolParameters) SetBelowMaxDepth(v uint32) {
o.BelowMaxDepth = v
}
// GetMinPowScore returns the MinPowScore field value
func (o *ProtocolParameters) GetMinPowScore() uint32 {
if o == nil {
var ret uint32
return ret
}
return o.MinPowScore
}
// GetMinPowScoreOk returns a tuple with the MinPowScore field value
// and a boolean to check if the value has been set.
func (o *ProtocolParameters) GetMinPowScoreOk() (*uint32, bool) {
if o == nil {
return nil, false
}
return &o.MinPowScore, true
}
// SetMinPowScore sets field value
func (o *ProtocolParameters) SetMinPowScore(v uint32) {
o.MinPowScore = v
}
// GetNetworkName returns the NetworkName field value
func (o *ProtocolParameters) GetNetworkName() string {
if o == nil {
var ret string
return ret
}
return o.NetworkName
}
// GetNetworkNameOk returns a tuple with the NetworkName field value
// and a boolean to check if the value has been set.
func (o *ProtocolParameters) GetNetworkNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.NetworkName, true
}
// SetNetworkName sets field value
func (o *ProtocolParameters) SetNetworkName(v string) {
o.NetworkName = v
}
// GetRentStructure returns the RentStructure field value
func (o *ProtocolParameters) GetRentStructure() RentStructure {
if o == nil {
var ret RentStructure
return ret
}
return o.RentStructure
}
// GetRentStructureOk returns a tuple with the RentStructure field value
// and a boolean to check if the value has been set.
func (o *ProtocolParameters) GetRentStructureOk() (*RentStructure, bool) {
if o == nil {
return nil, false
}
return &o.RentStructure, true
}
// SetRentStructure sets field value
func (o *ProtocolParameters) SetRentStructure(v RentStructure) {
o.RentStructure = v
}
// GetTokenSupply returns the TokenSupply field value
func (o *ProtocolParameters) GetTokenSupply() string {
if o == nil {
var ret string
return ret
}
return o.TokenSupply
}
// GetTokenSupplyOk returns a tuple with the TokenSupply field value
// and a boolean to check if the value has been set.
func (o *ProtocolParameters) GetTokenSupplyOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.TokenSupply, true
}
// SetTokenSupply sets field value
func (o *ProtocolParameters) SetTokenSupply(v string) {
o.TokenSupply = v
}
// GetVersion returns the Version field value
func (o *ProtocolParameters) GetVersion() int32 {
if o == nil {
var ret int32
return ret
}
return o.Version
}
// GetVersionOk returns a tuple with the Version field value
// and a boolean to check if the value has been set.
func (o *ProtocolParameters) GetVersionOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.Version, true
}
// SetVersion sets field value
func (o *ProtocolParameters) SetVersion(v int32) {
o.Version = v
}
func (o ProtocolParameters) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProtocolParameters) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["bech32Hrp"] = o.Bech32Hrp
toSerialize["belowMaxDepth"] = o.BelowMaxDepth
toSerialize["minPowScore"] = o.MinPowScore
toSerialize["networkName"] = o.NetworkName
toSerialize["rentStructure"] = o.RentStructure
toSerialize["tokenSupply"] = o.TokenSupply
toSerialize["version"] = o.Version
return toSerialize, nil
}
type NullableProtocolParameters struct {
value *ProtocolParameters
isSet bool
}
func (v NullableProtocolParameters) Get() *ProtocolParameters {
return v.value
}
func (v *NullableProtocolParameters) Set(val *ProtocolParameters) {
v.value = val
v.isSet = true
}
func (v NullableProtocolParameters) IsSet() bool {
return v.isSet
}
func (v *NullableProtocolParameters) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProtocolParameters(val *ProtocolParameters) *NullableProtocolParameters {
return &NullableProtocolParameters{value: val, isSet: true}
}
func (v NullableProtocolParameters) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProtocolParameters) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}