github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_device_update_request.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 // DeviceUpdateRequest struct for DeviceUpdateRequest 18 type DeviceUpdateRequest struct { 19 Name *string `json:"name,omitempty"` 20 IdNumber *string `json:"id_number,omitempty"` 21 Description *string `json:"description,omitempty"` 22 DisplayInfo *DisplayInfo `json:"display_info,omitempty"` 23 ClientIdList *[]string `json:"client_id_list,omitempty"` 24 // 該当デバイスの管理方法についての区分。8 管理外:unmanaged ・・・該当デバイス情報に情報を持たせるのみの場合、こちらを選択。 一部管理:managed ・・・該当デバイス情報に情報を持たせ、かつ当サービス以外システム(アプリ)にて管理される場合、こちらを選択。 完全管理:full_managed ・・・該当デバイス情報に情報を持たせ、かつ当サービス以外システム(アプリ)およびデバイスエージェント(キッティング、ファームウェアアップデート等行う機構)にて管理される場合、こちらを選択。 25 IsManaged *string `json:"is_managed,omitempty"` 26 RsaPublickey *string `json:"rsa_publickey,omitempty"` 27 CustomInventory *[]interface{} `json:"custom_inventory,omitempty"` 28 } 29 30 // NewDeviceUpdateRequest instantiates a new DeviceUpdateRequest object 31 // This constructor will assign default values to properties that have it defined, 32 // and makes sure properties required by API are set, but the set of arguments 33 // will change when the set of required properties is changed 34 func NewDeviceUpdateRequest() *DeviceUpdateRequest { 35 this := DeviceUpdateRequest{} 36 return &this 37 } 38 39 // NewDeviceUpdateRequestWithDefaults instantiates a new DeviceUpdateRequest object 40 // This constructor will only assign default values to properties that have it defined, 41 // but it doesn't guarantee that properties required by API are set 42 func NewDeviceUpdateRequestWithDefaults() *DeviceUpdateRequest { 43 this := DeviceUpdateRequest{} 44 return &this 45 } 46 47 // GetName returns the Name field value if set, zero value otherwise. 48 func (o *DeviceUpdateRequest) GetName() string { 49 if o == nil || o.Name == nil { 50 var ret string 51 return ret 52 } 53 return *o.Name 54 } 55 56 // GetNameOk returns a tuple with the Name field value if set, nil otherwise 57 // and a boolean to check if the value has been set. 58 func (o *DeviceUpdateRequest) GetNameOk() (*string, bool) { 59 if o == nil || o.Name == nil { 60 return nil, false 61 } 62 return o.Name, true 63 } 64 65 // HasName returns a boolean if a field has been set. 66 func (o *DeviceUpdateRequest) HasName() bool { 67 if o != nil && o.Name != nil { 68 return true 69 } 70 71 return false 72 } 73 74 // SetName gets a reference to the given string and assigns it to the Name field. 75 func (o *DeviceUpdateRequest) SetName(v string) { 76 o.Name = &v 77 } 78 79 // GetIdNumber returns the IdNumber field value if set, zero value otherwise. 80 func (o *DeviceUpdateRequest) GetIdNumber() string { 81 if o == nil || o.IdNumber == nil { 82 var ret string 83 return ret 84 } 85 return *o.IdNumber 86 } 87 88 // GetIdNumberOk returns a tuple with the IdNumber field value if set, nil otherwise 89 // and a boolean to check if the value has been set. 90 func (o *DeviceUpdateRequest) GetIdNumberOk() (*string, bool) { 91 if o == nil || o.IdNumber == nil { 92 return nil, false 93 } 94 return o.IdNumber, true 95 } 96 97 // HasIdNumber returns a boolean if a field has been set. 98 func (o *DeviceUpdateRequest) HasIdNumber() bool { 99 if o != nil && o.IdNumber != nil { 100 return true 101 } 102 103 return false 104 } 105 106 // SetIdNumber gets a reference to the given string and assigns it to the IdNumber field. 107 func (o *DeviceUpdateRequest) SetIdNumber(v string) { 108 o.IdNumber = &v 109 } 110 111 // GetDescription returns the Description field value if set, zero value otherwise. 112 func (o *DeviceUpdateRequest) GetDescription() string { 113 if o == nil || o.Description == nil { 114 var ret string 115 return ret 116 } 117 return *o.Description 118 } 119 120 // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise 121 // and a boolean to check if the value has been set. 122 func (o *DeviceUpdateRequest) GetDescriptionOk() (*string, bool) { 123 if o == nil || o.Description == nil { 124 return nil, false 125 } 126 return o.Description, true 127 } 128 129 // HasDescription returns a boolean if a field has been set. 130 func (o *DeviceUpdateRequest) HasDescription() bool { 131 if o != nil && o.Description != nil { 132 return true 133 } 134 135 return false 136 } 137 138 // SetDescription gets a reference to the given string and assigns it to the Description field. 139 func (o *DeviceUpdateRequest) SetDescription(v string) { 140 o.Description = &v 141 } 142 143 // GetDisplayInfo returns the DisplayInfo field value if set, zero value otherwise. 144 func (o *DeviceUpdateRequest) GetDisplayInfo() DisplayInfo { 145 if o == nil || o.DisplayInfo == nil { 146 var ret DisplayInfo 147 return ret 148 } 149 return *o.DisplayInfo 150 } 151 152 // GetDisplayInfoOk returns a tuple with the DisplayInfo field value if set, nil otherwise 153 // and a boolean to check if the value has been set. 154 func (o *DeviceUpdateRequest) GetDisplayInfoOk() (*DisplayInfo, bool) { 155 if o == nil || o.DisplayInfo == nil { 156 return nil, false 157 } 158 return o.DisplayInfo, true 159 } 160 161 // HasDisplayInfo returns a boolean if a field has been set. 162 func (o *DeviceUpdateRequest) HasDisplayInfo() bool { 163 if o != nil && o.DisplayInfo != nil { 164 return true 165 } 166 167 return false 168 } 169 170 // SetDisplayInfo gets a reference to the given DisplayInfo and assigns it to the DisplayInfo field. 171 func (o *DeviceUpdateRequest) SetDisplayInfo(v DisplayInfo) { 172 o.DisplayInfo = &v 173 } 174 175 // GetClientIdList returns the ClientIdList field value if set, zero value otherwise. 176 func (o *DeviceUpdateRequest) GetClientIdList() []string { 177 if o == nil || o.ClientIdList == nil { 178 var ret []string 179 return ret 180 } 181 return *o.ClientIdList 182 } 183 184 // GetClientIdListOk returns a tuple with the ClientIdList field value if set, nil otherwise 185 // and a boolean to check if the value has been set. 186 func (o *DeviceUpdateRequest) GetClientIdListOk() (*[]string, bool) { 187 if o == nil || o.ClientIdList == nil { 188 return nil, false 189 } 190 return o.ClientIdList, true 191 } 192 193 // HasClientIdList returns a boolean if a field has been set. 194 func (o *DeviceUpdateRequest) HasClientIdList() bool { 195 if o != nil && o.ClientIdList != nil { 196 return true 197 } 198 199 return false 200 } 201 202 // SetClientIdList gets a reference to the given []string and assigns it to the ClientIdList field. 203 func (o *DeviceUpdateRequest) SetClientIdList(v []string) { 204 o.ClientIdList = &v 205 } 206 207 // GetIsManaged returns the IsManaged field value if set, zero value otherwise. 208 func (o *DeviceUpdateRequest) GetIsManaged() string { 209 if o == nil || o.IsManaged == nil { 210 var ret string 211 return ret 212 } 213 return *o.IsManaged 214 } 215 216 // GetIsManagedOk returns a tuple with the IsManaged field value if set, nil otherwise 217 // and a boolean to check if the value has been set. 218 func (o *DeviceUpdateRequest) GetIsManagedOk() (*string, bool) { 219 if o == nil || o.IsManaged == nil { 220 return nil, false 221 } 222 return o.IsManaged, true 223 } 224 225 // HasIsManaged returns a boolean if a field has been set. 226 func (o *DeviceUpdateRequest) HasIsManaged() bool { 227 if o != nil && o.IsManaged != nil { 228 return true 229 } 230 231 return false 232 } 233 234 // SetIsManaged gets a reference to the given string and assigns it to the IsManaged field. 235 func (o *DeviceUpdateRequest) SetIsManaged(v string) { 236 o.IsManaged = &v 237 } 238 239 // GetRsaPublickey returns the RsaPublickey field value if set, zero value otherwise. 240 func (o *DeviceUpdateRequest) GetRsaPublickey() string { 241 if o == nil || o.RsaPublickey == nil { 242 var ret string 243 return ret 244 } 245 return *o.RsaPublickey 246 } 247 248 // GetRsaPublickeyOk returns a tuple with the RsaPublickey field value if set, nil otherwise 249 // and a boolean to check if the value has been set. 250 func (o *DeviceUpdateRequest) GetRsaPublickeyOk() (*string, bool) { 251 if o == nil || o.RsaPublickey == nil { 252 return nil, false 253 } 254 return o.RsaPublickey, true 255 } 256 257 // HasRsaPublickey returns a boolean if a field has been set. 258 func (o *DeviceUpdateRequest) HasRsaPublickey() bool { 259 if o != nil && o.RsaPublickey != nil { 260 return true 261 } 262 263 return false 264 } 265 266 // SetRsaPublickey gets a reference to the given string and assigns it to the RsaPublickey field. 267 func (o *DeviceUpdateRequest) SetRsaPublickey(v string) { 268 o.RsaPublickey = &v 269 } 270 271 // GetCustomInventory returns the CustomInventory field value if set, zero value otherwise. 272 func (o *DeviceUpdateRequest) GetCustomInventory() []interface{} { 273 if o == nil || o.CustomInventory == nil { 274 var ret []interface{} 275 return ret 276 } 277 return *o.CustomInventory 278 } 279 280 // GetCustomInventoryOk returns a tuple with the CustomInventory field value if set, nil otherwise 281 // and a boolean to check if the value has been set. 282 func (o *DeviceUpdateRequest) GetCustomInventoryOk() (*[]interface{}, bool) { 283 if o == nil || o.CustomInventory == nil { 284 return nil, false 285 } 286 return o.CustomInventory, true 287 } 288 289 // HasCustomInventory returns a boolean if a field has been set. 290 func (o *DeviceUpdateRequest) HasCustomInventory() bool { 291 if o != nil && o.CustomInventory != nil { 292 return true 293 } 294 295 return false 296 } 297 298 // SetCustomInventory gets a reference to the given []interface{} and assigns it to the CustomInventory field. 299 func (o *DeviceUpdateRequest) SetCustomInventory(v []interface{}) { 300 o.CustomInventory = &v 301 } 302 303 func (o DeviceUpdateRequest) MarshalJSON() ([]byte, error) { 304 toSerialize := map[string]interface{}{} 305 if o.Name != nil { 306 toSerialize["name"] = o.Name 307 } 308 if o.IdNumber != nil { 309 toSerialize["id_number"] = o.IdNumber 310 } 311 if o.Description != nil { 312 toSerialize["description"] = o.Description 313 } 314 if o.DisplayInfo != nil { 315 toSerialize["display_info"] = o.DisplayInfo 316 } 317 if o.ClientIdList != nil { 318 toSerialize["client_id_list"] = o.ClientIdList 319 } 320 if o.IsManaged != nil { 321 toSerialize["is_managed"] = o.IsManaged 322 } 323 if o.RsaPublickey != nil { 324 toSerialize["rsa_publickey"] = o.RsaPublickey 325 } 326 if o.CustomInventory != nil { 327 toSerialize["custom_inventory"] = o.CustomInventory 328 } 329 return json.Marshal(toSerialize) 330 } 331 332 type NullableDeviceUpdateRequest struct { 333 value *DeviceUpdateRequest 334 isSet bool 335 } 336 337 func (v NullableDeviceUpdateRequest) Get() *DeviceUpdateRequest { 338 return v.value 339 } 340 341 func (v *NullableDeviceUpdateRequest) Set(val *DeviceUpdateRequest) { 342 v.value = val 343 v.isSet = true 344 } 345 346 func (v NullableDeviceUpdateRequest) IsSet() bool { 347 return v.isSet 348 } 349 350 func (v *NullableDeviceUpdateRequest) Unset() { 351 v.value = nil 352 v.isSet = false 353 } 354 355 func NewNullableDeviceUpdateRequest(val *DeviceUpdateRequest) *NullableDeviceUpdateRequest { 356 return &NullableDeviceUpdateRequest{value: val, isSet: true} 357 } 358 359 func (v NullableDeviceUpdateRequest) MarshalJSON() ([]byte, error) { 360 return json.Marshal(v.value) 361 } 362 363 func (v *NullableDeviceUpdateRequest) UnmarshalJSON(src []byte) error { 364 v.isSet = true 365 return json.Unmarshal(src, &v.value) 366 } 367 368