github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_collection_latest.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 // CollectionLatest struct for CollectionLatest 18 type CollectionLatest struct { 19 ResourceOwnerId *string `json:"resource_owner_id,omitempty"` 20 Location *CollectionLocation `json:"location,omitempty"` 21 Measurements *map[string]interface{} `json:"measurements,omitempty"` 22 SeriesId *string `json:"series_id,omitempty"` 23 Timestamp *string `json:"timestamp,omitempty"` 24 Image *string `json:"image,omitempty"` 25 ImageType *string `json:"image_type,omitempty"` 26 } 27 28 // NewCollectionLatest instantiates a new CollectionLatest object 29 // This constructor will assign default values to properties that have it defined, 30 // and makes sure properties required by API are set, but the set of arguments 31 // will change when the set of required properties is changed 32 func NewCollectionLatest() *CollectionLatest { 33 this := CollectionLatest{} 34 return &this 35 } 36 37 // NewCollectionLatestWithDefaults instantiates a new CollectionLatest object 38 // This constructor will only assign default values to properties that have it defined, 39 // but it doesn't guarantee that properties required by API are set 40 func NewCollectionLatestWithDefaults() *CollectionLatest { 41 this := CollectionLatest{} 42 return &this 43 } 44 45 // GetResourceOwnerId returns the ResourceOwnerId field value if set, zero value otherwise. 46 func (o *CollectionLatest) GetResourceOwnerId() string { 47 if o == nil || o.ResourceOwnerId == nil { 48 var ret string 49 return ret 50 } 51 return *o.ResourceOwnerId 52 } 53 54 // GetResourceOwnerIdOk returns a tuple with the ResourceOwnerId field value if set, nil otherwise 55 // and a boolean to check if the value has been set. 56 func (o *CollectionLatest) GetResourceOwnerIdOk() (*string, bool) { 57 if o == nil || o.ResourceOwnerId == nil { 58 return nil, false 59 } 60 return o.ResourceOwnerId, true 61 } 62 63 // HasResourceOwnerId returns a boolean if a field has been set. 64 func (o *CollectionLatest) HasResourceOwnerId() bool { 65 if o != nil && o.ResourceOwnerId != nil { 66 return true 67 } 68 69 return false 70 } 71 72 // SetResourceOwnerId gets a reference to the given string and assigns it to the ResourceOwnerId field. 73 func (o *CollectionLatest) SetResourceOwnerId(v string) { 74 o.ResourceOwnerId = &v 75 } 76 77 // GetLocation returns the Location field value if set, zero value otherwise. 78 func (o *CollectionLatest) GetLocation() CollectionLocation { 79 if o == nil || o.Location == nil { 80 var ret CollectionLocation 81 return ret 82 } 83 return *o.Location 84 } 85 86 // GetLocationOk returns a tuple with the Location field value if set, nil otherwise 87 // and a boolean to check if the value has been set. 88 func (o *CollectionLatest) GetLocationOk() (*CollectionLocation, bool) { 89 if o == nil || o.Location == nil { 90 return nil, false 91 } 92 return o.Location, true 93 } 94 95 // HasLocation returns a boolean if a field has been set. 96 func (o *CollectionLatest) HasLocation() bool { 97 if o != nil && o.Location != nil { 98 return true 99 } 100 101 return false 102 } 103 104 // SetLocation gets a reference to the given CollectionLocation and assigns it to the Location field. 105 func (o *CollectionLatest) SetLocation(v CollectionLocation) { 106 o.Location = &v 107 } 108 109 // GetMeasurements returns the Measurements field value if set, zero value otherwise. 110 func (o *CollectionLatest) GetMeasurements() map[string]interface{} { 111 if o == nil || o.Measurements == nil { 112 var ret map[string]interface{} 113 return ret 114 } 115 return *o.Measurements 116 } 117 118 // GetMeasurementsOk returns a tuple with the Measurements field value if set, nil otherwise 119 // and a boolean to check if the value has been set. 120 func (o *CollectionLatest) GetMeasurementsOk() (*map[string]interface{}, bool) { 121 if o == nil || o.Measurements == nil { 122 return nil, false 123 } 124 return o.Measurements, true 125 } 126 127 // HasMeasurements returns a boolean if a field has been set. 128 func (o *CollectionLatest) HasMeasurements() bool { 129 if o != nil && o.Measurements != nil { 130 return true 131 } 132 133 return false 134 } 135 136 // SetMeasurements gets a reference to the given map[string]interface{} and assigns it to the Measurements field. 137 func (o *CollectionLatest) SetMeasurements(v map[string]interface{}) { 138 o.Measurements = &v 139 } 140 141 // GetSeriesId returns the SeriesId field value if set, zero value otherwise. 142 func (o *CollectionLatest) GetSeriesId() string { 143 if o == nil || o.SeriesId == nil { 144 var ret string 145 return ret 146 } 147 return *o.SeriesId 148 } 149 150 // GetSeriesIdOk returns a tuple with the SeriesId field value if set, nil otherwise 151 // and a boolean to check if the value has been set. 152 func (o *CollectionLatest) GetSeriesIdOk() (*string, bool) { 153 if o == nil || o.SeriesId == nil { 154 return nil, false 155 } 156 return o.SeriesId, true 157 } 158 159 // HasSeriesId returns a boolean if a field has been set. 160 func (o *CollectionLatest) HasSeriesId() bool { 161 if o != nil && o.SeriesId != nil { 162 return true 163 } 164 165 return false 166 } 167 168 // SetSeriesId gets a reference to the given string and assigns it to the SeriesId field. 169 func (o *CollectionLatest) SetSeriesId(v string) { 170 o.SeriesId = &v 171 } 172 173 // GetTimestamp returns the Timestamp field value if set, zero value otherwise. 174 func (o *CollectionLatest) GetTimestamp() string { 175 if o == nil || o.Timestamp == nil { 176 var ret string 177 return ret 178 } 179 return *o.Timestamp 180 } 181 182 // GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise 183 // and a boolean to check if the value has been set. 184 func (o *CollectionLatest) GetTimestampOk() (*string, bool) { 185 if o == nil || o.Timestamp == nil { 186 return nil, false 187 } 188 return o.Timestamp, true 189 } 190 191 // HasTimestamp returns a boolean if a field has been set. 192 func (o *CollectionLatest) HasTimestamp() bool { 193 if o != nil && o.Timestamp != nil { 194 return true 195 } 196 197 return false 198 } 199 200 // SetTimestamp gets a reference to the given string and assigns it to the Timestamp field. 201 func (o *CollectionLatest) SetTimestamp(v string) { 202 o.Timestamp = &v 203 } 204 205 // GetImage returns the Image field value if set, zero value otherwise. 206 func (o *CollectionLatest) GetImage() string { 207 if o == nil || o.Image == nil { 208 var ret string 209 return ret 210 } 211 return *o.Image 212 } 213 214 // GetImageOk returns a tuple with the Image field value if set, nil otherwise 215 // and a boolean to check if the value has been set. 216 func (o *CollectionLatest) GetImageOk() (*string, bool) { 217 if o == nil || o.Image == nil { 218 return nil, false 219 } 220 return o.Image, true 221 } 222 223 // HasImage returns a boolean if a field has been set. 224 func (o *CollectionLatest) HasImage() bool { 225 if o != nil && o.Image != nil { 226 return true 227 } 228 229 return false 230 } 231 232 // SetImage gets a reference to the given string and assigns it to the Image field. 233 func (o *CollectionLatest) SetImage(v string) { 234 o.Image = &v 235 } 236 237 // GetImageType returns the ImageType field value if set, zero value otherwise. 238 func (o *CollectionLatest) GetImageType() string { 239 if o == nil || o.ImageType == nil { 240 var ret string 241 return ret 242 } 243 return *o.ImageType 244 } 245 246 // GetImageTypeOk returns a tuple with the ImageType field value if set, nil otherwise 247 // and a boolean to check if the value has been set. 248 func (o *CollectionLatest) GetImageTypeOk() (*string, bool) { 249 if o == nil || o.ImageType == nil { 250 return nil, false 251 } 252 return o.ImageType, true 253 } 254 255 // HasImageType returns a boolean if a field has been set. 256 func (o *CollectionLatest) HasImageType() bool { 257 if o != nil && o.ImageType != nil { 258 return true 259 } 260 261 return false 262 } 263 264 // SetImageType gets a reference to the given string and assigns it to the ImageType field. 265 func (o *CollectionLatest) SetImageType(v string) { 266 o.ImageType = &v 267 } 268 269 func (o CollectionLatest) MarshalJSON() ([]byte, error) { 270 toSerialize := map[string]interface{}{} 271 if o.ResourceOwnerId != nil { 272 toSerialize["resource_owner_id"] = o.ResourceOwnerId 273 } 274 if o.Location != nil { 275 toSerialize["location"] = o.Location 276 } 277 if o.Measurements != nil { 278 toSerialize["measurements"] = o.Measurements 279 } 280 if o.SeriesId != nil { 281 toSerialize["series_id"] = o.SeriesId 282 } 283 if o.Timestamp != nil { 284 toSerialize["timestamp"] = o.Timestamp 285 } 286 if o.Image != nil { 287 toSerialize["image"] = o.Image 288 } 289 if o.ImageType != nil { 290 toSerialize["image_type"] = o.ImageType 291 } 292 return json.Marshal(toSerialize) 293 } 294 295 type NullableCollectionLatest struct { 296 value *CollectionLatest 297 isSet bool 298 } 299 300 func (v NullableCollectionLatest) Get() *CollectionLatest { 301 return v.value 302 } 303 304 func (v *NullableCollectionLatest) Set(val *CollectionLatest) { 305 v.value = val 306 v.isSet = true 307 } 308 309 func (v NullableCollectionLatest) IsSet() bool { 310 return v.isSet 311 } 312 313 func (v *NullableCollectionLatest) Unset() { 314 v.value = nil 315 v.isSet = false 316 } 317 318 func NewNullableCollectionLatest(val *CollectionLatest) *NullableCollectionLatest { 319 return &NullableCollectionLatest{value: val, isSet: true} 320 } 321 322 func (v NullableCollectionLatest) MarshalJSON() ([]byte, error) { 323 return json.Marshal(v.value) 324 } 325 326 func (v *NullableCollectionLatest) UnmarshalJSON(src []byte) error { 327 v.isSet = true 328 return json.Unmarshal(src, &v.value) 329 } 330 331