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

// AgentACPSpecsInterruptsInner struct for AgentACPSpecsInterruptsInner
type AgentACPSpecsInterruptsInner struct {
	// Name of this interrupt type. Needs to be unique in the list of interrupts.
	InterruptType string `json:"interrupt_type"`
	// This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object
	InterruptPayload map[string]interface{} `json:"interrupt_payload"`
	// This object contains an instance of an OpenAPI schema object, formatted as per the OpenAPI specs: https://spec.openapis.org/oas/v3.1.1.html#schema-object
	ResumePayload map[string]interface{} `json:"resume_payload"`
}

// NewAgentACPSpecsInterruptsInner instantiates a new AgentACPSpecsInterruptsInner 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 NewAgentACPSpecsInterruptsInner(interruptType string, interruptPayload map[string]interface{}, resumePayload map[string]interface{}) *AgentACPSpecsInterruptsInner {
	this := AgentACPSpecsInterruptsInner{}
	this.InterruptType = interruptType
	this.InterruptPayload = interruptPayload
	this.ResumePayload = resumePayload
	return &this
}

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

// GetInterruptType returns the InterruptType field value
func (o *AgentACPSpecsInterruptsInner) GetInterruptType() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.InterruptType
}

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

// SetInterruptType sets field value
func (o *AgentACPSpecsInterruptsInner) SetInterruptType(v string) {
	o.InterruptType = v
}

// GetInterruptPayload returns the InterruptPayload field value
func (o *AgentACPSpecsInterruptsInner) GetInterruptPayload() map[string]interface{} {
	if o == nil {
		var ret map[string]interface{}
		return ret
	}

	return o.InterruptPayload
}

// GetInterruptPayloadOk returns a tuple with the InterruptPayload field value
// and a boolean to check if the value has been set.
func (o *AgentACPSpecsInterruptsInner) GetInterruptPayloadOk() (map[string]interface{}, bool) {
	if o == nil {
		return map[string]interface{}{}, false
	}
	return o.InterruptPayload, true
}

// SetInterruptPayload sets field value
func (o *AgentACPSpecsInterruptsInner) SetInterruptPayload(v map[string]interface{}) {
	o.InterruptPayload = v
}

// GetResumePayload returns the ResumePayload field value
func (o *AgentACPSpecsInterruptsInner) GetResumePayload() map[string]interface{} {
	if o == nil {
		var ret map[string]interface{}
		return ret
	}

	return o.ResumePayload
}

// GetResumePayloadOk returns a tuple with the ResumePayload field value
// and a boolean to check if the value has been set.
func (o *AgentACPSpecsInterruptsInner) GetResumePayloadOk() (map[string]interface{}, bool) {
	if o == nil {
		return map[string]interface{}{}, false
	}
	return o.ResumePayload, true
}

// SetResumePayload sets field value
func (o *AgentACPSpecsInterruptsInner) SetResumePayload(v map[string]interface{}) {
	o.ResumePayload = v
}

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

func (o AgentACPSpecsInterruptsInner) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["interrupt_type"] = o.InterruptType
	toSerialize["interrupt_payload"] = o.InterruptPayload
	toSerialize["resume_payload"] = o.ResumePayload
	return toSerialize, nil
}

type NullableAgentACPSpecsInterruptsInner struct {
	value *AgentACPSpecsInterruptsInner
	isSet bool
}

func (v NullableAgentACPSpecsInterruptsInner) Get() *AgentACPSpecsInterruptsInner {
	return v.value
}

func (v *NullableAgentACPSpecsInterruptsInner) Set(val *AgentACPSpecsInterruptsInner) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableAgentACPSpecsInterruptsInner(val *AgentACPSpecsInterruptsInner) *NullableAgentACPSpecsInterruptsInner {
	return &NullableAgentACPSpecsInterruptsInner{value: val, isSet: true}
}

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

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