github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_device_entities_component_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 // DeviceEntitiesComponentUpdateRequest struct for DeviceEntitiesComponentUpdateRequest 18 type DeviceEntitiesComponentUpdateRequest struct { 19 Type *string `json:"type,omitempty"` 20 ParentId *string `json:"parent_id,omitempty"` 21 Attribute *map[string]interface{} `json:"attribute,omitempty"` 22 DisplayInfo *DisplayInfo `json:"display_info,omitempty"` 23 } 24 25 // NewDeviceEntitiesComponentUpdateRequest instantiates a new DeviceEntitiesComponentUpdateRequest object 26 // This constructor will assign default values to properties that have it defined, 27 // and makes sure properties required by API are set, but the set of arguments 28 // will change when the set of required properties is changed 29 func NewDeviceEntitiesComponentUpdateRequest() *DeviceEntitiesComponentUpdateRequest { 30 this := DeviceEntitiesComponentUpdateRequest{} 31 return &this 32 } 33 34 // NewDeviceEntitiesComponentUpdateRequestWithDefaults instantiates a new DeviceEntitiesComponentUpdateRequest object 35 // This constructor will only assign default values to properties that have it defined, 36 // but it doesn't guarantee that properties required by API are set 37 func NewDeviceEntitiesComponentUpdateRequestWithDefaults() *DeviceEntitiesComponentUpdateRequest { 38 this := DeviceEntitiesComponentUpdateRequest{} 39 return &this 40 } 41 42 // GetType returns the Type field value if set, zero value otherwise. 43 func (o *DeviceEntitiesComponentUpdateRequest) GetType() string { 44 if o == nil || o.Type == nil { 45 var ret string 46 return ret 47 } 48 return *o.Type 49 } 50 51 // GetTypeOk returns a tuple with the Type field value if set, nil otherwise 52 // and a boolean to check if the value has been set. 53 func (o *DeviceEntitiesComponentUpdateRequest) GetTypeOk() (*string, bool) { 54 if o == nil || o.Type == nil { 55 return nil, false 56 } 57 return o.Type, true 58 } 59 60 // HasType returns a boolean if a field has been set. 61 func (o *DeviceEntitiesComponentUpdateRequest) HasType() bool { 62 if o != nil && o.Type != nil { 63 return true 64 } 65 66 return false 67 } 68 69 // SetType gets a reference to the given string and assigns it to the Type field. 70 func (o *DeviceEntitiesComponentUpdateRequest) SetType(v string) { 71 o.Type = &v 72 } 73 74 // GetParentId returns the ParentId field value if set, zero value otherwise. 75 func (o *DeviceEntitiesComponentUpdateRequest) GetParentId() string { 76 if o == nil || o.ParentId == nil { 77 var ret string 78 return ret 79 } 80 return *o.ParentId 81 } 82 83 // GetParentIdOk returns a tuple with the ParentId field value if set, nil otherwise 84 // and a boolean to check if the value has been set. 85 func (o *DeviceEntitiesComponentUpdateRequest) GetParentIdOk() (*string, bool) { 86 if o == nil || o.ParentId == nil { 87 return nil, false 88 } 89 return o.ParentId, true 90 } 91 92 // HasParentId returns a boolean if a field has been set. 93 func (o *DeviceEntitiesComponentUpdateRequest) HasParentId() bool { 94 if o != nil && o.ParentId != nil { 95 return true 96 } 97 98 return false 99 } 100 101 // SetParentId gets a reference to the given string and assigns it to the ParentId field. 102 func (o *DeviceEntitiesComponentUpdateRequest) SetParentId(v string) { 103 o.ParentId = &v 104 } 105 106 // GetAttribute returns the Attribute field value if set, zero value otherwise. 107 func (o *DeviceEntitiesComponentUpdateRequest) GetAttribute() map[string]interface{} { 108 if o == nil || o.Attribute == nil { 109 var ret map[string]interface{} 110 return ret 111 } 112 return *o.Attribute 113 } 114 115 // GetAttributeOk returns a tuple with the Attribute field value if set, nil otherwise 116 // and a boolean to check if the value has been set. 117 func (o *DeviceEntitiesComponentUpdateRequest) GetAttributeOk() (*map[string]interface{}, bool) { 118 if o == nil || o.Attribute == nil { 119 return nil, false 120 } 121 return o.Attribute, true 122 } 123 124 // HasAttribute returns a boolean if a field has been set. 125 func (o *DeviceEntitiesComponentUpdateRequest) HasAttribute() bool { 126 if o != nil && o.Attribute != nil { 127 return true 128 } 129 130 return false 131 } 132 133 // SetAttribute gets a reference to the given map[string]interface{} and assigns it to the Attribute field. 134 func (o *DeviceEntitiesComponentUpdateRequest) SetAttribute(v map[string]interface{}) { 135 o.Attribute = &v 136 } 137 138 // GetDisplayInfo returns the DisplayInfo field value if set, zero value otherwise. 139 func (o *DeviceEntitiesComponentUpdateRequest) GetDisplayInfo() DisplayInfo { 140 if o == nil || o.DisplayInfo == nil { 141 var ret DisplayInfo 142 return ret 143 } 144 return *o.DisplayInfo 145 } 146 147 // GetDisplayInfoOk returns a tuple with the DisplayInfo field value if set, nil otherwise 148 // and a boolean to check if the value has been set. 149 func (o *DeviceEntitiesComponentUpdateRequest) GetDisplayInfoOk() (*DisplayInfo, bool) { 150 if o == nil || o.DisplayInfo == nil { 151 return nil, false 152 } 153 return o.DisplayInfo, true 154 } 155 156 // HasDisplayInfo returns a boolean if a field has been set. 157 func (o *DeviceEntitiesComponentUpdateRequest) HasDisplayInfo() bool { 158 if o != nil && o.DisplayInfo != nil { 159 return true 160 } 161 162 return false 163 } 164 165 // SetDisplayInfo gets a reference to the given DisplayInfo and assigns it to the DisplayInfo field. 166 func (o *DeviceEntitiesComponentUpdateRequest) SetDisplayInfo(v DisplayInfo) { 167 o.DisplayInfo = &v 168 } 169 170 func (o DeviceEntitiesComponentUpdateRequest) MarshalJSON() ([]byte, error) { 171 toSerialize := map[string]interface{}{} 172 if o.Type != nil { 173 toSerialize["type"] = o.Type 174 } 175 if o.ParentId != nil { 176 toSerialize["parent_id"] = o.ParentId 177 } 178 if o.Attribute != nil { 179 toSerialize["attribute"] = o.Attribute 180 } 181 if o.DisplayInfo != nil { 182 toSerialize["display_info"] = o.DisplayInfo 183 } 184 return json.Marshal(toSerialize) 185 } 186 187 type NullableDeviceEntitiesComponentUpdateRequest struct { 188 value *DeviceEntitiesComponentUpdateRequest 189 isSet bool 190 } 191 192 func (v NullableDeviceEntitiesComponentUpdateRequest) Get() *DeviceEntitiesComponentUpdateRequest { 193 return v.value 194 } 195 196 func (v *NullableDeviceEntitiesComponentUpdateRequest) Set(val *DeviceEntitiesComponentUpdateRequest) { 197 v.value = val 198 v.isSet = true 199 } 200 201 func (v NullableDeviceEntitiesComponentUpdateRequest) IsSet() bool { 202 return v.isSet 203 } 204 205 func (v *NullableDeviceEntitiesComponentUpdateRequest) Unset() { 206 v.value = nil 207 v.isSet = false 208 } 209 210 func NewNullableDeviceEntitiesComponentUpdateRequest(val *DeviceEntitiesComponentUpdateRequest) *NullableDeviceEntitiesComponentUpdateRequest { 211 return &NullableDeviceEntitiesComponentUpdateRequest{value: val, isSet: true} 212 } 213 214 func (v NullableDeviceEntitiesComponentUpdateRequest) MarshalJSON() ([]byte, error) { 215 return json.Marshal(v.value) 216 } 217 218 func (v *NullableDeviceEntitiesComponentUpdateRequest) UnmarshalJSON(src []byte) error { 219 v.isSet = true 220 return json.Unmarshal(src, &v.value) 221 } 222 223