/
model_transaction_request_approval_data_item.go
260 lines (217 loc) · 8.16 KB
/
model_transaction_request_approval_data_item.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
/*
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"
)
// TransactionRequestApprovalDataItem Defines an `item` as one result.
type TransactionRequestApprovalDataItem struct {
// Represents the specific blockchain protocol name, e.g. Ethereum, Bitcoin, etc.
Blockchain string `json:"blockchain"`
// Represents the name of the blockchain network used; blockchain networks are usually identical as technology and software, but they differ in data, e.g. - \"mainnet\" is the live network with actual data while networks like \"testnet\", \"ropsten\", \"rinkeby\" are test networks.
Network string `json:"network"`
// The required number of approvals needed to approve the transaction.
RequiredApprovals int32 `json:"requiredApprovals"`
// The required number of rejections needed to reject the transaction.
RequiredRejections int32 `json:"requiredRejections"`
// The current number of approvals given for the transaction.
CurrentApprovals int32 `json:"currentApprovals"`
// The current number of rejections given for the transaction.
CurrentRejections int32 `json:"currentRejections"`
}
// NewTransactionRequestApprovalDataItem instantiates a new TransactionRequestApprovalDataItem 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 NewTransactionRequestApprovalDataItem(blockchain string, network string, requiredApprovals int32, requiredRejections int32, currentApprovals int32, currentRejections int32) *TransactionRequestApprovalDataItem {
this := TransactionRequestApprovalDataItem{}
this.Blockchain = blockchain
this.Network = network
this.RequiredApprovals = requiredApprovals
this.RequiredRejections = requiredRejections
this.CurrentApprovals = currentApprovals
this.CurrentRejections = currentRejections
return &this
}
// NewTransactionRequestApprovalDataItemWithDefaults instantiates a new TransactionRequestApprovalDataItem 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 NewTransactionRequestApprovalDataItemWithDefaults() *TransactionRequestApprovalDataItem {
this := TransactionRequestApprovalDataItem{}
return &this
}
// GetBlockchain returns the Blockchain field value
func (o *TransactionRequestApprovalDataItem) GetBlockchain() string {
if o == nil {
var ret string
return ret
}
return o.Blockchain
}
// GetBlockchainOk returns a tuple with the Blockchain field value
// and a boolean to check if the value has been set.
func (o *TransactionRequestApprovalDataItem) GetBlockchainOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Blockchain, true
}
// SetBlockchain sets field value
func (o *TransactionRequestApprovalDataItem) SetBlockchain(v string) {
o.Blockchain = v
}
// GetNetwork returns the Network field value
func (o *TransactionRequestApprovalDataItem) GetNetwork() string {
if o == nil {
var ret string
return ret
}
return o.Network
}
// GetNetworkOk returns a tuple with the Network field value
// and a boolean to check if the value has been set.
func (o *TransactionRequestApprovalDataItem) GetNetworkOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Network, true
}
// SetNetwork sets field value
func (o *TransactionRequestApprovalDataItem) SetNetwork(v string) {
o.Network = v
}
// GetRequiredApprovals returns the RequiredApprovals field value
func (o *TransactionRequestApprovalDataItem) GetRequiredApprovals() int32 {
if o == nil {
var ret int32
return ret
}
return o.RequiredApprovals
}
// GetRequiredApprovalsOk returns a tuple with the RequiredApprovals field value
// and a boolean to check if the value has been set.
func (o *TransactionRequestApprovalDataItem) GetRequiredApprovalsOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.RequiredApprovals, true
}
// SetRequiredApprovals sets field value
func (o *TransactionRequestApprovalDataItem) SetRequiredApprovals(v int32) {
o.RequiredApprovals = v
}
// GetRequiredRejections returns the RequiredRejections field value
func (o *TransactionRequestApprovalDataItem) GetRequiredRejections() int32 {
if o == nil {
var ret int32
return ret
}
return o.RequiredRejections
}
// GetRequiredRejectionsOk returns a tuple with the RequiredRejections field value
// and a boolean to check if the value has been set.
func (o *TransactionRequestApprovalDataItem) GetRequiredRejectionsOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.RequiredRejections, true
}
// SetRequiredRejections sets field value
func (o *TransactionRequestApprovalDataItem) SetRequiredRejections(v int32) {
o.RequiredRejections = v
}
// GetCurrentApprovals returns the CurrentApprovals field value
func (o *TransactionRequestApprovalDataItem) GetCurrentApprovals() int32 {
if o == nil {
var ret int32
return ret
}
return o.CurrentApprovals
}
// GetCurrentApprovalsOk returns a tuple with the CurrentApprovals field value
// and a boolean to check if the value has been set.
func (o *TransactionRequestApprovalDataItem) GetCurrentApprovalsOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.CurrentApprovals, true
}
// SetCurrentApprovals sets field value
func (o *TransactionRequestApprovalDataItem) SetCurrentApprovals(v int32) {
o.CurrentApprovals = v
}
// GetCurrentRejections returns the CurrentRejections field value
func (o *TransactionRequestApprovalDataItem) GetCurrentRejections() int32 {
if o == nil {
var ret int32
return ret
}
return o.CurrentRejections
}
// GetCurrentRejectionsOk returns a tuple with the CurrentRejections field value
// and a boolean to check if the value has been set.
func (o *TransactionRequestApprovalDataItem) GetCurrentRejectionsOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.CurrentRejections, true
}
// SetCurrentRejections sets field value
func (o *TransactionRequestApprovalDataItem) SetCurrentRejections(v int32) {
o.CurrentRejections = v
}
func (o TransactionRequestApprovalDataItem) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["blockchain"] = o.Blockchain
}
if true {
toSerialize["network"] = o.Network
}
if true {
toSerialize["requiredApprovals"] = o.RequiredApprovals
}
if true {
toSerialize["requiredRejections"] = o.RequiredRejections
}
if true {
toSerialize["currentApprovals"] = o.CurrentApprovals
}
if true {
toSerialize["currentRejections"] = o.CurrentRejections
}
return json.Marshal(toSerialize)
}
type NullableTransactionRequestApprovalDataItem struct {
value *TransactionRequestApprovalDataItem
isSet bool
}
func (v NullableTransactionRequestApprovalDataItem) Get() *TransactionRequestApprovalDataItem {
return v.value
}
func (v *NullableTransactionRequestApprovalDataItem) Set(val *TransactionRequestApprovalDataItem) {
v.value = val
v.isSet = true
}
func (v NullableTransactionRequestApprovalDataItem) IsSet() bool {
return v.isSet
}
func (v *NullableTransactionRequestApprovalDataItem) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTransactionRequestApprovalDataItem(val *TransactionRequestApprovalDataItem) *NullableTransactionRequestApprovalDataItem {
return &NullableTransactionRequestApprovalDataItem{value: val, isSet: true}
}
func (v NullableTransactionRequestApprovalDataItem) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTransactionRequestApprovalDataItem) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}