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