225 lines
5.3 KiB
Go
225 lines
5.3 KiB
Go
/*
|
|
* Subset of Influx API covered by Influx CLI
|
|
*
|
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
*
|
|
* API version: 2.0.0
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package api
|
|
|
|
import (
|
|
"encoding/json"
|
|
"time"
|
|
)
|
|
|
|
// MeasurementSchema The schema definition for a single measurement
|
|
type MeasurementSchema struct {
|
|
Id string `json:"id" yaml:"id"`
|
|
Name string `json:"name" yaml:"name"`
|
|
// An ordered collection of column definitions
|
|
Columns []MeasurementSchemaColumn `json:"columns" yaml:"columns"`
|
|
CreatedAt time.Time `json:"createdAt" yaml:"createdAt"`
|
|
UpdatedAt time.Time `json:"updatedAt" yaml:"updatedAt"`
|
|
}
|
|
|
|
// NewMeasurementSchema instantiates a new MeasurementSchema object
|
|
// This constructor will assign default values to properties that have it defined,
|
|
// and makes sure properties required by API are set, but the set of arguments
|
|
// will change when the set of required properties is changed
|
|
func NewMeasurementSchema(id string, name string, columns []MeasurementSchemaColumn, createdAt time.Time, updatedAt time.Time) *MeasurementSchema {
|
|
this := MeasurementSchema{}
|
|
this.Id = id
|
|
this.Name = name
|
|
this.Columns = columns
|
|
this.CreatedAt = createdAt
|
|
this.UpdatedAt = updatedAt
|
|
return &this
|
|
}
|
|
|
|
// NewMeasurementSchemaWithDefaults instantiates a new MeasurementSchema object
|
|
// This constructor will only assign default values to properties that have it defined,
|
|
// but it doesn't guarantee that properties required by API are set
|
|
func NewMeasurementSchemaWithDefaults() *MeasurementSchema {
|
|
this := MeasurementSchema{}
|
|
return &this
|
|
}
|
|
|
|
// GetId returns the Id field value
|
|
func (o *MeasurementSchema) GetId() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MeasurementSchema) GetIdOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Id, true
|
|
}
|
|
|
|
// SetId sets field value
|
|
func (o *MeasurementSchema) SetId(v string) {
|
|
o.Id = v
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *MeasurementSchema) GetName() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MeasurementSchema) GetNameOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Name, true
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *MeasurementSchema) SetName(v string) {
|
|
o.Name = v
|
|
}
|
|
|
|
// GetColumns returns the Columns field value
|
|
func (o *MeasurementSchema) GetColumns() []MeasurementSchemaColumn {
|
|
if o == nil {
|
|
var ret []MeasurementSchemaColumn
|
|
return ret
|
|
}
|
|
|
|
return o.Columns
|
|
}
|
|
|
|
// GetColumnsOk returns a tuple with the Columns field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MeasurementSchema) GetColumnsOk() (*[]MeasurementSchemaColumn, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Columns, true
|
|
}
|
|
|
|
// SetColumns sets field value
|
|
func (o *MeasurementSchema) SetColumns(v []MeasurementSchemaColumn) {
|
|
o.Columns = v
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value
|
|
func (o *MeasurementSchema) GetCreatedAt() time.Time {
|
|
if o == nil {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
|
|
return o.CreatedAt
|
|
}
|
|
|
|
// GetCreatedAtOk returns a tuple with the CreatedAt field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MeasurementSchema) GetCreatedAtOk() (*time.Time, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.CreatedAt, true
|
|
}
|
|
|
|
// SetCreatedAt sets field value
|
|
func (o *MeasurementSchema) SetCreatedAt(v time.Time) {
|
|
o.CreatedAt = v
|
|
}
|
|
|
|
// GetUpdatedAt returns the UpdatedAt field value
|
|
func (o *MeasurementSchema) GetUpdatedAt() time.Time {
|
|
if o == nil {
|
|
var ret time.Time
|
|
return ret
|
|
}
|
|
|
|
return o.UpdatedAt
|
|
}
|
|
|
|
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MeasurementSchema) GetUpdatedAtOk() (*time.Time, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.UpdatedAt, true
|
|
}
|
|
|
|
// SetUpdatedAt sets field value
|
|
func (o *MeasurementSchema) SetUpdatedAt(v time.Time) {
|
|
o.UpdatedAt = v
|
|
}
|
|
|
|
func (o MeasurementSchema) MarshalJSON() ([]byte, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if true {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if true {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if true {
|
|
toSerialize["columns"] = o.Columns
|
|
}
|
|
if true {
|
|
toSerialize["createdAt"] = o.CreatedAt
|
|
}
|
|
if true {
|
|
toSerialize["updatedAt"] = o.UpdatedAt
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
type NullableMeasurementSchema struct {
|
|
value *MeasurementSchema
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableMeasurementSchema) Get() *MeasurementSchema {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableMeasurementSchema) Set(val *MeasurementSchema) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableMeasurementSchema) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableMeasurementSchema) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableMeasurementSchema(val *MeasurementSchema) *NullableMeasurementSchema {
|
|
return &NullableMeasurementSchema{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableMeasurementSchema) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableMeasurementSchema) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|