github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_single_device_entities_component.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 // SingleDeviceEntitiesComponent struct for SingleDeviceEntitiesComponent 18 type SingleDeviceEntitiesComponent struct { 19 Component NullableDeviceEntitiesComponent `json:"component"` 20 } 21 22 // NewSingleDeviceEntitiesComponent instantiates a new SingleDeviceEntitiesComponent object 23 // This constructor will assign default values to properties that have it defined, 24 // and makes sure properties required by API are set, but the set of arguments 25 // will change when the set of required properties is changed 26 func NewSingleDeviceEntitiesComponent(component NullableDeviceEntitiesComponent, ) *SingleDeviceEntitiesComponent { 27 this := SingleDeviceEntitiesComponent{} 28 this.Component = component 29 return &this 30 } 31 32 // NewSingleDeviceEntitiesComponentWithDefaults instantiates a new SingleDeviceEntitiesComponent 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 NewSingleDeviceEntitiesComponentWithDefaults() *SingleDeviceEntitiesComponent { 36 this := SingleDeviceEntitiesComponent{} 37 return &this 38 } 39 40 // GetComponent returns the Component field value 41 // If the value is explicit nil, the zero value for DeviceEntitiesComponent will be returned 42 func (o *SingleDeviceEntitiesComponent) GetComponent() DeviceEntitiesComponent { 43 if o == nil || o.Component.Get() == nil { 44 var ret DeviceEntitiesComponent 45 return ret 46 } 47 48 return *o.Component.Get() 49 } 50 51 // GetComponentOk returns a tuple with the Component field value 52 // and a boolean to check if the value has been set. 53 // NOTE: If the value is an explicit nil, `nil, true` will be returned 54 func (o *SingleDeviceEntitiesComponent) GetComponentOk() (*DeviceEntitiesComponent, bool) { 55 if o == nil { 56 return nil, false 57 } 58 return o.Component.Get(), o.Component.IsSet() 59 } 60 61 // SetComponent sets field value 62 func (o *SingleDeviceEntitiesComponent) SetComponent(v DeviceEntitiesComponent) { 63 o.Component.Set(&v) 64 } 65 66 func (o SingleDeviceEntitiesComponent) MarshalJSON() ([]byte, error) { 67 toSerialize := map[string]interface{}{} 68 if true { 69 toSerialize["component"] = o.Component.Get() 70 } 71 return json.Marshal(toSerialize) 72 } 73 74 type NullableSingleDeviceEntitiesComponent struct { 75 value *SingleDeviceEntitiesComponent 76 isSet bool 77 } 78 79 func (v NullableSingleDeviceEntitiesComponent) Get() *SingleDeviceEntitiesComponent { 80 return v.value 81 } 82 83 func (v *NullableSingleDeviceEntitiesComponent) Set(val *SingleDeviceEntitiesComponent) { 84 v.value = val 85 v.isSet = true 86 } 87 88 func (v NullableSingleDeviceEntitiesComponent) IsSet() bool { 89 return v.isSet 90 } 91 92 func (v *NullableSingleDeviceEntitiesComponent) Unset() { 93 v.value = nil 94 v.isSet = false 95 } 96 97 func NewNullableSingleDeviceEntitiesComponent(val *SingleDeviceEntitiesComponent) *NullableSingleDeviceEntitiesComponent { 98 return &NullableSingleDeviceEntitiesComponent{value: val, isSet: true} 99 } 100 101 func (v NullableSingleDeviceEntitiesComponent) MarshalJSON() ([]byte, error) { 102 return json.Marshal(v.value) 103 } 104 105 func (v *NullableSingleDeviceEntitiesComponent) UnmarshalJSON(src []byte) error { 106 v.isSet = true 107 return json.Unmarshal(src, &v.value) 108 } 109 110