/*
 * CLOUD API
 *
 *  IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool.    Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on.
 *
 * API version: 6.0
 */

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

package ionoscloud

import (
	"encoding/json"
)

// GpuProperties struct for GpuProperties
type GpuProperties struct {
	// The name of the resource.
	Name *string `json:"name,omitempty"`
	// The vendor of the Graphics Processing Unit (GPU) card. The available options can be retrieved from the 'gpuArchitecture' field returned in the GET responses of the resources /datacenters and /locations.
	Vendor *string `json:"vendor,omitempty"`
	// The model of Graphics Processing Unit (GPU) card. The available options can be retrieved from the 'gpuArchitecture' field returned in the GET responses of the resources /datacenters and /locations.
	Model *string `json:"model,omitempty"`
	// The way the Graphics Processing Unit (GPU) card will function. The 'passthrough' type means that the Server will be connected to the GPU directly (e.g. no virtualization involved).
	Type *string `json:"type,omitempty"`
}

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

	return &this
}

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

// GetName returns the Name field value
// If the value is explicit nil, nil is returned
func (o *GpuProperties) GetName() *string {
	if o == nil {
		return nil
	}

	return o.Name

}

// GetNameOk returns a tuple with the Name 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 *GpuProperties) GetNameOk() (*string, bool) {
	if o == nil {
		return nil, false
	}

	return o.Name, true
}

// SetName sets field value
func (o *GpuProperties) SetName(v string) {

	o.Name = &v

}

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

	return false
}

// GetVendor returns the Vendor field value
// If the value is explicit nil, nil is returned
func (o *GpuProperties) GetVendor() *string {
	if o == nil {
		return nil
	}

	return o.Vendor

}

// GetVendorOk returns a tuple with the Vendor 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 *GpuProperties) GetVendorOk() (*string, bool) {
	if o == nil {
		return nil, false
	}

	return o.Vendor, true
}

// SetVendor sets field value
func (o *GpuProperties) SetVendor(v string) {

	o.Vendor = &v

}

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

	return false
}

// GetModel returns the Model field value
// If the value is explicit nil, nil is returned
func (o *GpuProperties) GetModel() *string {
	if o == nil {
		return nil
	}

	return o.Model

}

// GetModelOk returns a tuple with the Model 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 *GpuProperties) GetModelOk() (*string, bool) {
	if o == nil {
		return nil, false
	}

	return o.Model, true
}

// SetModel sets field value
func (o *GpuProperties) SetModel(v string) {

	o.Model = &v

}

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

	return false
}

// GetType returns the Type field value
// If the value is explicit nil, nil is returned
func (o *GpuProperties) GetType() *string {
	if o == nil {
		return nil
	}

	return o.Type

}

// GetTypeOk returns a tuple with the Type 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 *GpuProperties) GetTypeOk() (*string, bool) {
	if o == nil {
		return nil, false
	}

	return o.Type, true
}

// SetType sets field value
func (o *GpuProperties) SetType(v string) {

	o.Type = &v

}

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

	return false
}

func (o GpuProperties) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Name != nil {
		toSerialize["name"] = o.Name
	}

	if o.Vendor != nil {
		toSerialize["vendor"] = o.Vendor
	}

	if o.Model != nil {
		toSerialize["model"] = o.Model
	}

	if o.Type != nil {
		toSerialize["type"] = o.Type
	}

	return json.Marshal(toSerialize)
}

type NullableGpuProperties struct {
	value *GpuProperties
	isSet bool
}

func (v NullableGpuProperties) Get() *GpuProperties {
	return v.value
}

func (v *NullableGpuProperties) Set(val *GpuProperties) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableGpuProperties(val *GpuProperties) *NullableGpuProperties {
	return &NullableGpuProperties{value: val, isSet: true}
}

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

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