/*
Daytona Toolbox API

Daytona Toolbox API

API version: v0.0.0-dev
*/

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

package toolbox

import (
	"encoding/json"
)

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

// CodeRunArtifacts struct for CodeRunArtifacts
type CodeRunArtifacts struct {
	Charts []Chart `json:"charts,omitempty"`
}

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

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

// GetCharts returns the Charts field value if set, zero value otherwise.
func (o *CodeRunArtifacts) GetCharts() []Chart {
	if o == nil || IsNil(o.Charts) {
		var ret []Chart
		return ret
	}
	return o.Charts
}

// GetChartsOk returns a tuple with the Charts field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CodeRunArtifacts) GetChartsOk() ([]Chart, bool) {
	if o == nil || IsNil(o.Charts) {
		return nil, false
	}
	return o.Charts, true
}

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

	return false
}

// SetCharts gets a reference to the given []Chart and assigns it to the Charts field.
func (o *CodeRunArtifacts) SetCharts(v []Chart) {
	o.Charts = v
}

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

func (o CodeRunArtifacts) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Charts) {
		toSerialize["charts"] = o.Charts
	}
	return toSerialize, nil
}

type NullableCodeRunArtifacts struct {
	value *CodeRunArtifacts
	isSet bool
}

func (v NullableCodeRunArtifacts) Get() *CodeRunArtifacts {
	return v.value
}

func (v *NullableCodeRunArtifacts) Set(val *CodeRunArtifacts) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableCodeRunArtifacts(val *CodeRunArtifacts) *NullableCodeRunArtifacts {
	return &NullableCodeRunArtifacts{value: val, isSet: true}
}

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

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


