-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodel_process_stat.go
More file actions
378 lines (317 loc) · 9.25 KB
/
model_process_stat.go
File metadata and controls
378 lines (317 loc) · 9.25 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
/*
Machines API
This site hosts documentation generated from the Fly.io Machines API OpenAPI specification. Visit our complete [Machines API docs](https://fly.io/docs/machines/api/) for how to get started, more information about each endpoint, parameter descriptions, and examples.
API version: 1.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package machines
import (
"encoding/json"
)
// checks if the ProcessStat type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProcessStat{}
// ProcessStat struct for ProcessStat
type ProcessStat struct {
Command *string `json:"command,omitempty"`
Cpu *int64 `json:"cpu,omitempty"`
Directory *string `json:"directory,omitempty"`
ListenSockets []ListenSocket `json:"listen_sockets,omitempty"`
Pid *int64 `json:"pid,omitempty"`
Rss *int64 `json:"rss,omitempty"`
Rtime *int64 `json:"rtime,omitempty"`
Stime *int64 `json:"stime,omitempty"`
}
// NewProcessStat instantiates a new ProcessStat 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 NewProcessStat() *ProcessStat {
this := ProcessStat{}
return &this
}
// NewProcessStatWithDefaults instantiates a new ProcessStat 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 NewProcessStatWithDefaults() *ProcessStat {
this := ProcessStat{}
return &this
}
// GetCommand returns the Command field value if set, zero value otherwise.
func (o *ProcessStat) GetCommand() string {
if o == nil || IsNil(o.Command) {
var ret string
return ret
}
return *o.Command
}
// GetCommandOk returns a tuple with the Command field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProcessStat) GetCommandOk() (*string, bool) {
if o == nil || IsNil(o.Command) {
return nil, false
}
return o.Command, true
}
// HasCommand returns a boolean if a field has been set.
func (o *ProcessStat) HasCommand() bool {
if o != nil && !IsNil(o.Command) {
return true
}
return false
}
// SetCommand gets a reference to the given string and assigns it to the Command field.
func (o *ProcessStat) SetCommand(v string) {
o.Command = &v
}
// GetCpu returns the Cpu field value if set, zero value otherwise.
func (o *ProcessStat) GetCpu() int64 {
if o == nil || IsNil(o.Cpu) {
var ret int64
return ret
}
return *o.Cpu
}
// GetCpuOk returns a tuple with the Cpu field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProcessStat) GetCpuOk() (*int64, bool) {
if o == nil || IsNil(o.Cpu) {
return nil, false
}
return o.Cpu, true
}
// HasCpu returns a boolean if a field has been set.
func (o *ProcessStat) HasCpu() bool {
if o != nil && !IsNil(o.Cpu) {
return true
}
return false
}
// SetCpu gets a reference to the given int64 and assigns it to the Cpu field.
func (o *ProcessStat) SetCpu(v int64) {
o.Cpu = &v
}
// GetDirectory returns the Directory field value if set, zero value otherwise.
func (o *ProcessStat) GetDirectory() string {
if o == nil || IsNil(o.Directory) {
var ret string
return ret
}
return *o.Directory
}
// GetDirectoryOk returns a tuple with the Directory field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProcessStat) GetDirectoryOk() (*string, bool) {
if o == nil || IsNil(o.Directory) {
return nil, false
}
return o.Directory, true
}
// HasDirectory returns a boolean if a field has been set.
func (o *ProcessStat) HasDirectory() bool {
if o != nil && !IsNil(o.Directory) {
return true
}
return false
}
// SetDirectory gets a reference to the given string and assigns it to the Directory field.
func (o *ProcessStat) SetDirectory(v string) {
o.Directory = &v
}
// GetListenSockets returns the ListenSockets field value if set, zero value otherwise.
func (o *ProcessStat) GetListenSockets() []ListenSocket {
if o == nil || IsNil(o.ListenSockets) {
var ret []ListenSocket
return ret
}
return o.ListenSockets
}
// GetListenSocketsOk returns a tuple with the ListenSockets field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProcessStat) GetListenSocketsOk() ([]ListenSocket, bool) {
if o == nil || IsNil(o.ListenSockets) {
return nil, false
}
return o.ListenSockets, true
}
// HasListenSockets returns a boolean if a field has been set.
func (o *ProcessStat) HasListenSockets() bool {
if o != nil && !IsNil(o.ListenSockets) {
return true
}
return false
}
// SetListenSockets gets a reference to the given []ListenSocket and assigns it to the ListenSockets field.
func (o *ProcessStat) SetListenSockets(v []ListenSocket) {
o.ListenSockets = v
}
// GetPid returns the Pid field value if set, zero value otherwise.
func (o *ProcessStat) GetPid() int64 {
if o == nil || IsNil(o.Pid) {
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 *ProcessStat) GetPidOk() (*int64, bool) {
if o == nil || IsNil(o.Pid) {
return nil, false
}
return o.Pid, true
}
// HasPid returns a boolean if a field has been set.
func (o *ProcessStat) HasPid() bool {
if o != nil && !IsNil(o.Pid) {
return true
}
return false
}
// SetPid gets a reference to the given int64 and assigns it to the Pid field.
func (o *ProcessStat) SetPid(v int64) {
o.Pid = &v
}
// GetRss returns the Rss field value if set, zero value otherwise.
func (o *ProcessStat) GetRss() int64 {
if o == nil || IsNil(o.Rss) {
var ret int64
return ret
}
return *o.Rss
}
// GetRssOk returns a tuple with the Rss field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProcessStat) GetRssOk() (*int64, bool) {
if o == nil || IsNil(o.Rss) {
return nil, false
}
return o.Rss, true
}
// HasRss returns a boolean if a field has been set.
func (o *ProcessStat) HasRss() bool {
if o != nil && !IsNil(o.Rss) {
return true
}
return false
}
// SetRss gets a reference to the given int64 and assigns it to the Rss field.
func (o *ProcessStat) SetRss(v int64) {
o.Rss = &v
}
// GetRtime returns the Rtime field value if set, zero value otherwise.
func (o *ProcessStat) GetRtime() int64 {
if o == nil || IsNil(o.Rtime) {
var ret int64
return ret
}
return *o.Rtime
}
// GetRtimeOk returns a tuple with the Rtime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProcessStat) GetRtimeOk() (*int64, bool) {
if o == nil || IsNil(o.Rtime) {
return nil, false
}
return o.Rtime, true
}
// HasRtime returns a boolean if a field has been set.
func (o *ProcessStat) HasRtime() bool {
if o != nil && !IsNil(o.Rtime) {
return true
}
return false
}
// SetRtime gets a reference to the given int64 and assigns it to the Rtime field.
func (o *ProcessStat) SetRtime(v int64) {
o.Rtime = &v
}
// GetStime returns the Stime field value if set, zero value otherwise.
func (o *ProcessStat) GetStime() int64 {
if o == nil || IsNil(o.Stime) {
var ret int64
return ret
}
return *o.Stime
}
// GetStimeOk returns a tuple with the Stime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProcessStat) GetStimeOk() (*int64, bool) {
if o == nil || IsNil(o.Stime) {
return nil, false
}
return o.Stime, true
}
// HasStime returns a boolean if a field has been set.
func (o *ProcessStat) HasStime() bool {
if o != nil && !IsNil(o.Stime) {
return true
}
return false
}
// SetStime gets a reference to the given int64 and assigns it to the Stime field.
func (o *ProcessStat) SetStime(v int64) {
o.Stime = &v
}
func (o ProcessStat) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProcessStat) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Command) {
toSerialize["command"] = o.Command
}
if !IsNil(o.Cpu) {
toSerialize["cpu"] = o.Cpu
}
if !IsNil(o.Directory) {
toSerialize["directory"] = o.Directory
}
if !IsNil(o.ListenSockets) {
toSerialize["listen_sockets"] = o.ListenSockets
}
if !IsNil(o.Pid) {
toSerialize["pid"] = o.Pid
}
if !IsNil(o.Rss) {
toSerialize["rss"] = o.Rss
}
if !IsNil(o.Rtime) {
toSerialize["rtime"] = o.Rtime
}
if !IsNil(o.Stime) {
toSerialize["stime"] = o.Stime
}
return toSerialize, nil
}
type NullableProcessStat struct {
value *ProcessStat
isSet bool
}
func (v NullableProcessStat) Get() *ProcessStat {
return v.value
}
func (v *NullableProcessStat) Set(val *ProcessStat) {
v.value = val
v.isSet = true
}
func (v NullableProcessStat) IsSet() bool {
return v.isSet
}
func (v *NullableProcessStat) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProcessStat(val *ProcessStat) *NullableProcessStat {
return &NullableProcessStat{value: val, isSet: true}
}
func (v NullableProcessStat) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProcessStat) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}