/*
Daytona

Daytona AI platform API Docs

API version: 1.0
Contact: support@daytona.com
*/

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

package apiclient

import (
	"encoding/json"
)

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

// UpdateRegion struct for UpdateRegion
type UpdateRegion struct {
	// Proxy URL for the region
	ProxyUrl NullableString `json:"proxyUrl,omitempty"`
	// SSH Gateway URL for the region
	SshGatewayUrl NullableString `json:"sshGatewayUrl,omitempty"`
	// Snapshot Manager URL for the region
	SnapshotManagerUrl NullableString `json:"snapshotManagerUrl,omitempty"`
	AdditionalProperties map[string]interface{}
}

type _UpdateRegion UpdateRegion

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

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

// GetProxyUrl returns the ProxyUrl field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UpdateRegion) GetProxyUrl() string {
	if o == nil || IsNil(o.ProxyUrl.Get()) {
		var ret string
		return ret
	}
	return *o.ProxyUrl.Get()
}

// GetProxyUrlOk returns a tuple with the ProxyUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *UpdateRegion) GetProxyUrlOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return o.ProxyUrl.Get(), o.ProxyUrl.IsSet()
}

// HasProxyUrl returns a boolean if a field has been set.
func (o *UpdateRegion) HasProxyUrl() bool {
	if o != nil && o.ProxyUrl.IsSet() {
		return true
	}

	return false
}

// SetProxyUrl gets a reference to the given NullableString and assigns it to the ProxyUrl field.
func (o *UpdateRegion) SetProxyUrl(v string) {
	o.ProxyUrl.Set(&v)
}
// SetProxyUrlNil sets the value for ProxyUrl to be an explicit nil
func (o *UpdateRegion) SetProxyUrlNil() {
	o.ProxyUrl.Set(nil)
}

// UnsetProxyUrl ensures that no value is present for ProxyUrl, not even an explicit nil
func (o *UpdateRegion) UnsetProxyUrl() {
	o.ProxyUrl.Unset()
}

// GetSshGatewayUrl returns the SshGatewayUrl field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UpdateRegion) GetSshGatewayUrl() string {
	if o == nil || IsNil(o.SshGatewayUrl.Get()) {
		var ret string
		return ret
	}
	return *o.SshGatewayUrl.Get()
}

// GetSshGatewayUrlOk returns a tuple with the SshGatewayUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *UpdateRegion) GetSshGatewayUrlOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return o.SshGatewayUrl.Get(), o.SshGatewayUrl.IsSet()
}

// HasSshGatewayUrl returns a boolean if a field has been set.
func (o *UpdateRegion) HasSshGatewayUrl() bool {
	if o != nil && o.SshGatewayUrl.IsSet() {
		return true
	}

	return false
}

// SetSshGatewayUrl gets a reference to the given NullableString and assigns it to the SshGatewayUrl field.
func (o *UpdateRegion) SetSshGatewayUrl(v string) {
	o.SshGatewayUrl.Set(&v)
}
// SetSshGatewayUrlNil sets the value for SshGatewayUrl to be an explicit nil
func (o *UpdateRegion) SetSshGatewayUrlNil() {
	o.SshGatewayUrl.Set(nil)
}

// UnsetSshGatewayUrl ensures that no value is present for SshGatewayUrl, not even an explicit nil
func (o *UpdateRegion) UnsetSshGatewayUrl() {
	o.SshGatewayUrl.Unset()
}

// GetSnapshotManagerUrl returns the SnapshotManagerUrl field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *UpdateRegion) GetSnapshotManagerUrl() string {
	if o == nil || IsNil(o.SnapshotManagerUrl.Get()) {
		var ret string
		return ret
	}
	return *o.SnapshotManagerUrl.Get()
}

// GetSnapshotManagerUrlOk returns a tuple with the SnapshotManagerUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *UpdateRegion) GetSnapshotManagerUrlOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return o.SnapshotManagerUrl.Get(), o.SnapshotManagerUrl.IsSet()
}

// HasSnapshotManagerUrl returns a boolean if a field has been set.
func (o *UpdateRegion) HasSnapshotManagerUrl() bool {
	if o != nil && o.SnapshotManagerUrl.IsSet() {
		return true
	}

	return false
}

// SetSnapshotManagerUrl gets a reference to the given NullableString and assigns it to the SnapshotManagerUrl field.
func (o *UpdateRegion) SetSnapshotManagerUrl(v string) {
	o.SnapshotManagerUrl.Set(&v)
}
// SetSnapshotManagerUrlNil sets the value for SnapshotManagerUrl to be an explicit nil
func (o *UpdateRegion) SetSnapshotManagerUrlNil() {
	o.SnapshotManagerUrl.Set(nil)
}

// UnsetSnapshotManagerUrl ensures that no value is present for SnapshotManagerUrl, not even an explicit nil
func (o *UpdateRegion) UnsetSnapshotManagerUrl() {
	o.SnapshotManagerUrl.Unset()
}

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

func (o UpdateRegion) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if o.ProxyUrl.IsSet() {
		toSerialize["proxyUrl"] = o.ProxyUrl.Get()
	}
	if o.SshGatewayUrl.IsSet() {
		toSerialize["sshGatewayUrl"] = o.SshGatewayUrl.Get()
	}
	if o.SnapshotManagerUrl.IsSet() {
		toSerialize["snapshotManagerUrl"] = o.SnapshotManagerUrl.Get()
	}

	for key, value := range o.AdditionalProperties {
		toSerialize[key] = value
	}

	return toSerialize, nil
}

func (o *UpdateRegion) UnmarshalJSON(data []byte) (err error) {
	varUpdateRegion := _UpdateRegion{}

	err = json.Unmarshal(data, &varUpdateRegion)

	if err != nil {
		return err
	}

	*o = UpdateRegion(varUpdateRegion)

	additionalProperties := make(map[string]interface{})

	if err = json.Unmarshal(data, &additionalProperties); err == nil {
		delete(additionalProperties, "proxyUrl")
		delete(additionalProperties, "sshGatewayUrl")
		delete(additionalProperties, "snapshotManagerUrl")
		o.AdditionalProperties = additionalProperties
	}

	return err
}

type NullableUpdateRegion struct {
	value *UpdateRegion
	isSet bool
}

func (v NullableUpdateRegion) Get() *UpdateRegion {
	return v.value
}

func (v *NullableUpdateRegion) Set(val *UpdateRegion) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableUpdateRegion(val *UpdateRegion) *NullableUpdateRegion {
	return &NullableUpdateRegion{value: val, isSet: true}
}

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

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


