-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_data.go
263 lines (214 loc) · 6.32 KB
/
model_data.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
/*
senhasegura DSM API Reference
This is a senhasegura new API design
API version: 2.0.22
Contact: egoncalves@senhasegura.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package sdk
import (
"encoding/json"
)
// checks if the Data type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Data{}
// Data struct for Data
type Data struct {
Response *Response `json:"response,omitempty"`
Application *Application `json:"application,omitempty"`
Authorization *Authorization `json:"authorization,omitempty"`
Secrets []Secret `json:"secrets,omitempty"`
AdditionalProperties map[string]interface{}
}
type _Data Data
// NewData instantiates a new Data 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 NewData() *Data {
this := Data{}
return &this
}
// NewDataWithDefaults instantiates a new Data 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 NewDataWithDefaults() *Data {
this := Data{}
return &this
}
// GetResponse returns the Response field value if set, zero value otherwise.
func (o *Data) GetResponse() Response {
if o == nil || isNil(o.Response) {
var ret Response
return ret
}
return *o.Response
}
// GetResponseOk returns a tuple with the Response field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Data) GetResponseOk() (*Response, bool) {
if o == nil || isNil(o.Response) {
return nil, false
}
return o.Response, true
}
// HasResponse returns a boolean if a field has been set.
func (o *Data) HasResponse() bool {
if o != nil && !isNil(o.Response) {
return true
}
return false
}
// SetResponse gets a reference to the given Response and assigns it to the Response field.
func (o *Data) SetResponse(v Response) {
o.Response = &v
}
// GetApplication returns the Application field value if set, zero value otherwise.
func (o *Data) GetApplication() Application {
if o == nil || isNil(o.Application) {
var ret Application
return ret
}
return *o.Application
}
// GetApplicationOk returns a tuple with the Application field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Data) GetApplicationOk() (*Application, bool) {
if o == nil || isNil(o.Application) {
return nil, false
}
return o.Application, true
}
// HasApplication returns a boolean if a field has been set.
func (o *Data) HasApplication() bool {
if o != nil && !isNil(o.Application) {
return true
}
return false
}
// SetApplication gets a reference to the given Application and assigns it to the Application field.
func (o *Data) SetApplication(v Application) {
o.Application = &v
}
// GetAuthorization returns the Authorization field value if set, zero value otherwise.
func (o *Data) GetAuthorization() Authorization {
if o == nil || isNil(o.Authorization) {
var ret Authorization
return ret
}
return *o.Authorization
}
// GetAuthorizationOk returns a tuple with the Authorization field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Data) GetAuthorizationOk() (*Authorization, bool) {
if o == nil || isNil(o.Authorization) {
return nil, false
}
return o.Authorization, true
}
// HasAuthorization returns a boolean if a field has been set.
func (o *Data) HasAuthorization() bool {
if o != nil && !isNil(o.Authorization) {
return true
}
return false
}
// SetAuthorization gets a reference to the given Authorization and assigns it to the Authorization field.
func (o *Data) SetAuthorization(v Authorization) {
o.Authorization = &v
}
// GetSecrets returns the Secrets field value if set, zero value otherwise.
func (o *Data) GetSecrets() []Secret {
if o == nil || isNil(o.Secrets) {
var ret []Secret
return ret
}
return o.Secrets
}
// GetSecretsOk returns a tuple with the Secrets field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Data) GetSecretsOk() ([]Secret, bool) {
if o == nil || isNil(o.Secrets) {
return nil, false
}
return o.Secrets, true
}
// HasSecrets returns a boolean if a field has been set.
func (o *Data) HasSecrets() bool {
if o != nil && !isNil(o.Secrets) {
return true
}
return false
}
// SetSecrets gets a reference to the given []Secret and assigns it to the Secrets field.
func (o *Data) SetSecrets(v []Secret) {
o.Secrets = v
}
func (o Data) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Data) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !isNil(o.Response) {
toSerialize["response"] = o.Response
}
if !isNil(o.Application) {
toSerialize["application"] = o.Application
}
if !isNil(o.Authorization) {
toSerialize["authorization"] = o.Authorization
}
if !isNil(o.Secrets) {
toSerialize["secrets"] = o.Secrets
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *Data) UnmarshalJSON(bytes []byte) (err error) {
varData := _Data{}
if err = json.Unmarshal(bytes, &varData); err == nil {
*o = Data(varData)
}
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
delete(additionalProperties, "response")
delete(additionalProperties, "application")
delete(additionalProperties, "authorization")
delete(additionalProperties, "secrets")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableData struct {
value *Data
isSet bool
}
func (v NullableData) Get() *Data {
return v.value
}
func (v *NullableData) Set(val *Data) {
v.value = val
v.isSet = true
}
func (v NullableData) IsSet() bool {
return v.isSet
}
func (v *NullableData) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableData(val *Data) *NullableData {
return &NullableData{value: val, isSet: true}
}
func (v NullableData) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableData) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}