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

// StreamingModes Supported streaming modes. If missing, streaming is not supported.  If no mode is supported attempts to stream output will result in an error.
type StreamingModes struct {
	// This is `true` if the agent supports values streaming. If `false` or missing, values streaming is not supported. Values streaming consists of a stream of objects of type `ValueRunResultUpdate`, where each one sent over the stream fully replace the previous one.
	Values *bool `json:"values,omitempty"`
	// This is `true` if the agent supports custom objects streaming. If `false` or missing, custom streaming is not supported. Custom Objects streaming consists of a stream of object whose schema is specified by the agent ACP descriptor under `specs.custom_streaming_update`.
	Custom *bool `json:"custom,omitempty"`
}

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

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

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

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

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

	return false
}

// SetValues gets a reference to the given bool and assigns it to the Values field.
func (o *StreamingModes) SetValues(v bool) {
	o.Values = &v
}

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

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

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

	return false
}

// SetCustom gets a reference to the given bool and assigns it to the Custom field.
func (o *StreamingModes) SetCustom(v bool) {
	o.Custom = &v
}

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

func (o StreamingModes) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Values) {
		toSerialize["values"] = o.Values
	}
	if !IsNil(o.Custom) {
		toSerialize["custom"] = o.Custom
	}
	return toSerialize, nil
}

type NullableStreamingModes struct {
	value *StreamingModes
	isSet bool
}

func (v NullableStreamingModes) Get() *StreamingModes {
	return v.value
}

func (v *NullableStreamingModes) Set(val *StreamingModes) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableStreamingModes(val *StreamingModes) *NullableStreamingModes {
	return &NullableStreamingModes{value: val, isSet: true}
}

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

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