/*
 * 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"
)

// MeasurementSchemaUpdateRequest Update an existing measurement schema
type MeasurementSchemaUpdateRequest struct {
	// An ordered collection of column definitions
	Columns []MeasurementSchemaColumn `json:"columns" yaml:"columns"`
}

// NewMeasurementSchemaUpdateRequest instantiates a new MeasurementSchemaUpdateRequest 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 NewMeasurementSchemaUpdateRequest(columns []MeasurementSchemaColumn) *MeasurementSchemaUpdateRequest {
	this := MeasurementSchemaUpdateRequest{}
	this.Columns = columns
	return &this
}

// NewMeasurementSchemaUpdateRequestWithDefaults instantiates a new MeasurementSchemaUpdateRequest 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 NewMeasurementSchemaUpdateRequestWithDefaults() *MeasurementSchemaUpdateRequest {
	this := MeasurementSchemaUpdateRequest{}
	return &this
}

// GetColumns returns the Columns field value
func (o *MeasurementSchemaUpdateRequest) 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 *MeasurementSchemaUpdateRequest) GetColumnsOk() (*[]MeasurementSchemaColumn, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Columns, true
}

// SetColumns sets field value
func (o *MeasurementSchemaUpdateRequest) SetColumns(v []MeasurementSchemaColumn) {
	o.Columns = v
}

func (o MeasurementSchemaUpdateRequest) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if true {
		toSerialize["columns"] = o.Columns
	}
	return json.Marshal(toSerialize)
}

type NullableMeasurementSchemaUpdateRequest struct {
	value *MeasurementSchemaUpdateRequest
	isSet bool
}

func (v NullableMeasurementSchemaUpdateRequest) Get() *MeasurementSchemaUpdateRequest {
	return v.value
}

func (v *NullableMeasurementSchemaUpdateRequest) Set(val *MeasurementSchemaUpdateRequest) {
	v.value = val
	v.isSet = true
}

func (v NullableMeasurementSchemaUpdateRequest) IsSet() bool {
	return v.isSet
}

func (v *NullableMeasurementSchemaUpdateRequest) Unset() {
	v.value = nil
	v.isSet = false
}

func NewNullableMeasurementSchemaUpdateRequest(val *MeasurementSchemaUpdateRequest) *NullableMeasurementSchemaUpdateRequest {
	return &NullableMeasurementSchemaUpdateRequest{value: val, isSet: true}
}

func (v NullableMeasurementSchemaUpdateRequest) MarshalJSON() ([]byte, error) {
	return json.Marshal(v.value)
}

func (v *NullableMeasurementSchemaUpdateRequest) UnmarshalJSON(src []byte) error {
	v.isSet = true
	return json.Unmarshal(src, &v.value)
}
