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

// InterruptConfig struct for InterruptConfig
type InterruptConfig struct {
	InterruptRef string `json:"interrupt_ref"`
	ResumeRef    string `json:"resume_ref"`
}

// NewInterruptConfig instantiates a new InterruptConfig 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 NewInterruptConfig(interruptRef string, resumeRef string) *InterruptConfig {
	this := InterruptConfig{}
	this.InterruptRef = interruptRef
	this.ResumeRef = resumeRef
	return &this
}

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

// GetInterruptRef returns the InterruptRef field value
func (o *InterruptConfig) GetInterruptRef() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.InterruptRef
}

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

// SetInterruptRef sets field value
func (o *InterruptConfig) SetInterruptRef(v string) {
	o.InterruptRef = v
}

// GetResumeRef returns the ResumeRef field value
func (o *InterruptConfig) GetResumeRef() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.ResumeRef
}

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

// SetResumeRef sets field value
func (o *InterruptConfig) SetResumeRef(v string) {
	o.ResumeRef = v
}

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

func (o InterruptConfig) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["interrupt_ref"] = o.InterruptRef
	toSerialize["resume_ref"] = o.ResumeRef
	return toSerialize, nil
}

type NullableInterruptConfig struct {
	value *InterruptConfig
	isSet bool
}

func (v NullableInterruptConfig) Get() *InterruptConfig {
	return v.value
}

func (v *NullableInterruptConfig) Set(val *InterruptConfig) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableInterruptConfig(val *InterruptConfig) *NullableInterruptConfig {
	return &NullableInterruptConfig{value: val, isSet: true}
}

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

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