github.com/optim-corp/cios-golang-sdk@v0.5.1/cios/model_series_data_location_unix.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  // SeriesDataLocationUnix struct for SeriesDataLocationUnix
    18  type SeriesDataLocationUnix struct {
    19  	Location NullableSeriesDataLocation `json:"location,omitempty"`
    20  	// 計測値。送信可能なプロパティはcollectionによって異なる。 collectionごとの定義は[Available Collections](./docs/available-collections.html)を参照。  以下の場合はリクエスト不正となる。 - collectionに定義されていないプロパティがmeasurementsに含まれる場合 - measurementsのJSON Objectのサイズが350KB以上の場合
    21  	Measurements *map[string]map[string]interface{} `json:"measurements,omitempty"`
    22  	Timestamp *string `json:"timestamp,omitempty"`
    23  }
    24  
    25  // NewSeriesDataLocationUnix instantiates a new SeriesDataLocationUnix object
    26  // This constructor will assign default values to properties that have it defined,
    27  // and makes sure properties required by API are set, but the set of arguments
    28  // will change when the set of required properties is changed
    29  func NewSeriesDataLocationUnix() *SeriesDataLocationUnix {
    30  	this := SeriesDataLocationUnix{}
    31  	return &this
    32  }
    33  
    34  // NewSeriesDataLocationUnixWithDefaults instantiates a new SeriesDataLocationUnix 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 NewSeriesDataLocationUnixWithDefaults() *SeriesDataLocationUnix {
    38  	this := SeriesDataLocationUnix{}
    39  	return &this
    40  }
    41  
    42  // GetLocation returns the Location field value if set, zero value otherwise (both if not set or set to explicit null).
    43  func (o *SeriesDataLocationUnix) GetLocation() SeriesDataLocation {
    44  	if o == nil || o.Location.Get() == nil {
    45  		var ret SeriesDataLocation
    46  		return ret
    47  	}
    48  	return *o.Location.Get()
    49  }
    50  
    51  // GetLocationOk returns a tuple with the Location field value if set, nil otherwise
    52  // and a boolean to check if the value has been set.
    53  // NOTE: If the value is an explicit nil, `nil, true` will be returned
    54  func (o *SeriesDataLocationUnix) GetLocationOk() (*SeriesDataLocation, bool) {
    55  	if o == nil  {
    56  		return nil, false
    57  	}
    58  	return o.Location.Get(), o.Location.IsSet()
    59  }
    60  
    61  // HasLocation returns a boolean if a field has been set.
    62  func (o *SeriesDataLocationUnix) HasLocation() bool {
    63  	if o != nil && o.Location.IsSet() {
    64  		return true
    65  	}
    66  
    67  	return false
    68  }
    69  
    70  // SetLocation gets a reference to the given NullableSeriesDataLocation and assigns it to the Location field.
    71  func (o *SeriesDataLocationUnix) SetLocation(v SeriesDataLocation) {
    72  	o.Location.Set(&v)
    73  }
    74  // SetLocationNil sets the value for Location to be an explicit nil
    75  func (o *SeriesDataLocationUnix) SetLocationNil() {
    76  	o.Location.Set(nil)
    77  }
    78  
    79  // UnsetLocation ensures that no value is present for Location, not even an explicit nil
    80  func (o *SeriesDataLocationUnix) UnsetLocation() {
    81  	o.Location.Unset()
    82  }
    83  
    84  // GetMeasurements returns the Measurements field value if set, zero value otherwise.
    85  func (o *SeriesDataLocationUnix) GetMeasurements() map[string]map[string]interface{} {
    86  	if o == nil || o.Measurements == nil {
    87  		var ret map[string]map[string]interface{}
    88  		return ret
    89  	}
    90  	return *o.Measurements
    91  }
    92  
    93  // GetMeasurementsOk returns a tuple with the Measurements field value if set, nil otherwise
    94  // and a boolean to check if the value has been set.
    95  func (o *SeriesDataLocationUnix) GetMeasurementsOk() (*map[string]map[string]interface{}, bool) {
    96  	if o == nil || o.Measurements == nil {
    97  		return nil, false
    98  	}
    99  	return o.Measurements, true
   100  }
   101  
   102  // HasMeasurements returns a boolean if a field has been set.
   103  func (o *SeriesDataLocationUnix) HasMeasurements() bool {
   104  	if o != nil && o.Measurements != nil {
   105  		return true
   106  	}
   107  
   108  	return false
   109  }
   110  
   111  // SetMeasurements gets a reference to the given map[string]map[string]interface{} and assigns it to the Measurements field.
   112  func (o *SeriesDataLocationUnix) SetMeasurements(v map[string]map[string]interface{}) {
   113  	o.Measurements = &v
   114  }
   115  
   116  // GetTimestamp returns the Timestamp field value if set, zero value otherwise.
   117  func (o *SeriesDataLocationUnix) GetTimestamp() string {
   118  	if o == nil || o.Timestamp == nil {
   119  		var ret string
   120  		return ret
   121  	}
   122  	return *o.Timestamp
   123  }
   124  
   125  // GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise
   126  // and a boolean to check if the value has been set.
   127  func (o *SeriesDataLocationUnix) GetTimestampOk() (*string, bool) {
   128  	if o == nil || o.Timestamp == nil {
   129  		return nil, false
   130  	}
   131  	return o.Timestamp, true
   132  }
   133  
   134  // HasTimestamp returns a boolean if a field has been set.
   135  func (o *SeriesDataLocationUnix) HasTimestamp() bool {
   136  	if o != nil && o.Timestamp != nil {
   137  		return true
   138  	}
   139  
   140  	return false
   141  }
   142  
   143  // SetTimestamp gets a reference to the given string and assigns it to the Timestamp field.
   144  func (o *SeriesDataLocationUnix) SetTimestamp(v string) {
   145  	o.Timestamp = &v
   146  }
   147  
   148  func (o SeriesDataLocationUnix) MarshalJSON() ([]byte, error) {
   149  	toSerialize := map[string]interface{}{}
   150  	if o.Location.IsSet() {
   151  		toSerialize["location"] = o.Location.Get()
   152  	}
   153  	if o.Measurements != nil {
   154  		toSerialize["measurements"] = o.Measurements
   155  	}
   156  	if o.Timestamp != nil {
   157  		toSerialize["timestamp"] = o.Timestamp
   158  	}
   159  	return json.Marshal(toSerialize)
   160  }
   161  
   162  type NullableSeriesDataLocationUnix struct {
   163  	value *SeriesDataLocationUnix
   164  	isSet bool
   165  }
   166  
   167  func (v NullableSeriesDataLocationUnix) Get() *SeriesDataLocationUnix {
   168  	return v.value
   169  }
   170  
   171  func (v *NullableSeriesDataLocationUnix) Set(val *SeriesDataLocationUnix) {
   172  	v.value = val
   173  	v.isSet = true
   174  }
   175  
   176  func (v NullableSeriesDataLocationUnix) IsSet() bool {
   177  	return v.isSet
   178  }
   179  
   180  func (v *NullableSeriesDataLocationUnix) Unset() {
   181  	v.value = nil
   182  	v.isSet = false
   183  }
   184  
   185  func NewNullableSeriesDataLocationUnix(val *SeriesDataLocationUnix) *NullableSeriesDataLocationUnix {
   186  	return &NullableSeriesDataLocationUnix{value: val, isSet: true}
   187  }
   188  
   189  func (v NullableSeriesDataLocationUnix) MarshalJSON() ([]byte, error) {
   190  	return json.Marshal(v.value)
   191  }
   192  
   193  func (v *NullableSeriesDataLocationUnix) UnmarshalJSON(src []byte) error {
   194  	v.isSet = true
   195  	return json.Unmarshal(src, &v.value)
   196  }
   197  
   198