-
Notifications
You must be signed in to change notification settings - Fork 57
/
model_process_summary_attributes.go
372 lines (324 loc) · 9.88 KB
/
model_process_summary_attributes.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
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
/*
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2019-Present Datadog, Inc.
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package datadog
import (
"encoding/json"
)
// ProcessSummaryAttributes Attributes for a process summary.
type ProcessSummaryAttributes struct {
// Process command line.
Cmdline *string `json:"cmdline,omitempty"`
// Host running the process.
Host *string `json:"host,omitempty"`
// Process ID.
Pid *int64 `json:"pid,omitempty"`
// Parent process ID.
Ppid *int64 `json:"ppid,omitempty"`
// Time the process was started.
Start *string `json:"start,omitempty"`
// List of tags associated with the process.
Tags *[]string `json:"tags,omitempty"`
// Time the process was seen.
Timestamp *string `json:"timestamp,omitempty"`
// Process owner.
User *string `json:"user,omitempty"`
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
UnparsedObject map[string]interface{} `json:-`
}
// NewProcessSummaryAttributes instantiates a new ProcessSummaryAttributes 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 NewProcessSummaryAttributes() *ProcessSummaryAttributes {
this := ProcessSummaryAttributes{}
return &this
}
// NewProcessSummaryAttributesWithDefaults instantiates a new ProcessSummaryAttributes 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 NewProcessSummaryAttributesWithDefaults() *ProcessSummaryAttributes {
this := ProcessSummaryAttributes{}
return &this
}
// GetCmdline returns the Cmdline field value if set, zero value otherwise.
func (o *ProcessSummaryAttributes) GetCmdline() string {
if o == nil || o.Cmdline == nil {
var ret string
return ret
}
return *o.Cmdline
}
// GetCmdlineOk returns a tuple with the Cmdline field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProcessSummaryAttributes) GetCmdlineOk() (*string, bool) {
if o == nil || o.Cmdline == nil {
return nil, false
}
return o.Cmdline, true
}
// HasCmdline returns a boolean if a field has been set.
func (o *ProcessSummaryAttributes) HasCmdline() bool {
if o != nil && o.Cmdline != nil {
return true
}
return false
}
// SetCmdline gets a reference to the given string and assigns it to the Cmdline field.
func (o *ProcessSummaryAttributes) SetCmdline(v string) {
o.Cmdline = &v
}
// GetHost returns the Host field value if set, zero value otherwise.
func (o *ProcessSummaryAttributes) GetHost() string {
if o == nil || o.Host == nil {
var ret string
return ret
}
return *o.Host
}
// GetHostOk returns a tuple with the Host field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProcessSummaryAttributes) GetHostOk() (*string, bool) {
if o == nil || o.Host == nil {
return nil, false
}
return o.Host, true
}
// HasHost returns a boolean if a field has been set.
func (o *ProcessSummaryAttributes) HasHost() bool {
if o != nil && o.Host != nil {
return true
}
return false
}
// SetHost gets a reference to the given string and assigns it to the Host field.
func (o *ProcessSummaryAttributes) SetHost(v string) {
o.Host = &v
}
// GetPid returns the Pid field value if set, zero value otherwise.
func (o *ProcessSummaryAttributes) GetPid() int64 {
if o == nil || o.Pid == nil {
var ret int64
return ret
}
return *o.Pid
}
// GetPidOk returns a tuple with the Pid field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProcessSummaryAttributes) GetPidOk() (*int64, bool) {
if o == nil || o.Pid == nil {
return nil, false
}
return o.Pid, true
}
// HasPid returns a boolean if a field has been set.
func (o *ProcessSummaryAttributes) HasPid() bool {
if o != nil && o.Pid != nil {
return true
}
return false
}
// SetPid gets a reference to the given int64 and assigns it to the Pid field.
func (o *ProcessSummaryAttributes) SetPid(v int64) {
o.Pid = &v
}
// GetPpid returns the Ppid field value if set, zero value otherwise.
func (o *ProcessSummaryAttributes) GetPpid() int64 {
if o == nil || o.Ppid == nil {
var ret int64
return ret
}
return *o.Ppid
}
// GetPpidOk returns a tuple with the Ppid field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProcessSummaryAttributes) GetPpidOk() (*int64, bool) {
if o == nil || o.Ppid == nil {
return nil, false
}
return o.Ppid, true
}
// HasPpid returns a boolean if a field has been set.
func (o *ProcessSummaryAttributes) HasPpid() bool {
if o != nil && o.Ppid != nil {
return true
}
return false
}
// SetPpid gets a reference to the given int64 and assigns it to the Ppid field.
func (o *ProcessSummaryAttributes) SetPpid(v int64) {
o.Ppid = &v
}
// GetStart returns the Start field value if set, zero value otherwise.
func (o *ProcessSummaryAttributes) GetStart() string {
if o == nil || o.Start == nil {
var ret string
return ret
}
return *o.Start
}
// GetStartOk returns a tuple with the Start field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProcessSummaryAttributes) GetStartOk() (*string, bool) {
if o == nil || o.Start == nil {
return nil, false
}
return o.Start, true
}
// HasStart returns a boolean if a field has been set.
func (o *ProcessSummaryAttributes) HasStart() bool {
if o != nil && o.Start != nil {
return true
}
return false
}
// SetStart gets a reference to the given string and assigns it to the Start field.
func (o *ProcessSummaryAttributes) SetStart(v string) {
o.Start = &v
}
// GetTags returns the Tags field value if set, zero value otherwise.
func (o *ProcessSummaryAttributes) GetTags() []string {
if o == nil || o.Tags == nil {
var ret []string
return ret
}
return *o.Tags
}
// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProcessSummaryAttributes) GetTagsOk() (*[]string, bool) {
if o == nil || o.Tags == nil {
return nil, false
}
return o.Tags, true
}
// HasTags returns a boolean if a field has been set.
func (o *ProcessSummaryAttributes) HasTags() bool {
if o != nil && o.Tags != nil {
return true
}
return false
}
// SetTags gets a reference to the given []string and assigns it to the Tags field.
func (o *ProcessSummaryAttributes) SetTags(v []string) {
o.Tags = &v
}
// GetTimestamp returns the Timestamp field value if set, zero value otherwise.
func (o *ProcessSummaryAttributes) GetTimestamp() string {
if o == nil || o.Timestamp == nil {
var ret string
return ret
}
return *o.Timestamp
}
// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProcessSummaryAttributes) GetTimestampOk() (*string, bool) {
if o == nil || o.Timestamp == nil {
return nil, false
}
return o.Timestamp, true
}
// HasTimestamp returns a boolean if a field has been set.
func (o *ProcessSummaryAttributes) HasTimestamp() bool {
if o != nil && o.Timestamp != nil {
return true
}
return false
}
// SetTimestamp gets a reference to the given string and assigns it to the Timestamp field.
func (o *ProcessSummaryAttributes) SetTimestamp(v string) {
o.Timestamp = &v
}
// GetUser returns the User field value if set, zero value otherwise.
func (o *ProcessSummaryAttributes) GetUser() string {
if o == nil || o.User == nil {
var ret string
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 *ProcessSummaryAttributes) GetUserOk() (*string, bool) {
if o == nil || o.User == nil {
return nil, false
}
return o.User, true
}
// HasUser returns a boolean if a field has been set.
func (o *ProcessSummaryAttributes) HasUser() bool {
if o != nil && o.User != nil {
return true
}
return false
}
// SetUser gets a reference to the given string and assigns it to the User field.
func (o *ProcessSummaryAttributes) SetUser(v string) {
o.User = &v
}
func (o ProcessSummaryAttributes) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.UnparsedObject != nil {
return json.Marshal(o.UnparsedObject)
}
if o.Cmdline != nil {
toSerialize["cmdline"] = o.Cmdline
}
if o.Host != nil {
toSerialize["host"] = o.Host
}
if o.Pid != nil {
toSerialize["pid"] = o.Pid
}
if o.Ppid != nil {
toSerialize["ppid"] = o.Ppid
}
if o.Start != nil {
toSerialize["start"] = o.Start
}
if o.Tags != nil {
toSerialize["tags"] = o.Tags
}
if o.Timestamp != nil {
toSerialize["timestamp"] = o.Timestamp
}
if o.User != nil {
toSerialize["user"] = o.User
}
return json.Marshal(toSerialize)
}
func (o *ProcessSummaryAttributes) UnmarshalJSON(bytes []byte) (err error) {
raw := map[string]interface{}{}
all := struct {
Cmdline *string `json:"cmdline,omitempty"`
Host *string `json:"host,omitempty"`
Pid *int64 `json:"pid,omitempty"`
Ppid *int64 `json:"ppid,omitempty"`
Start *string `json:"start,omitempty"`
Tags *[]string `json:"tags,omitempty"`
Timestamp *string `json:"timestamp,omitempty"`
User *string `json:"user,omitempty"`
}{}
err = json.Unmarshal(bytes, &all)
if err != nil {
err = json.Unmarshal(bytes, &raw)
if err != nil {
return err
}
o.UnparsedObject = raw
return nil
}
o.Cmdline = all.Cmdline
o.Host = all.Host
o.Pid = all.Pid
o.Ppid = all.Ppid
o.Start = all.Start
o.Tags = all.Tags
o.Timestamp = all.Timestamp
o.User = all.User
return nil
}