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