/*
1Backend

AI-native microservices platform.

API version: 0.8.2
Contact: sales@singulatron.com
*/

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

package openapi

import (
	"encoding/json"
)

// checks if the ModelSvcCudaParameters type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ModelSvcCudaParameters{}

// ModelSvcCudaParameters struct for ModelSvcCudaParameters
type ModelSvcCudaParameters struct {
	// Container configuration related to CUDA usage.
	Container *ModelSvcContainer `json:"container,omitempty"`
	// Level of precision for selecting the CUDA version when resolving the container image. - 2 -> Use \"major.minor\" (e.g., \"12.2\") - 3 -> Use \"major.minor.patch\" (e.g., \"12.2.0\")
	CudaVersionPrecision *int32 `json:"cudaVersionPrecision,omitempty"`
	// Default CUDA version to use (e.g., \"12.2\" or \"12.2.0\").
	DefaultCudaVersion *string `json:"defaultCudaVersion,omitempty"`
	// Default cuDNN version to use alongside CUDA.
	DefaultCudnnVersion *string `json:"defaultCudnnVersion,omitempty"`
}

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

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

// GetContainer returns the Container field value if set, zero value otherwise.
func (o *ModelSvcCudaParameters) GetContainer() ModelSvcContainer {
	if o == nil || IsNil(o.Container) {
		var ret ModelSvcContainer
		return ret
	}
	return *o.Container
}

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

// HasContainer returns a boolean if a field has been set.
func (o *ModelSvcCudaParameters) HasContainer() bool {
	if o != nil && !IsNil(o.Container) {
		return true
	}

	return false
}

// SetContainer gets a reference to the given ModelSvcContainer and assigns it to the Container field.
func (o *ModelSvcCudaParameters) SetContainer(v ModelSvcContainer) {
	o.Container = &v
}

// GetCudaVersionPrecision returns the CudaVersionPrecision field value if set, zero value otherwise.
func (o *ModelSvcCudaParameters) GetCudaVersionPrecision() int32 {
	if o == nil || IsNil(o.CudaVersionPrecision) {
		var ret int32
		return ret
	}
	return *o.CudaVersionPrecision
}

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

// HasCudaVersionPrecision returns a boolean if a field has been set.
func (o *ModelSvcCudaParameters) HasCudaVersionPrecision() bool {
	if o != nil && !IsNil(o.CudaVersionPrecision) {
		return true
	}

	return false
}

// SetCudaVersionPrecision gets a reference to the given int32 and assigns it to the CudaVersionPrecision field.
func (o *ModelSvcCudaParameters) SetCudaVersionPrecision(v int32) {
	o.CudaVersionPrecision = &v
}

// GetDefaultCudaVersion returns the DefaultCudaVersion field value if set, zero value otherwise.
func (o *ModelSvcCudaParameters) GetDefaultCudaVersion() string {
	if o == nil || IsNil(o.DefaultCudaVersion) {
		var ret string
		return ret
	}
	return *o.DefaultCudaVersion
}

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

// HasDefaultCudaVersion returns a boolean if a field has been set.
func (o *ModelSvcCudaParameters) HasDefaultCudaVersion() bool {
	if o != nil && !IsNil(o.DefaultCudaVersion) {
		return true
	}

	return false
}

// SetDefaultCudaVersion gets a reference to the given string and assigns it to the DefaultCudaVersion field.
func (o *ModelSvcCudaParameters) SetDefaultCudaVersion(v string) {
	o.DefaultCudaVersion = &v
}

// GetDefaultCudnnVersion returns the DefaultCudnnVersion field value if set, zero value otherwise.
func (o *ModelSvcCudaParameters) GetDefaultCudnnVersion() string {
	if o == nil || IsNil(o.DefaultCudnnVersion) {
		var ret string
		return ret
	}
	return *o.DefaultCudnnVersion
}

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

// HasDefaultCudnnVersion returns a boolean if a field has been set.
func (o *ModelSvcCudaParameters) HasDefaultCudnnVersion() bool {
	if o != nil && !IsNil(o.DefaultCudnnVersion) {
		return true
	}

	return false
}

// SetDefaultCudnnVersion gets a reference to the given string and assigns it to the DefaultCudnnVersion field.
func (o *ModelSvcCudaParameters) SetDefaultCudnnVersion(v string) {
	o.DefaultCudnnVersion = &v
}

func (o ModelSvcCudaParameters) MarshalJSON() ([]byte, error) {
	toSerialize,err := o.ToMap()
	if err != nil {
		return []byte{}, err
	}
	return json.Marshal(toSerialize)
}

func (o ModelSvcCudaParameters) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Container) {
		toSerialize["container"] = o.Container
	}
	if !IsNil(o.CudaVersionPrecision) {
		toSerialize["cudaVersionPrecision"] = o.CudaVersionPrecision
	}
	if !IsNil(o.DefaultCudaVersion) {
		toSerialize["defaultCudaVersion"] = o.DefaultCudaVersion
	}
	if !IsNil(o.DefaultCudnnVersion) {
		toSerialize["defaultCudnnVersion"] = o.DefaultCudnnVersion
	}
	return toSerialize, nil
}

type NullableModelSvcCudaParameters struct {
	value *ModelSvcCudaParameters
	isSet bool
}

func (v NullableModelSvcCudaParameters) Get() *ModelSvcCudaParameters {
	return v.value
}

func (v *NullableModelSvcCudaParameters) Set(val *ModelSvcCudaParameters) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableModelSvcCudaParameters(val *ModelSvcCudaParameters) *NullableModelSvcCudaParameters {
	return &NullableModelSvcCudaParameters{value: val, isSet: true}
}

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

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


