/*
Variables API

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

API version: 1.0.0
*/

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package variables

import (
	"encoding/json"
	"time"
)

// checks if the Variable type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Variable{}

// Variable struct for Variable
type Variable struct {
	Uuid string `json:"uuid"`
	Key string `json:"key"`
	Value string `json:"value"`
	Secret bool `json:"secret"`
	LastEditor string `json:"last_editor"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

// NewVariable instantiates a new Variable 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 NewVariable(uuid string, key string, value string, secret bool, lastEditor string, createdAt time.Time, updatedAt time.Time) *Variable {
	this := Variable{}
	this.Uuid = uuid
	this.Key = key
	this.Value = value
	this.Secret = secret
	this.LastEditor = lastEditor
	this.CreatedAt = createdAt
	this.UpdatedAt = updatedAt
	return &this
}

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

// GetUuid returns the Uuid field value
func (o *Variable) GetUuid() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Uuid
}

// GetUuidOk returns a tuple with the Uuid field value
// and a boolean to check if the value has been set.
func (o *Variable) GetUuidOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Uuid, true
}

// SetUuid sets field value
func (o *Variable) SetUuid(v string) {
	o.Uuid = v
}

// GetKey returns the Key field value
func (o *Variable) GetKey() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Key
}

// GetKeyOk returns a tuple with the Key field value
// and a boolean to check if the value has been set.
func (o *Variable) GetKeyOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Key, true
}

// SetKey sets field value
func (o *Variable) SetKey(v string) {
	o.Key = v
}

// GetValue returns the Value field value
func (o *Variable) GetValue() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Value
}

// GetValueOk returns a tuple with the Value field value
// and a boolean to check if the value has been set.
func (o *Variable) GetValueOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Value, true
}

// SetValue sets field value
func (o *Variable) SetValue(v string) {
	o.Value = v
}

// GetSecret returns the Secret field value
func (o *Variable) GetSecret() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.Secret
}

// GetSecretOk returns a tuple with the Secret field value
// and a boolean to check if the value has been set.
func (o *Variable) GetSecretOk() (*bool, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Secret, true
}

// SetSecret sets field value
func (o *Variable) SetSecret(v bool) {
	o.Secret = v
}

// GetLastEditor returns the LastEditor field value
func (o *Variable) GetLastEditor() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.LastEditor
}

// GetLastEditorOk returns a tuple with the LastEditor field value
// and a boolean to check if the value has been set.
func (o *Variable) GetLastEditorOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.LastEditor, true
}

// SetLastEditor sets field value
func (o *Variable) SetLastEditor(v string) {
	o.LastEditor = v
}

// GetCreatedAt returns the CreatedAt field value
func (o *Variable) 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 *Variable) GetCreatedAtOk() (*time.Time, bool) {
	if o == nil {
		return nil, false
	}
	return &o.CreatedAt, true
}

// SetCreatedAt sets field value
func (o *Variable) SetCreatedAt(v time.Time) {
	o.CreatedAt = v
}

// GetUpdatedAt returns the UpdatedAt field value
func (o *Variable) 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 *Variable) GetUpdatedAtOk() (*time.Time, bool) {
	if o == nil {
		return nil, false
	}
	return &o.UpdatedAt, true
}

// SetUpdatedAt sets field value
func (o *Variable) SetUpdatedAt(v time.Time) {
	o.UpdatedAt = v
}

func (o Variable) MarshalJSON() ([]byte, error) {
	toSerialize,err := o.ToMap()
	if err != nil {
		return []byte{}, err
	}
	return json.Marshal(toSerialize)
}

func (o Variable) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["uuid"] = o.Uuid
	toSerialize["key"] = o.Key
	toSerialize["value"] = o.Value
	toSerialize["secret"] = o.Secret
	toSerialize["last_editor"] = o.LastEditor
	toSerialize["created_at"] = o.CreatedAt
	toSerialize["updated_at"] = o.UpdatedAt
	return toSerialize, nil
}

type NullableVariable struct {
	value *Variable
	isSet bool
}

func (v NullableVariable) Get() *Variable {
	return v.value
}

func (v *NullableVariable) Set(val *Variable) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableVariable(val *Variable) *NullableVariable {
	return &NullableVariable{value: val, isSet: true}
}

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

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


