/*
 * 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 IPSecTunnelReadList type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &IPSecTunnelReadList{}

// IPSecTunnelReadList struct for IPSecTunnelReadList
type IPSecTunnelReadList struct {
	// ID of the list of IPSecTunnel resources.
	Id string `json:"id"`
	// The type of the resource.
	Type string `json:"type"`
	// The URL of the list of IPSecTunnel resources.
	Href string `json:"href"`
	// The list of IPSecTunnel resources.
	Items []IPSecTunnelRead `json:"items,omitempty"`
	// The offset specified in the request (if none was specified, the default offset is 0).
	Offset int32 `json:"offset"`
	// The limit specified in the request (if none was specified, use the endpoint's default pagination limit).
	Limit int32 `json:"limit"`
	Links Links `json:"_links"`
}

// NewIPSecTunnelReadList instantiates a new IPSecTunnelReadList 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 NewIPSecTunnelReadList(id string, type_ string, href string, offset int32, limit int32, links Links) *IPSecTunnelReadList {
	this := IPSecTunnelReadList{}

	this.Id = id
	this.Type = type_
	this.Href = href
	this.Offset = offset
	this.Limit = limit
	this.Links = links

	return &this
}

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

// GetId returns the Id field value
func (o *IPSecTunnelReadList) 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 *IPSecTunnelReadList) GetIdOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Id, true
}

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

// GetType returns the Type field value
func (o *IPSecTunnelReadList) 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 *IPSecTunnelReadList) GetTypeOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Type, true
}

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

// GetHref returns the Href field value
func (o *IPSecTunnelReadList) 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 *IPSecTunnelReadList) GetHrefOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Href, true
}

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

// GetItems returns the Items field value if set, zero value otherwise.
func (o *IPSecTunnelReadList) GetItems() []IPSecTunnelRead {
	if o == nil || IsNil(o.Items) {
		var ret []IPSecTunnelRead
		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 *IPSecTunnelReadList) GetItemsOk() ([]IPSecTunnelRead, 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 *IPSecTunnelReadList) HasItems() bool {
	if o != nil && !IsNil(o.Items) {
		return true
	}

	return false
}

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

// GetOffset returns the Offset field value
func (o *IPSecTunnelReadList) GetOffset() int32 {
	if o == nil {
		var ret int32
		return ret
	}

	return o.Offset
}

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

// SetOffset sets field value
func (o *IPSecTunnelReadList) SetOffset(v int32) {
	o.Offset = v
}

// GetLimit returns the Limit field value
func (o *IPSecTunnelReadList) GetLimit() int32 {
	if o == nil {
		var ret int32
		return ret
	}

	return o.Limit
}

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

// SetLimit sets field value
func (o *IPSecTunnelReadList) SetLimit(v int32) {
	o.Limit = v
}

// GetLinks returns the Links field value
func (o *IPSecTunnelReadList) GetLinks() Links {
	if o == nil {
		var ret Links
		return ret
	}

	return o.Links
}

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

// SetLinks sets field value
func (o *IPSecTunnelReadList) SetLinks(v Links) {
	o.Links = v
}

func (o IPSecTunnelReadList) 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
	}
	toSerialize["offset"] = o.Offset
	toSerialize["limit"] = o.Limit
	toSerialize["_links"] = o.Links
	return toSerialize, nil
}

type NullableIPSecTunnelReadList struct {
	value *IPSecTunnelReadList
	isSet bool
}

func (v NullableIPSecTunnelReadList) Get() *IPSecTunnelReadList {
	return v.value
}

func (v *NullableIPSecTunnelReadList) Set(val *IPSecTunnelReadList) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableIPSecTunnelReadList(val *IPSecTunnelReadList) *NullableIPSecTunnelReadList {
	return &NullableIPSecTunnelReadList{value: val, isSet: true}
}

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

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