github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_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 // Watch struct for Watch 18 type Watch struct { 19 Types map[string]interface{} `json:"types,omitempty"` 20 ComponentIds map[string]interface{} `json:"component_ids,omitempty"` 21 } 22 23 // NewWatch instantiates a new Watch 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 NewWatch() *Watch { 28 this := Watch{} 29 return &this 30 } 31 32 // NewWatchWithDefaults instantiates a new Watch 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 NewWatchWithDefaults() *Watch { 36 this := Watch{} 37 return &this 38 } 39 40 // GetTypes returns the Types field value if set, zero value otherwise (both if not set or set to explicit null). 41 func (o *Watch) GetTypes() map[string]interface{} { 42 if o == nil { 43 var ret map[string]interface{} 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 // NOTE: If the value is an explicit nil, `nil, true` will be returned 52 func (o *Watch) GetTypesOk() (*map[string]interface{}, bool) { 53 if o == nil || o.Types == nil { 54 return nil, false 55 } 56 return &o.Types, true 57 } 58 59 // HasTypes returns a boolean if a field has been set. 60 func (o *Watch) HasTypes() bool { 61 if o != nil && o.Types != nil { 62 return true 63 } 64 65 return false 66 } 67 68 // SetTypes gets a reference to the given map[string]interface{} and assigns it to the Types field. 69 func (o *Watch) SetTypes(v map[string]interface{}) { 70 o.Types = v 71 } 72 73 // GetComponentIds returns the ComponentIds field value if set, zero value otherwise (both if not set or set to explicit null). 74 func (o *Watch) GetComponentIds() map[string]interface{} { 75 if o == nil { 76 var ret map[string]interface{} 77 return ret 78 } 79 return o.ComponentIds 80 } 81 82 // GetComponentIdsOk returns a tuple with the ComponentIds field value if set, nil otherwise 83 // and a boolean to check if the value has been set. 84 // NOTE: If the value is an explicit nil, `nil, true` will be returned 85 func (o *Watch) GetComponentIdsOk() (*map[string]interface{}, bool) { 86 if o == nil || o.ComponentIds == nil { 87 return nil, false 88 } 89 return &o.ComponentIds, true 90 } 91 92 // HasComponentIds returns a boolean if a field has been set. 93 func (o *Watch) HasComponentIds() bool { 94 if o != nil && o.ComponentIds != nil { 95 return true 96 } 97 98 return false 99 } 100 101 // SetComponentIds gets a reference to the given map[string]interface{} and assigns it to the ComponentIds field. 102 func (o *Watch) SetComponentIds(v map[string]interface{}) { 103 o.ComponentIds = v 104 } 105 106 func (o Watch) MarshalJSON() ([]byte, error) { 107 toSerialize := map[string]interface{}{} 108 if o.Types != nil { 109 toSerialize["types"] = o.Types 110 } 111 if o.ComponentIds != nil { 112 toSerialize["component_ids"] = o.ComponentIds 113 } 114 return json.Marshal(toSerialize) 115 } 116 117 type NullableWatch struct { 118 value *Watch 119 isSet bool 120 } 121 122 func (v NullableWatch) Get() *Watch { 123 return v.value 124 } 125 126 func (v *NullableWatch) Set(val *Watch) { 127 v.value = val 128 v.isSet = true 129 } 130 131 func (v NullableWatch) IsSet() bool { 132 return v.isSet 133 } 134 135 func (v *NullableWatch) Unset() { 136 v.value = nil 137 v.isSet = false 138 } 139 140 func NewNullableWatch(val *Watch) *NullableWatch { 141 return &NullableWatch{value: val, isSet: true} 142 } 143 144 func (v NullableWatch) MarshalJSON() ([]byte, error) { 145 return json.Marshal(v.value) 146 } 147 148 func (v *NullableWatch) UnmarshalJSON(src []byte) error { 149 v.isSet = true 150 return json.Unmarshal(src, &v.value) 151 } 152 153