github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_circle.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 // Circle struct for Circle 18 type Circle struct { 19 Id *string `json:"id,omitempty"` 20 Name *string `json:"name,omitempty"` 21 Altitude *float32 `json:"altitude,omitempty"` 22 RadiusM *float32 `json:"radius_m,omitempty"` 23 Location *Location `json:"location,omitempty"` 24 Labels *[]Label `json:"labels,omitempty"` 25 Description *string `json:"description,omitempty"` 26 DisplayInfo *[]DisplayInfo `json:"display_info,omitempty"` 27 ResourceOwnerId *string `json:"resource_owner_id,omitempty"` 28 } 29 30 // NewCircle instantiates a new Circle object 31 // This constructor will assign default values to properties that have it defined, 32 // and makes sure properties required by API are set, but the set of arguments 33 // will change when the set of required properties is changed 34 func NewCircle() *Circle { 35 this := Circle{} 36 return &this 37 } 38 39 // NewCircleWithDefaults instantiates a new Circle object 40 // This constructor will only assign default values to properties that have it defined, 41 // but it doesn't guarantee that properties required by API are set 42 func NewCircleWithDefaults() *Circle { 43 this := Circle{} 44 return &this 45 } 46 47 // GetId returns the Id field value if set, zero value otherwise. 48 func (o *Circle) GetId() string { 49 if o == nil || o.Id == nil { 50 var ret string 51 return ret 52 } 53 return *o.Id 54 } 55 56 // GetIdOk returns a tuple with the Id field value if set, nil otherwise 57 // and a boolean to check if the value has been set. 58 func (o *Circle) GetIdOk() (*string, bool) { 59 if o == nil || o.Id == nil { 60 return nil, false 61 } 62 return o.Id, true 63 } 64 65 // HasId returns a boolean if a field has been set. 66 func (o *Circle) HasId() bool { 67 if o != nil && o.Id != nil { 68 return true 69 } 70 71 return false 72 } 73 74 // SetId gets a reference to the given string and assigns it to the Id field. 75 func (o *Circle) SetId(v string) { 76 o.Id = &v 77 } 78 79 // GetName returns the Name field value if set, zero value otherwise. 80 func (o *Circle) GetName() string { 81 if o == nil || o.Name == nil { 82 var ret string 83 return ret 84 } 85 return *o.Name 86 } 87 88 // GetNameOk returns a tuple with the Name field value if set, nil otherwise 89 // and a boolean to check if the value has been set. 90 func (o *Circle) GetNameOk() (*string, bool) { 91 if o == nil || o.Name == nil { 92 return nil, false 93 } 94 return o.Name, true 95 } 96 97 // HasName returns a boolean if a field has been set. 98 func (o *Circle) HasName() bool { 99 if o != nil && o.Name != nil { 100 return true 101 } 102 103 return false 104 } 105 106 // SetName gets a reference to the given string and assigns it to the Name field. 107 func (o *Circle) SetName(v string) { 108 o.Name = &v 109 } 110 111 // GetAltitude returns the Altitude field value if set, zero value otherwise. 112 func (o *Circle) GetAltitude() float32 { 113 if o == nil || o.Altitude == nil { 114 var ret float32 115 return ret 116 } 117 return *o.Altitude 118 } 119 120 // GetAltitudeOk returns a tuple with the Altitude field value if set, nil otherwise 121 // and a boolean to check if the value has been set. 122 func (o *Circle) GetAltitudeOk() (*float32, bool) { 123 if o == nil || o.Altitude == nil { 124 return nil, false 125 } 126 return o.Altitude, true 127 } 128 129 // HasAltitude returns a boolean if a field has been set. 130 func (o *Circle) HasAltitude() bool { 131 if o != nil && o.Altitude != nil { 132 return true 133 } 134 135 return false 136 } 137 138 // SetAltitude gets a reference to the given float32 and assigns it to the Altitude field. 139 func (o *Circle) SetAltitude(v float32) { 140 o.Altitude = &v 141 } 142 143 // GetRadiusM returns the RadiusM field value if set, zero value otherwise. 144 func (o *Circle) GetRadiusM() float32 { 145 if o == nil || o.RadiusM == nil { 146 var ret float32 147 return ret 148 } 149 return *o.RadiusM 150 } 151 152 // GetRadiusMOk returns a tuple with the RadiusM field value if set, nil otherwise 153 // and a boolean to check if the value has been set. 154 func (o *Circle) GetRadiusMOk() (*float32, bool) { 155 if o == nil || o.RadiusM == nil { 156 return nil, false 157 } 158 return o.RadiusM, true 159 } 160 161 // HasRadiusM returns a boolean if a field has been set. 162 func (o *Circle) HasRadiusM() bool { 163 if o != nil && o.RadiusM != nil { 164 return true 165 } 166 167 return false 168 } 169 170 // SetRadiusM gets a reference to the given float32 and assigns it to the RadiusM field. 171 func (o *Circle) SetRadiusM(v float32) { 172 o.RadiusM = &v 173 } 174 175 // GetLocation returns the Location field value if set, zero value otherwise. 176 func (o *Circle) GetLocation() Location { 177 if o == nil || o.Location == nil { 178 var ret Location 179 return ret 180 } 181 return *o.Location 182 } 183 184 // GetLocationOk returns a tuple with the Location field value if set, nil otherwise 185 // and a boolean to check if the value has been set. 186 func (o *Circle) GetLocationOk() (*Location, bool) { 187 if o == nil || o.Location == nil { 188 return nil, false 189 } 190 return o.Location, true 191 } 192 193 // HasLocation returns a boolean if a field has been set. 194 func (o *Circle) HasLocation() bool { 195 if o != nil && o.Location != nil { 196 return true 197 } 198 199 return false 200 } 201 202 // SetLocation gets a reference to the given Location and assigns it to the Location field. 203 func (o *Circle) SetLocation(v Location) { 204 o.Location = &v 205 } 206 207 // GetLabels returns the Labels field value if set, zero value otherwise. 208 func (o *Circle) GetLabels() []Label { 209 if o == nil || o.Labels == nil { 210 var ret []Label 211 return ret 212 } 213 return *o.Labels 214 } 215 216 // GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise 217 // and a boolean to check if the value has been set. 218 func (o *Circle) GetLabelsOk() (*[]Label, bool) { 219 if o == nil || o.Labels == nil { 220 return nil, false 221 } 222 return o.Labels, true 223 } 224 225 // HasLabels returns a boolean if a field has been set. 226 func (o *Circle) HasLabels() bool { 227 if o != nil && o.Labels != nil { 228 return true 229 } 230 231 return false 232 } 233 234 // SetLabels gets a reference to the given []Label and assigns it to the Labels field. 235 func (o *Circle) SetLabels(v []Label) { 236 o.Labels = &v 237 } 238 239 // GetDescription returns the Description field value if set, zero value otherwise. 240 func (o *Circle) GetDescription() string { 241 if o == nil || o.Description == nil { 242 var ret string 243 return ret 244 } 245 return *o.Description 246 } 247 248 // GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise 249 // and a boolean to check if the value has been set. 250 func (o *Circle) GetDescriptionOk() (*string, bool) { 251 if o == nil || o.Description == nil { 252 return nil, false 253 } 254 return o.Description, true 255 } 256 257 // HasDescription returns a boolean if a field has been set. 258 func (o *Circle) HasDescription() bool { 259 if o != nil && o.Description != nil { 260 return true 261 } 262 263 return false 264 } 265 266 // SetDescription gets a reference to the given string and assigns it to the Description field. 267 func (o *Circle) SetDescription(v string) { 268 o.Description = &v 269 } 270 271 // GetDisplayInfo returns the DisplayInfo field value if set, zero value otherwise. 272 func (o *Circle) GetDisplayInfo() []DisplayInfo { 273 if o == nil || o.DisplayInfo == nil { 274 var ret []DisplayInfo 275 return ret 276 } 277 return *o.DisplayInfo 278 } 279 280 // GetDisplayInfoOk returns a tuple with the DisplayInfo field value if set, nil otherwise 281 // and a boolean to check if the value has been set. 282 func (o *Circle) GetDisplayInfoOk() (*[]DisplayInfo, bool) { 283 if o == nil || o.DisplayInfo == nil { 284 return nil, false 285 } 286 return o.DisplayInfo, true 287 } 288 289 // HasDisplayInfo returns a boolean if a field has been set. 290 func (o *Circle) HasDisplayInfo() bool { 291 if o != nil && o.DisplayInfo != nil { 292 return true 293 } 294 295 return false 296 } 297 298 // SetDisplayInfo gets a reference to the given []DisplayInfo and assigns it to the DisplayInfo field. 299 func (o *Circle) SetDisplayInfo(v []DisplayInfo) { 300 o.DisplayInfo = &v 301 } 302 303 // GetResourceOwnerId returns the ResourceOwnerId field value if set, zero value otherwise. 304 func (o *Circle) GetResourceOwnerId() string { 305 if o == nil || o.ResourceOwnerId == nil { 306 var ret string 307 return ret 308 } 309 return *o.ResourceOwnerId 310 } 311 312 // GetResourceOwnerIdOk returns a tuple with the ResourceOwnerId field value if set, nil otherwise 313 // and a boolean to check if the value has been set. 314 func (o *Circle) GetResourceOwnerIdOk() (*string, bool) { 315 if o == nil || o.ResourceOwnerId == nil { 316 return nil, false 317 } 318 return o.ResourceOwnerId, true 319 } 320 321 // HasResourceOwnerId returns a boolean if a field has been set. 322 func (o *Circle) HasResourceOwnerId() bool { 323 if o != nil && o.ResourceOwnerId != nil { 324 return true 325 } 326 327 return false 328 } 329 330 // SetResourceOwnerId gets a reference to the given string and assigns it to the ResourceOwnerId field. 331 func (o *Circle) SetResourceOwnerId(v string) { 332 o.ResourceOwnerId = &v 333 } 334 335 func (o Circle) MarshalJSON() ([]byte, error) { 336 toSerialize := map[string]interface{}{} 337 if o.Id != nil { 338 toSerialize["id"] = o.Id 339 } 340 if o.Name != nil { 341 toSerialize["name"] = o.Name 342 } 343 if o.Altitude != nil { 344 toSerialize["altitude"] = o.Altitude 345 } 346 if o.RadiusM != nil { 347 toSerialize["radius_m"] = o.RadiusM 348 } 349 if o.Location != nil { 350 toSerialize["location"] = o.Location 351 } 352 if o.Labels != nil { 353 toSerialize["labels"] = o.Labels 354 } 355 if o.Description != nil { 356 toSerialize["description"] = o.Description 357 } 358 if o.DisplayInfo != nil { 359 toSerialize["display_info"] = o.DisplayInfo 360 } 361 if o.ResourceOwnerId != nil { 362 toSerialize["resource_owner_id"] = o.ResourceOwnerId 363 } 364 return json.Marshal(toSerialize) 365 } 366 367 type NullableCircle struct { 368 value *Circle 369 isSet bool 370 } 371 372 func (v NullableCircle) Get() *Circle { 373 return v.value 374 } 375 376 func (v *NullableCircle) Set(val *Circle) { 377 v.value = val 378 v.isSet = true 379 } 380 381 func (v NullableCircle) IsSet() bool { 382 return v.isSet 383 } 384 385 func (v *NullableCircle) Unset() { 386 v.value = nil 387 v.isSet = false 388 } 389 390 func NewNullableCircle(val *Circle) *NullableCircle { 391 return &NullableCircle{value: val, isSet: true} 392 } 393 394 func (v NullableCircle) MarshalJSON() ([]byte, error) { 395 return json.Marshal(v.value) 396 } 397 398 func (v *NullableCircle) UnmarshalJSON(src []byte) error { 399 v.isSet = true 400 return json.Unmarshal(src, &v.value) 401 } 402 403