/*
Product Info.

The product info application uses the cloud provider APIs to asynchronously fetch and parse instance type attributes and prices, while storing the results in an in memory cache and making it available as structured data through a REST API.

API version: 0.9.5
Contact: info@banzaicloud.com
*/

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

package cloudinfo

import (
	"encoding/json"
)

// ProductDetails ProductDetails extended view of the virtual machine details
type ProductDetails struct {
	Attributes *map[string]string `json:"attributes,omitempty"`
	// Burst this is derived for now
	Burst *bool `json:"burst,omitempty"`
	Category *string `json:"category,omitempty"`
	CpusPerVm *float64 `json:"cpusPerVm,omitempty"`
	// CurrentGen signals whether the instance type generation is the current one. Only applies for amazon
	CurrentGen *bool `json:"currentGen,omitempty"`
	GpusPerVm *float64 `json:"gpusPerVm,omitempty"`
	MemPerVm *float64 `json:"memPerVm,omitempty"`
	NtwPerf *string `json:"ntwPerf,omitempty"`
	NtwPerfCategory *string `json:"ntwPerfCategory,omitempty"`
	OnDemandPrice *float64 `json:"onDemandPrice,omitempty"`
	SpotPrice []ZonePrice `json:"spotPrice,omitempty"`
	Type *string `json:"type,omitempty"`
	Zones []string `json:"zones,omitempty"`
}

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

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

// GetAttributes returns the Attributes field value if set, zero value otherwise.
func (o *ProductDetails) GetAttributes() map[string]string {
	if o == nil || o.Attributes == nil {
		var ret map[string]string
		return ret
	}
	return *o.Attributes
}

// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProductDetails) GetAttributesOk() (*map[string]string, bool) {
	if o == nil || o.Attributes == nil {
		return nil, false
	}
	return o.Attributes, true
}

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

	return false
}

// SetAttributes gets a reference to the given map[string]string and assigns it to the Attributes field.
func (o *ProductDetails) SetAttributes(v map[string]string) {
	o.Attributes = &v
}

// GetBurst returns the Burst field value if set, zero value otherwise.
func (o *ProductDetails) GetBurst() bool {
	if o == nil || o.Burst == nil {
		var ret bool
		return ret
	}
	return *o.Burst
}

// GetBurstOk returns a tuple with the Burst field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProductDetails) GetBurstOk() (*bool, bool) {
	if o == nil || o.Burst == nil {
		return nil, false
	}
	return o.Burst, true
}

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

	return false
}

// SetBurst gets a reference to the given bool and assigns it to the Burst field.
func (o *ProductDetails) SetBurst(v bool) {
	o.Burst = &v
}

// GetCategory returns the Category field value if set, zero value otherwise.
func (o *ProductDetails) GetCategory() string {
	if o == nil || o.Category == nil {
		var ret string
		return ret
	}
	return *o.Category
}

// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProductDetails) GetCategoryOk() (*string, bool) {
	if o == nil || o.Category == nil {
		return nil, false
	}
	return o.Category, true
}

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

	return false
}

// SetCategory gets a reference to the given string and assigns it to the Category field.
func (o *ProductDetails) SetCategory(v string) {
	o.Category = &v
}

// GetCpusPerVm returns the CpusPerVm field value if set, zero value otherwise.
func (o *ProductDetails) GetCpusPerVm() float64 {
	if o == nil || o.CpusPerVm == nil {
		var ret float64
		return ret
	}
	return *o.CpusPerVm
}

// GetCpusPerVmOk returns a tuple with the CpusPerVm field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProductDetails) GetCpusPerVmOk() (*float64, bool) {
	if o == nil || o.CpusPerVm == nil {
		return nil, false
	}
	return o.CpusPerVm, true
}

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

	return false
}

// SetCpusPerVm gets a reference to the given float64 and assigns it to the CpusPerVm field.
func (o *ProductDetails) SetCpusPerVm(v float64) {
	o.CpusPerVm = &v
}

// GetCurrentGen returns the CurrentGen field value if set, zero value otherwise.
func (o *ProductDetails) GetCurrentGen() bool {
	if o == nil || o.CurrentGen == nil {
		var ret bool
		return ret
	}
	return *o.CurrentGen
}

// GetCurrentGenOk returns a tuple with the CurrentGen field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProductDetails) GetCurrentGenOk() (*bool, bool) {
	if o == nil || o.CurrentGen == nil {
		return nil, false
	}
	return o.CurrentGen, true
}

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

	return false
}

// SetCurrentGen gets a reference to the given bool and assigns it to the CurrentGen field.
func (o *ProductDetails) SetCurrentGen(v bool) {
	o.CurrentGen = &v
}

// GetGpusPerVm returns the GpusPerVm field value if set, zero value otherwise.
func (o *ProductDetails) GetGpusPerVm() float64 {
	if o == nil || o.GpusPerVm == nil {
		var ret float64
		return ret
	}
	return *o.GpusPerVm
}

// GetGpusPerVmOk returns a tuple with the GpusPerVm field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProductDetails) GetGpusPerVmOk() (*float64, bool) {
	if o == nil || o.GpusPerVm == nil {
		return nil, false
	}
	return o.GpusPerVm, true
}

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

	return false
}

// SetGpusPerVm gets a reference to the given float64 and assigns it to the GpusPerVm field.
func (o *ProductDetails) SetGpusPerVm(v float64) {
	o.GpusPerVm = &v
}

// GetMemPerVm returns the MemPerVm field value if set, zero value otherwise.
func (o *ProductDetails) GetMemPerVm() float64 {
	if o == nil || o.MemPerVm == nil {
		var ret float64
		return ret
	}
	return *o.MemPerVm
}

// GetMemPerVmOk returns a tuple with the MemPerVm field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProductDetails) GetMemPerVmOk() (*float64, bool) {
	if o == nil || o.MemPerVm == nil {
		return nil, false
	}
	return o.MemPerVm, true
}

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

	return false
}

// SetMemPerVm gets a reference to the given float64 and assigns it to the MemPerVm field.
func (o *ProductDetails) SetMemPerVm(v float64) {
	o.MemPerVm = &v
}

// GetNtwPerf returns the NtwPerf field value if set, zero value otherwise.
func (o *ProductDetails) GetNtwPerf() string {
	if o == nil || o.NtwPerf == nil {
		var ret string
		return ret
	}
	return *o.NtwPerf
}

// GetNtwPerfOk returns a tuple with the NtwPerf field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProductDetails) GetNtwPerfOk() (*string, bool) {
	if o == nil || o.NtwPerf == nil {
		return nil, false
	}
	return o.NtwPerf, true
}

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

	return false
}

// SetNtwPerf gets a reference to the given string and assigns it to the NtwPerf field.
func (o *ProductDetails) SetNtwPerf(v string) {
	o.NtwPerf = &v
}

// GetNtwPerfCategory returns the NtwPerfCategory field value if set, zero value otherwise.
func (o *ProductDetails) GetNtwPerfCategory() string {
	if o == nil || o.NtwPerfCategory == nil {
		var ret string
		return ret
	}
	return *o.NtwPerfCategory
}

// GetNtwPerfCategoryOk returns a tuple with the NtwPerfCategory field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProductDetails) GetNtwPerfCategoryOk() (*string, bool) {
	if o == nil || o.NtwPerfCategory == nil {
		return nil, false
	}
	return o.NtwPerfCategory, true
}

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

	return false
}

// SetNtwPerfCategory gets a reference to the given string and assigns it to the NtwPerfCategory field.
func (o *ProductDetails) SetNtwPerfCategory(v string) {
	o.NtwPerfCategory = &v
}

// GetOnDemandPrice returns the OnDemandPrice field value if set, zero value otherwise.
func (o *ProductDetails) GetOnDemandPrice() float64 {
	if o == nil || o.OnDemandPrice == nil {
		var ret float64
		return ret
	}
	return *o.OnDemandPrice
}

// GetOnDemandPriceOk returns a tuple with the OnDemandPrice field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProductDetails) GetOnDemandPriceOk() (*float64, bool) {
	if o == nil || o.OnDemandPrice == nil {
		return nil, false
	}
	return o.OnDemandPrice, true
}

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

	return false
}

// SetOnDemandPrice gets a reference to the given float64 and assigns it to the OnDemandPrice field.
func (o *ProductDetails) SetOnDemandPrice(v float64) {
	o.OnDemandPrice = &v
}

// GetSpotPrice returns the SpotPrice field value if set, zero value otherwise.
func (o *ProductDetails) GetSpotPrice() []ZonePrice {
	if o == nil || o.SpotPrice == nil {
		var ret []ZonePrice
		return ret
	}
	return o.SpotPrice
}

// GetSpotPriceOk returns a tuple with the SpotPrice field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProductDetails) GetSpotPriceOk() ([]ZonePrice, bool) {
	if o == nil || o.SpotPrice == nil {
		return nil, false
	}
	return o.SpotPrice, true
}

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

	return false
}

// SetSpotPrice gets a reference to the given []ZonePrice and assigns it to the SpotPrice field.
func (o *ProductDetails) SetSpotPrice(v []ZonePrice) {
	o.SpotPrice = v
}

// GetType returns the Type field value if set, zero value otherwise.
func (o *ProductDetails) GetType() string {
	if o == nil || o.Type == nil {
		var ret string
		return ret
	}
	return *o.Type
}

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

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

	return false
}

// SetType gets a reference to the given string and assigns it to the Type field.
func (o *ProductDetails) SetType(v string) {
	o.Type = &v
}

// GetZones returns the Zones field value if set, zero value otherwise.
func (o *ProductDetails) GetZones() []string {
	if o == nil || o.Zones == nil {
		var ret []string
		return ret
	}
	return o.Zones
}

// GetZonesOk returns a tuple with the Zones field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProductDetails) GetZonesOk() ([]string, bool) {
	if o == nil || o.Zones == nil {
		return nil, false
	}
	return o.Zones, true
}

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

	return false
}

// SetZones gets a reference to the given []string and assigns it to the Zones field.
func (o *ProductDetails) SetZones(v []string) {
	o.Zones = v
}

func (o ProductDetails) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Attributes != nil {
		toSerialize["attributes"] = o.Attributes
	}
	if o.Burst != nil {
		toSerialize["burst"] = o.Burst
	}
	if o.Category != nil {
		toSerialize["category"] = o.Category
	}
	if o.CpusPerVm != nil {
		toSerialize["cpusPerVm"] = o.CpusPerVm
	}
	if o.CurrentGen != nil {
		toSerialize["currentGen"] = o.CurrentGen
	}
	if o.GpusPerVm != nil {
		toSerialize["gpusPerVm"] = o.GpusPerVm
	}
	if o.MemPerVm != nil {
		toSerialize["memPerVm"] = o.MemPerVm
	}
	if o.NtwPerf != nil {
		toSerialize["ntwPerf"] = o.NtwPerf
	}
	if o.NtwPerfCategory != nil {
		toSerialize["ntwPerfCategory"] = o.NtwPerfCategory
	}
	if o.OnDemandPrice != nil {
		toSerialize["onDemandPrice"] = o.OnDemandPrice
	}
	if o.SpotPrice != nil {
		toSerialize["spotPrice"] = o.SpotPrice
	}
	if o.Type != nil {
		toSerialize["type"] = o.Type
	}
	if o.Zones != nil {
		toSerialize["zones"] = o.Zones
	}
	return json.Marshal(toSerialize)
}

type NullableProductDetails struct {
	value *ProductDetails
	isSet bool
}

func (v NullableProductDetails) Get() *ProductDetails {
	return v.value
}

func (v *NullableProductDetails) Set(val *ProductDetails) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableProductDetails(val *ProductDetails) *NullableProductDetails {
	return &NullableProductDetails{value: val, isSet: true}
}

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

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


