github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_series_data_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  // SeriesDataLocation デバイス位置情報。コレクションの定義に依存。schema.location_typeが”POINT“の場合必須、”NONE”の場合はlocationをリクエストに含めることはできない
    18  type SeriesDataLocation struct {
    19  	// Point固定
    20  	Type string `json:"type"`
    21  	Coordinates []float32 `json:"coordinates"`
    22  }
    23  
    24  // NewSeriesDataLocation instantiates a new SeriesDataLocation object
    25  // This constructor will assign default values to properties that have it defined,
    26  // and makes sure properties required by API are set, but the set of arguments
    27  // will change when the set of required properties is changed
    28  func NewSeriesDataLocation(type_ string, coordinates []float32, ) *SeriesDataLocation {
    29  	this := SeriesDataLocation{}
    30  	this.Type = type_
    31  	this.Coordinates = coordinates
    32  	return &this
    33  }
    34  
    35  // NewSeriesDataLocationWithDefaults instantiates a new SeriesDataLocation object
    36  // This constructor will only assign default values to properties that have it defined,
    37  // but it doesn't guarantee that properties required by API are set
    38  func NewSeriesDataLocationWithDefaults() *SeriesDataLocation {
    39  	this := SeriesDataLocation{}
    40  	return &this
    41  }
    42  
    43  // GetType returns the Type field value
    44  func (o *SeriesDataLocation) GetType() string {
    45  	if o == nil  {
    46  		var ret string
    47  		return ret
    48  	}
    49  
    50  	return o.Type
    51  }
    52  
    53  // GetTypeOk returns a tuple with the Type field value
    54  // and a boolean to check if the value has been set.
    55  func (o *SeriesDataLocation) GetTypeOk() (*string, bool) {
    56  	if o == nil  {
    57  		return nil, false
    58  	}
    59  	return &o.Type, true
    60  }
    61  
    62  // SetType sets field value
    63  func (o *SeriesDataLocation) SetType(v string) {
    64  	o.Type = v
    65  }
    66  
    67  // GetCoordinates returns the Coordinates field value
    68  func (o *SeriesDataLocation) GetCoordinates() []float32 {
    69  	if o == nil  {
    70  		var ret []float32
    71  		return ret
    72  	}
    73  
    74  	return o.Coordinates
    75  }
    76  
    77  // GetCoordinatesOk returns a tuple with the Coordinates field value
    78  // and a boolean to check if the value has been set.
    79  func (o *SeriesDataLocation) GetCoordinatesOk() (*[]float32, bool) {
    80  	if o == nil  {
    81  		return nil, false
    82  	}
    83  	return &o.Coordinates, true
    84  }
    85  
    86  // SetCoordinates sets field value
    87  func (o *SeriesDataLocation) SetCoordinates(v []float32) {
    88  	o.Coordinates = v
    89  }
    90  
    91  func (o SeriesDataLocation) MarshalJSON() ([]byte, error) {
    92  	toSerialize := map[string]interface{}{}
    93  	if true {
    94  		toSerialize["type"] = o.Type
    95  	}
    96  	if true {
    97  		toSerialize["coordinates"] = o.Coordinates
    98  	}
    99  	return json.Marshal(toSerialize)
   100  }
   101  
   102  type NullableSeriesDataLocation struct {
   103  	value *SeriesDataLocation
   104  	isSet bool
   105  }
   106  
   107  func (v NullableSeriesDataLocation) Get() *SeriesDataLocation {
   108  	return v.value
   109  }
   110  
   111  func (v *NullableSeriesDataLocation) Set(val *SeriesDataLocation) {
   112  	v.value = val
   113  	v.isSet = true
   114  }
   115  
   116  func (v NullableSeriesDataLocation) IsSet() bool {
   117  	return v.isSet
   118  }
   119  
   120  func (v *NullableSeriesDataLocation) Unset() {
   121  	v.value = nil
   122  	v.isSet = false
   123  }
   124  
   125  func NewNullableSeriesDataLocation(val *SeriesDataLocation) *NullableSeriesDataLocation {
   126  	return &NullableSeriesDataLocation{value: val, isSet: true}
   127  }
   128  
   129  func (v NullableSeriesDataLocation) MarshalJSON() ([]byte, error) {
   130  	return json.Marshal(v.value)
   131  }
   132  
   133  func (v *NullableSeriesDataLocation) UnmarshalJSON(src []byte) error {
   134  	v.isSet = true
   135  	return json.Unmarshal(src, &v.value)
   136  }
   137  
   138