github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_device_model_update_request_watch.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 // DeviceModelUpdateRequestWatch struct for DeviceModelUpdateRequestWatch 18 type DeviceModelUpdateRequestWatch struct { 19 Types *DeviceModelUpdateRequestWatchTypes `json:"types,omitempty"` 20 ComponentIds *map[string]interface{} `json:"component_ids,omitempty"` 21 } 22 23 // NewDeviceModelUpdateRequestWatch instantiates a new DeviceModelUpdateRequestWatch object 24 // This constructor will assign default values to properties that have it defined, 25 // and makes sure properties required by API are set, but the set of arguments 26 // will change when the set of required properties is changed 27 func NewDeviceModelUpdateRequestWatch() *DeviceModelUpdateRequestWatch { 28 this := DeviceModelUpdateRequestWatch{} 29 return &this 30 } 31 32 // NewDeviceModelUpdateRequestWatchWithDefaults instantiates a new DeviceModelUpdateRequestWatch object 33 // This constructor will only assign default values to properties that have it defined, 34 // but it doesn't guarantee that properties required by API are set 35 func NewDeviceModelUpdateRequestWatchWithDefaults() *DeviceModelUpdateRequestWatch { 36 this := DeviceModelUpdateRequestWatch{} 37 return &this 38 } 39 40 // GetTypes returns the Types field value if set, zero value otherwise. 41 func (o *DeviceModelUpdateRequestWatch) GetTypes() DeviceModelUpdateRequestWatchTypes { 42 if o == nil || o.Types == nil { 43 var ret DeviceModelUpdateRequestWatchTypes 44 return ret 45 } 46 return *o.Types 47 } 48 49 // GetTypesOk returns a tuple with the Types field value if set, nil otherwise 50 // and a boolean to check if the value has been set. 51 func (o *DeviceModelUpdateRequestWatch) GetTypesOk() (*DeviceModelUpdateRequestWatchTypes, bool) { 52 if o == nil || o.Types == nil { 53 return nil, false 54 } 55 return o.Types, true 56 } 57 58 // HasTypes returns a boolean if a field has been set. 59 func (o *DeviceModelUpdateRequestWatch) HasTypes() bool { 60 if o != nil && o.Types != nil { 61 return true 62 } 63 64 return false 65 } 66 67 // SetTypes gets a reference to the given DeviceModelUpdateRequestWatchTypes and assigns it to the Types field. 68 func (o *DeviceModelUpdateRequestWatch) SetTypes(v DeviceModelUpdateRequestWatchTypes) { 69 o.Types = &v 70 } 71 72 // GetComponentIds returns the ComponentIds field value if set, zero value otherwise. 73 func (o *DeviceModelUpdateRequestWatch) GetComponentIds() map[string]interface{} { 74 if o == nil || o.ComponentIds == nil { 75 var ret map[string]interface{} 76 return ret 77 } 78 return *o.ComponentIds 79 } 80 81 // GetComponentIdsOk returns a tuple with the ComponentIds field value if set, nil otherwise 82 // and a boolean to check if the value has been set. 83 func (o *DeviceModelUpdateRequestWatch) GetComponentIdsOk() (*map[string]interface{}, bool) { 84 if o == nil || o.ComponentIds == nil { 85 return nil, false 86 } 87 return o.ComponentIds, true 88 } 89 90 // HasComponentIds returns a boolean if a field has been set. 91 func (o *DeviceModelUpdateRequestWatch) HasComponentIds() bool { 92 if o != nil && o.ComponentIds != nil { 93 return true 94 } 95 96 return false 97 } 98 99 // SetComponentIds gets a reference to the given map[string]interface{} and assigns it to the ComponentIds field. 100 func (o *DeviceModelUpdateRequestWatch) SetComponentIds(v map[string]interface{}) { 101 o.ComponentIds = &v 102 } 103 104 func (o DeviceModelUpdateRequestWatch) MarshalJSON() ([]byte, error) { 105 toSerialize := map[string]interface{}{} 106 if o.Types != nil { 107 toSerialize["types"] = o.Types 108 } 109 if o.ComponentIds != nil { 110 toSerialize["component_ids"] = o.ComponentIds 111 } 112 return json.Marshal(toSerialize) 113 } 114 115 type NullableDeviceModelUpdateRequestWatch struct { 116 value *DeviceModelUpdateRequestWatch 117 isSet bool 118 } 119 120 func (v NullableDeviceModelUpdateRequestWatch) Get() *DeviceModelUpdateRequestWatch { 121 return v.value 122 } 123 124 func (v *NullableDeviceModelUpdateRequestWatch) Set(val *DeviceModelUpdateRequestWatch) { 125 v.value = val 126 v.isSet = true 127 } 128 129 func (v NullableDeviceModelUpdateRequestWatch) IsSet() bool { 130 return v.isSet 131 } 132 133 func (v *NullableDeviceModelUpdateRequestWatch) Unset() { 134 v.value = nil 135 v.isSet = false 136 } 137 138 func NewNullableDeviceModelUpdateRequestWatch(val *DeviceModelUpdateRequestWatch) *NullableDeviceModelUpdateRequestWatch { 139 return &NullableDeviceModelUpdateRequestWatch{value: val, isSet: true} 140 } 141 142 func (v NullableDeviceModelUpdateRequestWatch) MarshalJSON() ([]byte, error) { 143 return json.Marshal(v.value) 144 } 145 146 func (v *NullableDeviceModelUpdateRequestWatch) UnmarshalJSON(src []byte) error { 147 v.isSet = true 148 return json.Unmarshal(src, &v.value) 149 } 150 151