-
Notifications
You must be signed in to change notification settings - Fork 141
/
model_committee_info_response.go
257 lines (212 loc) · 6.76 KB
/
model_committee_info_response.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
/*
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 CommitteeInfoResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CommitteeInfoResponse{}
// CommitteeInfoResponse struct for CommitteeInfoResponse
type CommitteeInfoResponse struct {
// A list of all access nodes and their peering info.
AccessNodes []CommitteeNode `json:"accessNodes"`
// Whether or not the chain is active.
Active bool `json:"active"`
// A list of all candidate nodes and their peering info.
CandidateNodes []CommitteeNode `json:"candidateNodes"`
// ChainID (Bech32-encoded).
ChainId string `json:"chainId"`
// A list of all committee nodes and their peering info.
CommitteeNodes []CommitteeNode `json:"committeeNodes"`
StateAddress string `json:"stateAddress"`
}
// NewCommitteeInfoResponse instantiates a new CommitteeInfoResponse 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 NewCommitteeInfoResponse(accessNodes []CommitteeNode, active bool, candidateNodes []CommitteeNode, chainId string, committeeNodes []CommitteeNode, stateAddress string) *CommitteeInfoResponse {
this := CommitteeInfoResponse{}
this.AccessNodes = accessNodes
this.Active = active
this.CandidateNodes = candidateNodes
this.ChainId = chainId
this.CommitteeNodes = committeeNodes
this.StateAddress = stateAddress
return &this
}
// NewCommitteeInfoResponseWithDefaults instantiates a new CommitteeInfoResponse 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 NewCommitteeInfoResponseWithDefaults() *CommitteeInfoResponse {
this := CommitteeInfoResponse{}
return &this
}
// GetAccessNodes returns the AccessNodes field value
func (o *CommitteeInfoResponse) GetAccessNodes() []CommitteeNode {
if o == nil {
var ret []CommitteeNode
return ret
}
return o.AccessNodes
}
// GetAccessNodesOk returns a tuple with the AccessNodes field value
// and a boolean to check if the value has been set.
func (o *CommitteeInfoResponse) GetAccessNodesOk() ([]CommitteeNode, bool) {
if o == nil {
return nil, false
}
return o.AccessNodes, true
}
// SetAccessNodes sets field value
func (o *CommitteeInfoResponse) SetAccessNodes(v []CommitteeNode) {
o.AccessNodes = v
}
// GetActive returns the Active field value
func (o *CommitteeInfoResponse) GetActive() bool {
if o == nil {
var ret bool
return ret
}
return o.Active
}
// GetActiveOk returns a tuple with the Active field value
// and a boolean to check if the value has been set.
func (o *CommitteeInfoResponse) GetActiveOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Active, true
}
// SetActive sets field value
func (o *CommitteeInfoResponse) SetActive(v bool) {
o.Active = v
}
// GetCandidateNodes returns the CandidateNodes field value
func (o *CommitteeInfoResponse) GetCandidateNodes() []CommitteeNode {
if o == nil {
var ret []CommitteeNode
return ret
}
return o.CandidateNodes
}
// GetCandidateNodesOk returns a tuple with the CandidateNodes field value
// and a boolean to check if the value has been set.
func (o *CommitteeInfoResponse) GetCandidateNodesOk() ([]CommitteeNode, bool) {
if o == nil {
return nil, false
}
return o.CandidateNodes, true
}
// SetCandidateNodes sets field value
func (o *CommitteeInfoResponse) SetCandidateNodes(v []CommitteeNode) {
o.CandidateNodes = v
}
// GetChainId returns the ChainId field value
func (o *CommitteeInfoResponse) GetChainId() string {
if o == nil {
var ret string
return ret
}
return o.ChainId
}
// GetChainIdOk returns a tuple with the ChainId field value
// and a boolean to check if the value has been set.
func (o *CommitteeInfoResponse) GetChainIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ChainId, true
}
// SetChainId sets field value
func (o *CommitteeInfoResponse) SetChainId(v string) {
o.ChainId = v
}
// GetCommitteeNodes returns the CommitteeNodes field value
func (o *CommitteeInfoResponse) GetCommitteeNodes() []CommitteeNode {
if o == nil {
var ret []CommitteeNode
return ret
}
return o.CommitteeNodes
}
// GetCommitteeNodesOk returns a tuple with the CommitteeNodes field value
// and a boolean to check if the value has been set.
func (o *CommitteeInfoResponse) GetCommitteeNodesOk() ([]CommitteeNode, bool) {
if o == nil {
return nil, false
}
return o.CommitteeNodes, true
}
// SetCommitteeNodes sets field value
func (o *CommitteeInfoResponse) SetCommitteeNodes(v []CommitteeNode) {
o.CommitteeNodes = v
}
// GetStateAddress returns the StateAddress field value
func (o *CommitteeInfoResponse) GetStateAddress() string {
if o == nil {
var ret string
return ret
}
return o.StateAddress
}
// GetStateAddressOk returns a tuple with the StateAddress field value
// and a boolean to check if the value has been set.
func (o *CommitteeInfoResponse) GetStateAddressOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.StateAddress, true
}
// SetStateAddress sets field value
func (o *CommitteeInfoResponse) SetStateAddress(v string) {
o.StateAddress = v
}
func (o CommitteeInfoResponse) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CommitteeInfoResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["accessNodes"] = o.AccessNodes
toSerialize["active"] = o.Active
toSerialize["candidateNodes"] = o.CandidateNodes
toSerialize["chainId"] = o.ChainId
toSerialize["committeeNodes"] = o.CommitteeNodes
toSerialize["stateAddress"] = o.StateAddress
return toSerialize, nil
}
type NullableCommitteeInfoResponse struct {
value *CommitteeInfoResponse
isSet bool
}
func (v NullableCommitteeInfoResponse) Get() *CommitteeInfoResponse {
return v.value
}
func (v *NullableCommitteeInfoResponse) Set(val *CommitteeInfoResponse) {
v.value = val
v.isSet = true
}
func (v NullableCommitteeInfoResponse) IsSet() bool {
return v.isSet
}
func (v *NullableCommitteeInfoResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCommitteeInfoResponse(val *CommitteeInfoResponse) *NullableCommitteeInfoResponse {
return &NullableCommitteeInfoResponse{value: val, isSet: true}
}
func (v NullableCommitteeInfoResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCommitteeInfoResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}