github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_device_model_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 // DeviceModelUpdateRequest struct for DeviceModelUpdateRequest 18 type DeviceModelUpdateRequest struct { 19 Name *string `json:"name,omitempty"` 20 ResourceOwnerId *string `json:"resource_owner_id,omitempty"` 21 MakerId *string `json:"maker_id,omitempty"` 22 Version *string `json:"version,omitempty"` 23 Watch *DeviceModelUpdateRequestWatch `json:"watch,omitempty"` 24 Components *[]ConstitutionComponent `json:"components,omitempty"` 25 } 26 27 // NewDeviceModelUpdateRequest instantiates a new DeviceModelUpdateRequest object 28 // This constructor will assign default values to properties that have it defined, 29 // and makes sure properties required by API are set, but the set of arguments 30 // will change when the set of required properties is changed 31 func NewDeviceModelUpdateRequest() *DeviceModelUpdateRequest { 32 this := DeviceModelUpdateRequest{} 33 return &this 34 } 35 36 // NewDeviceModelUpdateRequestWithDefaults instantiates a new DeviceModelUpdateRequest object 37 // This constructor will only assign default values to properties that have it defined, 38 // but it doesn't guarantee that properties required by API are set 39 func NewDeviceModelUpdateRequestWithDefaults() *DeviceModelUpdateRequest { 40 this := DeviceModelUpdateRequest{} 41 return &this 42 } 43 44 // GetName returns the Name field value if set, zero value otherwise. 45 func (o *DeviceModelUpdateRequest) GetName() string { 46 if o == nil || o.Name == nil { 47 var ret string 48 return ret 49 } 50 return *o.Name 51 } 52 53 // GetNameOk returns a tuple with the Name field value if set, nil otherwise 54 // and a boolean to check if the value has been set. 55 func (o *DeviceModelUpdateRequest) GetNameOk() (*string, bool) { 56 if o == nil || o.Name == nil { 57 return nil, false 58 } 59 return o.Name, true 60 } 61 62 // HasName returns a boolean if a field has been set. 63 func (o *DeviceModelUpdateRequest) HasName() bool { 64 if o != nil && o.Name != nil { 65 return true 66 } 67 68 return false 69 } 70 71 // SetName gets a reference to the given string and assigns it to the Name field. 72 func (o *DeviceModelUpdateRequest) SetName(v string) { 73 o.Name = &v 74 } 75 76 // GetResourceOwnerId returns the ResourceOwnerId field value if set, zero value otherwise. 77 func (o *DeviceModelUpdateRequest) GetResourceOwnerId() string { 78 if o == nil || o.ResourceOwnerId == nil { 79 var ret string 80 return ret 81 } 82 return *o.ResourceOwnerId 83 } 84 85 // GetResourceOwnerIdOk returns a tuple with the ResourceOwnerId field value if set, nil otherwise 86 // and a boolean to check if the value has been set. 87 func (o *DeviceModelUpdateRequest) GetResourceOwnerIdOk() (*string, bool) { 88 if o == nil || o.ResourceOwnerId == nil { 89 return nil, false 90 } 91 return o.ResourceOwnerId, true 92 } 93 94 // HasResourceOwnerId returns a boolean if a field has been set. 95 func (o *DeviceModelUpdateRequest) HasResourceOwnerId() bool { 96 if o != nil && o.ResourceOwnerId != nil { 97 return true 98 } 99 100 return false 101 } 102 103 // SetResourceOwnerId gets a reference to the given string and assigns it to the ResourceOwnerId field. 104 func (o *DeviceModelUpdateRequest) SetResourceOwnerId(v string) { 105 o.ResourceOwnerId = &v 106 } 107 108 // GetMakerId returns the MakerId field value if set, zero value otherwise. 109 func (o *DeviceModelUpdateRequest) GetMakerId() string { 110 if o == nil || o.MakerId == nil { 111 var ret string 112 return ret 113 } 114 return *o.MakerId 115 } 116 117 // GetMakerIdOk returns a tuple with the MakerId field value if set, nil otherwise 118 // and a boolean to check if the value has been set. 119 func (o *DeviceModelUpdateRequest) GetMakerIdOk() (*string, bool) { 120 if o == nil || o.MakerId == nil { 121 return nil, false 122 } 123 return o.MakerId, true 124 } 125 126 // HasMakerId returns a boolean if a field has been set. 127 func (o *DeviceModelUpdateRequest) HasMakerId() bool { 128 if o != nil && o.MakerId != nil { 129 return true 130 } 131 132 return false 133 } 134 135 // SetMakerId gets a reference to the given string and assigns it to the MakerId field. 136 func (o *DeviceModelUpdateRequest) SetMakerId(v string) { 137 o.MakerId = &v 138 } 139 140 // GetVersion returns the Version field value if set, zero value otherwise. 141 func (o *DeviceModelUpdateRequest) GetVersion() string { 142 if o == nil || o.Version == nil { 143 var ret string 144 return ret 145 } 146 return *o.Version 147 } 148 149 // GetVersionOk returns a tuple with the Version field value if set, nil otherwise 150 // and a boolean to check if the value has been set. 151 func (o *DeviceModelUpdateRequest) GetVersionOk() (*string, bool) { 152 if o == nil || o.Version == nil { 153 return nil, false 154 } 155 return o.Version, true 156 } 157 158 // HasVersion returns a boolean if a field has been set. 159 func (o *DeviceModelUpdateRequest) HasVersion() bool { 160 if o != nil && o.Version != nil { 161 return true 162 } 163 164 return false 165 } 166 167 // SetVersion gets a reference to the given string and assigns it to the Version field. 168 func (o *DeviceModelUpdateRequest) SetVersion(v string) { 169 o.Version = &v 170 } 171 172 // GetWatch returns the Watch field value if set, zero value otherwise. 173 func (o *DeviceModelUpdateRequest) GetWatch() DeviceModelUpdateRequestWatch { 174 if o == nil || o.Watch == nil { 175 var ret DeviceModelUpdateRequestWatch 176 return ret 177 } 178 return *o.Watch 179 } 180 181 // GetWatchOk returns a tuple with the Watch field value if set, nil otherwise 182 // and a boolean to check if the value has been set. 183 func (o *DeviceModelUpdateRequest) GetWatchOk() (*DeviceModelUpdateRequestWatch, bool) { 184 if o == nil || o.Watch == nil { 185 return nil, false 186 } 187 return o.Watch, true 188 } 189 190 // HasWatch returns a boolean if a field has been set. 191 func (o *DeviceModelUpdateRequest) HasWatch() bool { 192 if o != nil && o.Watch != nil { 193 return true 194 } 195 196 return false 197 } 198 199 // SetWatch gets a reference to the given DeviceModelUpdateRequestWatch and assigns it to the Watch field. 200 func (o *DeviceModelUpdateRequest) SetWatch(v DeviceModelUpdateRequestWatch) { 201 o.Watch = &v 202 } 203 204 // GetComponents returns the Components field value if set, zero value otherwise. 205 func (o *DeviceModelUpdateRequest) GetComponents() []ConstitutionComponent { 206 if o == nil || o.Components == nil { 207 var ret []ConstitutionComponent 208 return ret 209 } 210 return *o.Components 211 } 212 213 // GetComponentsOk returns a tuple with the Components field value if set, nil otherwise 214 // and a boolean to check if the value has been set. 215 func (o *DeviceModelUpdateRequest) GetComponentsOk() (*[]ConstitutionComponent, bool) { 216 if o == nil || o.Components == nil { 217 return nil, false 218 } 219 return o.Components, true 220 } 221 222 // HasComponents returns a boolean if a field has been set. 223 func (o *DeviceModelUpdateRequest) HasComponents() bool { 224 if o != nil && o.Components != nil { 225 return true 226 } 227 228 return false 229 } 230 231 // SetComponents gets a reference to the given []ConstitutionComponent and assigns it to the Components field. 232 func (o *DeviceModelUpdateRequest) SetComponents(v []ConstitutionComponent) { 233 o.Components = &v 234 } 235 236 func (o DeviceModelUpdateRequest) MarshalJSON() ([]byte, error) { 237 toSerialize := map[string]interface{}{} 238 if o.Name != nil { 239 toSerialize["name"] = o.Name 240 } 241 if o.ResourceOwnerId != nil { 242 toSerialize["resource_owner_id"] = o.ResourceOwnerId 243 } 244 if o.MakerId != nil { 245 toSerialize["maker_id"] = o.MakerId 246 } 247 if o.Version != nil { 248 toSerialize["version"] = o.Version 249 } 250 if o.Watch != nil { 251 toSerialize["watch"] = o.Watch 252 } 253 if o.Components != nil { 254 toSerialize["components"] = o.Components 255 } 256 return json.Marshal(toSerialize) 257 } 258 259 type NullableDeviceModelUpdateRequest struct { 260 value *DeviceModelUpdateRequest 261 isSet bool 262 } 263 264 func (v NullableDeviceModelUpdateRequest) Get() *DeviceModelUpdateRequest { 265 return v.value 266 } 267 268 func (v *NullableDeviceModelUpdateRequest) Set(val *DeviceModelUpdateRequest) { 269 v.value = val 270 v.isSet = true 271 } 272 273 func (v NullableDeviceModelUpdateRequest) IsSet() bool { 274 return v.isSet 275 } 276 277 func (v *NullableDeviceModelUpdateRequest) Unset() { 278 v.value = nil 279 v.isSet = false 280 } 281 282 func NewNullableDeviceModelUpdateRequest(val *DeviceModelUpdateRequest) *NullableDeviceModelUpdateRequest { 283 return &NullableDeviceModelUpdateRequest{value: val, isSet: true} 284 } 285 286 func (v NullableDeviceModelUpdateRequest) MarshalJSON() ([]byte, error) { 287 return json.Marshal(v.value) 288 } 289 290 func (v *NullableDeviceModelUpdateRequest) UnmarshalJSON(src []byte) error { 291 v.isSet = true 292 return json.Unmarshal(src, &v.value) 293 } 294 295