// Copyright AGNTCY Contributors (https://github.com/agntcy)
// SPDX-License-Identifier: Apache-2.0
/*
Agent Manifest Definition

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

API version: 0.1
*/

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

package manifests

import (
	"encoding/json"
)

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

// LlamaIndexConfig Describes llamaindex based agent deployment config
type LlamaIndexConfig struct {
	FrameworkType string                     `json:"framework_type"`
	Path          string                     `json:"path"`
	Interrupts    map[string]InterruptConfig `json:"interrupts,omitempty"`
}

// NewLlamaIndexConfig instantiates a new LlamaIndexConfig 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 NewLlamaIndexConfig(frameworkType string, path string) *LlamaIndexConfig {
	this := LlamaIndexConfig{}
	this.FrameworkType = frameworkType
	this.Path = path
	return &this
}

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

// GetFrameworkType returns the FrameworkType field value
func (o *LlamaIndexConfig) GetFrameworkType() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.FrameworkType
}

// GetFrameworkTypeOk returns a tuple with the FrameworkType field value
// and a boolean to check if the value has been set.
func (o *LlamaIndexConfig) GetFrameworkTypeOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.FrameworkType, true
}

// SetFrameworkType sets field value
func (o *LlamaIndexConfig) SetFrameworkType(v string) {
	o.FrameworkType = v
}

// GetPath returns the Path field value
func (o *LlamaIndexConfig) GetPath() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Path
}

// GetPathOk returns a tuple with the Path field value
// and a boolean to check if the value has been set.
func (o *LlamaIndexConfig) GetPathOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Path, true
}

// SetPath sets field value
func (o *LlamaIndexConfig) SetPath(v string) {
	o.Path = v
}

// GetInterrupts returns the Interrupts field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *LlamaIndexConfig) GetInterrupts() map[string]InterruptConfig {
	if o == nil {
		var ret map[string]InterruptConfig
		return ret
	}
	return o.Interrupts
}

// GetInterruptsOk returns a tuple with the Interrupts field value if set, nil otherwise
// 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 *LlamaIndexConfig) GetInterruptsOk() (*map[string]InterruptConfig, bool) {
	if o == nil || IsNil(o.Interrupts) {
		return nil, false
	}
	return &o.Interrupts, true
}

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

	return false
}

// SetInterrupts gets a reference to the given map[string]InterruptConfig and assigns it to the Interrupts field.
func (o *LlamaIndexConfig) SetInterrupts(v map[string]InterruptConfig) {
	o.Interrupts = v
}

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

func (o LlamaIndexConfig) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["framework_type"] = o.FrameworkType
	toSerialize["path"] = o.Path
	if o.Interrupts != nil {
		toSerialize["interrupts"] = o.Interrupts
	}
	return toSerialize, nil
}

type NullableLlamaIndexConfig struct {
	value *LlamaIndexConfig
	isSet bool
}

func (v NullableLlamaIndexConfig) Get() *LlamaIndexConfig {
	return v.value
}

func (v *NullableLlamaIndexConfig) Set(val *LlamaIndexConfig) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableLlamaIndexConfig(val *LlamaIndexConfig) *NullableLlamaIndexConfig {
	return &NullableLlamaIndexConfig{value: val, isSet: true}
}

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

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