/*
 * IONOS Cloud - DNS API
 *
 * Cloud DNS service helps IONOS Cloud customers to automate DNS Zone and Record management.
 *
 * API version: 1.16.0
 * Contact: support@cloud.ionos.com
 */

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

package ionoscloud

import (
	"encoding/json"
)

// Quota struct for Quota
type Quota struct {
	QuotaUsage  *QuotaDetail `json:"quotaUsage"`
	QuotaLimits *QuotaDetail `json:"quotaLimits"`
}

// NewQuota instantiates a new Quota 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 NewQuota(quotaUsage QuotaDetail, quotaLimits QuotaDetail) *Quota {
	this := Quota{}

	this.QuotaUsage = &quotaUsage
	this.QuotaLimits = &quotaLimits

	return &this
}

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

// GetQuotaUsage returns the QuotaUsage field value
// If the value is explicit nil, the zero value for QuotaDetail will be returned
func (o *Quota) GetQuotaUsage() *QuotaDetail {
	if o == nil {
		return nil
	}

	return o.QuotaUsage

}

// GetQuotaUsageOk returns a tuple with the QuotaUsage 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 *Quota) GetQuotaUsageOk() (*QuotaDetail, bool) {
	if o == nil {
		return nil, false
	}

	return o.QuotaUsage, true
}

// SetQuotaUsage sets field value
func (o *Quota) SetQuotaUsage(v QuotaDetail) {

	o.QuotaUsage = &v

}

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

	return false
}

// GetQuotaLimits returns the QuotaLimits field value
// If the value is explicit nil, the zero value for QuotaDetail will be returned
func (o *Quota) GetQuotaLimits() *QuotaDetail {
	if o == nil {
		return nil
	}

	return o.QuotaLimits

}

// GetQuotaLimitsOk returns a tuple with the QuotaLimits 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 *Quota) GetQuotaLimitsOk() (*QuotaDetail, bool) {
	if o == nil {
		return nil, false
	}

	return o.QuotaLimits, true
}

// SetQuotaLimits sets field value
func (o *Quota) SetQuotaLimits(v QuotaDetail) {

	o.QuotaLimits = &v

}

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

	return false
}

func (o Quota) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.QuotaUsage != nil {
		toSerialize["quotaUsage"] = o.QuotaUsage
	}

	if o.QuotaLimits != nil {
		toSerialize["quotaLimits"] = o.QuotaLimits
	}

	return json.Marshal(toSerialize)
}

type NullableQuota struct {
	value *Quota
	isSet bool
}

func (v NullableQuota) Get() *Quota {
	return v.value
}

func (v *NullableQuota) Set(val *Quota) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableQuota(val *Quota) *NullableQuota {
	return &NullableQuota{value: val, isSet: true}
}

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

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