// 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 AgentCapabilities type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AgentCapabilities{}

// AgentCapabilities Declares what invocation features this agent is capable of.
type AgentCapabilities struct {
	// This is `true` if the agent supports run threads. If this is `false`, then the threads tagged with `Threads` are not available. If missing, it means `false`
	Threads *bool `json:"threads,omitempty"`
	// This is `true` if the agent runs can interrupt to request additional input and can be subsequently resumed. If missing, it means `false`
	Interrupts *bool `json:"interrupts,omitempty"`
	// This is `true` if the agent supports a webhook to report run results. If this is `false`, providing a `webhook` at run creation has no effect. If missing, it means `false`
	Callbacks *bool           `json:"callbacks,omitempty"`
	Streaming *StreamingModes `json:"streaming,omitempty"`
}

// NewAgentCapabilities instantiates a new AgentCapabilities 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 NewAgentCapabilities() *AgentCapabilities {
	this := AgentCapabilities{}
	var threads bool = false
	this.Threads = &threads
	var interrupts bool = false
	this.Interrupts = &interrupts
	var callbacks bool = false
	this.Callbacks = &callbacks
	return &this
}

// NewAgentCapabilitiesWithDefaults instantiates a new AgentCapabilities 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 NewAgentCapabilitiesWithDefaults() *AgentCapabilities {
	this := AgentCapabilities{}
	var threads bool = false
	this.Threads = &threads
	var interrupts bool = false
	this.Interrupts = &interrupts
	var callbacks bool = false
	this.Callbacks = &callbacks
	return &this
}

// GetThreads returns the Threads field value if set, zero value otherwise.
func (o *AgentCapabilities) GetThreads() bool {
	if o == nil || IsNil(o.Threads) {
		var ret bool
		return ret
	}
	return *o.Threads
}

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

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

	return false
}

// SetThreads gets a reference to the given bool and assigns it to the Threads field.
func (o *AgentCapabilities) SetThreads(v bool) {
	o.Threads = &v
}

// GetInterrupts returns the Interrupts field value if set, zero value otherwise.
func (o *AgentCapabilities) GetInterrupts() bool {
	if o == nil || IsNil(o.Interrupts) {
		var ret bool
		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.
func (o *AgentCapabilities) GetInterruptsOk() (*bool, 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 *AgentCapabilities) HasInterrupts() bool {
	if o != nil && !IsNil(o.Interrupts) {
		return true
	}

	return false
}

// SetInterrupts gets a reference to the given bool and assigns it to the Interrupts field.
func (o *AgentCapabilities) SetInterrupts(v bool) {
	o.Interrupts = &v
}

// GetCallbacks returns the Callbacks field value if set, zero value otherwise.
func (o *AgentCapabilities) GetCallbacks() bool {
	if o == nil || IsNil(o.Callbacks) {
		var ret bool
		return ret
	}
	return *o.Callbacks
}

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

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

	return false
}

// SetCallbacks gets a reference to the given bool and assigns it to the Callbacks field.
func (o *AgentCapabilities) SetCallbacks(v bool) {
	o.Callbacks = &v
}

// GetStreaming returns the Streaming field value if set, zero value otherwise.
func (o *AgentCapabilities) GetStreaming() StreamingModes {
	if o == nil || IsNil(o.Streaming) {
		var ret StreamingModes
		return ret
	}
	return *o.Streaming
}

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

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

	return false
}

// SetStreaming gets a reference to the given StreamingModes and assigns it to the Streaming field.
func (o *AgentCapabilities) SetStreaming(v StreamingModes) {
	o.Streaming = &v
}

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

func (o AgentCapabilities) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Threads) {
		toSerialize["threads"] = o.Threads
	}
	if !IsNil(o.Interrupts) {
		toSerialize["interrupts"] = o.Interrupts
	}
	if !IsNil(o.Callbacks) {
		toSerialize["callbacks"] = o.Callbacks
	}
	if !IsNil(o.Streaming) {
		toSerialize["streaming"] = o.Streaming
	}
	return toSerialize, nil
}

type NullableAgentCapabilities struct {
	value *AgentCapabilities
	isSet bool
}

func (v NullableAgentCapabilities) Get() *AgentCapabilities {
	return v.value
}

func (v *NullableAgentCapabilities) Set(val *AgentCapabilities) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableAgentCapabilities(val *AgentCapabilities) *NullableAgentCapabilities {
	return &NullableAgentCapabilities{value: val, isSet: true}
}

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

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