forked from optim-corp/cios-golang-sdk
/
model_device.go
559 lines (476 loc) · 14 KB
/
model_device.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
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
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
/*
* Cios Openapi
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* API version: 1.0.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package cios
import (
"encoding/json"
)
// Device struct for Device
type Device struct {
Id string `json:"id"`
ResourceOwnerId string `json:"resource_owner_id"`
Name *string `json:"name,omitempty"`
IdNumber *string `json:"id_number,omitempty"`
Description *string `json:"description,omitempty"`
DisplayInfo *DisplayInfo `json:"display_info,omitempty"`
ClientList *[]Client `json:"client_list,omitempty"`
IsManaged *string `json:"is_managed,omitempty"`
RsaPublickey *string `json:"rsa_publickey,omitempty"`
CustomInventory *[]interface{} `json:"custom_inventory,omitempty"`
// 最終更新時間
CreatedAt string `json:"created_at"`
// 作成時間
UpdatedAt string `json:"updated_at"`
// アクティベート時間。is_managedがfull_managedの場合のみ表示
ActivatedAt *string `json:"activated_at,omitempty"`
// ok:正常, error:エラー, offline:オフライン、 Null:監視状態なし
MonitoringStatus *string `json:"monitoring_status,omitempty"`
}
// NewDevice instantiates a new Device 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 NewDevice(id string, resourceOwnerId string, createdAt string, updatedAt string, ) *Device {
this := Device{}
this.Id = id
this.ResourceOwnerId = resourceOwnerId
this.CreatedAt = createdAt
this.UpdatedAt = updatedAt
return &this
}
// NewDeviceWithDefaults instantiates a new Device 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 NewDeviceWithDefaults() *Device {
this := Device{}
return &this
}
// GetId returns the Id field value
func (o *Device) GetId() string {
if o == nil {
var ret string
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 *Device) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *Device) SetId(v string) {
o.Id = v
}
// GetResourceOwnerId returns the ResourceOwnerId field value
func (o *Device) GetResourceOwnerId() string {
if o == nil {
var ret string
return ret
}
return o.ResourceOwnerId
}
// GetResourceOwnerIdOk returns a tuple with the ResourceOwnerId field value
// and a boolean to check if the value has been set.
func (o *Device) GetResourceOwnerIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ResourceOwnerId, true
}
// SetResourceOwnerId sets field value
func (o *Device) SetResourceOwnerId(v string) {
o.ResourceOwnerId = v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *Device) GetName() string {
if o == nil || o.Name == nil {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Device) GetNameOk() (*string, bool) {
if o == nil || o.Name == nil {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *Device) HasName() bool {
if o != nil && o.Name != nil {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *Device) SetName(v string) {
o.Name = &v
}
// GetIdNumber returns the IdNumber field value if set, zero value otherwise.
func (o *Device) GetIdNumber() string {
if o == nil || o.IdNumber == nil {
var ret string
return ret
}
return *o.IdNumber
}
// GetIdNumberOk returns a tuple with the IdNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Device) GetIdNumberOk() (*string, bool) {
if o == nil || o.IdNumber == nil {
return nil, false
}
return o.IdNumber, true
}
// HasIdNumber returns a boolean if a field has been set.
func (o *Device) HasIdNumber() bool {
if o != nil && o.IdNumber != nil {
return true
}
return false
}
// SetIdNumber gets a reference to the given string and assigns it to the IdNumber field.
func (o *Device) SetIdNumber(v string) {
o.IdNumber = &v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *Device) GetDescription() string {
if o == nil || o.Description == nil {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Device) GetDescriptionOk() (*string, bool) {
if o == nil || o.Description == nil {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *Device) HasDescription() bool {
if o != nil && o.Description != nil {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *Device) SetDescription(v string) {
o.Description = &v
}
// GetDisplayInfo returns the DisplayInfo field value if set, zero value otherwise.
func (o *Device) GetDisplayInfo() DisplayInfo {
if o == nil || o.DisplayInfo == nil {
var ret DisplayInfo
return ret
}
return *o.DisplayInfo
}
// GetDisplayInfoOk returns a tuple with the DisplayInfo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Device) GetDisplayInfoOk() (*DisplayInfo, bool) {
if o == nil || o.DisplayInfo == nil {
return nil, false
}
return o.DisplayInfo, true
}
// HasDisplayInfo returns a boolean if a field has been set.
func (o *Device) HasDisplayInfo() bool {
if o != nil && o.DisplayInfo != nil {
return true
}
return false
}
// SetDisplayInfo gets a reference to the given DisplayInfo and assigns it to the DisplayInfo field.
func (o *Device) SetDisplayInfo(v DisplayInfo) {
o.DisplayInfo = &v
}
// GetClientList returns the ClientList field value if set, zero value otherwise.
func (o *Device) GetClientList() []Client {
if o == nil || o.ClientList == nil {
var ret []Client
return ret
}
return *o.ClientList
}
// GetClientListOk returns a tuple with the ClientList field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Device) GetClientListOk() (*[]Client, bool) {
if o == nil || o.ClientList == nil {
return nil, false
}
return o.ClientList, true
}
// HasClientList returns a boolean if a field has been set.
func (o *Device) HasClientList() bool {
if o != nil && o.ClientList != nil {
return true
}
return false
}
// SetClientList gets a reference to the given []Client and assigns it to the ClientList field.
func (o *Device) SetClientList(v []Client) {
o.ClientList = &v
}
// GetIsManaged returns the IsManaged field value if set, zero value otherwise.
func (o *Device) GetIsManaged() string {
if o == nil || o.IsManaged == nil {
var ret string
return ret
}
return *o.IsManaged
}
// GetIsManagedOk returns a tuple with the IsManaged field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Device) GetIsManagedOk() (*string, bool) {
if o == nil || o.IsManaged == nil {
return nil, false
}
return o.IsManaged, true
}
// HasIsManaged returns a boolean if a field has been set.
func (o *Device) HasIsManaged() bool {
if o != nil && o.IsManaged != nil {
return true
}
return false
}
// SetIsManaged gets a reference to the given string and assigns it to the IsManaged field.
func (o *Device) SetIsManaged(v string) {
o.IsManaged = &v
}
// GetRsaPublickey returns the RsaPublickey field value if set, zero value otherwise.
func (o *Device) GetRsaPublickey() string {
if o == nil || o.RsaPublickey == nil {
var ret string
return ret
}
return *o.RsaPublickey
}
// GetRsaPublickeyOk returns a tuple with the RsaPublickey field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Device) GetRsaPublickeyOk() (*string, bool) {
if o == nil || o.RsaPublickey == nil {
return nil, false
}
return o.RsaPublickey, true
}
// HasRsaPublickey returns a boolean if a field has been set.
func (o *Device) HasRsaPublickey() bool {
if o != nil && o.RsaPublickey != nil {
return true
}
return false
}
// SetRsaPublickey gets a reference to the given string and assigns it to the RsaPublickey field.
func (o *Device) SetRsaPublickey(v string) {
o.RsaPublickey = &v
}
// GetCustomInventory returns the CustomInventory field value if set, zero value otherwise.
func (o *Device) GetCustomInventory() []interface{} {
if o == nil || o.CustomInventory == nil {
var ret []interface{}
return ret
}
return *o.CustomInventory
}
// GetCustomInventoryOk returns a tuple with the CustomInventory field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Device) GetCustomInventoryOk() (*[]interface{}, bool) {
if o == nil || o.CustomInventory == nil {
return nil, false
}
return o.CustomInventory, true
}
// HasCustomInventory returns a boolean if a field has been set.
func (o *Device) HasCustomInventory() bool {
if o != nil && o.CustomInventory != nil {
return true
}
return false
}
// SetCustomInventory gets a reference to the given []interface{} and assigns it to the CustomInventory field.
func (o *Device) SetCustomInventory(v []interface{}) {
o.CustomInventory = &v
}
// GetCreatedAt returns the CreatedAt field value
func (o *Device) GetCreatedAt() string {
if o == nil {
var ret string
return ret
}
return o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value
// and a boolean to check if the value has been set.
func (o *Device) GetCreatedAtOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.CreatedAt, true
}
// SetCreatedAt sets field value
func (o *Device) SetCreatedAt(v string) {
o.CreatedAt = v
}
// GetUpdatedAt returns the UpdatedAt field value
func (o *Device) GetUpdatedAt() string {
if o == nil {
var ret string
return ret
}
return o.UpdatedAt
}
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value
// and a boolean to check if the value has been set.
func (o *Device) GetUpdatedAtOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.UpdatedAt, true
}
// SetUpdatedAt sets field value
func (o *Device) SetUpdatedAt(v string) {
o.UpdatedAt = v
}
// GetActivatedAt returns the ActivatedAt field value if set, zero value otherwise.
func (o *Device) GetActivatedAt() string {
if o == nil || o.ActivatedAt == nil {
var ret string
return ret
}
return *o.ActivatedAt
}
// GetActivatedAtOk returns a tuple with the ActivatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Device) GetActivatedAtOk() (*string, bool) {
if o == nil || o.ActivatedAt == nil {
return nil, false
}
return o.ActivatedAt, true
}
// HasActivatedAt returns a boolean if a field has been set.
func (o *Device) HasActivatedAt() bool {
if o != nil && o.ActivatedAt != nil {
return true
}
return false
}
// SetActivatedAt gets a reference to the given string and assigns it to the ActivatedAt field.
func (o *Device) SetActivatedAt(v string) {
o.ActivatedAt = &v
}
// GetMonitoringStatus returns the MonitoringStatus field value if set, zero value otherwise.
func (o *Device) GetMonitoringStatus() string {
if o == nil || o.MonitoringStatus == nil {
var ret string
return ret
}
return *o.MonitoringStatus
}
// GetMonitoringStatusOk returns a tuple with the MonitoringStatus field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Device) GetMonitoringStatusOk() (*string, bool) {
if o == nil || o.MonitoringStatus == nil {
return nil, false
}
return o.MonitoringStatus, true
}
// HasMonitoringStatus returns a boolean if a field has been set.
func (o *Device) HasMonitoringStatus() bool {
if o != nil && o.MonitoringStatus != nil {
return true
}
return false
}
// SetMonitoringStatus gets a reference to the given string and assigns it to the MonitoringStatus field.
func (o *Device) SetMonitoringStatus(v string) {
o.MonitoringStatus = &v
}
func (o Device) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["id"] = o.Id
}
if true {
toSerialize["resource_owner_id"] = o.ResourceOwnerId
}
if o.Name != nil {
toSerialize["name"] = o.Name
}
if o.IdNumber != nil {
toSerialize["id_number"] = o.IdNumber
}
if o.Description != nil {
toSerialize["description"] = o.Description
}
if o.DisplayInfo != nil {
toSerialize["display_info"] = o.DisplayInfo
}
if o.ClientList != nil {
toSerialize["client_list"] = o.ClientList
}
if o.IsManaged != nil {
toSerialize["is_managed"] = o.IsManaged
}
if o.RsaPublickey != nil {
toSerialize["rsa_publickey"] = o.RsaPublickey
}
if o.CustomInventory != nil {
toSerialize["custom_inventory"] = o.CustomInventory
}
if true {
toSerialize["created_at"] = o.CreatedAt
}
if true {
toSerialize["updated_at"] = o.UpdatedAt
}
if o.ActivatedAt != nil {
toSerialize["activated_at"] = o.ActivatedAt
}
if o.MonitoringStatus != nil {
toSerialize["monitoring_status"] = o.MonitoringStatus
}
return json.Marshal(toSerialize)
}
type NullableDevice struct {
value *Device
isSet bool
}
func (v NullableDevice) Get() *Device {
return v.value
}
func (v *NullableDevice) Set(val *Device) {
v.value = val
v.isSet = true
}
func (v NullableDevice) IsSet() bool {
return v.isSet
}
func (v *NullableDevice) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDevice(val *Device) *NullableDevice {
return &NullableDevice{value: val, isSet: true}
}
func (v NullableDevice) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDevice) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}