/*
 * VPN Gateways
 *
 * POC Docs for VPN gateway as service
 *
 * API version: 0.0.1
 * Contact: support@cloud.ionos.com
 */

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

package vpn

import (
	"encoding/json"
)

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

// WireguardGatewayReadListAllOf struct for WireguardGatewayReadListAllOf
type WireguardGatewayReadListAllOf struct {
	// ID of the list of WireguardGateway resources.
	Id string `json:"id"`
	// The type of the resource.
	Type string `json:"type"`
	// The URL of the list of WireguardGateway resources.
	Href string `json:"href"`
	// The list of WireguardGateway resources.
	Items []WireguardGatewayRead `json:"items,omitempty"`
}

// NewWireguardGatewayReadListAllOf instantiates a new WireguardGatewayReadListAllOf 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 NewWireguardGatewayReadListAllOf(id string, type_ string, href string) *WireguardGatewayReadListAllOf {
	this := WireguardGatewayReadListAllOf{}

	this.Id = id
	this.Type = type_
	this.Href = href

	return &this
}

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

// GetId returns the Id field value
func (o *WireguardGatewayReadListAllOf) GetId() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Id
}

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

// SetId sets field value
func (o *WireguardGatewayReadListAllOf) SetId(v string) {
	o.Id = v
}

// GetType returns the Type field value
func (o *WireguardGatewayReadListAllOf) GetType() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Type
}

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

// SetType sets field value
func (o *WireguardGatewayReadListAllOf) SetType(v string) {
	o.Type = v
}

// GetHref returns the Href field value
func (o *WireguardGatewayReadListAllOf) GetHref() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Href
}

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

// SetHref sets field value
func (o *WireguardGatewayReadListAllOf) SetHref(v string) {
	o.Href = v
}

// GetItems returns the Items field value if set, zero value otherwise.
func (o *WireguardGatewayReadListAllOf) GetItems() []WireguardGatewayRead {
	if o == nil || IsNil(o.Items) {
		var ret []WireguardGatewayRead
		return ret
	}
	return o.Items
}

// GetItemsOk returns a tuple with the Items field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *WireguardGatewayReadListAllOf) GetItemsOk() ([]WireguardGatewayRead, bool) {
	if o == nil || IsNil(o.Items) {
		return nil, false
	}
	return o.Items, true
}

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

	return false
}

// SetItems gets a reference to the given []WireguardGatewayRead and assigns it to the Items field.
func (o *WireguardGatewayReadListAllOf) SetItems(v []WireguardGatewayRead) {
	o.Items = v
}

func (o WireguardGatewayReadListAllOf) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["id"] = o.Id
	toSerialize["type"] = o.Type
	toSerialize["href"] = o.Href
	if !IsNil(o.Items) {
		toSerialize["items"] = o.Items
	}
	return toSerialize, nil
}

type NullableWireguardGatewayReadListAllOf struct {
	value *WireguardGatewayReadListAllOf
	isSet bool
}

func (v NullableWireguardGatewayReadListAllOf) Get() *WireguardGatewayReadListAllOf {
	return v.value
}

func (v *NullableWireguardGatewayReadListAllOf) Set(val *WireguardGatewayReadListAllOf) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableWireguardGatewayReadListAllOf(val *WireguardGatewayReadListAllOf) *NullableWireguardGatewayReadListAllOf {
	return &NullableWireguardGatewayReadListAllOf{value: val, isSet: true}
}

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

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