/*
Hindsight HTTP API

HTTP API for Hindsight

API version: 0.4.17
*/

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

package hindsight

import (
	"encoding/json"
)

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

// ReflectTrace Execution trace of LLM and tool calls during reflection.
type ReflectTrace struct {
	// Tool calls made during reflection
	ToolCalls []ReflectToolCall `json:"tool_calls,omitempty"`
	// LLM calls made during reflection
	LlmCalls []ReflectLLMCall `json:"llm_calls,omitempty"`
}

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

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

// GetToolCalls returns the ToolCalls field value if set, zero value otherwise.
func (o *ReflectTrace) GetToolCalls() []ReflectToolCall {
	if o == nil || IsNil(o.ToolCalls) {
		var ret []ReflectToolCall
		return ret
	}
	return o.ToolCalls
}

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

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

	return false
}

// SetToolCalls gets a reference to the given []ReflectToolCall and assigns it to the ToolCalls field.
func (o *ReflectTrace) SetToolCalls(v []ReflectToolCall) {
	o.ToolCalls = v
}

// GetLlmCalls returns the LlmCalls field value if set, zero value otherwise.
func (o *ReflectTrace) GetLlmCalls() []ReflectLLMCall {
	if o == nil || IsNil(o.LlmCalls) {
		var ret []ReflectLLMCall
		return ret
	}
	return o.LlmCalls
}

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

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

	return false
}

// SetLlmCalls gets a reference to the given []ReflectLLMCall and assigns it to the LlmCalls field.
func (o *ReflectTrace) SetLlmCalls(v []ReflectLLMCall) {
	o.LlmCalls = v
}

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

func (o ReflectTrace) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.ToolCalls) {
		toSerialize["tool_calls"] = o.ToolCalls
	}
	if !IsNil(o.LlmCalls) {
		toSerialize["llm_calls"] = o.LlmCalls
	}
	return toSerialize, nil
}

type NullableReflectTrace struct {
	value *ReflectTrace
	isSet bool
}

func (v NullableReflectTrace) Get() *ReflectTrace {
	return v.value
}

func (v *NullableReflectTrace) Set(val *ReflectTrace) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableReflectTrace(val *ReflectTrace) *NullableReflectTrace {
	return &NullableReflectTrace{value: val, isSet: true}
}

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

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


