/* * 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" ) // MeasurementSchemaColumn Definition of a measurement column type MeasurementSchemaColumn struct { Name string `json:"name" yaml:"name"` Type ColumnSemanticType `json:"type" yaml:"type"` DataType *ColumnDataType `json:"dataType,omitempty" yaml:"dataType,omitempty"` } // NewMeasurementSchemaColumn instantiates a new MeasurementSchemaColumn 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 NewMeasurementSchemaColumn(name string, type_ ColumnSemanticType) *MeasurementSchemaColumn { this := MeasurementSchemaColumn{} this.Name = name this.Type = type_ return &this } // NewMeasurementSchemaColumnWithDefaults instantiates a new MeasurementSchemaColumn 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 NewMeasurementSchemaColumnWithDefaults() *MeasurementSchemaColumn { this := MeasurementSchemaColumn{} return &this } // GetName returns the Name field value func (o *MeasurementSchemaColumn) 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 *MeasurementSchemaColumn) GetNameOk() (*string, bool) { if o == nil { return nil, false } return &o.Name, true } // SetName sets field value func (o *MeasurementSchemaColumn) SetName(v string) { o.Name = v } // GetType returns the Type field value func (o *MeasurementSchemaColumn) GetType() ColumnSemanticType { if o == nil { var ret ColumnSemanticType return ret } return o.Type } // GetTypeOk returns a tuple with the Type field value // and a boolean to check if the value has been set. func (o *MeasurementSchemaColumn) GetTypeOk() (*ColumnSemanticType, bool) { if o == nil { return nil, false } return &o.Type, true } // SetType sets field value func (o *MeasurementSchemaColumn) SetType(v ColumnSemanticType) { o.Type = v } // GetDataType returns the DataType field value if set, zero value otherwise. func (o *MeasurementSchemaColumn) GetDataType() ColumnDataType { if o == nil || o.DataType == nil { var ret ColumnDataType return ret } return *o.DataType } // GetDataTypeOk returns a tuple with the DataType field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *MeasurementSchemaColumn) GetDataTypeOk() (*ColumnDataType, bool) { if o == nil || o.DataType == nil { return nil, false } return o.DataType, true } // HasDataType returns a boolean if a field has been set. func (o *MeasurementSchemaColumn) HasDataType() bool { if o != nil && o.DataType != nil { return true } return false } // SetDataType gets a reference to the given ColumnDataType and assigns it to the DataType field. func (o *MeasurementSchemaColumn) SetDataType(v ColumnDataType) { o.DataType = &v } func (o MeasurementSchemaColumn) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if true { toSerialize["name"] = o.Name } if true { toSerialize["type"] = o.Type } if o.DataType != nil { toSerialize["dataType"] = o.DataType } return json.Marshal(toSerialize) } type NullableMeasurementSchemaColumn struct { value *MeasurementSchemaColumn isSet bool } func (v NullableMeasurementSchemaColumn) Get() *MeasurementSchemaColumn { return v.value } func (v *NullableMeasurementSchemaColumn) Set(val *MeasurementSchemaColumn) { v.value = val v.isSet = true } func (v NullableMeasurementSchemaColumn) IsSet() bool { return v.isSet } func (v *NullableMeasurementSchemaColumn) Unset() { v.value = nil v.isSet = false } func NewNullableMeasurementSchemaColumn(val *MeasurementSchemaColumn) *NullableMeasurementSchemaColumn { return &NullableMeasurementSchemaColumn{value: val, isSet: true} } func (v NullableMeasurementSchemaColumn) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableMeasurementSchemaColumn) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }