/*
 * IONOS DBaaS MariaDB REST API
 *
 * An enterprise-grade Database is provided as a Service (DBaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API.  The API allows you to create additional MariaDB database clusters or modify existing ones. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive.
 *
 * API version: 0.1.0
 */

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

package ionoscloud

import (
	"encoding/json"
)

// BackupListAllOf struct for BackupListAllOf
type BackupListAllOf struct {
	// The unique ID of the resource.
	Id    *string           `json:"id,omitempty"`
	Items *[]BackupResponse `json:"items,omitempty"`
}

// NewBackupListAllOf instantiates a new BackupListAllOf 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 NewBackupListAllOf() *BackupListAllOf {
	this := BackupListAllOf{}

	return &this
}

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

// GetId returns the Id field value
// If the value is explicit nil, the zero value for string will be returned
func (o *BackupListAllOf) GetId() *string {
	if o == nil {
		return nil
	}

	return o.Id

}

// GetIdOk returns a tuple with the Id field value
// 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 *BackupListAllOf) GetIdOk() (*string, bool) {
	if o == nil {
		return nil, false
	}

	return o.Id, true
}

// SetId sets field value
func (o *BackupListAllOf) SetId(v string) {

	o.Id = &v

}

// HasId returns a boolean if a field has been set.
func (o *BackupListAllOf) HasId() bool {
	if o != nil && o.Id != nil {
		return true
	}

	return false
}

// GetItems returns the Items field value
// If the value is explicit nil, the zero value for []BackupResponse will be returned
func (o *BackupListAllOf) GetItems() *[]BackupResponse {
	if o == nil {
		return nil
	}

	return o.Items

}

// GetItemsOk returns a tuple with the Items field value
// 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 *BackupListAllOf) GetItemsOk() (*[]BackupResponse, bool) {
	if o == nil {
		return nil, false
	}

	return o.Items, true
}

// SetItems sets field value
func (o *BackupListAllOf) SetItems(v []BackupResponse) {

	o.Items = &v

}

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

	return false
}

func (o BackupListAllOf) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Id != nil {
		toSerialize["id"] = o.Id
	}

	if o.Items != nil {
		toSerialize["items"] = o.Items
	}

	return json.Marshal(toSerialize)
}

type NullableBackupListAllOf struct {
	value *BackupListAllOf
	isSet bool
}

func (v NullableBackupListAllOf) Get() *BackupListAllOf {
	return v.value
}

func (v *NullableBackupListAllOf) Set(val *BackupListAllOf) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableBackupListAllOf(val *BackupListAllOf) *NullableBackupListAllOf {
	return &NullableBackupListAllOf{value: val, isSet: true}
}

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

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