github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_collection_location.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 // CollectionLocation struct for CollectionLocation 18 type CollectionLocation struct { 19 Type string `json:"type"` 20 Coordinates []float32 `json:"coordinates"` 21 } 22 23 // NewCollectionLocation instantiates a new CollectionLocation 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 NewCollectionLocation(type_ string, coordinates []float32, ) *CollectionLocation { 28 this := CollectionLocation{} 29 this.Type = type_ 30 this.Coordinates = coordinates 31 return &this 32 } 33 34 // NewCollectionLocationWithDefaults instantiates a new CollectionLocation object 35 // This constructor will only assign default values to properties that have it defined, 36 // but it doesn't guarantee that properties required by API are set 37 func NewCollectionLocationWithDefaults() *CollectionLocation { 38 this := CollectionLocation{} 39 var type_ string = "Point" 40 this.Type = type_ 41 return &this 42 } 43 44 // GetType returns the Type field value 45 func (o *CollectionLocation) GetType() string { 46 if o == nil { 47 var ret string 48 return ret 49 } 50 51 return o.Type 52 } 53 54 // GetTypeOk returns a tuple with the Type field value 55 // and a boolean to check if the value has been set. 56 func (o *CollectionLocation) GetTypeOk() (*string, bool) { 57 if o == nil { 58 return nil, false 59 } 60 return &o.Type, true 61 } 62 63 // SetType sets field value 64 func (o *CollectionLocation) SetType(v string) { 65 o.Type = v 66 } 67 68 // GetCoordinates returns the Coordinates field value 69 func (o *CollectionLocation) GetCoordinates() []float32 { 70 if o == nil { 71 var ret []float32 72 return ret 73 } 74 75 return o.Coordinates 76 } 77 78 // GetCoordinatesOk returns a tuple with the Coordinates field value 79 // and a boolean to check if the value has been set. 80 func (o *CollectionLocation) GetCoordinatesOk() (*[]float32, bool) { 81 if o == nil { 82 return nil, false 83 } 84 return &o.Coordinates, true 85 } 86 87 // SetCoordinates sets field value 88 func (o *CollectionLocation) SetCoordinates(v []float32) { 89 o.Coordinates = v 90 } 91 92 func (o CollectionLocation) MarshalJSON() ([]byte, error) { 93 toSerialize := map[string]interface{}{} 94 if true { 95 toSerialize["type"] = o.Type 96 } 97 if true { 98 toSerialize["coordinates"] = o.Coordinates 99 } 100 return json.Marshal(toSerialize) 101 } 102 103 type NullableCollectionLocation struct { 104 value *CollectionLocation 105 isSet bool 106 } 107 108 func (v NullableCollectionLocation) Get() *CollectionLocation { 109 return v.value 110 } 111 112 func (v *NullableCollectionLocation) Set(val *CollectionLocation) { 113 v.value = val 114 v.isSet = true 115 } 116 117 func (v NullableCollectionLocation) IsSet() bool { 118 return v.isSet 119 } 120 121 func (v *NullableCollectionLocation) Unset() { 122 v.value = nil 123 v.isSet = false 124 } 125 126 func NewNullableCollectionLocation(val *CollectionLocation) *NullableCollectionLocation { 127 return &NullableCollectionLocation{value: val, isSet: true} 128 } 129 130 func (v NullableCollectionLocation) MarshalJSON() ([]byte, error) { 131 return json.Marshal(v.value) 132 } 133 134 func (v *NullableCollectionLocation) UnmarshalJSON(src []byte) error { 135 v.isSet = true 136 return json.Unmarshal(src, &v.value) 137 } 138 139