/
model_postgresql_db_get_audit_logs_row.go
344 lines (288 loc) · 9.67 KB
/
model_postgresql_db_get_audit_logs_row.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
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
/*
Deepfence ThreatMapper
Deepfence Runtime API provides programmatic control over Deepfence microservice securing your container, kubernetes and cloud deployments. The API abstracts away underlying infrastructure details like cloud provider, container distros, container orchestrator and type of deployment. This is one uniform API to manage and control security alerts, policies and response to alerts for microservices running anywhere i.e. managed pure greenfield container deployments or a mix of containers, VMs and serverless paradigms like AWS Fargate.
API version: 2.2.0
Contact: community@deepfence.io
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package client
import (
"encoding/json"
"time"
)
// checks if the PostgresqlDbGetAuditLogsRow type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PostgresqlDbGetAuditLogsRow{}
// PostgresqlDbGetAuditLogsRow struct for PostgresqlDbGetAuditLogsRow
type PostgresqlDbGetAuditLogsRow struct {
Action *string `json:"action,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
Email *string `json:"email,omitempty"`
Event *string `json:"event,omitempty"`
Resources *string `json:"resources,omitempty"`
Role *string `json:"role,omitempty"`
Success *bool `json:"success,omitempty"`
}
// NewPostgresqlDbGetAuditLogsRow instantiates a new PostgresqlDbGetAuditLogsRow 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 NewPostgresqlDbGetAuditLogsRow() *PostgresqlDbGetAuditLogsRow {
this := PostgresqlDbGetAuditLogsRow{}
return &this
}
// NewPostgresqlDbGetAuditLogsRowWithDefaults instantiates a new PostgresqlDbGetAuditLogsRow 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 NewPostgresqlDbGetAuditLogsRowWithDefaults() *PostgresqlDbGetAuditLogsRow {
this := PostgresqlDbGetAuditLogsRow{}
return &this
}
// GetAction returns the Action field value if set, zero value otherwise.
func (o *PostgresqlDbGetAuditLogsRow) GetAction() string {
if o == nil || IsNil(o.Action) {
var ret string
return ret
}
return *o.Action
}
// GetActionOk returns a tuple with the Action field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PostgresqlDbGetAuditLogsRow) GetActionOk() (*string, bool) {
if o == nil || IsNil(o.Action) {
return nil, false
}
return o.Action, true
}
// HasAction returns a boolean if a field has been set.
func (o *PostgresqlDbGetAuditLogsRow) HasAction() bool {
if o != nil && !IsNil(o.Action) {
return true
}
return false
}
// SetAction gets a reference to the given string and assigns it to the Action field.
func (o *PostgresqlDbGetAuditLogsRow) SetAction(v string) {
o.Action = &v
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *PostgresqlDbGetAuditLogsRow) GetCreatedAt() time.Time {
if o == nil || IsNil(o.CreatedAt) {
var ret time.Time
return ret
}
return *o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PostgresqlDbGetAuditLogsRow) GetCreatedAtOk() (*time.Time, bool) {
if o == nil || IsNil(o.CreatedAt) {
return nil, false
}
return o.CreatedAt, true
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *PostgresqlDbGetAuditLogsRow) HasCreatedAt() bool {
if o != nil && !IsNil(o.CreatedAt) {
return true
}
return false
}
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
func (o *PostgresqlDbGetAuditLogsRow) SetCreatedAt(v time.Time) {
o.CreatedAt = &v
}
// GetEmail returns the Email field value if set, zero value otherwise.
func (o *PostgresqlDbGetAuditLogsRow) GetEmail() string {
if o == nil || IsNil(o.Email) {
var ret string
return ret
}
return *o.Email
}
// GetEmailOk returns a tuple with the Email field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PostgresqlDbGetAuditLogsRow) GetEmailOk() (*string, bool) {
if o == nil || IsNil(o.Email) {
return nil, false
}
return o.Email, true
}
// HasEmail returns a boolean if a field has been set.
func (o *PostgresqlDbGetAuditLogsRow) HasEmail() bool {
if o != nil && !IsNil(o.Email) {
return true
}
return false
}
// SetEmail gets a reference to the given string and assigns it to the Email field.
func (o *PostgresqlDbGetAuditLogsRow) SetEmail(v string) {
o.Email = &v
}
// GetEvent returns the Event field value if set, zero value otherwise.
func (o *PostgresqlDbGetAuditLogsRow) GetEvent() string {
if o == nil || IsNil(o.Event) {
var ret string
return ret
}
return *o.Event
}
// GetEventOk returns a tuple with the Event field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PostgresqlDbGetAuditLogsRow) GetEventOk() (*string, bool) {
if o == nil || IsNil(o.Event) {
return nil, false
}
return o.Event, true
}
// HasEvent returns a boolean if a field has been set.
func (o *PostgresqlDbGetAuditLogsRow) HasEvent() bool {
if o != nil && !IsNil(o.Event) {
return true
}
return false
}
// SetEvent gets a reference to the given string and assigns it to the Event field.
func (o *PostgresqlDbGetAuditLogsRow) SetEvent(v string) {
o.Event = &v
}
// GetResources returns the Resources field value if set, zero value otherwise.
func (o *PostgresqlDbGetAuditLogsRow) GetResources() string {
if o == nil || IsNil(o.Resources) {
var ret string
return ret
}
return *o.Resources
}
// GetResourcesOk returns a tuple with the Resources field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PostgresqlDbGetAuditLogsRow) GetResourcesOk() (*string, bool) {
if o == nil || IsNil(o.Resources) {
return nil, false
}
return o.Resources, true
}
// HasResources returns a boolean if a field has been set.
func (o *PostgresqlDbGetAuditLogsRow) HasResources() bool {
if o != nil && !IsNil(o.Resources) {
return true
}
return false
}
// SetResources gets a reference to the given string and assigns it to the Resources field.
func (o *PostgresqlDbGetAuditLogsRow) SetResources(v string) {
o.Resources = &v
}
// GetRole returns the Role field value if set, zero value otherwise.
func (o *PostgresqlDbGetAuditLogsRow) GetRole() string {
if o == nil || IsNil(o.Role) {
var ret string
return ret
}
return *o.Role
}
// GetRoleOk returns a tuple with the Role field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PostgresqlDbGetAuditLogsRow) GetRoleOk() (*string, bool) {
if o == nil || IsNil(o.Role) {
return nil, false
}
return o.Role, true
}
// HasRole returns a boolean if a field has been set.
func (o *PostgresqlDbGetAuditLogsRow) HasRole() bool {
if o != nil && !IsNil(o.Role) {
return true
}
return false
}
// SetRole gets a reference to the given string and assigns it to the Role field.
func (o *PostgresqlDbGetAuditLogsRow) SetRole(v string) {
o.Role = &v
}
// GetSuccess returns the Success field value if set, zero value otherwise.
func (o *PostgresqlDbGetAuditLogsRow) GetSuccess() bool {
if o == nil || IsNil(o.Success) {
var ret bool
return ret
}
return *o.Success
}
// GetSuccessOk returns a tuple with the Success field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PostgresqlDbGetAuditLogsRow) GetSuccessOk() (*bool, bool) {
if o == nil || IsNil(o.Success) {
return nil, false
}
return o.Success, true
}
// HasSuccess returns a boolean if a field has been set.
func (o *PostgresqlDbGetAuditLogsRow) HasSuccess() bool {
if o != nil && !IsNil(o.Success) {
return true
}
return false
}
// SetSuccess gets a reference to the given bool and assigns it to the Success field.
func (o *PostgresqlDbGetAuditLogsRow) SetSuccess(v bool) {
o.Success = &v
}
func (o PostgresqlDbGetAuditLogsRow) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PostgresqlDbGetAuditLogsRow) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Action) {
toSerialize["action"] = o.Action
}
if !IsNil(o.CreatedAt) {
toSerialize["created_at"] = o.CreatedAt
}
if !IsNil(o.Email) {
toSerialize["email"] = o.Email
}
if !IsNil(o.Event) {
toSerialize["event"] = o.Event
}
if !IsNil(o.Resources) {
toSerialize["resources"] = o.Resources
}
if !IsNil(o.Role) {
toSerialize["role"] = o.Role
}
if !IsNil(o.Success) {
toSerialize["success"] = o.Success
}
return toSerialize, nil
}
type NullablePostgresqlDbGetAuditLogsRow struct {
value *PostgresqlDbGetAuditLogsRow
isSet bool
}
func (v NullablePostgresqlDbGetAuditLogsRow) Get() *PostgresqlDbGetAuditLogsRow {
return v.value
}
func (v *NullablePostgresqlDbGetAuditLogsRow) Set(val *PostgresqlDbGetAuditLogsRow) {
v.value = val
v.isSet = true
}
func (v NullablePostgresqlDbGetAuditLogsRow) IsSet() bool {
return v.isSet
}
func (v *NullablePostgresqlDbGetAuditLogsRow) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePostgresqlDbGetAuditLogsRow(val *PostgresqlDbGetAuditLogsRow) *NullablePostgresqlDbGetAuditLogsRow {
return &NullablePostgresqlDbGetAuditLogsRow{value: val, isSet: true}
}
func (v NullablePostgresqlDbGetAuditLogsRow) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePostgresqlDbGetAuditLogsRow) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}