-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmodel_get_audit_logs_200_response_inner.go
More file actions
413 lines (340 loc) · 10.9 KB
/
Copy pathmodel_get_audit_logs_200_response_inner.go
File metadata and controls
413 lines (340 loc) · 10.9 KB
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
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
/*
Nginx Proxy Manager API
This is the official API documentation for Nginx Proxy Manager. Most endpoints require authentication via Bearer Token (JWT). You can generate a token by logging in via the `POST /tokens` endpoint. For more information, visit the [Nginx Proxy Manager Documentation](https://nginxproxymanager.com).
API version: 2.13.4
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package nginxproxymanager
import (
"encoding/json"
"fmt"
)
// checks if the GetAuditLogs200ResponseInner type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GetAuditLogs200ResponseInner{}
// GetAuditLogs200ResponseInner Audit Log object
type GetAuditLogs200ResponseInner struct {
// Unique identifier
Id int64 `json:"id"`
// Date and time of creation
CreatedOn string `json:"created_on"`
// Date and time of last update
ModifiedOn string `json:"modified_on"`
// User ID
UserId int64 `json:"user_id"`
ObjectType string `json:"object_type"`
// Unique identifier
ObjectId int64 `json:"object_id"`
Action string `json:"action"`
Meta map[string]interface{} `json:"meta"`
User *GetAuditLogs200ResponseInnerUser `json:"user,omitempty"`
AdditionalProperties map[string]interface{}
}
type _GetAuditLogs200ResponseInner GetAuditLogs200ResponseInner
// NewGetAuditLogs200ResponseInner instantiates a new GetAuditLogs200ResponseInner 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 NewGetAuditLogs200ResponseInner(id int64, createdOn string, modifiedOn string, userId int64, objectType string, objectId int64, action string, meta map[string]interface{}) *GetAuditLogs200ResponseInner {
this := GetAuditLogs200ResponseInner{}
this.Id = id
this.CreatedOn = createdOn
this.ModifiedOn = modifiedOn
this.UserId = userId
this.ObjectType = objectType
this.ObjectId = objectId
this.Action = action
this.Meta = meta
return &this
}
// NewGetAuditLogs200ResponseInnerWithDefaults instantiates a new GetAuditLogs200ResponseInner 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 NewGetAuditLogs200ResponseInnerWithDefaults() *GetAuditLogs200ResponseInner {
this := GetAuditLogs200ResponseInner{}
return &this
}
// GetId returns the Id field value
func (o *GetAuditLogs200ResponseInner) GetId() int64 {
if o == nil {
var ret int64
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *GetAuditLogs200ResponseInner) GetIdOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *GetAuditLogs200ResponseInner) SetId(v int64) {
o.Id = v
}
// GetCreatedOn returns the CreatedOn field value
func (o *GetAuditLogs200ResponseInner) GetCreatedOn() string {
if o == nil {
var ret string
return ret
}
return o.CreatedOn
}
// GetCreatedOnOk returns a tuple with the CreatedOn field value
// and a boolean to check if the value has been set.
func (o *GetAuditLogs200ResponseInner) GetCreatedOnOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.CreatedOn, true
}
// SetCreatedOn sets field value
func (o *GetAuditLogs200ResponseInner) SetCreatedOn(v string) {
o.CreatedOn = v
}
// GetModifiedOn returns the ModifiedOn field value
func (o *GetAuditLogs200ResponseInner) GetModifiedOn() string {
if o == nil {
var ret string
return ret
}
return o.ModifiedOn
}
// GetModifiedOnOk returns a tuple with the ModifiedOn field value
// and a boolean to check if the value has been set.
func (o *GetAuditLogs200ResponseInner) GetModifiedOnOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ModifiedOn, true
}
// SetModifiedOn sets field value
func (o *GetAuditLogs200ResponseInner) SetModifiedOn(v string) {
o.ModifiedOn = v
}
// GetUserId returns the UserId field value
func (o *GetAuditLogs200ResponseInner) GetUserId() int64 {
if o == nil {
var ret int64
return ret
}
return o.UserId
}
// GetUserIdOk returns a tuple with the UserId field value
// and a boolean to check if the value has been set.
func (o *GetAuditLogs200ResponseInner) GetUserIdOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.UserId, true
}
// SetUserId sets field value
func (o *GetAuditLogs200ResponseInner) SetUserId(v int64) {
o.UserId = v
}
// GetObjectType returns the ObjectType field value
func (o *GetAuditLogs200ResponseInner) GetObjectType() string {
if o == nil {
var ret string
return ret
}
return o.ObjectType
}
// GetObjectTypeOk returns a tuple with the ObjectType field value
// and a boolean to check if the value has been set.
func (o *GetAuditLogs200ResponseInner) GetObjectTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ObjectType, true
}
// SetObjectType sets field value
func (o *GetAuditLogs200ResponseInner) SetObjectType(v string) {
o.ObjectType = v
}
// GetObjectId returns the ObjectId field value
func (o *GetAuditLogs200ResponseInner) GetObjectId() int64 {
if o == nil {
var ret int64
return ret
}
return o.ObjectId
}
// GetObjectIdOk returns a tuple with the ObjectId field value
// and a boolean to check if the value has been set.
func (o *GetAuditLogs200ResponseInner) GetObjectIdOk() (*int64, bool) {
if o == nil {
return nil, false
}
return &o.ObjectId, true
}
// SetObjectId sets field value
func (o *GetAuditLogs200ResponseInner) SetObjectId(v int64) {
o.ObjectId = v
}
// GetAction returns the Action field value
func (o *GetAuditLogs200ResponseInner) GetAction() string {
if o == nil {
var ret string
return ret
}
return o.Action
}
// GetActionOk returns a tuple with the Action field value
// and a boolean to check if the value has been set.
func (o *GetAuditLogs200ResponseInner) GetActionOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Action, true
}
// SetAction sets field value
func (o *GetAuditLogs200ResponseInner) SetAction(v string) {
o.Action = v
}
// GetMeta returns the Meta field value
func (o *GetAuditLogs200ResponseInner) GetMeta() map[string]interface{} {
if o == nil {
var ret map[string]interface{}
return ret
}
return o.Meta
}
// GetMetaOk returns a tuple with the Meta field value
// and a boolean to check if the value has been set.
func (o *GetAuditLogs200ResponseInner) GetMetaOk() (map[string]interface{}, bool) {
if o == nil {
return map[string]interface{}{}, false
}
return o.Meta, true
}
// SetMeta sets field value
func (o *GetAuditLogs200ResponseInner) SetMeta(v map[string]interface{}) {
o.Meta = v
}
// GetUser returns the User field value if set, zero value otherwise.
func (o *GetAuditLogs200ResponseInner) GetUser() GetAuditLogs200ResponseInnerUser {
if o == nil || IsNil(o.User) {
var ret GetAuditLogs200ResponseInnerUser
return ret
}
return *o.User
}
// GetUserOk returns a tuple with the User field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetAuditLogs200ResponseInner) GetUserOk() (*GetAuditLogs200ResponseInnerUser, bool) {
if o == nil || IsNil(o.User) {
return nil, false
}
return o.User, true
}
// HasUser returns a boolean if a field has been set.
func (o *GetAuditLogs200ResponseInner) HasUser() bool {
if o != nil && !IsNil(o.User) {
return true
}
return false
}
// SetUser gets a reference to the given GetAuditLogs200ResponseInnerUser and assigns it to the User field.
func (o *GetAuditLogs200ResponseInner) SetUser(v GetAuditLogs200ResponseInnerUser) {
o.User = &v
}
func (o GetAuditLogs200ResponseInner) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GetAuditLogs200ResponseInner) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["id"] = o.Id
toSerialize["created_on"] = o.CreatedOn
toSerialize["modified_on"] = o.ModifiedOn
toSerialize["user_id"] = o.UserId
toSerialize["object_type"] = o.ObjectType
toSerialize["object_id"] = o.ObjectId
toSerialize["action"] = o.Action
toSerialize["meta"] = o.Meta
if !IsNil(o.User) {
toSerialize["user"] = o.User
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *GetAuditLogs200ResponseInner) UnmarshalJSON(data []byte) (err error) {
// This validates that all required properties are included in the JSON object
// by unmarshalling the object into a generic map with string keys and checking
// that every required field exists as a key in the generic map.
requiredProperties := []string{
"id",
"created_on",
"modified_on",
"user_id",
"object_type",
"object_id",
"action",
"meta",
}
allProperties := make(map[string]interface{})
err = json.Unmarshal(data, &allProperties)
if err != nil {
return err;
}
for _, requiredProperty := range(requiredProperties) {
if _, exists := allProperties[requiredProperty]; !exists {
return fmt.Errorf("no value given for required property %v", requiredProperty)
}
}
varGetAuditLogs200ResponseInner := _GetAuditLogs200ResponseInner{}
err = json.Unmarshal(data, &varGetAuditLogs200ResponseInner)
if err != nil {
return err
}
*o = GetAuditLogs200ResponseInner(varGetAuditLogs200ResponseInner)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "id")
delete(additionalProperties, "created_on")
delete(additionalProperties, "modified_on")
delete(additionalProperties, "user_id")
delete(additionalProperties, "object_type")
delete(additionalProperties, "object_id")
delete(additionalProperties, "action")
delete(additionalProperties, "meta")
delete(additionalProperties, "user")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableGetAuditLogs200ResponseInner struct {
value *GetAuditLogs200ResponseInner
isSet bool
}
func (v NullableGetAuditLogs200ResponseInner) Get() *GetAuditLogs200ResponseInner {
return v.value
}
func (v *NullableGetAuditLogs200ResponseInner) Set(val *GetAuditLogs200ResponseInner) {
v.value = val
v.isSet = true
}
func (v NullableGetAuditLogs200ResponseInner) IsSet() bool {
return v.isSet
}
func (v *NullableGetAuditLogs200ResponseInner) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGetAuditLogs200ResponseInner(val *GetAuditLogs200ResponseInner) *NullableGetAuditLogs200ResponseInner {
return &NullableGetAuditLogs200ResponseInner{value: val, isSet: true}
}
func (v NullableGetAuditLogs200ResponseInner) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGetAuditLogs200ResponseInner) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}