github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_device.go (about) 1 /* 2 * Cios Openapi 3 * 4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) 5 * 6 * API version: 1.0.1 7 */ 8 9 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 10 11 package cios 12 13 import ( 14 "encoding/json" 15 ) 16 17 // Device struct for Device 18 type Device struct { 19 Id string `json:"id"` 20 ResourceOwnerId string `json:"resource_owner_id"` 21 Name *string `json:"name,omitempty"` 22 IdNumber *string `json:"id_number,omitempty"` 23 Description *string `json:"description,omitempty"` 24 DisplayInfo *DisplayInfo `json:"display_info,omitempty"` 25 ClientList *[]Client `json:"client_list,omitempty"` 26 IsManaged *string `json:"is_managed,omitempty"` 27 RsaPublickey *string `json:"rsa_publickey,omitempty"` 28 CustomInventory *[]interface{} `json:"custom_inventory,omitempty"` 29 // 最終更新時間 30 CreatedAt string `json:"created_at"` 31 // 作成時間 32 UpdatedAt string `json:"updated_at"` 33 // アクティベート時間。is_managedがfull_managedの場合のみ表示 34 ActivatedAt *string `json:"activated_at,omitempty"` 35 // ok:正常, error:エラー, offline:オフライン、 Null:監視状態なし 36 MonitoringStatus *string `json:"monitoring_status,omitempty"` 37 } 38 39 // NewDevice instantiates a new Device object 40 // This constructor will assign default values to properties that have it defined, 41 // and makes sure properties required by API are set, but the set of arguments 42 // will change when the set of required properties is changed 43 func NewDevice(id string, resourceOwnerId string, createdAt string, updatedAt string, ) *Device { 44 this := Device{} 45 this.Id = id 46 this.ResourceOwnerId = resourceOwnerId 47 this.CreatedAt = createdAt 48 this.UpdatedAt = updatedAt 49 return &this 50 } 51 52 // NewDeviceWithDefaults instantiates a new Device object 53 // This constructor will only assign default values to properties that have it defined, 54 // but it doesn't guarantee that properties required by API are set 55 func NewDeviceWithDefaults() *Device { 56 this := Device{} 57 return &this 58 } 59 60 // GetId returns the Id field value 61 func (o *Device) GetId() string { 62 if o == nil { 63 var ret string 64 return ret 65 } 66 67 return o.Id 68 } 69 70 // GetIdOk returns a tuple with the Id field value 71 // and a boolean to check if the value has been set. 72 func (o *Device) GetIdOk() (*string, bool) { 73 if o == nil { 74 return nil, false 75 } 76 return &o.Id, true 77 } 78 79 // SetId sets field value 80 func (o *Device) SetId(v string) { 81 o.Id = v 82 } 83 84 // GetResourceOwnerId returns the ResourceOwnerId field value 85 func (o *Device) GetResourceOwnerId() string { 86 if o == nil { 87 var ret string 88 return ret 89 } 90 91 return o.ResourceOwnerId 92 } 93 94 // GetResourceOwnerIdOk returns a tuple with the ResourceOwnerId field value 95 // and a boolean to check if the value has been set. 96 func (o *Device) GetResourceOwnerIdOk() (*string, bool) { 97 if o == nil { 98 return nil, false 99 } 100 return &o.ResourceOwnerId, true 101 } 102 103 // SetResourceOwnerId sets field value 104 func (o *Device) SetResourceOwnerId(v string) { 105 o.ResourceOwnerId = v 106 } 107 108 // GetName returns the Name field value if set, zero value otherwise. 109 func (o *Device) GetName() string { 110 if o == nil || o.Name == nil { 111 var ret string 112 return ret 113 } 114 return *o.Name 115 } 116 117 // GetNameOk returns a tuple with the Name field value if set, nil otherwise 118 // and a boolean to check if the value has been set. 119 func (o *Device) GetNameOk() (*string, bool) { 120 if o == nil || o.Name == nil { 121 return nil, false 122 } 123 return o.Name, true 124 } 125 126 // HasName returns a boolean if a field has been set. 127 func (o *Device) HasName() bool { 128 if o != nil && o.Name != nil { 129 return true 130 } 131 132 return false 133 } 134 135 // SetName gets a reference to the given string and assigns it to the Name field. 136 func (o *Device) SetName(v string) { 137 o.Name = &v 138 } 139 140 // GetIdNumber returns the IdNumber field value if set, zero value otherwise. 141 func (o *Device) GetIdNumber() string { 142 if o == nil || o.IdNumber == nil { 143 var ret string 144 return ret 145 } 146 return *o.IdNumber 147 } 148 149 // GetIdNumberOk returns a tuple with the IdNumber field value if set, nil otherwise 150 // and a boolean to check if the value has been set. 151 func (o *Device) GetIdNumberOk() (*string, bool) { 152 if o == nil || o.IdNumber == nil { 153 return nil, false 154 } 155 return o.IdNumber, true 156 } 157 158 // HasIdNumber returns a boolean if a field has been set. 159 func (o *Device) HasIdNumber() bool { 160 if o != nil && o.IdNumber != nil { 161 return true 162 } 163 164 return false 165 } 166 167 // SetIdNumber gets a reference to the given string and assigns it to the IdNumber field. 168 func (o *Device) SetIdNumber(v string) { 169 o.IdNumber = &v 170 } 171 172 // GetDescription returns the Description field value if set, zero value otherwise. 173 func (o *Device) GetDescription() string { 174 if o == nil || o.Description == nil { 175 var ret string 176 return ret 177 } 178 return *o.Description 179 } 180 181 // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise 182 // and a boolean to check if the value has been set. 183 func (o *Device) GetDescriptionOk() (*string, bool) { 184 if o == nil || o.Description == nil { 185 return nil, false 186 } 187 return o.Description, true 188 } 189 190 // HasDescription returns a boolean if a field has been set. 191 func (o *Device) HasDescription() bool { 192 if o != nil && o.Description != nil { 193 return true 194 } 195 196 return false 197 } 198 199 // SetDescription gets a reference to the given string and assigns it to the Description field. 200 func (o *Device) SetDescription(v string) { 201 o.Description = &v 202 } 203 204 // GetDisplayInfo returns the DisplayInfo field value if set, zero value otherwise. 205 func (o *Device) GetDisplayInfo() DisplayInfo { 206 if o == nil || o.DisplayInfo == nil { 207 var ret DisplayInfo 208 return ret 209 } 210 return *o.DisplayInfo 211 } 212 213 // GetDisplayInfoOk returns a tuple with the DisplayInfo field value if set, nil otherwise 214 // and a boolean to check if the value has been set. 215 func (o *Device) GetDisplayInfoOk() (*DisplayInfo, bool) { 216 if o == nil || o.DisplayInfo == nil { 217 return nil, false 218 } 219 return o.DisplayInfo, true 220 } 221 222 // HasDisplayInfo returns a boolean if a field has been set. 223 func (o *Device) HasDisplayInfo() bool { 224 if o != nil && o.DisplayInfo != nil { 225 return true 226 } 227 228 return false 229 } 230 231 // SetDisplayInfo gets a reference to the given DisplayInfo and assigns it to the DisplayInfo field. 232 func (o *Device) SetDisplayInfo(v DisplayInfo) { 233 o.DisplayInfo = &v 234 } 235 236 // GetClientList returns the ClientList field value if set, zero value otherwise. 237 func (o *Device) GetClientList() []Client { 238 if o == nil || o.ClientList == nil { 239 var ret []Client 240 return ret 241 } 242 return *o.ClientList 243 } 244 245 // GetClientListOk returns a tuple with the ClientList field value if set, nil otherwise 246 // and a boolean to check if the value has been set. 247 func (o *Device) GetClientListOk() (*[]Client, bool) { 248 if o == nil || o.ClientList == nil { 249 return nil, false 250 } 251 return o.ClientList, true 252 } 253 254 // HasClientList returns a boolean if a field has been set. 255 func (o *Device) HasClientList() bool { 256 if o != nil && o.ClientList != nil { 257 return true 258 } 259 260 return false 261 } 262 263 // SetClientList gets a reference to the given []Client and assigns it to the ClientList field. 264 func (o *Device) SetClientList(v []Client) { 265 o.ClientList = &v 266 } 267 268 // GetIsManaged returns the IsManaged field value if set, zero value otherwise. 269 func (o *Device) GetIsManaged() string { 270 if o == nil || o.IsManaged == nil { 271 var ret string 272 return ret 273 } 274 return *o.IsManaged 275 } 276 277 // GetIsManagedOk returns a tuple with the IsManaged field value if set, nil otherwise 278 // and a boolean to check if the value has been set. 279 func (o *Device) GetIsManagedOk() (*string, bool) { 280 if o == nil || o.IsManaged == nil { 281 return nil, false 282 } 283 return o.IsManaged, true 284 } 285 286 // HasIsManaged returns a boolean if a field has been set. 287 func (o *Device) HasIsManaged() bool { 288 if o != nil && o.IsManaged != nil { 289 return true 290 } 291 292 return false 293 } 294 295 // SetIsManaged gets a reference to the given string and assigns it to the IsManaged field. 296 func (o *Device) SetIsManaged(v string) { 297 o.IsManaged = &v 298 } 299 300 // GetRsaPublickey returns the RsaPublickey field value if set, zero value otherwise. 301 func (o *Device) GetRsaPublickey() string { 302 if o == nil || o.RsaPublickey == nil { 303 var ret string 304 return ret 305 } 306 return *o.RsaPublickey 307 } 308 309 // GetRsaPublickeyOk returns a tuple with the RsaPublickey field value if set, nil otherwise 310 // and a boolean to check if the value has been set. 311 func (o *Device) GetRsaPublickeyOk() (*string, bool) { 312 if o == nil || o.RsaPublickey == nil { 313 return nil, false 314 } 315 return o.RsaPublickey, true 316 } 317 318 // HasRsaPublickey returns a boolean if a field has been set. 319 func (o *Device) HasRsaPublickey() bool { 320 if o != nil && o.RsaPublickey != nil { 321 return true 322 } 323 324 return false 325 } 326 327 // SetRsaPublickey gets a reference to the given string and assigns it to the RsaPublickey field. 328 func (o *Device) SetRsaPublickey(v string) { 329 o.RsaPublickey = &v 330 } 331 332 // GetCustomInventory returns the CustomInventory field value if set, zero value otherwise. 333 func (o *Device) GetCustomInventory() []interface{} { 334 if o == nil || o.CustomInventory == nil { 335 var ret []interface{} 336 return ret 337 } 338 return *o.CustomInventory 339 } 340 341 // GetCustomInventoryOk returns a tuple with the CustomInventory field value if set, nil otherwise 342 // and a boolean to check if the value has been set. 343 func (o *Device) GetCustomInventoryOk() (*[]interface{}, bool) { 344 if o == nil || o.CustomInventory == nil { 345 return nil, false 346 } 347 return o.CustomInventory, true 348 } 349 350 // HasCustomInventory returns a boolean if a field has been set. 351 func (o *Device) HasCustomInventory() bool { 352 if o != nil && o.CustomInventory != nil { 353 return true 354 } 355 356 return false 357 } 358 359 // SetCustomInventory gets a reference to the given []interface{} and assigns it to the CustomInventory field. 360 func (o *Device) SetCustomInventory(v []interface{}) { 361 o.CustomInventory = &v 362 } 363 364 // GetCreatedAt returns the CreatedAt field value 365 func (o *Device) GetCreatedAt() string { 366 if o == nil { 367 var ret string 368 return ret 369 } 370 371 return o.CreatedAt 372 } 373 374 // GetCreatedAtOk returns a tuple with the CreatedAt field value 375 // and a boolean to check if the value has been set. 376 func (o *Device) GetCreatedAtOk() (*string, bool) { 377 if o == nil { 378 return nil, false 379 } 380 return &o.CreatedAt, true 381 } 382 383 // SetCreatedAt sets field value 384 func (o *Device) SetCreatedAt(v string) { 385 o.CreatedAt = v 386 } 387 388 // GetUpdatedAt returns the UpdatedAt field value 389 func (o *Device) GetUpdatedAt() string { 390 if o == nil { 391 var ret string 392 return ret 393 } 394 395 return o.UpdatedAt 396 } 397 398 // GetUpdatedAtOk returns a tuple with the UpdatedAt field value 399 // and a boolean to check if the value has been set. 400 func (o *Device) GetUpdatedAtOk() (*string, bool) { 401 if o == nil { 402 return nil, false 403 } 404 return &o.UpdatedAt, true 405 } 406 407 // SetUpdatedAt sets field value 408 func (o *Device) SetUpdatedAt(v string) { 409 o.UpdatedAt = v 410 } 411 412 // GetActivatedAt returns the ActivatedAt field value if set, zero value otherwise. 413 func (o *Device) GetActivatedAt() string { 414 if o == nil || o.ActivatedAt == nil { 415 var ret string 416 return ret 417 } 418 return *o.ActivatedAt 419 } 420 421 // GetActivatedAtOk returns a tuple with the ActivatedAt field value if set, nil otherwise 422 // and a boolean to check if the value has been set. 423 func (o *Device) GetActivatedAtOk() (*string, bool) { 424 if o == nil || o.ActivatedAt == nil { 425 return nil, false 426 } 427 return o.ActivatedAt, true 428 } 429 430 // HasActivatedAt returns a boolean if a field has been set. 431 func (o *Device) HasActivatedAt() bool { 432 if o != nil && o.ActivatedAt != nil { 433 return true 434 } 435 436 return false 437 } 438 439 // SetActivatedAt gets a reference to the given string and assigns it to the ActivatedAt field. 440 func (o *Device) SetActivatedAt(v string) { 441 o.ActivatedAt = &v 442 } 443 444 // GetMonitoringStatus returns the MonitoringStatus field value if set, zero value otherwise. 445 func (o *Device) GetMonitoringStatus() string { 446 if o == nil || o.MonitoringStatus == nil { 447 var ret string 448 return ret 449 } 450 return *o.MonitoringStatus 451 } 452 453 // GetMonitoringStatusOk returns a tuple with the MonitoringStatus field value if set, nil otherwise 454 // and a boolean to check if the value has been set. 455 func (o *Device) GetMonitoringStatusOk() (*string, bool) { 456 if o == nil || o.MonitoringStatus == nil { 457 return nil, false 458 } 459 return o.MonitoringStatus, true 460 } 461 462 // HasMonitoringStatus returns a boolean if a field has been set. 463 func (o *Device) HasMonitoringStatus() bool { 464 if o != nil && o.MonitoringStatus != nil { 465 return true 466 } 467 468 return false 469 } 470 471 // SetMonitoringStatus gets a reference to the given string and assigns it to the MonitoringStatus field. 472 func (o *Device) SetMonitoringStatus(v string) { 473 o.MonitoringStatus = &v 474 } 475 476 func (o Device) MarshalJSON() ([]byte, error) { 477 toSerialize := map[string]interface{}{} 478 if true { 479 toSerialize["id"] = o.Id 480 } 481 if true { 482 toSerialize["resource_owner_id"] = o.ResourceOwnerId 483 } 484 if o.Name != nil { 485 toSerialize["name"] = o.Name 486 } 487 if o.IdNumber != nil { 488 toSerialize["id_number"] = o.IdNumber 489 } 490 if o.Description != nil { 491 toSerialize["description"] = o.Description 492 } 493 if o.DisplayInfo != nil { 494 toSerialize["display_info"] = o.DisplayInfo 495 } 496 if o.ClientList != nil { 497 toSerialize["client_list"] = o.ClientList 498 } 499 if o.IsManaged != nil { 500 toSerialize["is_managed"] = o.IsManaged 501 } 502 if o.RsaPublickey != nil { 503 toSerialize["rsa_publickey"] = o.RsaPublickey 504 } 505 if o.CustomInventory != nil { 506 toSerialize["custom_inventory"] = o.CustomInventory 507 } 508 if true { 509 toSerialize["created_at"] = o.CreatedAt 510 } 511 if true { 512 toSerialize["updated_at"] = o.UpdatedAt 513 } 514 if o.ActivatedAt != nil { 515 toSerialize["activated_at"] = o.ActivatedAt 516 } 517 if o.MonitoringStatus != nil { 518 toSerialize["monitoring_status"] = o.MonitoringStatus 519 } 520 return json.Marshal(toSerialize) 521 } 522 523 type NullableDevice struct { 524 value *Device 525 isSet bool 526 } 527 528 func (v NullableDevice) Get() *Device { 529 return v.value 530 } 531 532 func (v *NullableDevice) Set(val *Device) { 533 v.value = val 534 v.isSet = true 535 } 536 537 func (v NullableDevice) IsSet() bool { 538 return v.isSet 539 } 540 541 func (v *NullableDevice) Unset() { 542 v.value = nil 543 v.isSet = false 544 } 545 546 func NewNullableDevice(val *Device) *NullableDevice { 547 return &NullableDevice{value: val, isSet: true} 548 } 549 550 func (v NullableDevice) MarshalJSON() ([]byte, error) { 551 return json.Marshal(v.value) 552 } 553 554 func (v *NullableDevice) UnmarshalJSON(src []byte) error { 555 v.isSet = true 556 return json.Unmarshal(src, &v.value) 557 } 558 559