// Copyright © 2023 Cisco Systems, Inc. and its affiliates.
// All rights reserved.
//
// Licensed under the Mozilla Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://mozilla.org/MPL/2.0/
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: MPL-2.0

// Code generated by "gen/generator.go"; DO NOT EDIT.

package provider

// Section below is generated&owned by "gen/generator.go". //template:begin imports
import (
	"context"
	"fmt"
	"reflect"
	"regexp"
	"strconv"
	"strings"

	"github.com/CiscoDevNet/terraform-provider-iosxe/internal/provider/helpers"
	"github.com/hashicorp/terraform-plugin-framework/types"
	"github.com/tidwall/gjson"
	"github.com/tidwall/sjson"
)

// End of section. //template:end imports

// Section below is generated&owned by "gen/generator.go". //template:begin types
type EEM struct {
	Device                            types.String              `tfsdk:"device"`
	Id                                types.String              `tfsdk:"id"`
	EnvironmentVariables              []EEMEnvironmentVariables `tfsdk:"environment_variables"`
	SessionCliUsername                types.String              `tfsdk:"session_cli_username"`
	SessionCliUsernamePrivilege       types.Int64               `tfsdk:"session_cli_username_privilege"`
	HistorySizeEvents                 types.Int64               `tfsdk:"history_size_events"`
	HistorySizeTraps                  types.Int64               `tfsdk:"history_size_traps"`
	DirectoryUserPolicy               types.String              `tfsdk:"directory_user_policy"`
	SchedulerAppletThreadClassDefault types.Bool                `tfsdk:"scheduler_applet_thread_class_default"`
	SchedulerAppletThreadClassNumber  types.Int64               `tfsdk:"scheduler_applet_thread_class_number"`
	DetectorRpcMaxSessions            types.Int64               `tfsdk:"detector_rpc_max_sessions"`
	DetectorRoutingBootupDelay        types.Float64             `tfsdk:"detector_routing_bootup_delay"`
	Applets                           []EEMApplets              `tfsdk:"applets"`
}

type EEMData struct {
	Device                            types.String              `tfsdk:"device"`
	Id                                types.String              `tfsdk:"id"`
	EnvironmentVariables              []EEMEnvironmentVariables `tfsdk:"environment_variables"`
	SessionCliUsername                types.String              `tfsdk:"session_cli_username"`
	SessionCliUsernamePrivilege       types.Int64               `tfsdk:"session_cli_username_privilege"`
	HistorySizeEvents                 types.Int64               `tfsdk:"history_size_events"`
	HistorySizeTraps                  types.Int64               `tfsdk:"history_size_traps"`
	DirectoryUserPolicy               types.String              `tfsdk:"directory_user_policy"`
	SchedulerAppletThreadClassDefault types.Bool                `tfsdk:"scheduler_applet_thread_class_default"`
	SchedulerAppletThreadClassNumber  types.Int64               `tfsdk:"scheduler_applet_thread_class_number"`
	DetectorRpcMaxSessions            types.Int64               `tfsdk:"detector_rpc_max_sessions"`
	DetectorRoutingBootupDelay        types.Float64             `tfsdk:"detector_routing_bootup_delay"`
	Applets                           []EEMApplets              `tfsdk:"applets"`
}
type EEMEnvironmentVariables struct {
	Name  types.String `tfsdk:"name"`
	Value types.String `tfsdk:"value"`
}
type EEMApplets struct {
	Name                        types.String        `tfsdk:"name"`
	Authorization               types.String        `tfsdk:"authorization"`
	Class                       types.String        `tfsdk:"class"`
	Description                 types.String        `tfsdk:"description"`
	EventCliPattern             types.String        `tfsdk:"event_cli_pattern"`
	EventCliSync                types.String        `tfsdk:"event_cli_sync"`
	EventCliSkip                types.String        `tfsdk:"event_cli_skip"`
	Actions                     []EEMAppletsActions `tfsdk:"actions"`
	EventTimerWatchdogTime      types.Float64       `tfsdk:"event_timer_watchdog_time"`
	EventTimerWatchdogName      types.String        `tfsdk:"event_timer_watchdog_name"`
	EventTimerWatchdogMaxrun    types.Float64       `tfsdk:"event_timer_watchdog_maxrun"`
	EventTimerWatchdogRatelimit types.Float64       `tfsdk:"event_timer_watchdog_ratelimit"`
	EventTimerCronEntry         types.String        `tfsdk:"event_timer_cron_entry"`
	EventTimerCronName          types.String        `tfsdk:"event_timer_cron_name"`
	EventTimerCronMaxrun        types.Float64       `tfsdk:"event_timer_cron_maxrun"`
	EventTimerCronRatelimit     types.Float64       `tfsdk:"event_timer_cron_ratelimit"`
}
type EEMAppletsActions struct {
	Name                            types.String `tfsdk:"name"`
	CliCommand                      types.String `tfsdk:"cli_command"`
	RegexpStringPattern             types.String `tfsdk:"regexp_string_pattern"`
	RegexpStringInput               types.String `tfsdk:"regexp_string_input"`
	RegexpStringMatch               types.String `tfsdk:"regexp_string_match"`
	RegexpStringMatch1              types.String `tfsdk:"regexp_string_match1"`
	RegexpStringMatch2              types.String `tfsdk:"regexp_string_match2"`
	RegexpStringMatch3              types.String `tfsdk:"regexp_string_match3"`
	SyslogFacility                  types.String `tfsdk:"syslog_facility"`
	SyslogMsg                       types.String `tfsdk:"syslog_msg"`
	SyslogPriority                  types.String `tfsdk:"syslog_priority"`
	SetVarname                      types.String `tfsdk:"set_varname"`
	SetValue                        types.String `tfsdk:"set_value"`
	IfStringOp1                     types.String `tfsdk:"if_string_op_1"`
	IfKeyword                       types.String `tfsdk:"if_keyword"`
	IfStringOp2                     types.String `tfsdk:"if_string_op_2"`
	IfGoto                          types.String `tfsdk:"if_goto"`
	ElseifOperand1                  types.String `tfsdk:"elseif_operand1"`
	ElseifOperation                 types.String `tfsdk:"elseif_operation"`
	ElseifOperand2                  types.String `tfsdk:"elseif_operand2"`
	Else                            types.Bool   `tfsdk:"else"`
	WhileOperand1                   types.String `tfsdk:"while_operand1"`
	WhileOperation                  types.String `tfsdk:"while_operation"`
	WhileOperand2                   types.String `tfsdk:"while_operand2"`
	Break                           types.Bool   `tfsdk:"break"`
	Continue                        types.Bool   `tfsdk:"continue"`
	IncrementVarname                types.String `tfsdk:"increment_varname"`
	IncrementValue                  types.String `tfsdk:"increment_value"`
	DecrementVarname                types.String `tfsdk:"decrement_varname"`
	DecrementValue                  types.String `tfsdk:"decrement_value"`
	AppendVarname                   types.String `tfsdk:"append_varname"`
	AppendValue                     types.String `tfsdk:"append_value"`
	DivideOperand1                  types.String `tfsdk:"divide_operand1"`
	DivideOperand2                  types.String `tfsdk:"divide_operand2"`
	ForeachLoopvar                  types.String `tfsdk:"foreach_loopvar"`
	ForeachIterator                 types.String `tfsdk:"foreach_iterator"`
	ForeachDelimiter                types.String `tfsdk:"foreach_delimiter"`
	Gets                            types.String `tfsdk:"gets"`
	Puts                            types.String `tfsdk:"puts"`
	Wait                            types.Int64  `tfsdk:"wait"`
	End                             types.Bool   `tfsdk:"end"`
	Exit                            types.Bool   `tfsdk:"exit"`
	Reload                          types.Bool   `tfsdk:"reload"`
	ContextRetrieveKey              types.String `tfsdk:"context_retrieve_key"`
	ContextRetrieveVariable         types.String `tfsdk:"context_retrieve_variable"`
	ContextSaveKey                  types.String `tfsdk:"context_save_key"`
	ContextSaveVariable             types.String `tfsdk:"context_save_variable"`
	StringTrim                      types.String `tfsdk:"string_trim"`
	InfoTypeSnmpTrapEnterpriseOid   types.String `tfsdk:"info_type_snmp_trap_enterprise_oid"`
	InfoTypeSnmpTrapGenericTrapnum  types.Int64  `tfsdk:"info_type_snmp_trap_generic_trapnum"`
	InfoTypeSnmpTrapSpecificTrapnum types.Int64  `tfsdk:"info_type_snmp_trap_specific_trapnum"`
	InfoTypeSnmpTrapTrapOid         types.String `tfsdk:"info_type_snmp_trap_trap_oid"`
	InfoTypeSnmpTrapTrapVar         types.String `tfsdk:"info_type_snmp_trap_trap_var"`
	HandleErrorType                 types.String `tfsdk:"handle_error_type"`
	CounterName                     types.String `tfsdk:"counter_name"`
	CounterValue                    types.Int64  `tfsdk:"counter_value"`
	CounterOpDec                    types.Bool   `tfsdk:"counter_op_dec"`
	CounterOpInc                    types.Bool   `tfsdk:"counter_op_inc"`
	CounterOpSet                    types.Bool   `tfsdk:"counter_op_set"`
	CounterOpNop                    types.Bool   `tfsdk:"counter_op_nop"`
	SnmpTrapIntdata1                types.Int64  `tfsdk:"snmp_trap_intdata1"`
	SnmpTrapIntdata2                types.Int64  `tfsdk:"snmp_trap_intdata2"`
	SnmpTrapStrdata                 types.String `tfsdk:"snmp_trap_strdata"`
	InfoTypeSnmpVar                 types.String `tfsdk:"info_type_snmp_var"`
	InfoTypeSnmpVarOid              types.String `tfsdk:"info_type_snmp_var_oid"`
	InfoTypeSnmpVarOidType          types.String `tfsdk:"info_type_snmp_var_oid_type"`
	InfoTypeSnmpVarOidTypeValue     types.String `tfsdk:"info_type_snmp_var_oid_type_value"`
	StringTrimFirstStringOp1        types.String `tfsdk:"string_trim_first_string_op_1"`
	StringTrimFirstStringOp2        types.String `tfsdk:"string_trim_first_string_op_2"`
}

// End of section. //template:end types

// Section below is generated&owned by "gen/generator.go". //template:begin getPath

func (data EEM) getPath() string {
	return "Cisco-IOS-XE-native:native/event/Cisco-IOS-XE-eem:manager"
}

func (data EEMData) getPath() string {
	return "Cisco-IOS-XE-native:native/event/Cisco-IOS-XE-eem:manager"
}

// if last path element has a key -> remove it
func (data EEM) getPathShort() string {
	path := data.getPath()
	re := regexp.MustCompile(`(.*)=[^\/]*$`)
	matches := re.FindStringSubmatch(path)
	if len(matches) <= 1 {
		return path
	}
	return matches[1]
}

// End of section. //template:end getPath

// Section below is generated&owned by "gen/generator.go". //template:begin toBody

func (data EEM) toBody(ctx context.Context) string {
	body := `{"` + helpers.LastElement(data.getPath()) + `":{}}`
	if !data.SessionCliUsername.IsNull() && !data.SessionCliUsername.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"session.cli.username.username_in_word_set", data.SessionCliUsername.ValueString())
	}
	if !data.SessionCliUsernamePrivilege.IsNull() && !data.SessionCliUsernamePrivilege.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"session.cli.username.privilege_set", strconv.FormatInt(data.SessionCliUsernamePrivilege.ValueInt64(), 10))
	}
	if !data.HistorySizeEvents.IsNull() && !data.HistorySizeEvents.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"history.size.events", strconv.FormatInt(data.HistorySizeEvents.ValueInt64(), 10))
	}
	if !data.HistorySizeTraps.IsNull() && !data.HistorySizeTraps.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"history.size.traps", strconv.FormatInt(data.HistorySizeTraps.ValueInt64(), 10))
	}
	if !data.DirectoryUserPolicy.IsNull() && !data.DirectoryUserPolicy.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"directory.user.policy", data.DirectoryUserPolicy.ValueString())
	}
	if !data.SchedulerAppletThreadClassDefault.IsNull() && !data.SchedulerAppletThreadClassDefault.IsUnknown() {
		if data.SchedulerAppletThreadClassDefault.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"scheduler.applet.thread.class.default", map[string]string{})
		}
	}
	if !data.SchedulerAppletThreadClassNumber.IsNull() && !data.SchedulerAppletThreadClassNumber.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"scheduler.applet.thread.class.number", strconv.FormatInt(data.SchedulerAppletThreadClassNumber.ValueInt64(), 10))
	}
	if !data.DetectorRpcMaxSessions.IsNull() && !data.DetectorRpcMaxSessions.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"detector.rpc.max-sessions", strconv.FormatInt(data.DetectorRpcMaxSessions.ValueInt64(), 10))
	}
	if !data.DetectorRoutingBootupDelay.IsNull() && !data.DetectorRoutingBootupDelay.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"detector.routing.bootup-delay", strconv.FormatFloat(data.DetectorRoutingBootupDelay.ValueFloat64(), 'f', 1, 64))
	}
	if len(data.EnvironmentVariables) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"environment", []interface{}{})
		for index, item := range data.EnvironmentVariables {
			if !item.Name.IsNull() && !item.Name.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"environment"+"."+strconv.Itoa(index)+"."+"name", item.Name.ValueString())
			}
			if !item.Value.IsNull() && !item.Value.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"environment"+"."+strconv.Itoa(index)+"."+"value", item.Value.ValueString())
			}
		}
	}
	if len(data.Applets) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet", []interface{}{})
		for index, item := range data.Applets {
			if !item.Name.IsNull() && !item.Name.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"name", item.Name.ValueString())
			}
			if !item.Authorization.IsNull() && !item.Authorization.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"authorization", item.Authorization.ValueString())
			}
			if !item.Class.IsNull() && !item.Class.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"class", item.Class.ValueString())
			}
			if !item.Description.IsNull() && !item.Description.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"description", item.Description.ValueString())
			}
			if !item.EventCliPattern.IsNull() && !item.EventCliPattern.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"event.cli.pattern", item.EventCliPattern.ValueString())
			}
			if !item.EventCliSync.IsNull() && !item.EventCliSync.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"event.cli.sync", item.EventCliSync.ValueString())
			}
			if !item.EventCliSkip.IsNull() && !item.EventCliSkip.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"event.cli.skip", item.EventCliSkip.ValueString())
			}
			if !item.EventTimerWatchdogTime.IsNull() && !item.EventTimerWatchdogTime.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"event.timer-choice.watchdog.time-set", strconv.FormatFloat(item.EventTimerWatchdogTime.ValueFloat64(), 'f', 1, 64))
			}
			if !item.EventTimerWatchdogName.IsNull() && !item.EventTimerWatchdogName.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"event.timer-choice.watchdog.name", item.EventTimerWatchdogName.ValueString())
			}
			if !item.EventTimerWatchdogMaxrun.IsNull() && !item.EventTimerWatchdogMaxrun.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"event.timer-choice.watchdog.maxrun-set", strconv.FormatFloat(item.EventTimerWatchdogMaxrun.ValueFloat64(), 'f', 1, 64))
			}
			if !item.EventTimerWatchdogRatelimit.IsNull() && !item.EventTimerWatchdogRatelimit.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"event.timer-choice.watchdog.ratelimit-set", strconv.FormatFloat(item.EventTimerWatchdogRatelimit.ValueFloat64(), 'f', 1, 64))
			}
			if !item.EventTimerCronEntry.IsNull() && !item.EventTimerCronEntry.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"event.timer-choice.cron.cron-entry", item.EventTimerCronEntry.ValueString())
			}
			if !item.EventTimerCronName.IsNull() && !item.EventTimerCronName.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"event.timer-choice.cron.name", item.EventTimerCronName.ValueString())
			}
			if !item.EventTimerCronMaxrun.IsNull() && !item.EventTimerCronMaxrun.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"event.timer-choice.cron.maxrun-set", strconv.FormatFloat(item.EventTimerCronMaxrun.ValueFloat64(), 'f', 1, 64))
			}
			if !item.EventTimerCronRatelimit.IsNull() && !item.EventTimerCronRatelimit.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"event.timer-choice.cron.ratelimit-set", strconv.FormatFloat(item.EventTimerCronRatelimit.ValueFloat64(), 'f', 1, 64))
			}
			if len(item.Actions) > 0 {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action", []interface{}{})
				for cindex, citem := range item.Actions {
					if !citem.Name.IsNull() && !citem.Name.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"name", citem.Name.ValueString())
					}
					if !citem.CliCommand.IsNull() && !citem.CliCommand.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"cli-choice.command", citem.CliCommand.ValueString())
					}
					if !citem.RegexpStringPattern.IsNull() && !citem.RegexpStringPattern.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"regexp-option.string-pattern", citem.RegexpStringPattern.ValueString())
					}
					if !citem.RegexpStringInput.IsNull() && !citem.RegexpStringInput.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"regexp-option.string-input", citem.RegexpStringInput.ValueString())
					}
					if !citem.RegexpStringMatch.IsNull() && !citem.RegexpStringMatch.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"regexp-option.string-match", citem.RegexpStringMatch.ValueString())
					}
					if !citem.RegexpStringMatch1.IsNull() && !citem.RegexpStringMatch1.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"regexp-option.string-submatch1", citem.RegexpStringMatch1.ValueString())
					}
					if !citem.RegexpStringMatch2.IsNull() && !citem.RegexpStringMatch2.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"regexp-option.string-submatch2", citem.RegexpStringMatch2.ValueString())
					}
					if !citem.RegexpStringMatch3.IsNull() && !citem.RegexpStringMatch3.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"regexp-option.string-submatch3", citem.RegexpStringMatch3.ValueString())
					}
					if !citem.SyslogFacility.IsNull() && !citem.SyslogFacility.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"syslog-option.facility", citem.SyslogFacility.ValueString())
					}
					if !citem.SyslogMsg.IsNull() && !citem.SyslogMsg.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"syslog-option.msg", citem.SyslogMsg.ValueString())
					}
					if !citem.SyslogPriority.IsNull() && !citem.SyslogPriority.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"syslog-option.priority", citem.SyslogPriority.ValueString())
					}
					if !citem.SetVarname.IsNull() && !citem.SetVarname.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"set.varname", citem.SetVarname.ValueString())
					}
					if !citem.SetValue.IsNull() && !citem.SetValue.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"set.value", citem.SetValue.ValueString())
					}
					if !citem.IfStringOp1.IsNull() && !citem.IfStringOp1.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"if.string-op-1", citem.IfStringOp1.ValueString())
					}
					if !citem.IfKeyword.IsNull() && !citem.IfKeyword.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"if.keyword", citem.IfKeyword.ValueString())
					}
					if !citem.IfStringOp2.IsNull() && !citem.IfStringOp2.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"if.string-op-2", citem.IfStringOp2.ValueString())
					}
					if !citem.IfGoto.IsNull() && !citem.IfGoto.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"if.goto", citem.IfGoto.ValueString())
					}
					if !citem.ElseifOperand1.IsNull() && !citem.ElseifOperand1.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"elseif.operand1", citem.ElseifOperand1.ValueString())
					}
					if !citem.ElseifOperation.IsNull() && !citem.ElseifOperation.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"elseif.operation", citem.ElseifOperation.ValueString())
					}
					if !citem.ElseifOperand2.IsNull() && !citem.ElseifOperand2.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"elseif.operand2", citem.ElseifOperand2.ValueString())
					}
					if !citem.Else.IsNull() && !citem.Else.IsUnknown() {
						if citem.Else.ValueBool() {
							body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"else", map[string]string{})
						}
					}
					if !citem.WhileOperand1.IsNull() && !citem.WhileOperand1.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"while.operand1", citem.WhileOperand1.ValueString())
					}
					if !citem.WhileOperation.IsNull() && !citem.WhileOperation.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"while.operation", citem.WhileOperation.ValueString())
					}
					if !citem.WhileOperand2.IsNull() && !citem.WhileOperand2.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"while.operand2", citem.WhileOperand2.ValueString())
					}
					if !citem.Break.IsNull() && !citem.Break.IsUnknown() {
						if citem.Break.ValueBool() {
							body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"break", map[string]string{})
						}
					}
					if !citem.Continue.IsNull() && !citem.Continue.IsUnknown() {
						if citem.Continue.ValueBool() {
							body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"continue", map[string]string{})
						}
					}
					if !citem.IncrementVarname.IsNull() && !citem.IncrementVarname.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"increment.varname", citem.IncrementVarname.ValueString())
					}
					if !citem.IncrementValue.IsNull() && !citem.IncrementValue.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"increment.value", citem.IncrementValue.ValueString())
					}
					if !citem.DecrementVarname.IsNull() && !citem.DecrementVarname.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"decrement.varname", citem.DecrementVarname.ValueString())
					}
					if !citem.DecrementValue.IsNull() && !citem.DecrementValue.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"decrement.value", citem.DecrementValue.ValueString())
					}
					if !citem.AppendVarname.IsNull() && !citem.AppendVarname.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"append.varname", citem.AppendVarname.ValueString())
					}
					if !citem.AppendValue.IsNull() && !citem.AppendValue.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"append.value", citem.AppendValue.ValueString())
					}
					if !citem.DivideOperand1.IsNull() && !citem.DivideOperand1.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"divide.operand1", citem.DivideOperand1.ValueString())
					}
					if !citem.DivideOperand2.IsNull() && !citem.DivideOperand2.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"divide.operand2", citem.DivideOperand2.ValueString())
					}
					if !citem.ForeachLoopvar.IsNull() && !citem.ForeachLoopvar.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"foreach.loopvar", citem.ForeachLoopvar.ValueString())
					}
					if !citem.ForeachIterator.IsNull() && !citem.ForeachIterator.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"foreach.iterator", citem.ForeachIterator.ValueString())
					}
					if !citem.ForeachDelimiter.IsNull() && !citem.ForeachDelimiter.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"foreach.delimiter", citem.ForeachDelimiter.ValueString())
					}
					if !citem.Gets.IsNull() && !citem.Gets.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"gets", citem.Gets.ValueString())
					}
					if !citem.Puts.IsNull() && !citem.Puts.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"puts", citem.Puts.ValueString())
					}
					if !citem.Wait.IsNull() && !citem.Wait.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"wait", strconv.FormatInt(citem.Wait.ValueInt64(), 10))
					}
					if !citem.End.IsNull() && !citem.End.IsUnknown() {
						if citem.End.ValueBool() {
							body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"end", map[string]string{})
						}
					}
					if !citem.Exit.IsNull() && !citem.Exit.IsUnknown() {
						if citem.Exit.ValueBool() {
							body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"exit", map[string]string{})
						}
					}
					if !citem.Reload.IsNull() && !citem.Reload.IsUnknown() {
						if citem.Reload.ValueBool() {
							body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"reload", map[string]string{})
						}
					}
					if !citem.ContextRetrieveKey.IsNull() && !citem.ContextRetrieveKey.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"context.retrieve.key", citem.ContextRetrieveKey.ValueString())
					}
					if !citem.ContextRetrieveVariable.IsNull() && !citem.ContextRetrieveVariable.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"context.retrieve.variable", citem.ContextRetrieveVariable.ValueString())
					}
					if !citem.ContextSaveKey.IsNull() && !citem.ContextSaveKey.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"context.save.key", citem.ContextSaveKey.ValueString())
					}
					if !citem.ContextSaveVariable.IsNull() && !citem.ContextSaveVariable.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"context.save.variable", citem.ContextSaveVariable.ValueString())
					}
					if !citem.StringTrim.IsNull() && !citem.StringTrim.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"string.trim", citem.StringTrim.ValueString())
					}
					if !citem.InfoTypeSnmpTrapEnterpriseOid.IsNull() && !citem.InfoTypeSnmpTrapEnterpriseOid.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"info.type.snmp.trap.enterprise-oid", citem.InfoTypeSnmpTrapEnterpriseOid.ValueString())
					}
					if !citem.InfoTypeSnmpTrapGenericTrapnum.IsNull() && !citem.InfoTypeSnmpTrapGenericTrapnum.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"info.type.snmp.trap.generic-trapnum", strconv.FormatInt(citem.InfoTypeSnmpTrapGenericTrapnum.ValueInt64(), 10))
					}
					if !citem.InfoTypeSnmpTrapSpecificTrapnum.IsNull() && !citem.InfoTypeSnmpTrapSpecificTrapnum.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"info.type.snmp.trap.specific-trapnum", strconv.FormatInt(citem.InfoTypeSnmpTrapSpecificTrapnum.ValueInt64(), 10))
					}
					if !citem.InfoTypeSnmpTrapTrapOid.IsNull() && !citem.InfoTypeSnmpTrapTrapOid.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"info.type.snmp.trap.trap-oid", citem.InfoTypeSnmpTrapTrapOid.ValueString())
					}
					if !citem.InfoTypeSnmpTrapTrapVar.IsNull() && !citem.InfoTypeSnmpTrapTrapVar.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"info.type.snmp.trap.trap-var", citem.InfoTypeSnmpTrapTrapVar.ValueString())
					}
					if !citem.HandleErrorType.IsNull() && !citem.HandleErrorType.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"handle-error.type", citem.HandleErrorType.ValueString())
					}
					if !citem.CounterName.IsNull() && !citem.CounterName.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"counter.name", citem.CounterName.ValueString())
					}
					if !citem.CounterValue.IsNull() && !citem.CounterValue.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"counter.value", strconv.FormatInt(citem.CounterValue.ValueInt64(), 10))
					}
					if !citem.CounterOpDec.IsNull() && !citem.CounterOpDec.IsUnknown() {
						if citem.CounterOpDec.ValueBool() {
							body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"counter.op.dec", map[string]string{})
						}
					}
					if !citem.CounterOpInc.IsNull() && !citem.CounterOpInc.IsUnknown() {
						if citem.CounterOpInc.ValueBool() {
							body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"counter.op.inc", map[string]string{})
						}
					}
					if !citem.CounterOpSet.IsNull() && !citem.CounterOpSet.IsUnknown() {
						if citem.CounterOpSet.ValueBool() {
							body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"counter.op.set", map[string]string{})
						}
					}
					if !citem.CounterOpNop.IsNull() && !citem.CounterOpNop.IsUnknown() {
						if citem.CounterOpNop.ValueBool() {
							body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"counter.op.nop", map[string]string{})
						}
					}
					if !citem.SnmpTrapIntdata1.IsNull() && !citem.SnmpTrapIntdata1.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"snmp-trap.intdata1", strconv.FormatInt(citem.SnmpTrapIntdata1.ValueInt64(), 10))
					}
					if !citem.SnmpTrapIntdata2.IsNull() && !citem.SnmpTrapIntdata2.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"snmp-trap.intdata2", strconv.FormatInt(citem.SnmpTrapIntdata2.ValueInt64(), 10))
					}
					if !citem.SnmpTrapStrdata.IsNull() && !citem.SnmpTrapStrdata.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"snmp-trap.strdata", citem.SnmpTrapStrdata.ValueString())
					}
					if !citem.InfoTypeSnmpVar.IsNull() && !citem.InfoTypeSnmpVar.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"info.type.snmp.var.variable-name", citem.InfoTypeSnmpVar.ValueString())
					}
					if !citem.InfoTypeSnmpVarOid.IsNull() && !citem.InfoTypeSnmpVarOid.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"info.type.snmp.var.oid", citem.InfoTypeSnmpVarOid.ValueString())
					}
					if !citem.InfoTypeSnmpVarOidType.IsNull() && !citem.InfoTypeSnmpVarOidType.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"info.type.snmp.var.oid-type", citem.InfoTypeSnmpVarOidType.ValueString())
					}
					if !citem.InfoTypeSnmpVarOidTypeValue.IsNull() && !citem.InfoTypeSnmpVarOidTypeValue.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"info.type.snmp.var.oid-type-value", citem.InfoTypeSnmpVarOidTypeValue.ValueString())
					}
					if !citem.StringTrimFirstStringOp1.IsNull() && !citem.StringTrimFirstStringOp1.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"string.trim.first.string-op-1", citem.StringTrimFirstStringOp1.ValueString())
					}
					if !citem.StringTrimFirstStringOp2.IsNull() && !citem.StringTrimFirstStringOp2.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"applet"+"."+strconv.Itoa(index)+"."+"action-config.action"+"."+strconv.Itoa(cindex)+"."+"string.trim.first.string-op-2", citem.StringTrimFirstStringOp2.ValueString())
					}
				}
			}
		}
	}
	return body
}

// End of section. //template:end toBody

// Section below is generated&owned by "gen/generator.go". //template:begin updateFromBody

func (data *EEM) updateFromBody(ctx context.Context, res gjson.Result) {
	prefix := helpers.LastElement(data.getPath()) + "."
	if res.Get(helpers.LastElement(data.getPath())).IsArray() {
		prefix += "0."
	}
	for i := range data.EnvironmentVariables {
		keys := [...]string{"name"}
		keyValues := [...]string{data.EnvironmentVariables[i].Name.ValueString()}

		var r gjson.Result
		res.Get(prefix + "environment").ForEach(
			func(_, v gjson.Result) bool {
				found := false
				for ik := range keys {
					if v.Get(keys[ik]).String() == keyValues[ik] {
						found = true
						continue
					}
					found = false
					break
				}
				if found {
					r = v
					return false
				}
				return true
			},
		)
		if value := r.Get("name"); value.Exists() && !data.EnvironmentVariables[i].Name.IsNull() {
			data.EnvironmentVariables[i].Name = types.StringValue(value.String())
		} else {
			data.EnvironmentVariables[i].Name = types.StringNull()
		}
		if value := r.Get("value"); value.Exists() && !data.EnvironmentVariables[i].Value.IsNull() {
			data.EnvironmentVariables[i].Value = types.StringValue(value.String())
		} else {
			data.EnvironmentVariables[i].Value = types.StringNull()
		}
	}
	if value := res.Get(prefix + "session.cli.username.username_in_word_set"); value.Exists() && !data.SessionCliUsername.IsNull() {
		data.SessionCliUsername = types.StringValue(value.String())
	} else {
		data.SessionCliUsername = types.StringNull()
	}
	if value := res.Get(prefix + "session.cli.username.privilege_set"); value.Exists() && !data.SessionCliUsernamePrivilege.IsNull() {
		data.SessionCliUsernamePrivilege = types.Int64Value(value.Int())
	} else {
		data.SessionCliUsernamePrivilege = types.Int64Null()
	}
	if value := res.Get(prefix + "history.size.events"); value.Exists() && !data.HistorySizeEvents.IsNull() {
		data.HistorySizeEvents = types.Int64Value(value.Int())
	} else {
		data.HistorySizeEvents = types.Int64Null()
	}
	if value := res.Get(prefix + "history.size.traps"); value.Exists() && !data.HistorySizeTraps.IsNull() {
		data.HistorySizeTraps = types.Int64Value(value.Int())
	} else {
		data.HistorySizeTraps = types.Int64Null()
	}
	if value := res.Get(prefix + "directory.user.policy"); value.Exists() && !data.DirectoryUserPolicy.IsNull() {
		data.DirectoryUserPolicy = types.StringValue(value.String())
	} else {
		data.DirectoryUserPolicy = types.StringNull()
	}
	if value := res.Get(prefix + "scheduler.applet.thread.class.default"); !data.SchedulerAppletThreadClassDefault.IsNull() {
		if value.Exists() {
			data.SchedulerAppletThreadClassDefault = types.BoolValue(true)
		} else {
			data.SchedulerAppletThreadClassDefault = types.BoolValue(false)
		}
	} else {
		data.SchedulerAppletThreadClassDefault = types.BoolNull()
	}
	if value := res.Get(prefix + "scheduler.applet.thread.class.number"); value.Exists() && !data.SchedulerAppletThreadClassNumber.IsNull() {
		data.SchedulerAppletThreadClassNumber = types.Int64Value(value.Int())
	} else {
		data.SchedulerAppletThreadClassNumber = types.Int64Null()
	}
	if value := res.Get(prefix + "detector.rpc.max-sessions"); value.Exists() && !data.DetectorRpcMaxSessions.IsNull() {
		data.DetectorRpcMaxSessions = types.Int64Value(value.Int())
	} else {
		data.DetectorRpcMaxSessions = types.Int64Null()
	}
	if value := res.Get(prefix + "detector.routing.bootup-delay"); value.Exists() && !data.DetectorRoutingBootupDelay.IsNull() {
		data.DetectorRoutingBootupDelay = types.Float64Value(value.Float())
	} else {
		data.DetectorRoutingBootupDelay = types.Float64Null()
	}
	for i := range data.Applets {
		keys := [...]string{"name"}
		keyValues := [...]string{data.Applets[i].Name.ValueString()}

		var r gjson.Result
		res.Get(prefix + "applet").ForEach(
			func(_, v gjson.Result) bool {
				found := false
				for ik := range keys {
					if v.Get(keys[ik]).String() == keyValues[ik] {
						found = true
						continue
					}
					found = false
					break
				}
				if found {
					r = v
					return false
				}
				return true
			},
		)
		if value := r.Get("name"); value.Exists() && !data.Applets[i].Name.IsNull() {
			data.Applets[i].Name = types.StringValue(value.String())
		} else {
			data.Applets[i].Name = types.StringNull()
		}
		if value := r.Get("authorization"); value.Exists() && !data.Applets[i].Authorization.IsNull() {
			data.Applets[i].Authorization = types.StringValue(value.String())
		} else {
			data.Applets[i].Authorization = types.StringNull()
		}
		if value := r.Get("class"); value.Exists() && !data.Applets[i].Class.IsNull() {
			data.Applets[i].Class = types.StringValue(value.String())
		} else {
			data.Applets[i].Class = types.StringNull()
		}
		if value := r.Get("description"); value.Exists() && !data.Applets[i].Description.IsNull() {
			data.Applets[i].Description = types.StringValue(value.String())
		} else {
			data.Applets[i].Description = types.StringNull()
		}
		if value := r.Get("event.cli.pattern"); value.Exists() && !data.Applets[i].EventCliPattern.IsNull() {
			data.Applets[i].EventCliPattern = types.StringValue(value.String())
		} else {
			data.Applets[i].EventCliPattern = types.StringNull()
		}
		if value := r.Get("event.cli.sync"); value.Exists() && !data.Applets[i].EventCliSync.IsNull() {
			data.Applets[i].EventCliSync = types.StringValue(value.String())
		} else {
			data.Applets[i].EventCliSync = types.StringNull()
		}
		if value := r.Get("event.cli.skip"); value.Exists() && !data.Applets[i].EventCliSkip.IsNull() {
			data.Applets[i].EventCliSkip = types.StringValue(value.String())
		} else {
			data.Applets[i].EventCliSkip = types.StringNull()
		}
		for ci := range data.Applets[i].Actions {
			keys := [...]string{"name"}
			keyValues := [...]string{data.Applets[i].Actions[ci].Name.ValueString()}

			var cr gjson.Result
			r.Get("action-config.action").ForEach(
				func(_, v gjson.Result) bool {
					found := false
					for ik := range keys {
						if v.Get(keys[ik]).String() == keyValues[ik] {
							found = true
							continue
						}
						found = false
						break
					}
					if found {
						cr = v
						return false
					}
					return true
				},
			)
			if value := cr.Get("name"); value.Exists() && !data.Applets[i].Actions[ci].Name.IsNull() {
				data.Applets[i].Actions[ci].Name = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].Name = types.StringNull()
			}
			if value := cr.Get("cli-choice.command"); value.Exists() && !data.Applets[i].Actions[ci].CliCommand.IsNull() {
				data.Applets[i].Actions[ci].CliCommand = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].CliCommand = types.StringNull()
			}
			if value := cr.Get("regexp-option.string-pattern"); value.Exists() && !data.Applets[i].Actions[ci].RegexpStringPattern.IsNull() {
				data.Applets[i].Actions[ci].RegexpStringPattern = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].RegexpStringPattern = types.StringNull()
			}
			if value := cr.Get("regexp-option.string-input"); value.Exists() && !data.Applets[i].Actions[ci].RegexpStringInput.IsNull() {
				data.Applets[i].Actions[ci].RegexpStringInput = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].RegexpStringInput = types.StringNull()
			}
			if value := cr.Get("regexp-option.string-match"); value.Exists() && !data.Applets[i].Actions[ci].RegexpStringMatch.IsNull() {
				data.Applets[i].Actions[ci].RegexpStringMatch = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].RegexpStringMatch = types.StringNull()
			}
			if value := cr.Get("regexp-option.string-submatch1"); value.Exists() && !data.Applets[i].Actions[ci].RegexpStringMatch1.IsNull() {
				data.Applets[i].Actions[ci].RegexpStringMatch1 = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].RegexpStringMatch1 = types.StringNull()
			}
			if value := cr.Get("regexp-option.string-submatch2"); value.Exists() && !data.Applets[i].Actions[ci].RegexpStringMatch2.IsNull() {
				data.Applets[i].Actions[ci].RegexpStringMatch2 = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].RegexpStringMatch2 = types.StringNull()
			}
			if value := cr.Get("regexp-option.string-submatch3"); value.Exists() && !data.Applets[i].Actions[ci].RegexpStringMatch3.IsNull() {
				data.Applets[i].Actions[ci].RegexpStringMatch3 = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].RegexpStringMatch3 = types.StringNull()
			}
			if value := cr.Get("syslog-option.facility"); value.Exists() && !data.Applets[i].Actions[ci].SyslogFacility.IsNull() {
				data.Applets[i].Actions[ci].SyslogFacility = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].SyslogFacility = types.StringNull()
			}
			if value := cr.Get("syslog-option.msg"); value.Exists() && !data.Applets[i].Actions[ci].SyslogMsg.IsNull() {
				data.Applets[i].Actions[ci].SyslogMsg = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].SyslogMsg = types.StringNull()
			}
			if value := cr.Get("syslog-option.priority"); value.Exists() && !data.Applets[i].Actions[ci].SyslogPriority.IsNull() {
				data.Applets[i].Actions[ci].SyslogPriority = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].SyslogPriority = types.StringNull()
			}
			if value := cr.Get("set.varname"); value.Exists() && !data.Applets[i].Actions[ci].SetVarname.IsNull() {
				data.Applets[i].Actions[ci].SetVarname = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].SetVarname = types.StringNull()
			}
			if value := cr.Get("set.value"); value.Exists() && !data.Applets[i].Actions[ci].SetValue.IsNull() {
				data.Applets[i].Actions[ci].SetValue = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].SetValue = types.StringNull()
			}
			if value := cr.Get("if.string-op-1"); value.Exists() && !data.Applets[i].Actions[ci].IfStringOp1.IsNull() {
				data.Applets[i].Actions[ci].IfStringOp1 = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].IfStringOp1 = types.StringNull()
			}
			if value := cr.Get("if.keyword"); value.Exists() && !data.Applets[i].Actions[ci].IfKeyword.IsNull() {
				data.Applets[i].Actions[ci].IfKeyword = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].IfKeyword = types.StringNull()
			}
			if value := cr.Get("if.string-op-2"); value.Exists() && !data.Applets[i].Actions[ci].IfStringOp2.IsNull() {
				data.Applets[i].Actions[ci].IfStringOp2 = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].IfStringOp2 = types.StringNull()
			}
			if value := cr.Get("if.goto"); value.Exists() && !data.Applets[i].Actions[ci].IfGoto.IsNull() {
				data.Applets[i].Actions[ci].IfGoto = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].IfGoto = types.StringNull()
			}
			if value := cr.Get("elseif.operand1"); value.Exists() && !data.Applets[i].Actions[ci].ElseifOperand1.IsNull() {
				data.Applets[i].Actions[ci].ElseifOperand1 = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].ElseifOperand1 = types.StringNull()
			}
			if value := cr.Get("elseif.operation"); value.Exists() && !data.Applets[i].Actions[ci].ElseifOperation.IsNull() {
				data.Applets[i].Actions[ci].ElseifOperation = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].ElseifOperation = types.StringNull()
			}
			if value := cr.Get("elseif.operand2"); value.Exists() && !data.Applets[i].Actions[ci].ElseifOperand2.IsNull() {
				data.Applets[i].Actions[ci].ElseifOperand2 = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].ElseifOperand2 = types.StringNull()
			}
			if value := cr.Get("else"); !data.Applets[i].Actions[ci].Else.IsNull() {
				if value.Exists() {
					data.Applets[i].Actions[ci].Else = types.BoolValue(true)
				} else {
					data.Applets[i].Actions[ci].Else = types.BoolValue(false)
				}
			} else {
				data.Applets[i].Actions[ci].Else = types.BoolNull()
			}
			if value := cr.Get("while.operand1"); value.Exists() && !data.Applets[i].Actions[ci].WhileOperand1.IsNull() {
				data.Applets[i].Actions[ci].WhileOperand1 = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].WhileOperand1 = types.StringNull()
			}
			if value := cr.Get("while.operation"); value.Exists() && !data.Applets[i].Actions[ci].WhileOperation.IsNull() {
				data.Applets[i].Actions[ci].WhileOperation = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].WhileOperation = types.StringNull()
			}
			if value := cr.Get("while.operand2"); value.Exists() && !data.Applets[i].Actions[ci].WhileOperand2.IsNull() {
				data.Applets[i].Actions[ci].WhileOperand2 = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].WhileOperand2 = types.StringNull()
			}
			if value := cr.Get("break"); !data.Applets[i].Actions[ci].Break.IsNull() {
				if value.Exists() {
					data.Applets[i].Actions[ci].Break = types.BoolValue(true)
				} else {
					data.Applets[i].Actions[ci].Break = types.BoolValue(false)
				}
			} else {
				data.Applets[i].Actions[ci].Break = types.BoolNull()
			}
			if value := cr.Get("continue"); !data.Applets[i].Actions[ci].Continue.IsNull() {
				if value.Exists() {
					data.Applets[i].Actions[ci].Continue = types.BoolValue(true)
				} else {
					data.Applets[i].Actions[ci].Continue = types.BoolValue(false)
				}
			} else {
				data.Applets[i].Actions[ci].Continue = types.BoolNull()
			}
			if value := cr.Get("increment.varname"); value.Exists() && !data.Applets[i].Actions[ci].IncrementVarname.IsNull() {
				data.Applets[i].Actions[ci].IncrementVarname = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].IncrementVarname = types.StringNull()
			}
			if value := cr.Get("increment.value"); value.Exists() && !data.Applets[i].Actions[ci].IncrementValue.IsNull() {
				data.Applets[i].Actions[ci].IncrementValue = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].IncrementValue = types.StringNull()
			}
			if value := cr.Get("decrement.varname"); value.Exists() && !data.Applets[i].Actions[ci].DecrementVarname.IsNull() {
				data.Applets[i].Actions[ci].DecrementVarname = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].DecrementVarname = types.StringNull()
			}
			if value := cr.Get("decrement.value"); value.Exists() && !data.Applets[i].Actions[ci].DecrementValue.IsNull() {
				data.Applets[i].Actions[ci].DecrementValue = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].DecrementValue = types.StringNull()
			}
			if value := cr.Get("append.varname"); value.Exists() && !data.Applets[i].Actions[ci].AppendVarname.IsNull() {
				data.Applets[i].Actions[ci].AppendVarname = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].AppendVarname = types.StringNull()
			}
			if value := cr.Get("append.value"); value.Exists() && !data.Applets[i].Actions[ci].AppendValue.IsNull() {
				data.Applets[i].Actions[ci].AppendValue = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].AppendValue = types.StringNull()
			}
			if value := cr.Get("divide.operand1"); value.Exists() && !data.Applets[i].Actions[ci].DivideOperand1.IsNull() {
				data.Applets[i].Actions[ci].DivideOperand1 = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].DivideOperand1 = types.StringNull()
			}
			if value := cr.Get("divide.operand2"); value.Exists() && !data.Applets[i].Actions[ci].DivideOperand2.IsNull() {
				data.Applets[i].Actions[ci].DivideOperand2 = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].DivideOperand2 = types.StringNull()
			}
			if value := cr.Get("foreach.loopvar"); value.Exists() && !data.Applets[i].Actions[ci].ForeachLoopvar.IsNull() {
				data.Applets[i].Actions[ci].ForeachLoopvar = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].ForeachLoopvar = types.StringNull()
			}
			if value := cr.Get("foreach.iterator"); value.Exists() && !data.Applets[i].Actions[ci].ForeachIterator.IsNull() {
				data.Applets[i].Actions[ci].ForeachIterator = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].ForeachIterator = types.StringNull()
			}
			if value := cr.Get("foreach.delimiter"); value.Exists() && !data.Applets[i].Actions[ci].ForeachDelimiter.IsNull() {
				data.Applets[i].Actions[ci].ForeachDelimiter = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].ForeachDelimiter = types.StringNull()
			}
			if value := cr.Get("gets"); value.Exists() && !data.Applets[i].Actions[ci].Gets.IsNull() {
				data.Applets[i].Actions[ci].Gets = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].Gets = types.StringNull()
			}
			if value := cr.Get("puts"); value.Exists() && !data.Applets[i].Actions[ci].Puts.IsNull() {
				data.Applets[i].Actions[ci].Puts = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].Puts = types.StringNull()
			}
			if value := cr.Get("wait"); value.Exists() && !data.Applets[i].Actions[ci].Wait.IsNull() {
				data.Applets[i].Actions[ci].Wait = types.Int64Value(value.Int())
			} else {
				data.Applets[i].Actions[ci].Wait = types.Int64Null()
			}
			if value := cr.Get("end"); !data.Applets[i].Actions[ci].End.IsNull() {
				if value.Exists() {
					data.Applets[i].Actions[ci].End = types.BoolValue(true)
				} else {
					data.Applets[i].Actions[ci].End = types.BoolValue(false)
				}
			} else {
				data.Applets[i].Actions[ci].End = types.BoolNull()
			}
			if value := cr.Get("exit"); !data.Applets[i].Actions[ci].Exit.IsNull() {
				if value.Exists() {
					data.Applets[i].Actions[ci].Exit = types.BoolValue(true)
				} else {
					data.Applets[i].Actions[ci].Exit = types.BoolValue(false)
				}
			} else {
				data.Applets[i].Actions[ci].Exit = types.BoolNull()
			}
			if value := cr.Get("reload"); !data.Applets[i].Actions[ci].Reload.IsNull() {
				if value.Exists() {
					data.Applets[i].Actions[ci].Reload = types.BoolValue(true)
				} else {
					data.Applets[i].Actions[ci].Reload = types.BoolValue(false)
				}
			} else {
				data.Applets[i].Actions[ci].Reload = types.BoolNull()
			}
			if value := cr.Get("context.retrieve.key"); value.Exists() && !data.Applets[i].Actions[ci].ContextRetrieveKey.IsNull() {
				data.Applets[i].Actions[ci].ContextRetrieveKey = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].ContextRetrieveKey = types.StringNull()
			}
			if value := cr.Get("context.retrieve.variable"); value.Exists() && !data.Applets[i].Actions[ci].ContextRetrieveVariable.IsNull() {
				data.Applets[i].Actions[ci].ContextRetrieveVariable = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].ContextRetrieveVariable = types.StringNull()
			}
			if value := cr.Get("context.save.key"); value.Exists() && !data.Applets[i].Actions[ci].ContextSaveKey.IsNull() {
				data.Applets[i].Actions[ci].ContextSaveKey = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].ContextSaveKey = types.StringNull()
			}
			if value := cr.Get("context.save.variable"); value.Exists() && !data.Applets[i].Actions[ci].ContextSaveVariable.IsNull() {
				data.Applets[i].Actions[ci].ContextSaveVariable = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].ContextSaveVariable = types.StringNull()
			}
			if value := cr.Get("string.trim"); value.Exists() && !data.Applets[i].Actions[ci].StringTrim.IsNull() {
				data.Applets[i].Actions[ci].StringTrim = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].StringTrim = types.StringNull()
			}
			if value := cr.Get("info.type.snmp.trap.enterprise-oid"); value.Exists() && !data.Applets[i].Actions[ci].InfoTypeSnmpTrapEnterpriseOid.IsNull() {
				data.Applets[i].Actions[ci].InfoTypeSnmpTrapEnterpriseOid = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].InfoTypeSnmpTrapEnterpriseOid = types.StringNull()
			}
			if value := cr.Get("info.type.snmp.trap.generic-trapnum"); value.Exists() && !data.Applets[i].Actions[ci].InfoTypeSnmpTrapGenericTrapnum.IsNull() {
				data.Applets[i].Actions[ci].InfoTypeSnmpTrapGenericTrapnum = types.Int64Value(value.Int())
			} else {
				data.Applets[i].Actions[ci].InfoTypeSnmpTrapGenericTrapnum = types.Int64Null()
			}
			if value := cr.Get("info.type.snmp.trap.specific-trapnum"); value.Exists() && !data.Applets[i].Actions[ci].InfoTypeSnmpTrapSpecificTrapnum.IsNull() {
				data.Applets[i].Actions[ci].InfoTypeSnmpTrapSpecificTrapnum = types.Int64Value(value.Int())
			} else {
				data.Applets[i].Actions[ci].InfoTypeSnmpTrapSpecificTrapnum = types.Int64Null()
			}
			if value := cr.Get("info.type.snmp.trap.trap-oid"); value.Exists() && !data.Applets[i].Actions[ci].InfoTypeSnmpTrapTrapOid.IsNull() {
				data.Applets[i].Actions[ci].InfoTypeSnmpTrapTrapOid = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].InfoTypeSnmpTrapTrapOid = types.StringNull()
			}
			if value := cr.Get("info.type.snmp.trap.trap-var"); value.Exists() && !data.Applets[i].Actions[ci].InfoTypeSnmpTrapTrapVar.IsNull() {
				data.Applets[i].Actions[ci].InfoTypeSnmpTrapTrapVar = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].InfoTypeSnmpTrapTrapVar = types.StringNull()
			}
			if value := cr.Get("handle-error.type"); value.Exists() && !data.Applets[i].Actions[ci].HandleErrorType.IsNull() {
				data.Applets[i].Actions[ci].HandleErrorType = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].HandleErrorType = types.StringNull()
			}
			if value := cr.Get("counter.name"); value.Exists() && !data.Applets[i].Actions[ci].CounterName.IsNull() {
				data.Applets[i].Actions[ci].CounterName = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].CounterName = types.StringNull()
			}
			if value := cr.Get("counter.value"); value.Exists() && !data.Applets[i].Actions[ci].CounterValue.IsNull() {
				data.Applets[i].Actions[ci].CounterValue = types.Int64Value(value.Int())
			} else {
				data.Applets[i].Actions[ci].CounterValue = types.Int64Null()
			}
			if value := cr.Get("counter.op.dec"); !data.Applets[i].Actions[ci].CounterOpDec.IsNull() {
				if value.Exists() {
					data.Applets[i].Actions[ci].CounterOpDec = types.BoolValue(true)
				} else {
					data.Applets[i].Actions[ci].CounterOpDec = types.BoolValue(false)
				}
			} else {
				data.Applets[i].Actions[ci].CounterOpDec = types.BoolNull()
			}
			if value := cr.Get("counter.op.inc"); !data.Applets[i].Actions[ci].CounterOpInc.IsNull() {
				if value.Exists() {
					data.Applets[i].Actions[ci].CounterOpInc = types.BoolValue(true)
				} else {
					data.Applets[i].Actions[ci].CounterOpInc = types.BoolValue(false)
				}
			} else {
				data.Applets[i].Actions[ci].CounterOpInc = types.BoolNull()
			}
			if value := cr.Get("counter.op.set"); !data.Applets[i].Actions[ci].CounterOpSet.IsNull() {
				if value.Exists() {
					data.Applets[i].Actions[ci].CounterOpSet = types.BoolValue(true)
				} else {
					data.Applets[i].Actions[ci].CounterOpSet = types.BoolValue(false)
				}
			} else {
				data.Applets[i].Actions[ci].CounterOpSet = types.BoolNull()
			}
			if value := cr.Get("counter.op.nop"); !data.Applets[i].Actions[ci].CounterOpNop.IsNull() {
				if value.Exists() {
					data.Applets[i].Actions[ci].CounterOpNop = types.BoolValue(true)
				} else {
					data.Applets[i].Actions[ci].CounterOpNop = types.BoolValue(false)
				}
			} else {
				data.Applets[i].Actions[ci].CounterOpNop = types.BoolNull()
			}
			if value := cr.Get("snmp-trap.intdata1"); value.Exists() && !data.Applets[i].Actions[ci].SnmpTrapIntdata1.IsNull() {
				data.Applets[i].Actions[ci].SnmpTrapIntdata1 = types.Int64Value(value.Int())
			} else {
				data.Applets[i].Actions[ci].SnmpTrapIntdata1 = types.Int64Null()
			}
			if value := cr.Get("snmp-trap.intdata2"); value.Exists() && !data.Applets[i].Actions[ci].SnmpTrapIntdata2.IsNull() {
				data.Applets[i].Actions[ci].SnmpTrapIntdata2 = types.Int64Value(value.Int())
			} else {
				data.Applets[i].Actions[ci].SnmpTrapIntdata2 = types.Int64Null()
			}
			if value := cr.Get("snmp-trap.strdata"); value.Exists() && !data.Applets[i].Actions[ci].SnmpTrapStrdata.IsNull() {
				data.Applets[i].Actions[ci].SnmpTrapStrdata = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].SnmpTrapStrdata = types.StringNull()
			}
			if value := cr.Get("info.type.snmp.var.variable-name"); value.Exists() && !data.Applets[i].Actions[ci].InfoTypeSnmpVar.IsNull() {
				data.Applets[i].Actions[ci].InfoTypeSnmpVar = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].InfoTypeSnmpVar = types.StringNull()
			}
			if value := cr.Get("info.type.snmp.var.oid"); value.Exists() && !data.Applets[i].Actions[ci].InfoTypeSnmpVarOid.IsNull() {
				data.Applets[i].Actions[ci].InfoTypeSnmpVarOid = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].InfoTypeSnmpVarOid = types.StringNull()
			}
			if value := cr.Get("info.type.snmp.var.oid-type"); value.Exists() && !data.Applets[i].Actions[ci].InfoTypeSnmpVarOidType.IsNull() {
				data.Applets[i].Actions[ci].InfoTypeSnmpVarOidType = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].InfoTypeSnmpVarOidType = types.StringNull()
			}
			if value := cr.Get("info.type.snmp.var.oid-type-value"); value.Exists() && !data.Applets[i].Actions[ci].InfoTypeSnmpVarOidTypeValue.IsNull() {
				data.Applets[i].Actions[ci].InfoTypeSnmpVarOidTypeValue = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].InfoTypeSnmpVarOidTypeValue = types.StringNull()
			}
			if value := cr.Get("string.trim.first.string-op-1"); value.Exists() && !data.Applets[i].Actions[ci].StringTrimFirstStringOp1.IsNull() {
				data.Applets[i].Actions[ci].StringTrimFirstStringOp1 = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].StringTrimFirstStringOp1 = types.StringNull()
			}
			if value := cr.Get("string.trim.first.string-op-2"); value.Exists() && !data.Applets[i].Actions[ci].StringTrimFirstStringOp2.IsNull() {
				data.Applets[i].Actions[ci].StringTrimFirstStringOp2 = types.StringValue(value.String())
			} else {
				data.Applets[i].Actions[ci].StringTrimFirstStringOp2 = types.StringNull()
			}
		}
		if value := r.Get("event.timer-choice.watchdog.time-set"); value.Exists() && !data.Applets[i].EventTimerWatchdogTime.IsNull() {
			data.Applets[i].EventTimerWatchdogTime = types.Float64Value(value.Float())
		} else {
			data.Applets[i].EventTimerWatchdogTime = types.Float64Null()
		}
		if value := r.Get("event.timer-choice.watchdog.name"); value.Exists() && !data.Applets[i].EventTimerWatchdogName.IsNull() {
			data.Applets[i].EventTimerWatchdogName = types.StringValue(value.String())
		} else {
			data.Applets[i].EventTimerWatchdogName = types.StringNull()
		}
		if value := r.Get("event.timer-choice.watchdog.maxrun-set"); value.Exists() && !data.Applets[i].EventTimerWatchdogMaxrun.IsNull() {
			data.Applets[i].EventTimerWatchdogMaxrun = types.Float64Value(value.Float())
		} else {
			data.Applets[i].EventTimerWatchdogMaxrun = types.Float64Null()
		}
		if value := r.Get("event.timer-choice.watchdog.ratelimit-set"); value.Exists() && !data.Applets[i].EventTimerWatchdogRatelimit.IsNull() {
			data.Applets[i].EventTimerWatchdogRatelimit = types.Float64Value(value.Float())
		} else {
			data.Applets[i].EventTimerWatchdogRatelimit = types.Float64Null()
		}
		if value := r.Get("event.timer-choice.cron.cron-entry"); value.Exists() && !data.Applets[i].EventTimerCronEntry.IsNull() {
			data.Applets[i].EventTimerCronEntry = types.StringValue(value.String())
		} else {
			data.Applets[i].EventTimerCronEntry = types.StringNull()
		}
		if value := r.Get("event.timer-choice.cron.name"); value.Exists() && !data.Applets[i].EventTimerCronName.IsNull() {
			data.Applets[i].EventTimerCronName = types.StringValue(value.String())
		} else {
			data.Applets[i].EventTimerCronName = types.StringNull()
		}
		if value := r.Get("event.timer-choice.cron.maxrun-set"); value.Exists() && !data.Applets[i].EventTimerCronMaxrun.IsNull() {
			data.Applets[i].EventTimerCronMaxrun = types.Float64Value(value.Float())
		} else {
			data.Applets[i].EventTimerCronMaxrun = types.Float64Null()
		}
		if value := r.Get("event.timer-choice.cron.ratelimit-set"); value.Exists() && !data.Applets[i].EventTimerCronRatelimit.IsNull() {
			data.Applets[i].EventTimerCronRatelimit = types.Float64Value(value.Float())
		} else {
			data.Applets[i].EventTimerCronRatelimit = types.Float64Null()
		}
	}
}

// End of section. //template:end updateFromBody

// Section below is generated&owned by "gen/generator.go". //template:begin fromBody

func (data *EEM) fromBody(ctx context.Context, res gjson.Result) {
	prefix := helpers.LastElement(data.getPath()) + "."
	if res.Get(helpers.LastElement(data.getPath())).IsArray() {
		prefix += "0."
	}
	if value := res.Get(prefix + "environment"); value.Exists() {
		data.EnvironmentVariables = make([]EEMEnvironmentVariables, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := EEMEnvironmentVariables{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			if cValue := v.Get("value"); cValue.Exists() {
				item.Value = types.StringValue(cValue.String())
			}
			data.EnvironmentVariables = append(data.EnvironmentVariables, item)
			return true
		})
	}
	if value := res.Get(prefix + "session.cli.username.username_in_word_set"); value.Exists() {
		data.SessionCliUsername = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "session.cli.username.privilege_set"); value.Exists() {
		data.SessionCliUsernamePrivilege = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "history.size.events"); value.Exists() {
		data.HistorySizeEvents = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "history.size.traps"); value.Exists() {
		data.HistorySizeTraps = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "directory.user.policy"); value.Exists() {
		data.DirectoryUserPolicy = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "scheduler.applet.thread.class.default"); value.Exists() {
		data.SchedulerAppletThreadClassDefault = types.BoolValue(true)
	} else {
		data.SchedulerAppletThreadClassDefault = types.BoolValue(false)
	}
	if value := res.Get(prefix + "scheduler.applet.thread.class.number"); value.Exists() {
		data.SchedulerAppletThreadClassNumber = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "detector.rpc.max-sessions"); value.Exists() {
		data.DetectorRpcMaxSessions = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "detector.routing.bootup-delay"); value.Exists() {
		data.DetectorRoutingBootupDelay = types.Float64Value(value.Float())
	}
	if value := res.Get(prefix + "applet"); value.Exists() {
		data.Applets = make([]EEMApplets, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := EEMApplets{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			if cValue := v.Get("authorization"); cValue.Exists() {
				item.Authorization = types.StringValue(cValue.String())
			}
			if cValue := v.Get("class"); cValue.Exists() {
				item.Class = types.StringValue(cValue.String())
			}
			if cValue := v.Get("description"); cValue.Exists() {
				item.Description = types.StringValue(cValue.String())
			}
			if cValue := v.Get("event.cli.pattern"); cValue.Exists() {
				item.EventCliPattern = types.StringValue(cValue.String())
			}
			if cValue := v.Get("event.cli.sync"); cValue.Exists() {
				item.EventCliSync = types.StringValue(cValue.String())
			}
			if cValue := v.Get("event.cli.skip"); cValue.Exists() {
				item.EventCliSkip = types.StringValue(cValue.String())
			}
			if cValue := v.Get("action-config.action"); cValue.Exists() {
				item.Actions = make([]EEMAppletsActions, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := EEMAppletsActions{}
					if ccValue := cv.Get("name"); ccValue.Exists() {
						cItem.Name = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("cli-choice.command"); ccValue.Exists() {
						cItem.CliCommand = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("regexp-option.string-pattern"); ccValue.Exists() {
						cItem.RegexpStringPattern = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("regexp-option.string-input"); ccValue.Exists() {
						cItem.RegexpStringInput = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("regexp-option.string-match"); ccValue.Exists() {
						cItem.RegexpStringMatch = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("regexp-option.string-submatch1"); ccValue.Exists() {
						cItem.RegexpStringMatch1 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("regexp-option.string-submatch2"); ccValue.Exists() {
						cItem.RegexpStringMatch2 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("regexp-option.string-submatch3"); ccValue.Exists() {
						cItem.RegexpStringMatch3 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("syslog-option.facility"); ccValue.Exists() {
						cItem.SyslogFacility = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("syslog-option.msg"); ccValue.Exists() {
						cItem.SyslogMsg = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("syslog-option.priority"); ccValue.Exists() {
						cItem.SyslogPriority = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("set.varname"); ccValue.Exists() {
						cItem.SetVarname = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("set.value"); ccValue.Exists() {
						cItem.SetValue = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("if.string-op-1"); ccValue.Exists() {
						cItem.IfStringOp1 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("if.keyword"); ccValue.Exists() {
						cItem.IfKeyword = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("if.string-op-2"); ccValue.Exists() {
						cItem.IfStringOp2 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("if.goto"); ccValue.Exists() {
						cItem.IfGoto = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("elseif.operand1"); ccValue.Exists() {
						cItem.ElseifOperand1 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("elseif.operation"); ccValue.Exists() {
						cItem.ElseifOperation = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("elseif.operand2"); ccValue.Exists() {
						cItem.ElseifOperand2 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("else"); ccValue.Exists() {
						cItem.Else = types.BoolValue(true)
					} else {
						cItem.Else = types.BoolValue(false)
					}
					if ccValue := cv.Get("while.operand1"); ccValue.Exists() {
						cItem.WhileOperand1 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("while.operation"); ccValue.Exists() {
						cItem.WhileOperation = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("while.operand2"); ccValue.Exists() {
						cItem.WhileOperand2 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("break"); ccValue.Exists() {
						cItem.Break = types.BoolValue(true)
					} else {
						cItem.Break = types.BoolValue(false)
					}
					if ccValue := cv.Get("continue"); ccValue.Exists() {
						cItem.Continue = types.BoolValue(true)
					} else {
						cItem.Continue = types.BoolValue(false)
					}
					if ccValue := cv.Get("increment.varname"); ccValue.Exists() {
						cItem.IncrementVarname = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("increment.value"); ccValue.Exists() {
						cItem.IncrementValue = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("decrement.varname"); ccValue.Exists() {
						cItem.DecrementVarname = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("decrement.value"); ccValue.Exists() {
						cItem.DecrementValue = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("append.varname"); ccValue.Exists() {
						cItem.AppendVarname = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("append.value"); ccValue.Exists() {
						cItem.AppendValue = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("divide.operand1"); ccValue.Exists() {
						cItem.DivideOperand1 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("divide.operand2"); ccValue.Exists() {
						cItem.DivideOperand2 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("foreach.loopvar"); ccValue.Exists() {
						cItem.ForeachLoopvar = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("foreach.iterator"); ccValue.Exists() {
						cItem.ForeachIterator = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("foreach.delimiter"); ccValue.Exists() {
						cItem.ForeachDelimiter = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("gets"); ccValue.Exists() {
						cItem.Gets = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("puts"); ccValue.Exists() {
						cItem.Puts = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("wait"); ccValue.Exists() {
						cItem.Wait = types.Int64Value(ccValue.Int())
					}
					if ccValue := cv.Get("end"); ccValue.Exists() {
						cItem.End = types.BoolValue(true)
					} else {
						cItem.End = types.BoolValue(false)
					}
					if ccValue := cv.Get("exit"); ccValue.Exists() {
						cItem.Exit = types.BoolValue(true)
					} else {
						cItem.Exit = types.BoolValue(false)
					}
					if ccValue := cv.Get("reload"); ccValue.Exists() {
						cItem.Reload = types.BoolValue(true)
					} else {
						cItem.Reload = types.BoolValue(false)
					}
					if ccValue := cv.Get("context.retrieve.key"); ccValue.Exists() {
						cItem.ContextRetrieveKey = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("context.retrieve.variable"); ccValue.Exists() {
						cItem.ContextRetrieveVariable = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("context.save.key"); ccValue.Exists() {
						cItem.ContextSaveKey = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("context.save.variable"); ccValue.Exists() {
						cItem.ContextSaveVariable = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("string.trim"); ccValue.Exists() {
						cItem.StringTrim = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("info.type.snmp.trap.enterprise-oid"); ccValue.Exists() {
						cItem.InfoTypeSnmpTrapEnterpriseOid = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("info.type.snmp.trap.generic-trapnum"); ccValue.Exists() {
						cItem.InfoTypeSnmpTrapGenericTrapnum = types.Int64Value(ccValue.Int())
					}
					if ccValue := cv.Get("info.type.snmp.trap.specific-trapnum"); ccValue.Exists() {
						cItem.InfoTypeSnmpTrapSpecificTrapnum = types.Int64Value(ccValue.Int())
					}
					if ccValue := cv.Get("info.type.snmp.trap.trap-oid"); ccValue.Exists() {
						cItem.InfoTypeSnmpTrapTrapOid = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("info.type.snmp.trap.trap-var"); ccValue.Exists() {
						cItem.InfoTypeSnmpTrapTrapVar = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("handle-error.type"); ccValue.Exists() {
						cItem.HandleErrorType = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("counter.name"); ccValue.Exists() {
						cItem.CounterName = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("counter.value"); ccValue.Exists() {
						cItem.CounterValue = types.Int64Value(ccValue.Int())
					}
					if ccValue := cv.Get("counter.op.dec"); ccValue.Exists() {
						cItem.CounterOpDec = types.BoolValue(true)
					} else {
						cItem.CounterOpDec = types.BoolValue(false)
					}
					if ccValue := cv.Get("counter.op.inc"); ccValue.Exists() {
						cItem.CounterOpInc = types.BoolValue(true)
					} else {
						cItem.CounterOpInc = types.BoolValue(false)
					}
					if ccValue := cv.Get("counter.op.set"); ccValue.Exists() {
						cItem.CounterOpSet = types.BoolValue(true)
					} else {
						cItem.CounterOpSet = types.BoolValue(false)
					}
					if ccValue := cv.Get("counter.op.nop"); ccValue.Exists() {
						cItem.CounterOpNop = types.BoolValue(true)
					} else {
						cItem.CounterOpNop = types.BoolValue(false)
					}
					if ccValue := cv.Get("snmp-trap.intdata1"); ccValue.Exists() {
						cItem.SnmpTrapIntdata1 = types.Int64Value(ccValue.Int())
					}
					if ccValue := cv.Get("snmp-trap.intdata2"); ccValue.Exists() {
						cItem.SnmpTrapIntdata2 = types.Int64Value(ccValue.Int())
					}
					if ccValue := cv.Get("snmp-trap.strdata"); ccValue.Exists() {
						cItem.SnmpTrapStrdata = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("info.type.snmp.var.variable-name"); ccValue.Exists() {
						cItem.InfoTypeSnmpVar = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("info.type.snmp.var.oid"); ccValue.Exists() {
						cItem.InfoTypeSnmpVarOid = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("info.type.snmp.var.oid-type"); ccValue.Exists() {
						cItem.InfoTypeSnmpVarOidType = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("info.type.snmp.var.oid-type-value"); ccValue.Exists() {
						cItem.InfoTypeSnmpVarOidTypeValue = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("string.trim.first.string-op-1"); ccValue.Exists() {
						cItem.StringTrimFirstStringOp1 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("string.trim.first.string-op-2"); ccValue.Exists() {
						cItem.StringTrimFirstStringOp2 = types.StringValue(ccValue.String())
					}
					item.Actions = append(item.Actions, cItem)
					return true
				})
			}
			if cValue := v.Get("event.timer-choice.watchdog.time-set"); cValue.Exists() {
				item.EventTimerWatchdogTime = types.Float64Value(cValue.Float())
			}
			if cValue := v.Get("event.timer-choice.watchdog.name"); cValue.Exists() {
				item.EventTimerWatchdogName = types.StringValue(cValue.String())
			}
			if cValue := v.Get("event.timer-choice.watchdog.maxrun-set"); cValue.Exists() {
				item.EventTimerWatchdogMaxrun = types.Float64Value(cValue.Float())
			}
			if cValue := v.Get("event.timer-choice.watchdog.ratelimit-set"); cValue.Exists() {
				item.EventTimerWatchdogRatelimit = types.Float64Value(cValue.Float())
			}
			if cValue := v.Get("event.timer-choice.cron.cron-entry"); cValue.Exists() {
				item.EventTimerCronEntry = types.StringValue(cValue.String())
			}
			if cValue := v.Get("event.timer-choice.cron.name"); cValue.Exists() {
				item.EventTimerCronName = types.StringValue(cValue.String())
			}
			if cValue := v.Get("event.timer-choice.cron.maxrun-set"); cValue.Exists() {
				item.EventTimerCronMaxrun = types.Float64Value(cValue.Float())
			}
			if cValue := v.Get("event.timer-choice.cron.ratelimit-set"); cValue.Exists() {
				item.EventTimerCronRatelimit = types.Float64Value(cValue.Float())
			}
			data.Applets = append(data.Applets, item)
			return true
		})
	}
}

// End of section. //template:end fromBody

// Section below is generated&owned by "gen/generator.go". //template:begin fromBodyData

func (data *EEMData) fromBody(ctx context.Context, res gjson.Result) {
	prefix := helpers.LastElement(data.getPath()) + "."
	if res.Get(helpers.LastElement(data.getPath())).IsArray() {
		prefix += "0."
	}
	if value := res.Get(prefix + "environment"); value.Exists() {
		data.EnvironmentVariables = make([]EEMEnvironmentVariables, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := EEMEnvironmentVariables{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			if cValue := v.Get("value"); cValue.Exists() {
				item.Value = types.StringValue(cValue.String())
			}
			data.EnvironmentVariables = append(data.EnvironmentVariables, item)
			return true
		})
	}
	if value := res.Get(prefix + "session.cli.username.username_in_word_set"); value.Exists() {
		data.SessionCliUsername = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "session.cli.username.privilege_set"); value.Exists() {
		data.SessionCliUsernamePrivilege = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "history.size.events"); value.Exists() {
		data.HistorySizeEvents = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "history.size.traps"); value.Exists() {
		data.HistorySizeTraps = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "directory.user.policy"); value.Exists() {
		data.DirectoryUserPolicy = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "scheduler.applet.thread.class.default"); value.Exists() {
		data.SchedulerAppletThreadClassDefault = types.BoolValue(true)
	} else {
		data.SchedulerAppletThreadClassDefault = types.BoolValue(false)
	}
	if value := res.Get(prefix + "scheduler.applet.thread.class.number"); value.Exists() {
		data.SchedulerAppletThreadClassNumber = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "detector.rpc.max-sessions"); value.Exists() {
		data.DetectorRpcMaxSessions = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "detector.routing.bootup-delay"); value.Exists() {
		data.DetectorRoutingBootupDelay = types.Float64Value(value.Float())
	}
	if value := res.Get(prefix + "applet"); value.Exists() {
		data.Applets = make([]EEMApplets, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := EEMApplets{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			if cValue := v.Get("authorization"); cValue.Exists() {
				item.Authorization = types.StringValue(cValue.String())
			}
			if cValue := v.Get("class"); cValue.Exists() {
				item.Class = types.StringValue(cValue.String())
			}
			if cValue := v.Get("description"); cValue.Exists() {
				item.Description = types.StringValue(cValue.String())
			}
			if cValue := v.Get("event.cli.pattern"); cValue.Exists() {
				item.EventCliPattern = types.StringValue(cValue.String())
			}
			if cValue := v.Get("event.cli.sync"); cValue.Exists() {
				item.EventCliSync = types.StringValue(cValue.String())
			}
			if cValue := v.Get("event.cli.skip"); cValue.Exists() {
				item.EventCliSkip = types.StringValue(cValue.String())
			}
			if cValue := v.Get("action-config.action"); cValue.Exists() {
				item.Actions = make([]EEMAppletsActions, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := EEMAppletsActions{}
					if ccValue := cv.Get("name"); ccValue.Exists() {
						cItem.Name = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("cli-choice.command"); ccValue.Exists() {
						cItem.CliCommand = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("regexp-option.string-pattern"); ccValue.Exists() {
						cItem.RegexpStringPattern = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("regexp-option.string-input"); ccValue.Exists() {
						cItem.RegexpStringInput = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("regexp-option.string-match"); ccValue.Exists() {
						cItem.RegexpStringMatch = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("regexp-option.string-submatch1"); ccValue.Exists() {
						cItem.RegexpStringMatch1 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("regexp-option.string-submatch2"); ccValue.Exists() {
						cItem.RegexpStringMatch2 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("regexp-option.string-submatch3"); ccValue.Exists() {
						cItem.RegexpStringMatch3 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("syslog-option.facility"); ccValue.Exists() {
						cItem.SyslogFacility = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("syslog-option.msg"); ccValue.Exists() {
						cItem.SyslogMsg = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("syslog-option.priority"); ccValue.Exists() {
						cItem.SyslogPriority = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("set.varname"); ccValue.Exists() {
						cItem.SetVarname = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("set.value"); ccValue.Exists() {
						cItem.SetValue = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("if.string-op-1"); ccValue.Exists() {
						cItem.IfStringOp1 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("if.keyword"); ccValue.Exists() {
						cItem.IfKeyword = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("if.string-op-2"); ccValue.Exists() {
						cItem.IfStringOp2 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("if.goto"); ccValue.Exists() {
						cItem.IfGoto = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("elseif.operand1"); ccValue.Exists() {
						cItem.ElseifOperand1 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("elseif.operation"); ccValue.Exists() {
						cItem.ElseifOperation = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("elseif.operand2"); ccValue.Exists() {
						cItem.ElseifOperand2 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("else"); ccValue.Exists() {
						cItem.Else = types.BoolValue(true)
					} else {
						cItem.Else = types.BoolValue(false)
					}
					if ccValue := cv.Get("while.operand1"); ccValue.Exists() {
						cItem.WhileOperand1 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("while.operation"); ccValue.Exists() {
						cItem.WhileOperation = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("while.operand2"); ccValue.Exists() {
						cItem.WhileOperand2 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("break"); ccValue.Exists() {
						cItem.Break = types.BoolValue(true)
					} else {
						cItem.Break = types.BoolValue(false)
					}
					if ccValue := cv.Get("continue"); ccValue.Exists() {
						cItem.Continue = types.BoolValue(true)
					} else {
						cItem.Continue = types.BoolValue(false)
					}
					if ccValue := cv.Get("increment.varname"); ccValue.Exists() {
						cItem.IncrementVarname = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("increment.value"); ccValue.Exists() {
						cItem.IncrementValue = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("decrement.varname"); ccValue.Exists() {
						cItem.DecrementVarname = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("decrement.value"); ccValue.Exists() {
						cItem.DecrementValue = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("append.varname"); ccValue.Exists() {
						cItem.AppendVarname = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("append.value"); ccValue.Exists() {
						cItem.AppendValue = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("divide.operand1"); ccValue.Exists() {
						cItem.DivideOperand1 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("divide.operand2"); ccValue.Exists() {
						cItem.DivideOperand2 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("foreach.loopvar"); ccValue.Exists() {
						cItem.ForeachLoopvar = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("foreach.iterator"); ccValue.Exists() {
						cItem.ForeachIterator = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("foreach.delimiter"); ccValue.Exists() {
						cItem.ForeachDelimiter = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("gets"); ccValue.Exists() {
						cItem.Gets = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("puts"); ccValue.Exists() {
						cItem.Puts = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("wait"); ccValue.Exists() {
						cItem.Wait = types.Int64Value(ccValue.Int())
					}
					if ccValue := cv.Get("end"); ccValue.Exists() {
						cItem.End = types.BoolValue(true)
					} else {
						cItem.End = types.BoolValue(false)
					}
					if ccValue := cv.Get("exit"); ccValue.Exists() {
						cItem.Exit = types.BoolValue(true)
					} else {
						cItem.Exit = types.BoolValue(false)
					}
					if ccValue := cv.Get("reload"); ccValue.Exists() {
						cItem.Reload = types.BoolValue(true)
					} else {
						cItem.Reload = types.BoolValue(false)
					}
					if ccValue := cv.Get("context.retrieve.key"); ccValue.Exists() {
						cItem.ContextRetrieveKey = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("context.retrieve.variable"); ccValue.Exists() {
						cItem.ContextRetrieveVariable = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("context.save.key"); ccValue.Exists() {
						cItem.ContextSaveKey = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("context.save.variable"); ccValue.Exists() {
						cItem.ContextSaveVariable = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("string.trim"); ccValue.Exists() {
						cItem.StringTrim = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("info.type.snmp.trap.enterprise-oid"); ccValue.Exists() {
						cItem.InfoTypeSnmpTrapEnterpriseOid = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("info.type.snmp.trap.generic-trapnum"); ccValue.Exists() {
						cItem.InfoTypeSnmpTrapGenericTrapnum = types.Int64Value(ccValue.Int())
					}
					if ccValue := cv.Get("info.type.snmp.trap.specific-trapnum"); ccValue.Exists() {
						cItem.InfoTypeSnmpTrapSpecificTrapnum = types.Int64Value(ccValue.Int())
					}
					if ccValue := cv.Get("info.type.snmp.trap.trap-oid"); ccValue.Exists() {
						cItem.InfoTypeSnmpTrapTrapOid = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("info.type.snmp.trap.trap-var"); ccValue.Exists() {
						cItem.InfoTypeSnmpTrapTrapVar = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("handle-error.type"); ccValue.Exists() {
						cItem.HandleErrorType = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("counter.name"); ccValue.Exists() {
						cItem.CounterName = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("counter.value"); ccValue.Exists() {
						cItem.CounterValue = types.Int64Value(ccValue.Int())
					}
					if ccValue := cv.Get("counter.op.dec"); ccValue.Exists() {
						cItem.CounterOpDec = types.BoolValue(true)
					} else {
						cItem.CounterOpDec = types.BoolValue(false)
					}
					if ccValue := cv.Get("counter.op.inc"); ccValue.Exists() {
						cItem.CounterOpInc = types.BoolValue(true)
					} else {
						cItem.CounterOpInc = types.BoolValue(false)
					}
					if ccValue := cv.Get("counter.op.set"); ccValue.Exists() {
						cItem.CounterOpSet = types.BoolValue(true)
					} else {
						cItem.CounterOpSet = types.BoolValue(false)
					}
					if ccValue := cv.Get("counter.op.nop"); ccValue.Exists() {
						cItem.CounterOpNop = types.BoolValue(true)
					} else {
						cItem.CounterOpNop = types.BoolValue(false)
					}
					if ccValue := cv.Get("snmp-trap.intdata1"); ccValue.Exists() {
						cItem.SnmpTrapIntdata1 = types.Int64Value(ccValue.Int())
					}
					if ccValue := cv.Get("snmp-trap.intdata2"); ccValue.Exists() {
						cItem.SnmpTrapIntdata2 = types.Int64Value(ccValue.Int())
					}
					if ccValue := cv.Get("snmp-trap.strdata"); ccValue.Exists() {
						cItem.SnmpTrapStrdata = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("info.type.snmp.var.variable-name"); ccValue.Exists() {
						cItem.InfoTypeSnmpVar = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("info.type.snmp.var.oid"); ccValue.Exists() {
						cItem.InfoTypeSnmpVarOid = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("info.type.snmp.var.oid-type"); ccValue.Exists() {
						cItem.InfoTypeSnmpVarOidType = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("info.type.snmp.var.oid-type-value"); ccValue.Exists() {
						cItem.InfoTypeSnmpVarOidTypeValue = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("string.trim.first.string-op-1"); ccValue.Exists() {
						cItem.StringTrimFirstStringOp1 = types.StringValue(ccValue.String())
					}
					if ccValue := cv.Get("string.trim.first.string-op-2"); ccValue.Exists() {
						cItem.StringTrimFirstStringOp2 = types.StringValue(ccValue.String())
					}
					item.Actions = append(item.Actions, cItem)
					return true
				})
			}
			if cValue := v.Get("event.timer-choice.watchdog.time-set"); cValue.Exists() {
				item.EventTimerWatchdogTime = types.Float64Value(cValue.Float())
			}
			if cValue := v.Get("event.timer-choice.watchdog.name"); cValue.Exists() {
				item.EventTimerWatchdogName = types.StringValue(cValue.String())
			}
			if cValue := v.Get("event.timer-choice.watchdog.maxrun-set"); cValue.Exists() {
				item.EventTimerWatchdogMaxrun = types.Float64Value(cValue.Float())
			}
			if cValue := v.Get("event.timer-choice.watchdog.ratelimit-set"); cValue.Exists() {
				item.EventTimerWatchdogRatelimit = types.Float64Value(cValue.Float())
			}
			if cValue := v.Get("event.timer-choice.cron.cron-entry"); cValue.Exists() {
				item.EventTimerCronEntry = types.StringValue(cValue.String())
			}
			if cValue := v.Get("event.timer-choice.cron.name"); cValue.Exists() {
				item.EventTimerCronName = types.StringValue(cValue.String())
			}
			if cValue := v.Get("event.timer-choice.cron.maxrun-set"); cValue.Exists() {
				item.EventTimerCronMaxrun = types.Float64Value(cValue.Float())
			}
			if cValue := v.Get("event.timer-choice.cron.ratelimit-set"); cValue.Exists() {
				item.EventTimerCronRatelimit = types.Float64Value(cValue.Float())
			}
			data.Applets = append(data.Applets, item)
			return true
		})
	}
}

// End of section. //template:end fromBodyData

// Section below is generated&owned by "gen/generator.go". //template:begin getDeletedItems

func (data *EEM) getDeletedItems(ctx context.Context, state EEM) []string {
	deletedItems := make([]string, 0)
	for i := range state.Applets {
		stateKeyValues := [...]string{state.Applets[i].Name.ValueString()}

		emptyKeys := true
		if !reflect.ValueOf(state.Applets[i].Name.ValueString()).IsZero() {
			emptyKeys = false
		}
		if emptyKeys {
			continue
		}

		found := false
		for j := range data.Applets {
			found = true
			if state.Applets[i].Name.ValueString() != data.Applets[j].Name.ValueString() {
				found = false
			}
			if found {
				if !state.Applets[i].EventTimerCronRatelimit.IsNull() && data.Applets[j].EventTimerCronRatelimit.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/event/timer-choice/cron/ratelimit-set", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Applets[i].EventTimerCronMaxrun.IsNull() && data.Applets[j].EventTimerCronMaxrun.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/event/timer-choice/cron/maxrun-set", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Applets[i].EventTimerCronName.IsNull() && data.Applets[j].EventTimerCronName.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/event/timer-choice/cron/name", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Applets[i].EventTimerCronEntry.IsNull() && data.Applets[j].EventTimerCronEntry.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/event/timer-choice/cron/cron-entry", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Applets[i].EventTimerWatchdogRatelimit.IsNull() && data.Applets[j].EventTimerWatchdogRatelimit.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/event/timer-choice/watchdog/ratelimit-set", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Applets[i].EventTimerWatchdogMaxrun.IsNull() && data.Applets[j].EventTimerWatchdogMaxrun.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/event/timer-choice/watchdog/maxrun-set", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Applets[i].EventTimerWatchdogName.IsNull() && data.Applets[j].EventTimerWatchdogName.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/event/timer-choice/watchdog/name", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Applets[i].EventTimerWatchdogTime.IsNull() && data.Applets[j].EventTimerWatchdogTime.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/event/timer-choice/watchdog/time-set", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				for ci := range state.Applets[i].Actions {
					cstateKeyValues := [...]string{state.Applets[i].Actions[ci].Name.ValueString()}

					cemptyKeys := true
					if !reflect.ValueOf(state.Applets[i].Actions[ci].Name.ValueString()).IsZero() {
						cemptyKeys = false
					}
					if cemptyKeys {
						continue
					}

					found := false
					for cj := range data.Applets[j].Actions {
						found = true
						if state.Applets[i].Actions[ci].Name.ValueString() != data.Applets[j].Actions[cj].Name.ValueString() {
							found = false
						}
						if found {
							if !state.Applets[i].Actions[ci].StringTrimFirstStringOp2.IsNull() && data.Applets[j].Actions[cj].StringTrimFirstStringOp2.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/string/trim/first/string-op-2", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].StringTrimFirstStringOp1.IsNull() && data.Applets[j].Actions[cj].StringTrimFirstStringOp1.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/string/trim/first/string-op-1", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].InfoTypeSnmpVarOidTypeValue.IsNull() && data.Applets[j].Actions[cj].InfoTypeSnmpVarOidTypeValue.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/info/type/snmp/var/oid-type-value", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].InfoTypeSnmpVarOidType.IsNull() && data.Applets[j].Actions[cj].InfoTypeSnmpVarOidType.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/info/type/snmp/var/oid-type", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].InfoTypeSnmpVarOid.IsNull() && data.Applets[j].Actions[cj].InfoTypeSnmpVarOid.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/info/type/snmp/var/oid", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].InfoTypeSnmpVar.IsNull() && data.Applets[j].Actions[cj].InfoTypeSnmpVar.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/info/type/snmp/var/variable-name", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].SnmpTrapStrdata.IsNull() && data.Applets[j].Actions[cj].SnmpTrapStrdata.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/snmp-trap/strdata", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].SnmpTrapIntdata2.IsNull() && data.Applets[j].Actions[cj].SnmpTrapIntdata2.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/snmp-trap/intdata2", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].SnmpTrapIntdata1.IsNull() && data.Applets[j].Actions[cj].SnmpTrapIntdata1.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/snmp-trap/intdata1", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].CounterOpNop.IsNull() && data.Applets[j].Actions[cj].CounterOpNop.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/counter/op/nop", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].CounterOpSet.IsNull() && data.Applets[j].Actions[cj].CounterOpSet.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/counter/op/set", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].CounterOpInc.IsNull() && data.Applets[j].Actions[cj].CounterOpInc.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/counter/op/inc", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].CounterOpDec.IsNull() && data.Applets[j].Actions[cj].CounterOpDec.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/counter/op/dec", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].CounterValue.IsNull() && data.Applets[j].Actions[cj].CounterValue.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/counter/value", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].CounterName.IsNull() && data.Applets[j].Actions[cj].CounterName.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/counter/name", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].HandleErrorType.IsNull() && data.Applets[j].Actions[cj].HandleErrorType.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/handle-error/type", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].InfoTypeSnmpTrapTrapVar.IsNull() && data.Applets[j].Actions[cj].InfoTypeSnmpTrapTrapVar.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/info/type/snmp/trap/trap-var", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].InfoTypeSnmpTrapTrapOid.IsNull() && data.Applets[j].Actions[cj].InfoTypeSnmpTrapTrapOid.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/info/type/snmp/trap/trap-oid", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].InfoTypeSnmpTrapSpecificTrapnum.IsNull() && data.Applets[j].Actions[cj].InfoTypeSnmpTrapSpecificTrapnum.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/info/type/snmp/trap/specific-trapnum", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].InfoTypeSnmpTrapGenericTrapnum.IsNull() && data.Applets[j].Actions[cj].InfoTypeSnmpTrapGenericTrapnum.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/info/type/snmp/trap/generic-trapnum", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].InfoTypeSnmpTrapEnterpriseOid.IsNull() && data.Applets[j].Actions[cj].InfoTypeSnmpTrapEnterpriseOid.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/info/type/snmp/trap/enterprise-oid", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].StringTrim.IsNull() && data.Applets[j].Actions[cj].StringTrim.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/string/trim", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].ContextSaveVariable.IsNull() && data.Applets[j].Actions[cj].ContextSaveVariable.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/context/save/variable", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].ContextSaveKey.IsNull() && data.Applets[j].Actions[cj].ContextSaveKey.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/context/save/key", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].ContextRetrieveVariable.IsNull() && data.Applets[j].Actions[cj].ContextRetrieveVariable.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/context/retrieve/variable", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].ContextRetrieveKey.IsNull() && data.Applets[j].Actions[cj].ContextRetrieveKey.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/context/retrieve/key", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].Reload.IsNull() && data.Applets[j].Actions[cj].Reload.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/reload", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].Exit.IsNull() && data.Applets[j].Actions[cj].Exit.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/exit", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].End.IsNull() && data.Applets[j].Actions[cj].End.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/end", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].Wait.IsNull() && data.Applets[j].Actions[cj].Wait.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/wait", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].Puts.IsNull() && data.Applets[j].Actions[cj].Puts.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/puts", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].Gets.IsNull() && data.Applets[j].Actions[cj].Gets.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/gets", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].ForeachDelimiter.IsNull() && data.Applets[j].Actions[cj].ForeachDelimiter.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/foreach/delimiter", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].ForeachIterator.IsNull() && data.Applets[j].Actions[cj].ForeachIterator.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/foreach/iterator", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].ForeachLoopvar.IsNull() && data.Applets[j].Actions[cj].ForeachLoopvar.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/foreach/loopvar", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].DivideOperand2.IsNull() && data.Applets[j].Actions[cj].DivideOperand2.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/divide/operand2", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].DivideOperand1.IsNull() && data.Applets[j].Actions[cj].DivideOperand1.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/divide/operand1", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].AppendValue.IsNull() && data.Applets[j].Actions[cj].AppendValue.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/append/value", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].AppendVarname.IsNull() && data.Applets[j].Actions[cj].AppendVarname.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/append/varname", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].DecrementValue.IsNull() && data.Applets[j].Actions[cj].DecrementValue.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/decrement/value", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].DecrementVarname.IsNull() && data.Applets[j].Actions[cj].DecrementVarname.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/decrement/varname", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].IncrementValue.IsNull() && data.Applets[j].Actions[cj].IncrementValue.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/increment/value", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].IncrementVarname.IsNull() && data.Applets[j].Actions[cj].IncrementVarname.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/increment/varname", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].Continue.IsNull() && data.Applets[j].Actions[cj].Continue.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/continue", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].Break.IsNull() && data.Applets[j].Actions[cj].Break.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/break", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].WhileOperand2.IsNull() && data.Applets[j].Actions[cj].WhileOperand2.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/while/operand2", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].WhileOperation.IsNull() && data.Applets[j].Actions[cj].WhileOperation.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/while/operation", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].WhileOperand1.IsNull() && data.Applets[j].Actions[cj].WhileOperand1.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/while/operand1", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].Else.IsNull() && data.Applets[j].Actions[cj].Else.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/else", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].ElseifOperand2.IsNull() && data.Applets[j].Actions[cj].ElseifOperand2.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/elseif/operand2", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].ElseifOperation.IsNull() && data.Applets[j].Actions[cj].ElseifOperation.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/elseif/operation", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].ElseifOperand1.IsNull() && data.Applets[j].Actions[cj].ElseifOperand1.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/elseif/operand1", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].IfGoto.IsNull() && data.Applets[j].Actions[cj].IfGoto.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/if/goto", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].IfStringOp2.IsNull() && data.Applets[j].Actions[cj].IfStringOp2.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/if/string-op-2", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].IfKeyword.IsNull() && data.Applets[j].Actions[cj].IfKeyword.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/if/keyword", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].IfStringOp1.IsNull() && data.Applets[j].Actions[cj].IfStringOp1.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/if/string-op-1", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].SetValue.IsNull() && data.Applets[j].Actions[cj].SetValue.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/set/value", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].SetVarname.IsNull() && data.Applets[j].Actions[cj].SetVarname.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/set/varname", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].SyslogPriority.IsNull() && data.Applets[j].Actions[cj].SyslogPriority.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/syslog-option/priority", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].SyslogMsg.IsNull() && data.Applets[j].Actions[cj].SyslogMsg.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/syslog-option/msg", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].SyslogFacility.IsNull() && data.Applets[j].Actions[cj].SyslogFacility.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/syslog-option/facility", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].RegexpStringMatch3.IsNull() && data.Applets[j].Actions[cj].RegexpStringMatch3.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/regexp-option/string-submatch3", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].RegexpStringMatch2.IsNull() && data.Applets[j].Actions[cj].RegexpStringMatch2.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/regexp-option/string-submatch2", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].RegexpStringMatch1.IsNull() && data.Applets[j].Actions[cj].RegexpStringMatch1.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/regexp-option/string-submatch1", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].RegexpStringMatch.IsNull() && data.Applets[j].Actions[cj].RegexpStringMatch.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/regexp-option/string-match", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].RegexpStringInput.IsNull() && data.Applets[j].Actions[cj].RegexpStringInput.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/regexp-option/string-input", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].RegexpStringPattern.IsNull() && data.Applets[j].Actions[cj].RegexpStringPattern.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/regexp-option/string-pattern", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							if !state.Applets[i].Actions[ci].CliCommand.IsNull() && data.Applets[j].Actions[cj].CliCommand.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v/cli-choice/command", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							break
						}
					}
					if !found {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/action-config/action=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
					}
				}
				if !state.Applets[i].EventCliSkip.IsNull() && data.Applets[j].EventCliSkip.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/event/cli/skip", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Applets[i].EventCliSync.IsNull() && data.Applets[j].EventCliSync.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/event/cli/sync", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Applets[i].EventCliPattern.IsNull() && data.Applets[j].EventCliPattern.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/event/cli/pattern", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Applets[i].Description.IsNull() && data.Applets[j].Description.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/description", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Applets[i].Class.IsNull() && data.Applets[j].Class.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/class", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Applets[i].Authorization.IsNull() && data.Applets[j].Authorization.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v/authorization", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/applet=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	if !state.DetectorRoutingBootupDelay.IsNull() && data.DetectorRoutingBootupDelay.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/detector/routing/bootup-delay", state.getPath()))
	}
	if !state.DetectorRpcMaxSessions.IsNull() && data.DetectorRpcMaxSessions.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/detector/rpc/max-sessions", state.getPath()))
	}
	if !state.SchedulerAppletThreadClassNumber.IsNull() && data.SchedulerAppletThreadClassNumber.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/scheduler/applet/thread/class/number", state.getPath()))
	}
	if !state.SchedulerAppletThreadClassDefault.IsNull() && data.SchedulerAppletThreadClassDefault.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/scheduler/applet/thread/class/default", state.getPath()))
	}
	if !state.DirectoryUserPolicy.IsNull() && data.DirectoryUserPolicy.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/directory/user/policy", state.getPath()))
	}
	if !state.HistorySizeTraps.IsNull() && data.HistorySizeTraps.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/history/size/traps", state.getPath()))
	}
	if !state.HistorySizeEvents.IsNull() && data.HistorySizeEvents.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/history/size/events", state.getPath()))
	}
	if !state.SessionCliUsernamePrivilege.IsNull() && data.SessionCliUsernamePrivilege.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/session/cli/username/privilege_set", state.getPath()))
	}
	if !state.SessionCliUsername.IsNull() && data.SessionCliUsername.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/session/cli/username/username_in_word_set", state.getPath()))
	}
	for i := range state.EnvironmentVariables {
		stateKeyValues := [...]string{state.EnvironmentVariables[i].Name.ValueString()}

		emptyKeys := true
		if !reflect.ValueOf(state.EnvironmentVariables[i].Name.ValueString()).IsZero() {
			emptyKeys = false
		}
		if emptyKeys {
			continue
		}

		found := false
		for j := range data.EnvironmentVariables {
			found = true
			if state.EnvironmentVariables[i].Name.ValueString() != data.EnvironmentVariables[j].Name.ValueString() {
				found = false
			}
			if found {
				if !state.EnvironmentVariables[i].Value.IsNull() && data.EnvironmentVariables[j].Value.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/environment=%v/value", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/environment=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}

	return deletedItems
}

// End of section. //template:end getDeletedItems

// Section below is generated&owned by "gen/generator.go". //template:begin getEmptyLeafsDelete

func (data *EEM) getEmptyLeafsDelete(ctx context.Context) []string {
	emptyLeafsDelete := make([]string, 0)

	for i := range data.Applets {
		keyValues := [...]string{data.Applets[i].Name.ValueString()}

		for ci := range data.Applets[i].Actions {
			ckeyValues := [...]string{data.Applets[i].Actions[ci].Name.ValueString()}
			if !data.Applets[i].Actions[ci].CounterOpNop.IsNull() && !data.Applets[i].Actions[ci].CounterOpNop.ValueBool() {
				emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/applet=%v/action-config/action=%v/counter/op/nop", data.getPath(), strings.Join(keyValues[:], ","), strings.Join(ckeyValues[:], ",")))
			}
			if !data.Applets[i].Actions[ci].CounterOpSet.IsNull() && !data.Applets[i].Actions[ci].CounterOpSet.ValueBool() {
				emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/applet=%v/action-config/action=%v/counter/op/set", data.getPath(), strings.Join(keyValues[:], ","), strings.Join(ckeyValues[:], ",")))
			}
			if !data.Applets[i].Actions[ci].CounterOpInc.IsNull() && !data.Applets[i].Actions[ci].CounterOpInc.ValueBool() {
				emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/applet=%v/action-config/action=%v/counter/op/inc", data.getPath(), strings.Join(keyValues[:], ","), strings.Join(ckeyValues[:], ",")))
			}
			if !data.Applets[i].Actions[ci].CounterOpDec.IsNull() && !data.Applets[i].Actions[ci].CounterOpDec.ValueBool() {
				emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/applet=%v/action-config/action=%v/counter/op/dec", data.getPath(), strings.Join(keyValues[:], ","), strings.Join(ckeyValues[:], ",")))
			}
			if !data.Applets[i].Actions[ci].Reload.IsNull() && !data.Applets[i].Actions[ci].Reload.ValueBool() {
				emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/applet=%v/action-config/action=%v/reload", data.getPath(), strings.Join(keyValues[:], ","), strings.Join(ckeyValues[:], ",")))
			}
			if !data.Applets[i].Actions[ci].Exit.IsNull() && !data.Applets[i].Actions[ci].Exit.ValueBool() {
				emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/applet=%v/action-config/action=%v/exit", data.getPath(), strings.Join(keyValues[:], ","), strings.Join(ckeyValues[:], ",")))
			}
			if !data.Applets[i].Actions[ci].End.IsNull() && !data.Applets[i].Actions[ci].End.ValueBool() {
				emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/applet=%v/action-config/action=%v/end", data.getPath(), strings.Join(keyValues[:], ","), strings.Join(ckeyValues[:], ",")))
			}
			if !data.Applets[i].Actions[ci].Continue.IsNull() && !data.Applets[i].Actions[ci].Continue.ValueBool() {
				emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/applet=%v/action-config/action=%v/continue", data.getPath(), strings.Join(keyValues[:], ","), strings.Join(ckeyValues[:], ",")))
			}
			if !data.Applets[i].Actions[ci].Break.IsNull() && !data.Applets[i].Actions[ci].Break.ValueBool() {
				emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/applet=%v/action-config/action=%v/break", data.getPath(), strings.Join(keyValues[:], ","), strings.Join(ckeyValues[:], ",")))
			}
			if !data.Applets[i].Actions[ci].Else.IsNull() && !data.Applets[i].Actions[ci].Else.ValueBool() {
				emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/applet=%v/action-config/action=%v/else", data.getPath(), strings.Join(keyValues[:], ","), strings.Join(ckeyValues[:], ",")))
			}
		}
	}
	if !data.SchedulerAppletThreadClassDefault.IsNull() && !data.SchedulerAppletThreadClassDefault.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/scheduler/applet/thread/class/default", data.getPath()))
	}

	return emptyLeafsDelete
}

// End of section. //template:end getEmptyLeafsDelete

// Section below is generated&owned by "gen/generator.go". //template:begin getDeletePaths

func (data *EEM) getDeletePaths(ctx context.Context) []string {
	var deletePaths []string
	for i := range data.Applets {
		keyValues := [...]string{data.Applets[i].Name.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/applet=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	if !data.DetectorRoutingBootupDelay.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/detector/routing/bootup-delay", data.getPath()))
	}
	if !data.DetectorRpcMaxSessions.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/detector/rpc/max-sessions", data.getPath()))
	}
	if !data.SchedulerAppletThreadClassNumber.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/scheduler/applet/thread/class/number", data.getPath()))
	}
	if !data.SchedulerAppletThreadClassDefault.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/scheduler/applet/thread/class/default", data.getPath()))
	}
	if !data.DirectoryUserPolicy.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/directory/user/policy", data.getPath()))
	}
	if !data.HistorySizeTraps.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/history/size/traps", data.getPath()))
	}
	if !data.HistorySizeEvents.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/history/size/events", data.getPath()))
	}
	if !data.SessionCliUsernamePrivilege.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/session/cli/username/privilege_set", data.getPath()))
	}
	if !data.SessionCliUsername.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/session/cli/username/username_in_word_set", data.getPath()))
	}
	for i := range data.EnvironmentVariables {
		keyValues := [...]string{data.EnvironmentVariables[i].Name.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/environment=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}

	return deletePaths
}

// End of section. //template:end getDeletePaths
