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

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

// VariableCreate struct for VariableCreate
type VariableCreate struct {
	Key string `json:"key"`
	Value string `json:"value"`
	Secret *bool `json:"secret,omitempty"`
}

// NewVariableCreate instantiates a new VariableCreate 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 NewVariableCreate(key string, value string) *VariableCreate {
	this := VariableCreate{}
	this.Key = key
	this.Value = value
	return &this
}

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

// GetKey returns the Key field value
func (o *VariableCreate) 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 *VariableCreate) GetKeyOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Key, true
}

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

// GetValue returns the Value field value
func (o *VariableCreate) 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 *VariableCreate) GetValueOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Value, true
}

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

// GetSecret returns the Secret field value if set, zero value otherwise.
func (o *VariableCreate) GetSecret() bool {
	if o == nil || IsNil(o.Secret) {
		var ret bool
		return ret
	}
	return *o.Secret
}

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

// HasSecret returns a boolean if a field has been set.
func (o *VariableCreate) HasSecret() bool {
	if o != nil && !IsNil(o.Secret) {
		return true
	}

	return false
}

// SetSecret gets a reference to the given bool and assigns it to the Secret field.
func (o *VariableCreate) SetSecret(v bool) {
	o.Secret = &v
}

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

func (o VariableCreate) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["key"] = o.Key
	toSerialize["value"] = o.Value
	if !IsNil(o.Secret) {
		toSerialize["secret"] = o.Secret
	}
	return toSerialize, nil
}

type NullableVariableCreate struct {
	value *VariableCreate
	isSet bool
}

func (v NullableVariableCreate) Get() *VariableCreate {
	return v.value
}

func (v *NullableVariableCreate) Set(val *VariableCreate) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableVariableCreate(val *VariableCreate) *NullableVariableCreate {
	return &NullableVariableCreate{value: val, isSet: true}
}

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

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


