/*
Services API

Azion Services

API version: 2.0.0
*/

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

package edgeservices

import (
	"encoding/json"
)

// Variable struct for Variable
type Variable struct {
	Name string `json:"name"`
	Value string `json:"value"`
}

// 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(name string, value string) *Variable {
	this := Variable{}
	this.Name = name
	this.Value = value
	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
}

// GetName returns the Name field value
func (o *Variable) 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 *Variable) GetNameOk() (*string, bool) {
	if o == nil  {
		return nil, false
	}
	return &o.Name, true
}

// SetName sets field value
func (o *Variable) SetName(v string) {
	o.Name = 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
}

func (o Variable) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if true {
		toSerialize["name"] = o.Name
	}
	if true {
		toSerialize["value"] = o.Value
	}
	return json.Marshal(toSerialize)
}

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)
}


