// 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"
	"net/url"
	"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 Template struct {
	Device                                             types.String                                 `tfsdk:"device"`
	Id                                                 types.String                                 `tfsdk:"id"`
	DeleteMode                                         types.String                                 `tfsdk:"delete_mode"`
	TemplateName                                       types.String                                 `tfsdk:"template_name"`
	Dot1xPae                                           types.String                                 `tfsdk:"dot1x_pae"`
	Dot1xMaxReauthReq                                  types.Int64                                  `tfsdk:"dot1x_max_reauth_req"`
	Dot1xMaxReq                                        types.Int64                                  `tfsdk:"dot1x_max_req"`
	Dot1xTimeoutTxPeriod                               types.Int64                                  `tfsdk:"dot1x_timeout_tx_period"`
	ServicePolicyTypeControlSubscriber                 types.String                                 `tfsdk:"service_policy_type_control_subscriber"`
	ServicePolicyInput                                 types.String                                 `tfsdk:"service_policy_input"`
	ServicePolicyOutput                                types.String                                 `tfsdk:"service_policy_output"`
	SourceTemplate                                     types.String                                 `tfsdk:"source_template"`
	SwitchportModeTrunk                                types.Bool                                   `tfsdk:"switchport_mode_trunk"`
	SwitchportModeAccess                               types.Bool                                   `tfsdk:"switchport_mode_access"`
	SwitchportNonegotiate                              types.Bool                                   `tfsdk:"switchport_nonegotiate"`
	SwitchportBlockUnicast                             types.Bool                                   `tfsdk:"switchport_block_unicast"`
	SwitchportPortSecurity                             types.Bool                                   `tfsdk:"switchport_port_security"`
	SwitchportPortSecurityAgingStatic                  types.Bool                                   `tfsdk:"switchport_port_security_aging_static"`
	SwitchportPortSecurityAgingTime                    types.Int64                                  `tfsdk:"switchport_port_security_aging_time"`
	SwitchportPortSecurityAgingType                    types.Bool                                   `tfsdk:"switchport_port_security_aging_type"`
	SwitchportPortSecurityAgingTypeInactivity          types.Bool                                   `tfsdk:"switchport_port_security_aging_type_inactivity"`
	SwitchportPortSecurityMaximumRange                 []TemplateSwitchportPortSecurityMaximumRange `tfsdk:"switchport_port_security_maximum_range"`
	SwitchportPortSecurityViolationProtect             types.Bool                                   `tfsdk:"switchport_port_security_violation_protect"`
	SwitchportPortSecurityViolationRestrict            types.Bool                                   `tfsdk:"switchport_port_security_violation_restrict"`
	SwitchportPortSecurityViolationShutdown            types.Bool                                   `tfsdk:"switchport_port_security_violation_shutdown"`
	SwitchportAccessVlan                               types.Int64                                  `tfsdk:"switchport_access_vlan"`
	SwitchportVoiceVlan                                types.Int64                                  `tfsdk:"switchport_voice_vlan"`
	SwitchportPrivateVlanHostAssociationPrimaryRange   types.Int64                                  `tfsdk:"switchport_private_vlan_host_association_primary_range"`
	SwitchportPrivateVlanHostAssociationSecondaryRange types.Int64                                  `tfsdk:"switchport_private_vlan_host_association_secondary_range"`
	SwitchportTrunkAllowedVlans                        types.String                                 `tfsdk:"switchport_trunk_allowed_vlans"`
	SwitchportTrunkAllowedVlansNone                    types.Bool                                   `tfsdk:"switchport_trunk_allowed_vlans_none"`
	SwitchportTrunkAllowedVlansAll                     types.Bool                                   `tfsdk:"switchport_trunk_allowed_vlans_all"`
	SwitchportTrunkNativeVlanTag                       types.Bool                                   `tfsdk:"switchport_trunk_native_vlan_tag"`
	SwitchportTrunkNativeVlanVlanId                    types.Int64                                  `tfsdk:"switchport_trunk_native_vlan_vlan_id"`
	Mab                                                types.Bool                                   `tfsdk:"mab"`
	MabEap                                             types.Bool                                   `tfsdk:"mab_eap"`
	AccessSessionClosed                                types.Bool                                   `tfsdk:"access_session_closed"`
	AccessSessionMonitor                               types.Bool                                   `tfsdk:"access_session_monitor"`
	AccessSessionPortControl                           types.String                                 `tfsdk:"access_session_port_control"`
	AccessSessionControlDirection                      types.String                                 `tfsdk:"access_session_control_direction"`
	AccessSessionHostMode                              types.String                                 `tfsdk:"access_session_host_mode"`
	AccessSessionInterfaceTemplateSticky               types.Bool                                   `tfsdk:"access_session_interface_template_sticky"`
	AccessSessionInterfaceTemplateStickyTimer          types.Int64                                  `tfsdk:"access_session_interface_template_sticky_timer"`
	AuthenticationPeriodic                             types.Bool                                   `tfsdk:"authentication_periodic"`
	AuthenticationTimerReauthenticateServer            types.Bool                                   `tfsdk:"authentication_timer_reauthenticate_server"`
	AuthenticationTimerReauthenticateRange             types.Int64                                  `tfsdk:"authentication_timer_reauthenticate_range"`
	SpanningTreeBpduguardEnable                        types.Bool                                   `tfsdk:"spanning_tree_bpduguard_enable"`
	SpanningTreeServicePolicy                          types.Bool                                   `tfsdk:"spanning_tree_service_policy"`
	SpanningTreePortfast                               types.Bool                                   `tfsdk:"spanning_tree_portfast"`
	SpanningTreePortfastDisable                        types.Bool                                   `tfsdk:"spanning_tree_portfast_disable"`
	SpanningTreePortfastEdge                           types.Bool                                   `tfsdk:"spanning_tree_portfast_edge"`
	SpanningTreePortfastNetwork                        types.Bool                                   `tfsdk:"spanning_tree_portfast_network"`
	StormControlBroadcastLevelPpsThreshold             types.String                                 `tfsdk:"storm_control_broadcast_level_pps_threshold"`
	StormControlBroadcastLevelBpsThreshold             types.Float64                                `tfsdk:"storm_control_broadcast_level_bps_threshold"`
	StormControlBroadcastLevelThreshold                types.Float64                                `tfsdk:"storm_control_broadcast_level_threshold"`
	StormControlMulticastLevelPpsThreshold             types.String                                 `tfsdk:"storm_control_multicast_level_pps_threshold"`
	StormControlMulticastLevelBpsThreshold             types.Float64                                `tfsdk:"storm_control_multicast_level_bps_threshold"`
	StormControlMulticastLevelThreshold                types.Float64                                `tfsdk:"storm_control_multicast_level_threshold"`
	StormControlActionShutdown                         types.Bool                                   `tfsdk:"storm_control_action_shutdown"`
	StormControlActionTrap                             types.Bool                                   `tfsdk:"storm_control_action_trap"`
	LoadInterval                                       types.Int64                                  `tfsdk:"load_interval"`
	IpDhcpSnoopingLimitRate                            types.Int64                                  `tfsdk:"ip_dhcp_snooping_limit_rate"`
	IpDhcpSnoopingTrust                                types.Bool                                   `tfsdk:"ip_dhcp_snooping_trust"`
	IpAccessGroup                                      []TemplateIpAccessGroup                      `tfsdk:"ip_access_group"`
	SubscriberAgingInactivityTimerValue                types.Int64                                  `tfsdk:"subscriber_aging_inactivity_timer_value"`
	SubscriberAgingInactivityTimerProbe                types.Bool                                   `tfsdk:"subscriber_aging_inactivity_timer_probe"`
	SubscriberAgingProbe                               types.Bool                                   `tfsdk:"subscriber_aging_probe"`
	DeviceTracking                                     types.Bool                                   `tfsdk:"device_tracking"`
	DeviceTrackingAttachPolicy                         []TemplateDeviceTrackingAttachPolicy         `tfsdk:"device_tracking_attach_policy"`
	DeviceTrackingVlanRange                            types.String                                 `tfsdk:"device_tracking_vlan_range"`
	CtsManual                                          types.Bool                                   `tfsdk:"cts_manual"`
	CtsManualPolicyStaticSgt                           types.Int64                                  `tfsdk:"cts_manual_policy_static_sgt"`
	CtsManualPolicyStaticTrusted                       types.Bool                                   `tfsdk:"cts_manual_policy_static_trusted"`
	CtsManualPropagateSgt                              types.Bool                                   `tfsdk:"cts_manual_propagate_sgt"`
	CtsRoleBasedEnforcement                            types.Bool                                   `tfsdk:"cts_role_based_enforcement"`
}

type TemplateData struct {
	Device                                             types.String                                 `tfsdk:"device"`
	Id                                                 types.String                                 `tfsdk:"id"`
	TemplateName                                       types.String                                 `tfsdk:"template_name"`
	Dot1xPae                                           types.String                                 `tfsdk:"dot1x_pae"`
	Dot1xMaxReauthReq                                  types.Int64                                  `tfsdk:"dot1x_max_reauth_req"`
	Dot1xMaxReq                                        types.Int64                                  `tfsdk:"dot1x_max_req"`
	Dot1xTimeoutTxPeriod                               types.Int64                                  `tfsdk:"dot1x_timeout_tx_period"`
	ServicePolicyTypeControlSubscriber                 types.String                                 `tfsdk:"service_policy_type_control_subscriber"`
	ServicePolicyInput                                 types.String                                 `tfsdk:"service_policy_input"`
	ServicePolicyOutput                                types.String                                 `tfsdk:"service_policy_output"`
	SourceTemplate                                     types.String                                 `tfsdk:"source_template"`
	SwitchportModeTrunk                                types.Bool                                   `tfsdk:"switchport_mode_trunk"`
	SwitchportModeAccess                               types.Bool                                   `tfsdk:"switchport_mode_access"`
	SwitchportNonegotiate                              types.Bool                                   `tfsdk:"switchport_nonegotiate"`
	SwitchportBlockUnicast                             types.Bool                                   `tfsdk:"switchport_block_unicast"`
	SwitchportPortSecurity                             types.Bool                                   `tfsdk:"switchport_port_security"`
	SwitchportPortSecurityAgingStatic                  types.Bool                                   `tfsdk:"switchport_port_security_aging_static"`
	SwitchportPortSecurityAgingTime                    types.Int64                                  `tfsdk:"switchport_port_security_aging_time"`
	SwitchportPortSecurityAgingType                    types.Bool                                   `tfsdk:"switchport_port_security_aging_type"`
	SwitchportPortSecurityAgingTypeInactivity          types.Bool                                   `tfsdk:"switchport_port_security_aging_type_inactivity"`
	SwitchportPortSecurityMaximumRange                 []TemplateSwitchportPortSecurityMaximumRange `tfsdk:"switchport_port_security_maximum_range"`
	SwitchportPortSecurityViolationProtect             types.Bool                                   `tfsdk:"switchport_port_security_violation_protect"`
	SwitchportPortSecurityViolationRestrict            types.Bool                                   `tfsdk:"switchport_port_security_violation_restrict"`
	SwitchportPortSecurityViolationShutdown            types.Bool                                   `tfsdk:"switchport_port_security_violation_shutdown"`
	SwitchportAccessVlan                               types.Int64                                  `tfsdk:"switchport_access_vlan"`
	SwitchportVoiceVlan                                types.Int64                                  `tfsdk:"switchport_voice_vlan"`
	SwitchportPrivateVlanHostAssociationPrimaryRange   types.Int64                                  `tfsdk:"switchport_private_vlan_host_association_primary_range"`
	SwitchportPrivateVlanHostAssociationSecondaryRange types.Int64                                  `tfsdk:"switchport_private_vlan_host_association_secondary_range"`
	SwitchportTrunkAllowedVlans                        types.String                                 `tfsdk:"switchport_trunk_allowed_vlans"`
	SwitchportTrunkAllowedVlansNone                    types.Bool                                   `tfsdk:"switchport_trunk_allowed_vlans_none"`
	SwitchportTrunkAllowedVlansAll                     types.Bool                                   `tfsdk:"switchport_trunk_allowed_vlans_all"`
	SwitchportTrunkNativeVlanTag                       types.Bool                                   `tfsdk:"switchport_trunk_native_vlan_tag"`
	SwitchportTrunkNativeVlanVlanId                    types.Int64                                  `tfsdk:"switchport_trunk_native_vlan_vlan_id"`
	Mab                                                types.Bool                                   `tfsdk:"mab"`
	MabEap                                             types.Bool                                   `tfsdk:"mab_eap"`
	AccessSessionClosed                                types.Bool                                   `tfsdk:"access_session_closed"`
	AccessSessionMonitor                               types.Bool                                   `tfsdk:"access_session_monitor"`
	AccessSessionPortControl                           types.String                                 `tfsdk:"access_session_port_control"`
	AccessSessionControlDirection                      types.String                                 `tfsdk:"access_session_control_direction"`
	AccessSessionHostMode                              types.String                                 `tfsdk:"access_session_host_mode"`
	AccessSessionInterfaceTemplateSticky               types.Bool                                   `tfsdk:"access_session_interface_template_sticky"`
	AccessSessionInterfaceTemplateStickyTimer          types.Int64                                  `tfsdk:"access_session_interface_template_sticky_timer"`
	AuthenticationPeriodic                             types.Bool                                   `tfsdk:"authentication_periodic"`
	AuthenticationTimerReauthenticateServer            types.Bool                                   `tfsdk:"authentication_timer_reauthenticate_server"`
	AuthenticationTimerReauthenticateRange             types.Int64                                  `tfsdk:"authentication_timer_reauthenticate_range"`
	SpanningTreeBpduguardEnable                        types.Bool                                   `tfsdk:"spanning_tree_bpduguard_enable"`
	SpanningTreeServicePolicy                          types.Bool                                   `tfsdk:"spanning_tree_service_policy"`
	SpanningTreePortfast                               types.Bool                                   `tfsdk:"spanning_tree_portfast"`
	SpanningTreePortfastDisable                        types.Bool                                   `tfsdk:"spanning_tree_portfast_disable"`
	SpanningTreePortfastEdge                           types.Bool                                   `tfsdk:"spanning_tree_portfast_edge"`
	SpanningTreePortfastNetwork                        types.Bool                                   `tfsdk:"spanning_tree_portfast_network"`
	StormControlBroadcastLevelPpsThreshold             types.String                                 `tfsdk:"storm_control_broadcast_level_pps_threshold"`
	StormControlBroadcastLevelBpsThreshold             types.Float64                                `tfsdk:"storm_control_broadcast_level_bps_threshold"`
	StormControlBroadcastLevelThreshold                types.Float64                                `tfsdk:"storm_control_broadcast_level_threshold"`
	StormControlMulticastLevelPpsThreshold             types.String                                 `tfsdk:"storm_control_multicast_level_pps_threshold"`
	StormControlMulticastLevelBpsThreshold             types.Float64                                `tfsdk:"storm_control_multicast_level_bps_threshold"`
	StormControlMulticastLevelThreshold                types.Float64                                `tfsdk:"storm_control_multicast_level_threshold"`
	StormControlActionShutdown                         types.Bool                                   `tfsdk:"storm_control_action_shutdown"`
	StormControlActionTrap                             types.Bool                                   `tfsdk:"storm_control_action_trap"`
	LoadInterval                                       types.Int64                                  `tfsdk:"load_interval"`
	IpDhcpSnoopingLimitRate                            types.Int64                                  `tfsdk:"ip_dhcp_snooping_limit_rate"`
	IpDhcpSnoopingTrust                                types.Bool                                   `tfsdk:"ip_dhcp_snooping_trust"`
	IpAccessGroup                                      []TemplateIpAccessGroup                      `tfsdk:"ip_access_group"`
	SubscriberAgingInactivityTimerValue                types.Int64                                  `tfsdk:"subscriber_aging_inactivity_timer_value"`
	SubscriberAgingInactivityTimerProbe                types.Bool                                   `tfsdk:"subscriber_aging_inactivity_timer_probe"`
	SubscriberAgingProbe                               types.Bool                                   `tfsdk:"subscriber_aging_probe"`
	DeviceTracking                                     types.Bool                                   `tfsdk:"device_tracking"`
	DeviceTrackingAttachPolicy                         []TemplateDeviceTrackingAttachPolicy         `tfsdk:"device_tracking_attach_policy"`
	DeviceTrackingVlanRange                            types.String                                 `tfsdk:"device_tracking_vlan_range"`
	CtsManual                                          types.Bool                                   `tfsdk:"cts_manual"`
	CtsManualPolicyStaticSgt                           types.Int64                                  `tfsdk:"cts_manual_policy_static_sgt"`
	CtsManualPolicyStaticTrusted                       types.Bool                                   `tfsdk:"cts_manual_policy_static_trusted"`
	CtsManualPropagateSgt                              types.Bool                                   `tfsdk:"cts_manual_propagate_sgt"`
	CtsRoleBasedEnforcement                            types.Bool                                   `tfsdk:"cts_role_based_enforcement"`
}
type TemplateSwitchportPortSecurityMaximumRange struct {
	Range      types.Int64 `tfsdk:"range"`
	Vlan       types.Bool  `tfsdk:"vlan"`
	VlanAccess types.Bool  `tfsdk:"vlan_access"`
}
type TemplateIpAccessGroup struct {
	Direction  types.String `tfsdk:"direction"`
	AccessList types.String `tfsdk:"access_list"`
}
type TemplateDeviceTrackingAttachPolicy struct {
	PolicyName types.String `tfsdk:"policy_name"`
	VlanRange  types.String `tfsdk:"vlan_range"`
}

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

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

func (data Template) getPath() string {
	return fmt.Sprintf("Cisco-IOS-XE-native:native/template/Cisco-IOS-XE-template:template_details=%v", url.QueryEscape(fmt.Sprintf("%v", data.TemplateName.ValueString())))
}

func (data TemplateData) getPath() string {
	return fmt.Sprintf("Cisco-IOS-XE-native:native/template/Cisco-IOS-XE-template:template_details=%v", url.QueryEscape(fmt.Sprintf("%v", data.TemplateName.ValueString())))
}

// if last path element has a key -> remove it
func (data Template) 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 Template) toBody(ctx context.Context) string {
	body := `{"` + helpers.LastElement(data.getPath()) + `":{}}`
	if !data.TemplateName.IsNull() && !data.TemplateName.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"template_name", data.TemplateName.ValueString())
	}
	if !data.Dot1xPae.IsNull() && !data.Dot1xPae.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.pae", data.Dot1xPae.ValueString())
	}
	if !data.Dot1xMaxReauthReq.IsNull() && !data.Dot1xMaxReauthReq.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.max-reauth-req", strconv.FormatInt(data.Dot1xMaxReauthReq.ValueInt64(), 10))
	}
	if !data.Dot1xMaxReq.IsNull() && !data.Dot1xMaxReq.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.max-req", strconv.FormatInt(data.Dot1xMaxReq.ValueInt64(), 10))
	}
	if !data.Dot1xTimeoutTxPeriod.IsNull() && !data.Dot1xTimeoutTxPeriod.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.timeout.tx-period", strconv.FormatInt(data.Dot1xTimeoutTxPeriod.ValueInt64(), 10))
	}
	if !data.ServicePolicyTypeControlSubscriber.IsNull() && !data.ServicePolicyTypeControlSubscriber.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"service-policy.type.control.subscriber", data.ServicePolicyTypeControlSubscriber.ValueString())
	}
	if !data.ServicePolicyInput.IsNull() && !data.ServicePolicyInput.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"service-policy.input.policy-map-name", data.ServicePolicyInput.ValueString())
	}
	if !data.ServicePolicyOutput.IsNull() && !data.ServicePolicyOutput.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"service-policy.output.policy-map-name", data.ServicePolicyOutput.ValueString())
	}
	if !data.SourceTemplate.IsNull() && !data.SourceTemplate.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"source.template", data.SourceTemplate.ValueString())
	}
	if !data.SwitchportModeTrunk.IsNull() && !data.SwitchportModeTrunk.IsUnknown() {
		if data.SwitchportModeTrunk.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.mode.trunk", map[string]string{})
		}
	}
	if !data.SwitchportModeAccess.IsNull() && !data.SwitchportModeAccess.IsUnknown() {
		if data.SwitchportModeAccess.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.mode.access", map[string]string{})
		}
	}
	if !data.SwitchportNonegotiate.IsNull() && !data.SwitchportNonegotiate.IsUnknown() {
		if data.SwitchportNonegotiate.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.nonegotiate", map[string]string{})
		}
	}
	if !data.SwitchportBlockUnicast.IsNull() && !data.SwitchportBlockUnicast.IsUnknown() {
		if data.SwitchportBlockUnicast.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.block.unicast", map[string]string{})
		}
	}
	if !data.SwitchportPortSecurity.IsNull() && !data.SwitchportPortSecurity.IsUnknown() {
		if data.SwitchportPortSecurity.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.port-security", map[string]string{})
		}
	}
	if !data.SwitchportPortSecurityAgingStatic.IsNull() && !data.SwitchportPortSecurityAgingStatic.IsUnknown() {
		if data.SwitchportPortSecurityAgingStatic.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.port-security.aging.static", map[string]string{})
		}
	}
	if !data.SwitchportPortSecurityAgingTime.IsNull() && !data.SwitchportPortSecurityAgingTime.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.port-security.aging.time", strconv.FormatInt(data.SwitchportPortSecurityAgingTime.ValueInt64(), 10))
	}
	if !data.SwitchportPortSecurityAgingType.IsNull() && !data.SwitchportPortSecurityAgingType.IsUnknown() {
		if data.SwitchportPortSecurityAgingType.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.port-security.aging.type", map[string]string{})
		}
	}
	if !data.SwitchportPortSecurityAgingTypeInactivity.IsNull() && !data.SwitchportPortSecurityAgingTypeInactivity.IsUnknown() {
		if data.SwitchportPortSecurityAgingTypeInactivity.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.port-security.aging.type.inactivity", map[string]string{})
		}
	}
	if !data.SwitchportPortSecurityViolationProtect.IsNull() && !data.SwitchportPortSecurityViolationProtect.IsUnknown() {
		if data.SwitchportPortSecurityViolationProtect.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.port-security.violation.protect", map[string]string{})
		}
	}
	if !data.SwitchportPortSecurityViolationRestrict.IsNull() && !data.SwitchportPortSecurityViolationRestrict.IsUnknown() {
		if data.SwitchportPortSecurityViolationRestrict.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.port-security.violation.restrict", map[string]string{})
		}
	}
	if !data.SwitchportPortSecurityViolationShutdown.IsNull() && !data.SwitchportPortSecurityViolationShutdown.IsUnknown() {
		if data.SwitchportPortSecurityViolationShutdown.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.port-security.violation.shutdown", map[string]string{})
		}
	}
	if !data.SwitchportAccessVlan.IsNull() && !data.SwitchportAccessVlan.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.access.vlan", strconv.FormatInt(data.SwitchportAccessVlan.ValueInt64(), 10))
	}
	if !data.SwitchportVoiceVlan.IsNull() && !data.SwitchportVoiceVlan.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.voice.vlan", strconv.FormatInt(data.SwitchportVoiceVlan.ValueInt64(), 10))
	}
	if !data.SwitchportPrivateVlanHostAssociationPrimaryRange.IsNull() && !data.SwitchportPrivateVlanHostAssociationPrimaryRange.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.private-vlan.host-association.primary-range", strconv.FormatInt(data.SwitchportPrivateVlanHostAssociationPrimaryRange.ValueInt64(), 10))
	}
	if !data.SwitchportPrivateVlanHostAssociationSecondaryRange.IsNull() && !data.SwitchportPrivateVlanHostAssociationSecondaryRange.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.private-vlan.host-association.secondary-range", strconv.FormatInt(data.SwitchportPrivateVlanHostAssociationSecondaryRange.ValueInt64(), 10))
	}
	if !data.SwitchportTrunkAllowedVlans.IsNull() && !data.SwitchportTrunkAllowedVlans.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.trunk.allowed.vlan.vlans", data.SwitchportTrunkAllowedVlans.ValueString())
	}
	if !data.SwitchportTrunkAllowedVlansNone.IsNull() && !data.SwitchportTrunkAllowedVlansNone.IsUnknown() {
		if data.SwitchportTrunkAllowedVlansNone.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.trunk.allowed.vlan.none", map[string]string{})
		}
	}
	if !data.SwitchportTrunkAllowedVlansAll.IsNull() && !data.SwitchportTrunkAllowedVlansAll.IsUnknown() {
		if data.SwitchportTrunkAllowedVlansAll.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.trunk.allowed.vlan.all", map[string]string{})
		}
	}
	if !data.SwitchportTrunkNativeVlanTag.IsNull() && !data.SwitchportTrunkNativeVlanTag.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.trunk.native.vlan.tag", data.SwitchportTrunkNativeVlanTag.ValueBool())
	}
	if !data.SwitchportTrunkNativeVlanVlanId.IsNull() && !data.SwitchportTrunkNativeVlanVlanId.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.trunk.native.vlan.vlan-id", strconv.FormatInt(data.SwitchportTrunkNativeVlanVlanId.ValueInt64(), 10))
	}
	if !data.Mab.IsNull() && !data.Mab.IsUnknown() {
		if data.Mab.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"mab", map[string]string{})
		}
	}
	if !data.MabEap.IsNull() && !data.MabEap.IsUnknown() {
		if data.MabEap.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"mab.eap", map[string]string{})
		}
	}
	if !data.AccessSessionClosed.IsNull() && !data.AccessSessionClosed.IsUnknown() {
		if data.AccessSessionClosed.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"access-session.closed", map[string]string{})
		}
	}
	if !data.AccessSessionMonitor.IsNull() && !data.AccessSessionMonitor.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"access-session.monitor", data.AccessSessionMonitor.ValueBool())
	}
	if !data.AccessSessionPortControl.IsNull() && !data.AccessSessionPortControl.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"access-session.port-control", data.AccessSessionPortControl.ValueString())
	}
	if !data.AccessSessionControlDirection.IsNull() && !data.AccessSessionControlDirection.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"access-session.control-direction", data.AccessSessionControlDirection.ValueString())
	}
	if !data.AccessSessionHostMode.IsNull() && !data.AccessSessionHostMode.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"access-session.host-mode", data.AccessSessionHostMode.ValueString())
	}
	if !data.AccessSessionInterfaceTemplateSticky.IsNull() && !data.AccessSessionInterfaceTemplateSticky.IsUnknown() {
		if data.AccessSessionInterfaceTemplateSticky.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"access-session.interface-template.sticky", map[string]string{})
		}
	}
	if !data.AccessSessionInterfaceTemplateStickyTimer.IsNull() && !data.AccessSessionInterfaceTemplateStickyTimer.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"access-session.interface-template.sticky.timer", strconv.FormatInt(data.AccessSessionInterfaceTemplateStickyTimer.ValueInt64(), 10))
	}
	if !data.AuthenticationPeriodic.IsNull() && !data.AuthenticationPeriodic.IsUnknown() {
		if data.AuthenticationPeriodic.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"authentication.periodic", map[string]string{})
		}
	}
	if !data.AuthenticationTimerReauthenticateServer.IsNull() && !data.AuthenticationTimerReauthenticateServer.IsUnknown() {
		if data.AuthenticationTimerReauthenticateServer.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"authentication.timer.reauthenticate.server", map[string]string{})
		}
	}
	if !data.AuthenticationTimerReauthenticateRange.IsNull() && !data.AuthenticationTimerReauthenticateRange.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"authentication.timer.reauthenticate.range", strconv.FormatInt(data.AuthenticationTimerReauthenticateRange.ValueInt64(), 10))
	}
	if !data.SpanningTreeBpduguardEnable.IsNull() && !data.SpanningTreeBpduguardEnable.IsUnknown() {
		if data.SpanningTreeBpduguardEnable.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"spanning-tree.bpduguard.enable", map[string]string{})
		}
	}
	if !data.SpanningTreeServicePolicy.IsNull() && !data.SpanningTreeServicePolicy.IsUnknown() {
		if data.SpanningTreeServicePolicy.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"spanning-tree.service-policy", map[string]string{})
		}
	}
	if !data.SpanningTreePortfast.IsNull() && !data.SpanningTreePortfast.IsUnknown() {
		if data.SpanningTreePortfast.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"spanning-tree.portfast", map[string]string{})
		}
	}
	if !data.SpanningTreePortfastDisable.IsNull() && !data.SpanningTreePortfastDisable.IsUnknown() {
		if data.SpanningTreePortfastDisable.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"spanning-tree.portfast.disable", map[string]string{})
		}
	}
	if !data.SpanningTreePortfastEdge.IsNull() && !data.SpanningTreePortfastEdge.IsUnknown() {
		if data.SpanningTreePortfastEdge.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"spanning-tree.portfast.edge", map[string]string{})
		}
	}
	if !data.SpanningTreePortfastNetwork.IsNull() && !data.SpanningTreePortfastNetwork.IsUnknown() {
		if data.SpanningTreePortfastNetwork.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"spanning-tree.portfast.network", map[string]string{})
		}
	}
	if !data.StormControlBroadcastLevelPpsThreshold.IsNull() && !data.StormControlBroadcastLevelPpsThreshold.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"storm-control.broadcast.level.pps.threshold", data.StormControlBroadcastLevelPpsThreshold.ValueString())
	}
	if !data.StormControlBroadcastLevelBpsThreshold.IsNull() && !data.StormControlBroadcastLevelBpsThreshold.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"storm-control.broadcast.level.bps.threshold", strconv.FormatFloat(data.StormControlBroadcastLevelBpsThreshold.ValueFloat64(), 'f', 1, 64))
	}
	if !data.StormControlBroadcastLevelThreshold.IsNull() && !data.StormControlBroadcastLevelThreshold.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"storm-control.broadcast.level.threshold", strconv.FormatFloat(data.StormControlBroadcastLevelThreshold.ValueFloat64(), 'f', 1, 64))
	}
	if !data.StormControlMulticastLevelPpsThreshold.IsNull() && !data.StormControlMulticastLevelPpsThreshold.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"storm-control.multicast.level.pps.threshold", data.StormControlMulticastLevelPpsThreshold.ValueString())
	}
	if !data.StormControlMulticastLevelBpsThreshold.IsNull() && !data.StormControlMulticastLevelBpsThreshold.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"storm-control.multicast.level.bps.threshold", strconv.FormatFloat(data.StormControlMulticastLevelBpsThreshold.ValueFloat64(), 'f', 1, 64))
	}
	if !data.StormControlMulticastLevelThreshold.IsNull() && !data.StormControlMulticastLevelThreshold.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"storm-control.multicast.level.threshold", strconv.FormatFloat(data.StormControlMulticastLevelThreshold.ValueFloat64(), 'f', 1, 64))
	}
	if !data.StormControlActionShutdown.IsNull() && !data.StormControlActionShutdown.IsUnknown() {
		if data.StormControlActionShutdown.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"storm-control.action.shutdown", map[string]string{})
		}
	}
	if !data.StormControlActionTrap.IsNull() && !data.StormControlActionTrap.IsUnknown() {
		if data.StormControlActionTrap.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"storm-control.action.trap", map[string]string{})
		}
	}
	if !data.LoadInterval.IsNull() && !data.LoadInterval.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"load-interval", strconv.FormatInt(data.LoadInterval.ValueInt64(), 10))
	}
	if !data.IpDhcpSnoopingLimitRate.IsNull() && !data.IpDhcpSnoopingLimitRate.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"ip.dhcp.snooping.limit.rate", strconv.FormatInt(data.IpDhcpSnoopingLimitRate.ValueInt64(), 10))
	}
	if !data.IpDhcpSnoopingTrust.IsNull() && !data.IpDhcpSnoopingTrust.IsUnknown() {
		if data.IpDhcpSnoopingTrust.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"ip.dhcp.snooping.trust", map[string]string{})
		}
	}
	if !data.SubscriberAgingInactivityTimerValue.IsNull() && !data.SubscriberAgingInactivityTimerValue.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"subscriber.aging.inactivity-timer.value", strconv.FormatInt(data.SubscriberAgingInactivityTimerValue.ValueInt64(), 10))
	}
	if !data.SubscriberAgingInactivityTimerProbe.IsNull() && !data.SubscriberAgingInactivityTimerProbe.IsUnknown() {
		if data.SubscriberAgingInactivityTimerProbe.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"subscriber.aging.inactivity-timer.probe", map[string]string{})
		}
	}
	if !data.SubscriberAgingProbe.IsNull() && !data.SubscriberAgingProbe.IsUnknown() {
		if data.SubscriberAgingProbe.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"subscriber.aging.probe", map[string]string{})
		}
	}
	if !data.DeviceTracking.IsNull() && !data.DeviceTracking.IsUnknown() {
		if data.DeviceTracking.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"device-tracking", map[string]string{})
		}
	}
	if !data.DeviceTrackingVlanRange.IsNull() && !data.DeviceTrackingVlanRange.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"device-tracking.vlan.vlan-range", data.DeviceTrackingVlanRange.ValueString())
	}
	if !data.CtsManual.IsNull() && !data.CtsManual.IsUnknown() {
		if data.CtsManual.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"cts.manual", map[string]string{})
		}
	}
	if !data.CtsManualPolicyStaticSgt.IsNull() && !data.CtsManualPolicyStaticSgt.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"cts.manual.policy.static.sgt", strconv.FormatInt(data.CtsManualPolicyStaticSgt.ValueInt64(), 10))
	}
	if !data.CtsManualPolicyStaticTrusted.IsNull() && !data.CtsManualPolicyStaticTrusted.IsUnknown() {
		if data.CtsManualPolicyStaticTrusted.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"cts.manual.policy.static.trusted", map[string]string{})
		}
	}
	if !data.CtsManualPropagateSgt.IsNull() && !data.CtsManualPropagateSgt.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"cts.manual.propagate.sgt", data.CtsManualPropagateSgt.ValueBool())
	}
	if !data.CtsRoleBasedEnforcement.IsNull() && !data.CtsRoleBasedEnforcement.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"cts.role-based.enforcement", data.CtsRoleBasedEnforcement.ValueBool())
	}
	if len(data.SwitchportPortSecurityMaximumRange) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.port-security.maximum.range", []interface{}{})
		for index, item := range data.SwitchportPortSecurityMaximumRange {
			if !item.Range.IsNull() && !item.Range.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.port-security.maximum.range"+"."+strconv.Itoa(index)+"."+"range", strconv.FormatInt(item.Range.ValueInt64(), 10))
			}
			if !item.Vlan.IsNull() && !item.Vlan.IsUnknown() {
				if item.Vlan.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.port-security.maximum.range"+"."+strconv.Itoa(index)+"."+"vlan", map[string]string{})
				}
			}
			if !item.VlanAccess.IsNull() && !item.VlanAccess.IsUnknown() {
				if item.VlanAccess.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"switchport.port-security.maximum.range"+"."+strconv.Itoa(index)+"."+"vlan.access", map[string]string{})
				}
			}
		}
	}
	if len(data.IpAccessGroup) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"ip.access-group", []interface{}{})
		for index, item := range data.IpAccessGroup {
			if !item.Direction.IsNull() && !item.Direction.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"ip.access-group"+"."+strconv.Itoa(index)+"."+"direction", item.Direction.ValueString())
			}
			if !item.AccessList.IsNull() && !item.AccessList.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"ip.access-group"+"."+strconv.Itoa(index)+"."+"access-list", item.AccessList.ValueString())
			}
		}
	}
	if len(data.DeviceTrackingAttachPolicy) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"device-tracking.attach-policy.policy-name", []interface{}{})
		for index, item := range data.DeviceTrackingAttachPolicy {
			if !item.PolicyName.IsNull() && !item.PolicyName.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"device-tracking.attach-policy.policy-name"+"."+strconv.Itoa(index)+"."+"policy-name", item.PolicyName.ValueString())
			}
			if !item.VlanRange.IsNull() && !item.VlanRange.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"device-tracking.attach-policy.policy-name"+"."+strconv.Itoa(index)+"."+"vlan.vlan-range", item.VlanRange.ValueString())
			}
		}
	}
	return body
}

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

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

func (data *Template) updateFromBody(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 + "template_name"); value.Exists() && !data.TemplateName.IsNull() {
		data.TemplateName = types.StringValue(value.String())
	} else {
		data.TemplateName = types.StringNull()
	}
	if value := res.Get(prefix + "dot1x.pae"); value.Exists() && !data.Dot1xPae.IsNull() {
		data.Dot1xPae = types.StringValue(value.String())
	} else {
		data.Dot1xPae = types.StringNull()
	}
	if value := res.Get(prefix + "dot1x.max-reauth-req"); value.Exists() && !data.Dot1xMaxReauthReq.IsNull() {
		data.Dot1xMaxReauthReq = types.Int64Value(value.Int())
	} else {
		data.Dot1xMaxReauthReq = types.Int64Null()
	}
	if value := res.Get(prefix + "dot1x.max-req"); value.Exists() && !data.Dot1xMaxReq.IsNull() {
		data.Dot1xMaxReq = types.Int64Value(value.Int())
	} else {
		data.Dot1xMaxReq = types.Int64Null()
	}
	if value := res.Get(prefix + "dot1x.timeout.tx-period"); value.Exists() && !data.Dot1xTimeoutTxPeriod.IsNull() {
		data.Dot1xTimeoutTxPeriod = types.Int64Value(value.Int())
	} else {
		data.Dot1xTimeoutTxPeriod = types.Int64Null()
	}
	if value := res.Get(prefix + "service-policy.type.control.subscriber"); value.Exists() && !data.ServicePolicyTypeControlSubscriber.IsNull() {
		data.ServicePolicyTypeControlSubscriber = types.StringValue(value.String())
	} else {
		data.ServicePolicyTypeControlSubscriber = types.StringNull()
	}
	if value := res.Get(prefix + "service-policy.input.policy-map-name"); value.Exists() && !data.ServicePolicyInput.IsNull() {
		data.ServicePolicyInput = types.StringValue(value.String())
	} else {
		data.ServicePolicyInput = types.StringNull()
	}
	if value := res.Get(prefix + "service-policy.output.policy-map-name"); value.Exists() && !data.ServicePolicyOutput.IsNull() {
		data.ServicePolicyOutput = types.StringValue(value.String())
	} else {
		data.ServicePolicyOutput = types.StringNull()
	}
	if value := res.Get(prefix + "source.template"); value.Exists() && !data.SourceTemplate.IsNull() {
		data.SourceTemplate = types.StringValue(value.String())
	} else {
		data.SourceTemplate = types.StringNull()
	}
	if value := res.Get(prefix + "switchport.mode.trunk"); !data.SwitchportModeTrunk.IsNull() {
		if value.Exists() {
			data.SwitchportModeTrunk = types.BoolValue(true)
		} else {
			data.SwitchportModeTrunk = types.BoolValue(false)
		}
	} else {
		data.SwitchportModeTrunk = types.BoolNull()
	}
	if value := res.Get(prefix + "switchport.mode.access"); !data.SwitchportModeAccess.IsNull() {
		if value.Exists() {
			data.SwitchportModeAccess = types.BoolValue(true)
		} else {
			data.SwitchportModeAccess = types.BoolValue(false)
		}
	} else {
		data.SwitchportModeAccess = types.BoolNull()
	}
	if value := res.Get(prefix + "switchport.nonegotiate"); !data.SwitchportNonegotiate.IsNull() {
		if value.Exists() {
			data.SwitchportNonegotiate = types.BoolValue(true)
		} else {
			data.SwitchportNonegotiate = types.BoolValue(false)
		}
	} else {
		data.SwitchportNonegotiate = types.BoolNull()
	}
	if value := res.Get(prefix + "switchport.block.unicast"); !data.SwitchportBlockUnicast.IsNull() {
		if value.Exists() {
			data.SwitchportBlockUnicast = types.BoolValue(true)
		} else {
			data.SwitchportBlockUnicast = types.BoolValue(false)
		}
	} else {
		data.SwitchportBlockUnicast = types.BoolNull()
	}
	if value := res.Get(prefix + "switchport.port-security"); !data.SwitchportPortSecurity.IsNull() {
		if value.Exists() {
			data.SwitchportPortSecurity = types.BoolValue(true)
		} else {
			data.SwitchportPortSecurity = types.BoolValue(false)
		}
	} else {
		data.SwitchportPortSecurity = types.BoolNull()
	}
	if value := res.Get(prefix + "switchport.port-security.aging.static"); !data.SwitchportPortSecurityAgingStatic.IsNull() {
		if value.Exists() {
			data.SwitchportPortSecurityAgingStatic = types.BoolValue(true)
		} else {
			data.SwitchportPortSecurityAgingStatic = types.BoolValue(false)
		}
	} else {
		data.SwitchportPortSecurityAgingStatic = types.BoolNull()
	}
	if value := res.Get(prefix + "switchport.port-security.aging.time"); value.Exists() && !data.SwitchportPortSecurityAgingTime.IsNull() {
		data.SwitchportPortSecurityAgingTime = types.Int64Value(value.Int())
	} else {
		data.SwitchportPortSecurityAgingTime = types.Int64Null()
	}
	if value := res.Get(prefix + "switchport.port-security.aging.type"); !data.SwitchportPortSecurityAgingType.IsNull() {
		if value.Exists() {
			data.SwitchportPortSecurityAgingType = types.BoolValue(true)
		} else {
			data.SwitchportPortSecurityAgingType = types.BoolValue(false)
		}
	} else {
		data.SwitchportPortSecurityAgingType = types.BoolNull()
	}
	if value := res.Get(prefix + "switchport.port-security.aging.type.inactivity"); !data.SwitchportPortSecurityAgingTypeInactivity.IsNull() {
		if value.Exists() {
			data.SwitchportPortSecurityAgingTypeInactivity = types.BoolValue(true)
		} else {
			data.SwitchportPortSecurityAgingTypeInactivity = types.BoolValue(false)
		}
	} else {
		data.SwitchportPortSecurityAgingTypeInactivity = types.BoolNull()
	}
	for i := range data.SwitchportPortSecurityMaximumRange {
		keys := [...]string{"range"}
		keyValues := [...]string{strconv.FormatInt(data.SwitchportPortSecurityMaximumRange[i].Range.ValueInt64(), 10)}

		var r gjson.Result
		res.Get(prefix + "switchport.port-security.maximum.range").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("range"); value.Exists() && !data.SwitchportPortSecurityMaximumRange[i].Range.IsNull() {
			data.SwitchportPortSecurityMaximumRange[i].Range = types.Int64Value(value.Int())
		} else {
			data.SwitchportPortSecurityMaximumRange[i].Range = types.Int64Null()
		}
		if value := r.Get("vlan"); !data.SwitchportPortSecurityMaximumRange[i].Vlan.IsNull() {
			if value.Exists() {
				data.SwitchportPortSecurityMaximumRange[i].Vlan = types.BoolValue(true)
			} else {
				data.SwitchportPortSecurityMaximumRange[i].Vlan = types.BoolValue(false)
			}
		} else {
			data.SwitchportPortSecurityMaximumRange[i].Vlan = types.BoolNull()
		}
		if value := r.Get("vlan.access"); !data.SwitchportPortSecurityMaximumRange[i].VlanAccess.IsNull() {
			if value.Exists() {
				data.SwitchportPortSecurityMaximumRange[i].VlanAccess = types.BoolValue(true)
			} else {
				data.SwitchportPortSecurityMaximumRange[i].VlanAccess = types.BoolValue(false)
			}
		} else {
			data.SwitchportPortSecurityMaximumRange[i].VlanAccess = types.BoolNull()
		}
	}
	if value := res.Get(prefix + "switchport.port-security.violation.protect"); !data.SwitchportPortSecurityViolationProtect.IsNull() {
		if value.Exists() {
			data.SwitchportPortSecurityViolationProtect = types.BoolValue(true)
		} else {
			data.SwitchportPortSecurityViolationProtect = types.BoolValue(false)
		}
	} else {
		data.SwitchportPortSecurityViolationProtect = types.BoolNull()
	}
	if value := res.Get(prefix + "switchport.port-security.violation.restrict"); !data.SwitchportPortSecurityViolationRestrict.IsNull() {
		if value.Exists() {
			data.SwitchportPortSecurityViolationRestrict = types.BoolValue(true)
		} else {
			data.SwitchportPortSecurityViolationRestrict = types.BoolValue(false)
		}
	} else {
		data.SwitchportPortSecurityViolationRestrict = types.BoolNull()
	}
	if value := res.Get(prefix + "switchport.port-security.violation.shutdown"); !data.SwitchportPortSecurityViolationShutdown.IsNull() {
		if value.Exists() {
			data.SwitchportPortSecurityViolationShutdown = types.BoolValue(true)
		} else {
			data.SwitchportPortSecurityViolationShutdown = types.BoolValue(false)
		}
	} else {
		data.SwitchportPortSecurityViolationShutdown = types.BoolNull()
	}
	if value := res.Get(prefix + "switchport.access.vlan"); value.Exists() && !data.SwitchportAccessVlan.IsNull() {
		data.SwitchportAccessVlan = types.Int64Value(value.Int())
	} else {
		data.SwitchportAccessVlan = types.Int64Null()
	}
	if value := res.Get(prefix + "switchport.voice.vlan"); value.Exists() && !data.SwitchportVoiceVlan.IsNull() {
		data.SwitchportVoiceVlan = types.Int64Value(value.Int())
	} else {
		data.SwitchportVoiceVlan = types.Int64Null()
	}
	if value := res.Get(prefix + "switchport.private-vlan.host-association.primary-range"); value.Exists() && !data.SwitchportPrivateVlanHostAssociationPrimaryRange.IsNull() {
		data.SwitchportPrivateVlanHostAssociationPrimaryRange = types.Int64Value(value.Int())
	} else {
		data.SwitchportPrivateVlanHostAssociationPrimaryRange = types.Int64Null()
	}
	if value := res.Get(prefix + "switchport.private-vlan.host-association.secondary-range"); value.Exists() && !data.SwitchportPrivateVlanHostAssociationSecondaryRange.IsNull() {
		data.SwitchportPrivateVlanHostAssociationSecondaryRange = types.Int64Value(value.Int())
	} else {
		data.SwitchportPrivateVlanHostAssociationSecondaryRange = types.Int64Null()
	}
	if value := res.Get(prefix + "switchport.trunk.allowed.vlan.vlans"); value.Exists() && !data.SwitchportTrunkAllowedVlans.IsNull() {
		data.SwitchportTrunkAllowedVlans = types.StringValue(value.String())
	} else {
		data.SwitchportTrunkAllowedVlans = types.StringNull()
	}
	if value := res.Get(prefix + "switchport.trunk.allowed.vlan.none"); !data.SwitchportTrunkAllowedVlansNone.IsNull() {
		if value.Exists() {
			data.SwitchportTrunkAllowedVlansNone = types.BoolValue(true)
		} else {
			data.SwitchportTrunkAllowedVlansNone = types.BoolValue(false)
		}
	} else {
		data.SwitchportTrunkAllowedVlansNone = types.BoolNull()
	}
	if value := res.Get(prefix + "switchport.trunk.allowed.vlan.all"); !data.SwitchportTrunkAllowedVlansAll.IsNull() {
		if value.Exists() {
			data.SwitchportTrunkAllowedVlansAll = types.BoolValue(true)
		} else {
			data.SwitchportTrunkAllowedVlansAll = types.BoolValue(false)
		}
	} else {
		data.SwitchportTrunkAllowedVlansAll = types.BoolNull()
	}
	if value := res.Get(prefix + "switchport.trunk.native.vlan.tag"); !data.SwitchportTrunkNativeVlanTag.IsNull() {
		if value.Exists() {
			data.SwitchportTrunkNativeVlanTag = types.BoolValue(value.Bool())
		}
	} else {
		data.SwitchportTrunkNativeVlanTag = types.BoolNull()
	}
	if value := res.Get(prefix + "switchport.trunk.native.vlan.vlan-id"); value.Exists() && !data.SwitchportTrunkNativeVlanVlanId.IsNull() {
		data.SwitchportTrunkNativeVlanVlanId = types.Int64Value(value.Int())
	} else {
		data.SwitchportTrunkNativeVlanVlanId = types.Int64Null()
	}
	if value := res.Get(prefix + "mab"); !data.Mab.IsNull() {
		if value.Exists() {
			data.Mab = types.BoolValue(true)
		} else {
			data.Mab = types.BoolValue(false)
		}
	} else {
		data.Mab = types.BoolNull()
	}
	if value := res.Get(prefix + "mab.eap"); !data.MabEap.IsNull() {
		if value.Exists() {
			data.MabEap = types.BoolValue(true)
		} else {
			data.MabEap = types.BoolValue(false)
		}
	} else {
		data.MabEap = types.BoolNull()
	}
	if value := res.Get(prefix + "access-session.closed"); !data.AccessSessionClosed.IsNull() {
		if value.Exists() {
			data.AccessSessionClosed = types.BoolValue(true)
		} else {
			data.AccessSessionClosed = types.BoolValue(false)
		}
	} else {
		data.AccessSessionClosed = types.BoolNull()
	}
	if value := res.Get(prefix + "access-session.monitor"); !data.AccessSessionMonitor.IsNull() {
		if value.Exists() {
			data.AccessSessionMonitor = types.BoolValue(value.Bool())
		}
	} else {
		data.AccessSessionMonitor = types.BoolNull()
	}
	if value := res.Get(prefix + "access-session.port-control"); value.Exists() && !data.AccessSessionPortControl.IsNull() {
		data.AccessSessionPortControl = types.StringValue(value.String())
	} else {
		data.AccessSessionPortControl = types.StringNull()
	}
	if value := res.Get(prefix + "access-session.control-direction"); value.Exists() && !data.AccessSessionControlDirection.IsNull() {
		data.AccessSessionControlDirection = types.StringValue(value.String())
	} else {
		data.AccessSessionControlDirection = types.StringNull()
	}
	if value := res.Get(prefix + "access-session.host-mode"); value.Exists() && !data.AccessSessionHostMode.IsNull() {
		data.AccessSessionHostMode = types.StringValue(value.String())
	} else {
		data.AccessSessionHostMode = types.StringNull()
	}
	if value := res.Get(prefix + "access-session.interface-template.sticky"); !data.AccessSessionInterfaceTemplateSticky.IsNull() {
		if value.Exists() {
			data.AccessSessionInterfaceTemplateSticky = types.BoolValue(true)
		} else {
			data.AccessSessionInterfaceTemplateSticky = types.BoolValue(false)
		}
	} else {
		data.AccessSessionInterfaceTemplateSticky = types.BoolNull()
	}
	if value := res.Get(prefix + "access-session.interface-template.sticky.timer"); value.Exists() && !data.AccessSessionInterfaceTemplateStickyTimer.IsNull() {
		data.AccessSessionInterfaceTemplateStickyTimer = types.Int64Value(value.Int())
	} else {
		data.AccessSessionInterfaceTemplateStickyTimer = types.Int64Null()
	}
	if value := res.Get(prefix + "authentication.periodic"); !data.AuthenticationPeriodic.IsNull() {
		if value.Exists() {
			data.AuthenticationPeriodic = types.BoolValue(true)
		} else {
			data.AuthenticationPeriodic = types.BoolValue(false)
		}
	} else {
		data.AuthenticationPeriodic = types.BoolNull()
	}
	if value := res.Get(prefix + "authentication.timer.reauthenticate.server"); !data.AuthenticationTimerReauthenticateServer.IsNull() {
		if value.Exists() {
			data.AuthenticationTimerReauthenticateServer = types.BoolValue(true)
		} else {
			data.AuthenticationTimerReauthenticateServer = types.BoolValue(false)
		}
	} else {
		data.AuthenticationTimerReauthenticateServer = types.BoolNull()
	}
	if value := res.Get(prefix + "authentication.timer.reauthenticate.range"); value.Exists() && !data.AuthenticationTimerReauthenticateRange.IsNull() {
		data.AuthenticationTimerReauthenticateRange = types.Int64Value(value.Int())
	} else {
		data.AuthenticationTimerReauthenticateRange = types.Int64Null()
	}
	if value := res.Get(prefix + "spanning-tree.bpduguard.enable"); !data.SpanningTreeBpduguardEnable.IsNull() {
		if value.Exists() {
			data.SpanningTreeBpduguardEnable = types.BoolValue(true)
		} else {
			data.SpanningTreeBpduguardEnable = types.BoolValue(false)
		}
	} else {
		data.SpanningTreeBpduguardEnable = types.BoolNull()
	}
	if value := res.Get(prefix + "spanning-tree.service-policy"); !data.SpanningTreeServicePolicy.IsNull() {
		if value.Exists() {
			data.SpanningTreeServicePolicy = types.BoolValue(true)
		} else {
			data.SpanningTreeServicePolicy = types.BoolValue(false)
		}
	} else {
		data.SpanningTreeServicePolicy = types.BoolNull()
	}
	if value := res.Get(prefix + "spanning-tree.portfast"); !data.SpanningTreePortfast.IsNull() {
		if value.Exists() {
			data.SpanningTreePortfast = types.BoolValue(true)
		} else {
			data.SpanningTreePortfast = types.BoolValue(false)
		}
	} else {
		data.SpanningTreePortfast = types.BoolNull()
	}
	if value := res.Get(prefix + "spanning-tree.portfast.disable"); !data.SpanningTreePortfastDisable.IsNull() {
		if value.Exists() {
			data.SpanningTreePortfastDisable = types.BoolValue(true)
		} else {
			data.SpanningTreePortfastDisable = types.BoolValue(false)
		}
	} else {
		data.SpanningTreePortfastDisable = types.BoolNull()
	}
	if value := res.Get(prefix + "spanning-tree.portfast.edge"); !data.SpanningTreePortfastEdge.IsNull() {
		if value.Exists() {
			data.SpanningTreePortfastEdge = types.BoolValue(true)
		} else {
			data.SpanningTreePortfastEdge = types.BoolValue(false)
		}
	} else {
		data.SpanningTreePortfastEdge = types.BoolNull()
	}
	if value := res.Get(prefix + "spanning-tree.portfast.network"); !data.SpanningTreePortfastNetwork.IsNull() {
		if value.Exists() {
			data.SpanningTreePortfastNetwork = types.BoolValue(true)
		} else {
			data.SpanningTreePortfastNetwork = types.BoolValue(false)
		}
	} else {
		data.SpanningTreePortfastNetwork = types.BoolNull()
	}
	if value := res.Get(prefix + "storm-control.broadcast.level.pps.threshold"); value.Exists() && !data.StormControlBroadcastLevelPpsThreshold.IsNull() {
		data.StormControlBroadcastLevelPpsThreshold = types.StringValue(value.String())
	} else {
		data.StormControlBroadcastLevelPpsThreshold = types.StringNull()
	}
	if value := res.Get(prefix + "storm-control.broadcast.level.bps.threshold"); value.Exists() && !data.StormControlBroadcastLevelBpsThreshold.IsNull() {
		data.StormControlBroadcastLevelBpsThreshold = types.Float64Value(value.Float())
	} else {
		data.StormControlBroadcastLevelBpsThreshold = types.Float64Null()
	}
	if value := res.Get(prefix + "storm-control.broadcast.level.threshold"); value.Exists() && !data.StormControlBroadcastLevelThreshold.IsNull() {
		data.StormControlBroadcastLevelThreshold = types.Float64Value(value.Float())
	} else {
		data.StormControlBroadcastLevelThreshold = types.Float64Null()
	}
	if value := res.Get(prefix + "storm-control.multicast.level.pps.threshold"); value.Exists() && !data.StormControlMulticastLevelPpsThreshold.IsNull() {
		data.StormControlMulticastLevelPpsThreshold = types.StringValue(value.String())
	} else {
		data.StormControlMulticastLevelPpsThreshold = types.StringNull()
	}
	if value := res.Get(prefix + "storm-control.multicast.level.bps.threshold"); value.Exists() && !data.StormControlMulticastLevelBpsThreshold.IsNull() {
		data.StormControlMulticastLevelBpsThreshold = types.Float64Value(value.Float())
	} else {
		data.StormControlMulticastLevelBpsThreshold = types.Float64Null()
	}
	if value := res.Get(prefix + "storm-control.multicast.level.threshold"); value.Exists() && !data.StormControlMulticastLevelThreshold.IsNull() {
		data.StormControlMulticastLevelThreshold = types.Float64Value(value.Float())
	} else {
		data.StormControlMulticastLevelThreshold = types.Float64Null()
	}
	if value := res.Get(prefix + "storm-control.action.shutdown"); !data.StormControlActionShutdown.IsNull() {
		if value.Exists() {
			data.StormControlActionShutdown = types.BoolValue(true)
		} else {
			data.StormControlActionShutdown = types.BoolValue(false)
		}
	} else {
		data.StormControlActionShutdown = types.BoolNull()
	}
	if value := res.Get(prefix + "storm-control.action.trap"); !data.StormControlActionTrap.IsNull() {
		if value.Exists() {
			data.StormControlActionTrap = types.BoolValue(true)
		} else {
			data.StormControlActionTrap = types.BoolValue(false)
		}
	} else {
		data.StormControlActionTrap = types.BoolNull()
	}
	if value := res.Get(prefix + "load-interval"); value.Exists() && !data.LoadInterval.IsNull() {
		data.LoadInterval = types.Int64Value(value.Int())
	} else {
		data.LoadInterval = types.Int64Null()
	}
	if value := res.Get(prefix + "ip.dhcp.snooping.limit.rate"); value.Exists() && !data.IpDhcpSnoopingLimitRate.IsNull() {
		data.IpDhcpSnoopingLimitRate = types.Int64Value(value.Int())
	} else {
		data.IpDhcpSnoopingLimitRate = types.Int64Null()
	}
	if value := res.Get(prefix + "ip.dhcp.snooping.trust"); !data.IpDhcpSnoopingTrust.IsNull() {
		if value.Exists() {
			data.IpDhcpSnoopingTrust = types.BoolValue(true)
		} else {
			data.IpDhcpSnoopingTrust = types.BoolValue(false)
		}
	} else {
		data.IpDhcpSnoopingTrust = types.BoolNull()
	}
	for i := range data.IpAccessGroup {
		keys := [...]string{"direction"}
		keyValues := [...]string{data.IpAccessGroup[i].Direction.ValueString()}

		var r gjson.Result
		res.Get(prefix + "ip.access-group").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("direction"); value.Exists() && !data.IpAccessGroup[i].Direction.IsNull() {
			data.IpAccessGroup[i].Direction = types.StringValue(value.String())
		} else {
			data.IpAccessGroup[i].Direction = types.StringNull()
		}
		if value := r.Get("access-list"); value.Exists() && !data.IpAccessGroup[i].AccessList.IsNull() {
			data.IpAccessGroup[i].AccessList = types.StringValue(value.String())
		} else {
			data.IpAccessGroup[i].AccessList = types.StringNull()
		}
	}
	if value := res.Get(prefix + "subscriber.aging.inactivity-timer.value"); value.Exists() && !data.SubscriberAgingInactivityTimerValue.IsNull() {
		data.SubscriberAgingInactivityTimerValue = types.Int64Value(value.Int())
	} else {
		data.SubscriberAgingInactivityTimerValue = types.Int64Null()
	}
	if value := res.Get(prefix + "subscriber.aging.inactivity-timer.probe"); !data.SubscriberAgingInactivityTimerProbe.IsNull() {
		if value.Exists() {
			data.SubscriberAgingInactivityTimerProbe = types.BoolValue(true)
		} else {
			data.SubscriberAgingInactivityTimerProbe = types.BoolValue(false)
		}
	} else {
		data.SubscriberAgingInactivityTimerProbe = types.BoolNull()
	}
	if value := res.Get(prefix + "subscriber.aging.probe"); !data.SubscriberAgingProbe.IsNull() {
		if value.Exists() {
			data.SubscriberAgingProbe = types.BoolValue(true)
		} else {
			data.SubscriberAgingProbe = types.BoolValue(false)
		}
	} else {
		data.SubscriberAgingProbe = types.BoolNull()
	}
	if value := res.Get(prefix + "device-tracking"); !data.DeviceTracking.IsNull() {
		if value.Exists() {
			data.DeviceTracking = types.BoolValue(true)
		} else {
			data.DeviceTracking = types.BoolValue(false)
		}
	} else {
		data.DeviceTracking = types.BoolNull()
	}
	for i := range data.DeviceTrackingAttachPolicy {
		keys := [...]string{"policy-name"}
		keyValues := [...]string{data.DeviceTrackingAttachPolicy[i].PolicyName.ValueString()}

		var r gjson.Result
		res.Get(prefix + "device-tracking.attach-policy.policy-name").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("policy-name"); value.Exists() && !data.DeviceTrackingAttachPolicy[i].PolicyName.IsNull() {
			data.DeviceTrackingAttachPolicy[i].PolicyName = types.StringValue(value.String())
		} else {
			data.DeviceTrackingAttachPolicy[i].PolicyName = types.StringNull()
		}
		if value := r.Get("vlan.vlan-range"); value.Exists() && !data.DeviceTrackingAttachPolicy[i].VlanRange.IsNull() {
			data.DeviceTrackingAttachPolicy[i].VlanRange = types.StringValue(value.String())
		} else {
			data.DeviceTrackingAttachPolicy[i].VlanRange = types.StringNull()
		}
	}
	if value := res.Get(prefix + "device-tracking.vlan.vlan-range"); value.Exists() && !data.DeviceTrackingVlanRange.IsNull() {
		data.DeviceTrackingVlanRange = types.StringValue(value.String())
	} else {
		data.DeviceTrackingVlanRange = types.StringNull()
	}
	if value := res.Get(prefix + "cts.manual"); !data.CtsManual.IsNull() {
		if value.Exists() {
			data.CtsManual = types.BoolValue(true)
		} else {
			data.CtsManual = types.BoolValue(false)
		}
	} else {
		data.CtsManual = types.BoolNull()
	}
	if value := res.Get(prefix + "cts.manual.policy.static.sgt"); value.Exists() && !data.CtsManualPolicyStaticSgt.IsNull() {
		data.CtsManualPolicyStaticSgt = types.Int64Value(value.Int())
	} else {
		data.CtsManualPolicyStaticSgt = types.Int64Null()
	}
	if value := res.Get(prefix + "cts.manual.policy.static.trusted"); !data.CtsManualPolicyStaticTrusted.IsNull() {
		if value.Exists() {
			data.CtsManualPolicyStaticTrusted = types.BoolValue(true)
		} else {
			data.CtsManualPolicyStaticTrusted = types.BoolValue(false)
		}
	} else {
		data.CtsManualPolicyStaticTrusted = types.BoolNull()
	}
	if value := res.Get(prefix + "cts.manual.propagate.sgt"); !data.CtsManualPropagateSgt.IsNull() {
		if value.Exists() {
			data.CtsManualPropagateSgt = types.BoolValue(value.Bool())
		}
	} else {
		data.CtsManualPropagateSgt = types.BoolNull()
	}
	if value := res.Get(prefix + "cts.role-based.enforcement"); !data.CtsRoleBasedEnforcement.IsNull() {
		if value.Exists() {
			data.CtsRoleBasedEnforcement = types.BoolValue(value.Bool())
		}
	} else {
		data.CtsRoleBasedEnforcement = types.BoolNull()
	}
}

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

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

func (data *Template) 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 + "dot1x.pae"); value.Exists() {
		data.Dot1xPae = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "dot1x.max-reauth-req"); value.Exists() {
		data.Dot1xMaxReauthReq = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "dot1x.max-req"); value.Exists() {
		data.Dot1xMaxReq = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "dot1x.timeout.tx-period"); value.Exists() {
		data.Dot1xTimeoutTxPeriod = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "service-policy.type.control.subscriber"); value.Exists() {
		data.ServicePolicyTypeControlSubscriber = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "service-policy.input.policy-map-name"); value.Exists() {
		data.ServicePolicyInput = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "service-policy.output.policy-map-name"); value.Exists() {
		data.ServicePolicyOutput = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "source.template"); value.Exists() {
		data.SourceTemplate = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "switchport.mode.trunk"); value.Exists() {
		data.SwitchportModeTrunk = types.BoolValue(true)
	} else {
		data.SwitchportModeTrunk = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.mode.access"); value.Exists() {
		data.SwitchportModeAccess = types.BoolValue(true)
	} else {
		data.SwitchportModeAccess = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.nonegotiate"); value.Exists() {
		data.SwitchportNonegotiate = types.BoolValue(true)
	} else {
		data.SwitchportNonegotiate = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.block.unicast"); value.Exists() {
		data.SwitchportBlockUnicast = types.BoolValue(true)
	} else {
		data.SwitchportBlockUnicast = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.port-security"); value.Exists() {
		data.SwitchportPortSecurity = types.BoolValue(true)
	} else {
		data.SwitchportPortSecurity = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.port-security.aging.static"); value.Exists() {
		data.SwitchportPortSecurityAgingStatic = types.BoolValue(true)
	} else {
		data.SwitchportPortSecurityAgingStatic = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.port-security.aging.time"); value.Exists() {
		data.SwitchportPortSecurityAgingTime = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "switchport.port-security.aging.type"); value.Exists() {
		data.SwitchportPortSecurityAgingType = types.BoolValue(true)
	} else {
		data.SwitchportPortSecurityAgingType = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.port-security.aging.type.inactivity"); value.Exists() {
		data.SwitchportPortSecurityAgingTypeInactivity = types.BoolValue(true)
	} else {
		data.SwitchportPortSecurityAgingTypeInactivity = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.port-security.maximum.range"); value.Exists() {
		data.SwitchportPortSecurityMaximumRange = make([]TemplateSwitchportPortSecurityMaximumRange, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := TemplateSwitchportPortSecurityMaximumRange{}
			if cValue := v.Get("range"); cValue.Exists() {
				item.Range = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("vlan"); cValue.Exists() {
				item.Vlan = types.BoolValue(true)
			} else {
				item.Vlan = types.BoolValue(false)
			}
			if cValue := v.Get("vlan.access"); cValue.Exists() {
				item.VlanAccess = types.BoolValue(true)
			} else {
				item.VlanAccess = types.BoolValue(false)
			}
			data.SwitchportPortSecurityMaximumRange = append(data.SwitchportPortSecurityMaximumRange, item)
			return true
		})
	}
	if value := res.Get(prefix + "switchport.port-security.violation.protect"); value.Exists() {
		data.SwitchportPortSecurityViolationProtect = types.BoolValue(true)
	} else {
		data.SwitchportPortSecurityViolationProtect = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.port-security.violation.restrict"); value.Exists() {
		data.SwitchportPortSecurityViolationRestrict = types.BoolValue(true)
	} else {
		data.SwitchportPortSecurityViolationRestrict = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.port-security.violation.shutdown"); value.Exists() {
		data.SwitchportPortSecurityViolationShutdown = types.BoolValue(true)
	} else {
		data.SwitchportPortSecurityViolationShutdown = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.access.vlan"); value.Exists() {
		data.SwitchportAccessVlan = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "switchport.voice.vlan"); value.Exists() {
		data.SwitchportVoiceVlan = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "switchport.private-vlan.host-association.primary-range"); value.Exists() {
		data.SwitchportPrivateVlanHostAssociationPrimaryRange = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "switchport.private-vlan.host-association.secondary-range"); value.Exists() {
		data.SwitchportPrivateVlanHostAssociationSecondaryRange = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "switchport.trunk.allowed.vlan.vlans"); value.Exists() {
		data.SwitchportTrunkAllowedVlans = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "switchport.trunk.allowed.vlan.none"); value.Exists() {
		data.SwitchportTrunkAllowedVlansNone = types.BoolValue(true)
	} else {
		data.SwitchportTrunkAllowedVlansNone = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.trunk.allowed.vlan.all"); value.Exists() {
		data.SwitchportTrunkAllowedVlansAll = types.BoolValue(true)
	} else {
		data.SwitchportTrunkAllowedVlansAll = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.trunk.native.vlan.tag"); value.Exists() {
		data.SwitchportTrunkNativeVlanTag = types.BoolValue(value.Bool())
	} else {
		data.SwitchportTrunkNativeVlanTag = types.BoolNull()
	}
	if value := res.Get(prefix + "switchport.trunk.native.vlan.vlan-id"); value.Exists() {
		data.SwitchportTrunkNativeVlanVlanId = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "mab"); value.Exists() {
		data.Mab = types.BoolValue(true)
	} else {
		data.Mab = types.BoolValue(false)
	}
	if value := res.Get(prefix + "mab.eap"); value.Exists() {
		data.MabEap = types.BoolValue(true)
	} else {
		data.MabEap = types.BoolValue(false)
	}
	if value := res.Get(prefix + "access-session.closed"); value.Exists() {
		data.AccessSessionClosed = types.BoolValue(true)
	} else {
		data.AccessSessionClosed = types.BoolValue(false)
	}
	if value := res.Get(prefix + "access-session.monitor"); value.Exists() {
		data.AccessSessionMonitor = types.BoolValue(value.Bool())
	} else {
		data.AccessSessionMonitor = types.BoolNull()
	}
	if value := res.Get(prefix + "access-session.port-control"); value.Exists() {
		data.AccessSessionPortControl = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "access-session.control-direction"); value.Exists() {
		data.AccessSessionControlDirection = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "access-session.host-mode"); value.Exists() {
		data.AccessSessionHostMode = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "access-session.interface-template.sticky"); value.Exists() {
		data.AccessSessionInterfaceTemplateSticky = types.BoolValue(true)
	} else {
		data.AccessSessionInterfaceTemplateSticky = types.BoolValue(false)
	}
	if value := res.Get(prefix + "access-session.interface-template.sticky.timer"); value.Exists() {
		data.AccessSessionInterfaceTemplateStickyTimer = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "authentication.periodic"); value.Exists() {
		data.AuthenticationPeriodic = types.BoolValue(true)
	} else {
		data.AuthenticationPeriodic = types.BoolValue(false)
	}
	if value := res.Get(prefix + "authentication.timer.reauthenticate.server"); value.Exists() {
		data.AuthenticationTimerReauthenticateServer = types.BoolValue(true)
	} else {
		data.AuthenticationTimerReauthenticateServer = types.BoolValue(false)
	}
	if value := res.Get(prefix + "authentication.timer.reauthenticate.range"); value.Exists() {
		data.AuthenticationTimerReauthenticateRange = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "spanning-tree.bpduguard.enable"); value.Exists() {
		data.SpanningTreeBpduguardEnable = types.BoolValue(true)
	} else {
		data.SpanningTreeBpduguardEnable = types.BoolValue(false)
	}
	if value := res.Get(prefix + "spanning-tree.service-policy"); value.Exists() {
		data.SpanningTreeServicePolicy = types.BoolValue(true)
	} else {
		data.SpanningTreeServicePolicy = types.BoolValue(false)
	}
	if value := res.Get(prefix + "spanning-tree.portfast"); value.Exists() {
		data.SpanningTreePortfast = types.BoolValue(true)
	} else {
		data.SpanningTreePortfast = types.BoolValue(false)
	}
	if value := res.Get(prefix + "spanning-tree.portfast.disable"); value.Exists() {
		data.SpanningTreePortfastDisable = types.BoolValue(true)
	} else {
		data.SpanningTreePortfastDisable = types.BoolValue(false)
	}
	if value := res.Get(prefix + "spanning-tree.portfast.edge"); value.Exists() {
		data.SpanningTreePortfastEdge = types.BoolValue(true)
	} else {
		data.SpanningTreePortfastEdge = types.BoolValue(false)
	}
	if value := res.Get(prefix + "spanning-tree.portfast.network"); value.Exists() {
		data.SpanningTreePortfastNetwork = types.BoolValue(true)
	} else {
		data.SpanningTreePortfastNetwork = types.BoolValue(false)
	}
	if value := res.Get(prefix + "storm-control.broadcast.level.pps.threshold"); value.Exists() {
		data.StormControlBroadcastLevelPpsThreshold = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "storm-control.broadcast.level.bps.threshold"); value.Exists() {
		data.StormControlBroadcastLevelBpsThreshold = types.Float64Value(value.Float())
	}
	if value := res.Get(prefix + "storm-control.broadcast.level.threshold"); value.Exists() {
		data.StormControlBroadcastLevelThreshold = types.Float64Value(value.Float())
	}
	if value := res.Get(prefix + "storm-control.multicast.level.pps.threshold"); value.Exists() {
		data.StormControlMulticastLevelPpsThreshold = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "storm-control.multicast.level.bps.threshold"); value.Exists() {
		data.StormControlMulticastLevelBpsThreshold = types.Float64Value(value.Float())
	}
	if value := res.Get(prefix + "storm-control.multicast.level.threshold"); value.Exists() {
		data.StormControlMulticastLevelThreshold = types.Float64Value(value.Float())
	}
	if value := res.Get(prefix + "storm-control.action.shutdown"); value.Exists() {
		data.StormControlActionShutdown = types.BoolValue(true)
	} else {
		data.StormControlActionShutdown = types.BoolValue(false)
	}
	if value := res.Get(prefix + "storm-control.action.trap"); value.Exists() {
		data.StormControlActionTrap = types.BoolValue(true)
	} else {
		data.StormControlActionTrap = types.BoolValue(false)
	}
	if value := res.Get(prefix + "load-interval"); value.Exists() {
		data.LoadInterval = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "ip.dhcp.snooping.limit.rate"); value.Exists() {
		data.IpDhcpSnoopingLimitRate = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "ip.dhcp.snooping.trust"); value.Exists() {
		data.IpDhcpSnoopingTrust = types.BoolValue(true)
	} else {
		data.IpDhcpSnoopingTrust = types.BoolValue(false)
	}
	if value := res.Get(prefix + "ip.access-group"); value.Exists() {
		data.IpAccessGroup = make([]TemplateIpAccessGroup, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := TemplateIpAccessGroup{}
			if cValue := v.Get("direction"); cValue.Exists() {
				item.Direction = types.StringValue(cValue.String())
			}
			if cValue := v.Get("access-list"); cValue.Exists() {
				item.AccessList = types.StringValue(cValue.String())
			}
			data.IpAccessGroup = append(data.IpAccessGroup, item)
			return true
		})
	}
	if value := res.Get(prefix + "subscriber.aging.inactivity-timer.value"); value.Exists() {
		data.SubscriberAgingInactivityTimerValue = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "subscriber.aging.inactivity-timer.probe"); value.Exists() {
		data.SubscriberAgingInactivityTimerProbe = types.BoolValue(true)
	} else {
		data.SubscriberAgingInactivityTimerProbe = types.BoolValue(false)
	}
	if value := res.Get(prefix + "subscriber.aging.probe"); value.Exists() {
		data.SubscriberAgingProbe = types.BoolValue(true)
	} else {
		data.SubscriberAgingProbe = types.BoolValue(false)
	}
	if value := res.Get(prefix + "device-tracking"); value.Exists() {
		data.DeviceTracking = types.BoolValue(true)
	} else {
		data.DeviceTracking = types.BoolValue(false)
	}
	if value := res.Get(prefix + "device-tracking.attach-policy.policy-name"); value.Exists() {
		data.DeviceTrackingAttachPolicy = make([]TemplateDeviceTrackingAttachPolicy, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := TemplateDeviceTrackingAttachPolicy{}
			if cValue := v.Get("policy-name"); cValue.Exists() {
				item.PolicyName = types.StringValue(cValue.String())
			}
			if cValue := v.Get("vlan.vlan-range"); cValue.Exists() {
				item.VlanRange = types.StringValue(cValue.String())
			}
			data.DeviceTrackingAttachPolicy = append(data.DeviceTrackingAttachPolicy, item)
			return true
		})
	}
	if value := res.Get(prefix + "device-tracking.vlan.vlan-range"); value.Exists() {
		data.DeviceTrackingVlanRange = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "cts.manual"); value.Exists() {
		data.CtsManual = types.BoolValue(true)
	} else {
		data.CtsManual = types.BoolValue(false)
	}
	if value := res.Get(prefix + "cts.manual.policy.static.sgt"); value.Exists() {
		data.CtsManualPolicyStaticSgt = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "cts.manual.policy.static.trusted"); value.Exists() {
		data.CtsManualPolicyStaticTrusted = types.BoolValue(true)
	} else {
		data.CtsManualPolicyStaticTrusted = types.BoolValue(false)
	}
	if value := res.Get(prefix + "cts.manual.propagate.sgt"); value.Exists() {
		data.CtsManualPropagateSgt = types.BoolValue(value.Bool())
	} else {
		data.CtsManualPropagateSgt = types.BoolNull()
	}
	if value := res.Get(prefix + "cts.role-based.enforcement"); value.Exists() {
		data.CtsRoleBasedEnforcement = types.BoolValue(value.Bool())
	} else {
		data.CtsRoleBasedEnforcement = types.BoolNull()
	}
}

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

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

func (data *TemplateData) 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 + "dot1x.pae"); value.Exists() {
		data.Dot1xPae = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "dot1x.max-reauth-req"); value.Exists() {
		data.Dot1xMaxReauthReq = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "dot1x.max-req"); value.Exists() {
		data.Dot1xMaxReq = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "dot1x.timeout.tx-period"); value.Exists() {
		data.Dot1xTimeoutTxPeriod = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "service-policy.type.control.subscriber"); value.Exists() {
		data.ServicePolicyTypeControlSubscriber = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "service-policy.input.policy-map-name"); value.Exists() {
		data.ServicePolicyInput = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "service-policy.output.policy-map-name"); value.Exists() {
		data.ServicePolicyOutput = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "source.template"); value.Exists() {
		data.SourceTemplate = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "switchport.mode.trunk"); value.Exists() {
		data.SwitchportModeTrunk = types.BoolValue(true)
	} else {
		data.SwitchportModeTrunk = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.mode.access"); value.Exists() {
		data.SwitchportModeAccess = types.BoolValue(true)
	} else {
		data.SwitchportModeAccess = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.nonegotiate"); value.Exists() {
		data.SwitchportNonegotiate = types.BoolValue(true)
	} else {
		data.SwitchportNonegotiate = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.block.unicast"); value.Exists() {
		data.SwitchportBlockUnicast = types.BoolValue(true)
	} else {
		data.SwitchportBlockUnicast = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.port-security"); value.Exists() {
		data.SwitchportPortSecurity = types.BoolValue(true)
	} else {
		data.SwitchportPortSecurity = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.port-security.aging.static"); value.Exists() {
		data.SwitchportPortSecurityAgingStatic = types.BoolValue(true)
	} else {
		data.SwitchportPortSecurityAgingStatic = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.port-security.aging.time"); value.Exists() {
		data.SwitchportPortSecurityAgingTime = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "switchport.port-security.aging.type"); value.Exists() {
		data.SwitchportPortSecurityAgingType = types.BoolValue(true)
	} else {
		data.SwitchportPortSecurityAgingType = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.port-security.aging.type.inactivity"); value.Exists() {
		data.SwitchportPortSecurityAgingTypeInactivity = types.BoolValue(true)
	} else {
		data.SwitchportPortSecurityAgingTypeInactivity = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.port-security.maximum.range"); value.Exists() {
		data.SwitchportPortSecurityMaximumRange = make([]TemplateSwitchportPortSecurityMaximumRange, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := TemplateSwitchportPortSecurityMaximumRange{}
			if cValue := v.Get("range"); cValue.Exists() {
				item.Range = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("vlan"); cValue.Exists() {
				item.Vlan = types.BoolValue(true)
			} else {
				item.Vlan = types.BoolValue(false)
			}
			if cValue := v.Get("vlan.access"); cValue.Exists() {
				item.VlanAccess = types.BoolValue(true)
			} else {
				item.VlanAccess = types.BoolValue(false)
			}
			data.SwitchportPortSecurityMaximumRange = append(data.SwitchportPortSecurityMaximumRange, item)
			return true
		})
	}
	if value := res.Get(prefix + "switchport.port-security.violation.protect"); value.Exists() {
		data.SwitchportPortSecurityViolationProtect = types.BoolValue(true)
	} else {
		data.SwitchportPortSecurityViolationProtect = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.port-security.violation.restrict"); value.Exists() {
		data.SwitchportPortSecurityViolationRestrict = types.BoolValue(true)
	} else {
		data.SwitchportPortSecurityViolationRestrict = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.port-security.violation.shutdown"); value.Exists() {
		data.SwitchportPortSecurityViolationShutdown = types.BoolValue(true)
	} else {
		data.SwitchportPortSecurityViolationShutdown = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.access.vlan"); value.Exists() {
		data.SwitchportAccessVlan = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "switchport.voice.vlan"); value.Exists() {
		data.SwitchportVoiceVlan = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "switchport.private-vlan.host-association.primary-range"); value.Exists() {
		data.SwitchportPrivateVlanHostAssociationPrimaryRange = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "switchport.private-vlan.host-association.secondary-range"); value.Exists() {
		data.SwitchportPrivateVlanHostAssociationSecondaryRange = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "switchport.trunk.allowed.vlan.vlans"); value.Exists() {
		data.SwitchportTrunkAllowedVlans = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "switchport.trunk.allowed.vlan.none"); value.Exists() {
		data.SwitchportTrunkAllowedVlansNone = types.BoolValue(true)
	} else {
		data.SwitchportTrunkAllowedVlansNone = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.trunk.allowed.vlan.all"); value.Exists() {
		data.SwitchportTrunkAllowedVlansAll = types.BoolValue(true)
	} else {
		data.SwitchportTrunkAllowedVlansAll = types.BoolValue(false)
	}
	if value := res.Get(prefix + "switchport.trunk.native.vlan.tag"); value.Exists() {
		data.SwitchportTrunkNativeVlanTag = types.BoolValue(value.Bool())
	} else {
		data.SwitchportTrunkNativeVlanTag = types.BoolNull()
	}
	if value := res.Get(prefix + "switchport.trunk.native.vlan.vlan-id"); value.Exists() {
		data.SwitchportTrunkNativeVlanVlanId = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "mab"); value.Exists() {
		data.Mab = types.BoolValue(true)
	} else {
		data.Mab = types.BoolValue(false)
	}
	if value := res.Get(prefix + "mab.eap"); value.Exists() {
		data.MabEap = types.BoolValue(true)
	} else {
		data.MabEap = types.BoolValue(false)
	}
	if value := res.Get(prefix + "access-session.closed"); value.Exists() {
		data.AccessSessionClosed = types.BoolValue(true)
	} else {
		data.AccessSessionClosed = types.BoolValue(false)
	}
	if value := res.Get(prefix + "access-session.monitor"); value.Exists() {
		data.AccessSessionMonitor = types.BoolValue(value.Bool())
	} else {
		data.AccessSessionMonitor = types.BoolNull()
	}
	if value := res.Get(prefix + "access-session.port-control"); value.Exists() {
		data.AccessSessionPortControl = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "access-session.control-direction"); value.Exists() {
		data.AccessSessionControlDirection = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "access-session.host-mode"); value.Exists() {
		data.AccessSessionHostMode = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "access-session.interface-template.sticky"); value.Exists() {
		data.AccessSessionInterfaceTemplateSticky = types.BoolValue(true)
	} else {
		data.AccessSessionInterfaceTemplateSticky = types.BoolValue(false)
	}
	if value := res.Get(prefix + "access-session.interface-template.sticky.timer"); value.Exists() {
		data.AccessSessionInterfaceTemplateStickyTimer = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "authentication.periodic"); value.Exists() {
		data.AuthenticationPeriodic = types.BoolValue(true)
	} else {
		data.AuthenticationPeriodic = types.BoolValue(false)
	}
	if value := res.Get(prefix + "authentication.timer.reauthenticate.server"); value.Exists() {
		data.AuthenticationTimerReauthenticateServer = types.BoolValue(true)
	} else {
		data.AuthenticationTimerReauthenticateServer = types.BoolValue(false)
	}
	if value := res.Get(prefix + "authentication.timer.reauthenticate.range"); value.Exists() {
		data.AuthenticationTimerReauthenticateRange = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "spanning-tree.bpduguard.enable"); value.Exists() {
		data.SpanningTreeBpduguardEnable = types.BoolValue(true)
	} else {
		data.SpanningTreeBpduguardEnable = types.BoolValue(false)
	}
	if value := res.Get(prefix + "spanning-tree.service-policy"); value.Exists() {
		data.SpanningTreeServicePolicy = types.BoolValue(true)
	} else {
		data.SpanningTreeServicePolicy = types.BoolValue(false)
	}
	if value := res.Get(prefix + "spanning-tree.portfast"); value.Exists() {
		data.SpanningTreePortfast = types.BoolValue(true)
	} else {
		data.SpanningTreePortfast = types.BoolValue(false)
	}
	if value := res.Get(prefix + "spanning-tree.portfast.disable"); value.Exists() {
		data.SpanningTreePortfastDisable = types.BoolValue(true)
	} else {
		data.SpanningTreePortfastDisable = types.BoolValue(false)
	}
	if value := res.Get(prefix + "spanning-tree.portfast.edge"); value.Exists() {
		data.SpanningTreePortfastEdge = types.BoolValue(true)
	} else {
		data.SpanningTreePortfastEdge = types.BoolValue(false)
	}
	if value := res.Get(prefix + "spanning-tree.portfast.network"); value.Exists() {
		data.SpanningTreePortfastNetwork = types.BoolValue(true)
	} else {
		data.SpanningTreePortfastNetwork = types.BoolValue(false)
	}
	if value := res.Get(prefix + "storm-control.broadcast.level.pps.threshold"); value.Exists() {
		data.StormControlBroadcastLevelPpsThreshold = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "storm-control.broadcast.level.bps.threshold"); value.Exists() {
		data.StormControlBroadcastLevelBpsThreshold = types.Float64Value(value.Float())
	}
	if value := res.Get(prefix + "storm-control.broadcast.level.threshold"); value.Exists() {
		data.StormControlBroadcastLevelThreshold = types.Float64Value(value.Float())
	}
	if value := res.Get(prefix + "storm-control.multicast.level.pps.threshold"); value.Exists() {
		data.StormControlMulticastLevelPpsThreshold = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "storm-control.multicast.level.bps.threshold"); value.Exists() {
		data.StormControlMulticastLevelBpsThreshold = types.Float64Value(value.Float())
	}
	if value := res.Get(prefix + "storm-control.multicast.level.threshold"); value.Exists() {
		data.StormControlMulticastLevelThreshold = types.Float64Value(value.Float())
	}
	if value := res.Get(prefix + "storm-control.action.shutdown"); value.Exists() {
		data.StormControlActionShutdown = types.BoolValue(true)
	} else {
		data.StormControlActionShutdown = types.BoolValue(false)
	}
	if value := res.Get(prefix + "storm-control.action.trap"); value.Exists() {
		data.StormControlActionTrap = types.BoolValue(true)
	} else {
		data.StormControlActionTrap = types.BoolValue(false)
	}
	if value := res.Get(prefix + "load-interval"); value.Exists() {
		data.LoadInterval = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "ip.dhcp.snooping.limit.rate"); value.Exists() {
		data.IpDhcpSnoopingLimitRate = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "ip.dhcp.snooping.trust"); value.Exists() {
		data.IpDhcpSnoopingTrust = types.BoolValue(true)
	} else {
		data.IpDhcpSnoopingTrust = types.BoolValue(false)
	}
	if value := res.Get(prefix + "ip.access-group"); value.Exists() {
		data.IpAccessGroup = make([]TemplateIpAccessGroup, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := TemplateIpAccessGroup{}
			if cValue := v.Get("direction"); cValue.Exists() {
				item.Direction = types.StringValue(cValue.String())
			}
			if cValue := v.Get("access-list"); cValue.Exists() {
				item.AccessList = types.StringValue(cValue.String())
			}
			data.IpAccessGroup = append(data.IpAccessGroup, item)
			return true
		})
	}
	if value := res.Get(prefix + "subscriber.aging.inactivity-timer.value"); value.Exists() {
		data.SubscriberAgingInactivityTimerValue = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "subscriber.aging.inactivity-timer.probe"); value.Exists() {
		data.SubscriberAgingInactivityTimerProbe = types.BoolValue(true)
	} else {
		data.SubscriberAgingInactivityTimerProbe = types.BoolValue(false)
	}
	if value := res.Get(prefix + "subscriber.aging.probe"); value.Exists() {
		data.SubscriberAgingProbe = types.BoolValue(true)
	} else {
		data.SubscriberAgingProbe = types.BoolValue(false)
	}
	if value := res.Get(prefix + "device-tracking"); value.Exists() {
		data.DeviceTracking = types.BoolValue(true)
	} else {
		data.DeviceTracking = types.BoolValue(false)
	}
	if value := res.Get(prefix + "device-tracking.attach-policy.policy-name"); value.Exists() {
		data.DeviceTrackingAttachPolicy = make([]TemplateDeviceTrackingAttachPolicy, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := TemplateDeviceTrackingAttachPolicy{}
			if cValue := v.Get("policy-name"); cValue.Exists() {
				item.PolicyName = types.StringValue(cValue.String())
			}
			if cValue := v.Get("vlan.vlan-range"); cValue.Exists() {
				item.VlanRange = types.StringValue(cValue.String())
			}
			data.DeviceTrackingAttachPolicy = append(data.DeviceTrackingAttachPolicy, item)
			return true
		})
	}
	if value := res.Get(prefix + "device-tracking.vlan.vlan-range"); value.Exists() {
		data.DeviceTrackingVlanRange = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "cts.manual"); value.Exists() {
		data.CtsManual = types.BoolValue(true)
	} else {
		data.CtsManual = types.BoolValue(false)
	}
	if value := res.Get(prefix + "cts.manual.policy.static.sgt"); value.Exists() {
		data.CtsManualPolicyStaticSgt = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "cts.manual.policy.static.trusted"); value.Exists() {
		data.CtsManualPolicyStaticTrusted = types.BoolValue(true)
	} else {
		data.CtsManualPolicyStaticTrusted = types.BoolValue(false)
	}
	if value := res.Get(prefix + "cts.manual.propagate.sgt"); value.Exists() {
		data.CtsManualPropagateSgt = types.BoolValue(value.Bool())
	} else {
		data.CtsManualPropagateSgt = types.BoolNull()
	}
	if value := res.Get(prefix + "cts.role-based.enforcement"); value.Exists() {
		data.CtsRoleBasedEnforcement = types.BoolValue(value.Bool())
	} else {
		data.CtsRoleBasedEnforcement = types.BoolNull()
	}
}

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

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

func (data *Template) getDeletedItems(ctx context.Context, state Template) []string {
	deletedItems := make([]string, 0)
	if !state.CtsRoleBasedEnforcement.IsNull() && data.CtsRoleBasedEnforcement.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/cts/role-based/enforcement", state.getPath()))
	}
	if !state.CtsManualPropagateSgt.IsNull() && data.CtsManualPropagateSgt.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/cts/manual/propagate/sgt", state.getPath()))
	}
	if !state.CtsManualPolicyStaticTrusted.IsNull() && data.CtsManualPolicyStaticTrusted.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/cts/manual/policy/static/trusted", state.getPath()))
	}
	if !state.CtsManualPolicyStaticSgt.IsNull() && data.CtsManualPolicyStaticSgt.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/cts/manual/policy/static/sgt", state.getPath()))
	}
	if !state.CtsManual.IsNull() && data.CtsManual.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/cts/manual", state.getPath()))
	}
	if !state.DeviceTrackingVlanRange.IsNull() && data.DeviceTrackingVlanRange.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/device-tracking/vlan/vlan-range", state.getPath()))
	}
	for i := range state.DeviceTrackingAttachPolicy {
		stateKeyValues := [...]string{state.DeviceTrackingAttachPolicy[i].PolicyName.ValueString()}

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

		found := false
		for j := range data.DeviceTrackingAttachPolicy {
			found = true
			if state.DeviceTrackingAttachPolicy[i].PolicyName.ValueString() != data.DeviceTrackingAttachPolicy[j].PolicyName.ValueString() {
				found = false
			}
			if found {
				if !state.DeviceTrackingAttachPolicy[i].VlanRange.IsNull() && data.DeviceTrackingAttachPolicy[j].VlanRange.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/device-tracking/attach-policy/policy-name=%v/vlan/vlan-range", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/device-tracking/attach-policy/policy-name=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	if !state.DeviceTracking.IsNull() && data.DeviceTracking.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/device-tracking", state.getPath()))
	}
	if !state.SubscriberAgingProbe.IsNull() && data.SubscriberAgingProbe.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/subscriber/aging/probe", state.getPath()))
	}
	if !state.SubscriberAgingInactivityTimerProbe.IsNull() && data.SubscriberAgingInactivityTimerProbe.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/subscriber/aging/inactivity-timer/probe", state.getPath()))
	}
	if !state.SubscriberAgingInactivityTimerValue.IsNull() && data.SubscriberAgingInactivityTimerValue.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/subscriber/aging/inactivity-timer/value", state.getPath()))
	}
	for i := range state.IpAccessGroup {
		stateKeyValues := [...]string{state.IpAccessGroup[i].Direction.ValueString()}

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

		found := false
		for j := range data.IpAccessGroup {
			found = true
			if state.IpAccessGroup[i].Direction.ValueString() != data.IpAccessGroup[j].Direction.ValueString() {
				found = false
			}
			if found {
				if !state.IpAccessGroup[i].AccessList.IsNull() && data.IpAccessGroup[j].AccessList.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/ip/access-group=%v/access-list", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/ip/access-group=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	if !state.IpDhcpSnoopingTrust.IsNull() && data.IpDhcpSnoopingTrust.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/ip/dhcp/snooping/trust", state.getPath()))
	}
	if !state.IpDhcpSnoopingLimitRate.IsNull() && data.IpDhcpSnoopingLimitRate.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/ip/dhcp/snooping/limit/rate", state.getPath()))
	}
	if !state.LoadInterval.IsNull() && data.LoadInterval.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/load-interval", state.getPath()))
	}
	if !state.StormControlActionTrap.IsNull() && data.StormControlActionTrap.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/storm-control/action/trap", state.getPath()))
	}
	if !state.StormControlActionShutdown.IsNull() && data.StormControlActionShutdown.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/storm-control/action/shutdown", state.getPath()))
	}
	if !state.StormControlMulticastLevelThreshold.IsNull() && data.StormControlMulticastLevelThreshold.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/storm-control/multicast/level/threshold", state.getPath()))
	}
	if !state.StormControlMulticastLevelBpsThreshold.IsNull() && data.StormControlMulticastLevelBpsThreshold.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/storm-control/multicast/level/bps/threshold", state.getPath()))
	}
	if !state.StormControlMulticastLevelPpsThreshold.IsNull() && data.StormControlMulticastLevelPpsThreshold.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/storm-control/multicast/level/pps/threshold", state.getPath()))
	}
	if !state.StormControlBroadcastLevelThreshold.IsNull() && data.StormControlBroadcastLevelThreshold.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/storm-control/broadcast/level/threshold", state.getPath()))
	}
	if !state.StormControlBroadcastLevelBpsThreshold.IsNull() && data.StormControlBroadcastLevelBpsThreshold.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/storm-control/broadcast/level/bps/threshold", state.getPath()))
	}
	if !state.StormControlBroadcastLevelPpsThreshold.IsNull() && data.StormControlBroadcastLevelPpsThreshold.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/storm-control/broadcast/level/pps/threshold", state.getPath()))
	}
	if !state.SpanningTreePortfastNetwork.IsNull() && data.SpanningTreePortfastNetwork.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/spanning-tree/portfast/network", state.getPath()))
	}
	if !state.SpanningTreePortfastEdge.IsNull() && data.SpanningTreePortfastEdge.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/spanning-tree/portfast/edge", state.getPath()))
	}
	if !state.SpanningTreePortfastDisable.IsNull() && data.SpanningTreePortfastDisable.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/spanning-tree/portfast/disable", state.getPath()))
	}
	if !state.SpanningTreeServicePolicy.IsNull() && data.SpanningTreeServicePolicy.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/spanning-tree/service-policy", state.getPath()))
	}
	if !state.SpanningTreeBpduguardEnable.IsNull() && data.SpanningTreeBpduguardEnable.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/spanning-tree/bpduguard/enable", state.getPath()))
	}
	if !state.AuthenticationTimerReauthenticateRange.IsNull() && data.AuthenticationTimerReauthenticateRange.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/authentication/timer/reauthenticate/range", state.getPath()))
	}
	if !state.AuthenticationTimerReauthenticateServer.IsNull() && data.AuthenticationTimerReauthenticateServer.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/authentication/timer/reauthenticate/server", state.getPath()))
	}
	if !state.AuthenticationPeriodic.IsNull() && data.AuthenticationPeriodic.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/authentication/periodic", state.getPath()))
	}
	if !state.AccessSessionInterfaceTemplateStickyTimer.IsNull() && data.AccessSessionInterfaceTemplateStickyTimer.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/access-session/interface-template/sticky/timer", state.getPath()))
	}
	if !state.AccessSessionInterfaceTemplateSticky.IsNull() && data.AccessSessionInterfaceTemplateSticky.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/access-session/interface-template/sticky", state.getPath()))
	}
	if !state.AccessSessionHostMode.IsNull() && data.AccessSessionHostMode.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/access-session/host-mode", state.getPath()))
	}
	if !state.AccessSessionControlDirection.IsNull() && data.AccessSessionControlDirection.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/access-session/control-direction", state.getPath()))
	}
	if !state.AccessSessionPortControl.IsNull() && data.AccessSessionPortControl.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/access-session/port-control", state.getPath()))
	}
	if !state.AccessSessionMonitor.IsNull() && data.AccessSessionMonitor.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/access-session/monitor", state.getPath()))
	}
	if !state.AccessSessionClosed.IsNull() && data.AccessSessionClosed.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/access-session/closed", state.getPath()))
	}
	if !state.MabEap.IsNull() && data.MabEap.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/mab/eap", state.getPath()))
	}
	if !state.Mab.IsNull() && data.Mab.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/mab", state.getPath()))
	}
	if !state.SwitchportTrunkNativeVlanVlanId.IsNull() && data.SwitchportTrunkNativeVlanVlanId.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/trunk/native/vlan/vlan-id", state.getPath()))
	}
	if !state.SwitchportTrunkNativeVlanTag.IsNull() && data.SwitchportTrunkNativeVlanTag.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/trunk/native/vlan/tag", state.getPath()))
	}
	if !state.SwitchportTrunkAllowedVlansAll.IsNull() && data.SwitchportTrunkAllowedVlansAll.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/trunk/allowed/vlan/all", state.getPath()))
	}
	if !state.SwitchportTrunkAllowedVlansNone.IsNull() && data.SwitchportTrunkAllowedVlansNone.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/trunk/allowed/vlan/none", state.getPath()))
	}
	if !state.SwitchportTrunkAllowedVlans.IsNull() && data.SwitchportTrunkAllowedVlans.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/trunk/allowed/vlan/vlans", state.getPath()))
	}
	if !state.SwitchportPrivateVlanHostAssociationSecondaryRange.IsNull() && data.SwitchportPrivateVlanHostAssociationSecondaryRange.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/private-vlan/host-association", state.getPath()))
	}
	if !state.SwitchportPrivateVlanHostAssociationPrimaryRange.IsNull() && data.SwitchportPrivateVlanHostAssociationPrimaryRange.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/private-vlan/host-association", state.getPath()))
	}
	if !state.SwitchportVoiceVlan.IsNull() && data.SwitchportVoiceVlan.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/voice/vlan", state.getPath()))
	}
	if !state.SwitchportAccessVlan.IsNull() && data.SwitchportAccessVlan.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/access/vlan", state.getPath()))
	}
	if !state.SwitchportPortSecurityViolationShutdown.IsNull() && data.SwitchportPortSecurityViolationShutdown.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/port-security/violation/shutdown", state.getPath()))
	}
	if !state.SwitchportPortSecurityViolationRestrict.IsNull() && data.SwitchportPortSecurityViolationRestrict.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/port-security/violation/restrict", state.getPath()))
	}
	if !state.SwitchportPortSecurityViolationProtect.IsNull() && data.SwitchportPortSecurityViolationProtect.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/port-security/violation/protect", state.getPath()))
	}
	for i := range state.SwitchportPortSecurityMaximumRange {
		stateKeyValues := [...]string{strconv.FormatInt(state.SwitchportPortSecurityMaximumRange[i].Range.ValueInt64(), 10)}

		emptyKeys := true
		if !reflect.ValueOf(state.SwitchportPortSecurityMaximumRange[i].Range.ValueInt64()).IsZero() {
			emptyKeys = false
		}
		if emptyKeys {
			continue
		}

		found := false
		for j := range data.SwitchportPortSecurityMaximumRange {
			found = true
			if state.SwitchportPortSecurityMaximumRange[i].Range.ValueInt64() != data.SwitchportPortSecurityMaximumRange[j].Range.ValueInt64() {
				found = false
			}
			if found {
				if !state.SwitchportPortSecurityMaximumRange[i].VlanAccess.IsNull() && data.SwitchportPortSecurityMaximumRange[j].VlanAccess.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/port-security/maximum/range=%v/vlan/access", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.SwitchportPortSecurityMaximumRange[i].Vlan.IsNull() && data.SwitchportPortSecurityMaximumRange[j].Vlan.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/port-security/maximum/range=%v/vlan", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/port-security/maximum/range=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	if !state.SwitchportPortSecurityAgingTypeInactivity.IsNull() && data.SwitchportPortSecurityAgingTypeInactivity.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/port-security/aging/type", state.getPath()))
	}
	if !state.SwitchportPortSecurityAgingType.IsNull() && data.SwitchportPortSecurityAgingType.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/port-security/aging/type", state.getPath()))
	}
	if !state.SwitchportPortSecurityAgingTime.IsNull() && data.SwitchportPortSecurityAgingTime.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/port-security/aging/time", state.getPath()))
	}
	if !state.SwitchportPortSecurityAgingStatic.IsNull() && data.SwitchportPortSecurityAgingStatic.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/port-security/aging/static", state.getPath()))
	}
	if !state.SwitchportPortSecurity.IsNull() && data.SwitchportPortSecurity.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/port-security", state.getPath()))
	}
	if !state.SwitchportBlockUnicast.IsNull() && data.SwitchportBlockUnicast.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/block/unicast", state.getPath()))
	}
	if !state.SwitchportNonegotiate.IsNull() && data.SwitchportNonegotiate.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/nonegotiate", state.getPath()))
	}
	if !state.SwitchportModeAccess.IsNull() && data.SwitchportModeAccess.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/mode/access", state.getPath()))
	}
	if !state.SwitchportModeTrunk.IsNull() && data.SwitchportModeTrunk.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/switchport/mode/trunk", state.getPath()))
	}
	if !state.SourceTemplate.IsNull() && data.SourceTemplate.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/source/template", state.getPath()))
	}
	if !state.ServicePolicyOutput.IsNull() && data.ServicePolicyOutput.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/service-policy/output/policy-map-name", state.getPath()))
	}
	if !state.ServicePolicyInput.IsNull() && data.ServicePolicyInput.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/service-policy/input/policy-map-name", state.getPath()))
	}
	if !state.ServicePolicyTypeControlSubscriber.IsNull() && data.ServicePolicyTypeControlSubscriber.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/service-policy/type/control/subscriber", state.getPath()))
	}
	if !state.Dot1xTimeoutTxPeriod.IsNull() && data.Dot1xTimeoutTxPeriod.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/timeout/tx-period", state.getPath()))
	}
	if !state.Dot1xMaxReq.IsNull() && data.Dot1xMaxReq.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/max-req", state.getPath()))
	}
	if !state.Dot1xMaxReauthReq.IsNull() && data.Dot1xMaxReauthReq.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/max-reauth-req", state.getPath()))
	}
	if !state.Dot1xPae.IsNull() && data.Dot1xPae.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/pae", state.getPath()))
	}

	return deletedItems
}

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

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

func (data *Template) getEmptyLeafsDelete(ctx context.Context) []string {
	emptyLeafsDelete := make([]string, 0)
	if !data.CtsManualPolicyStaticTrusted.IsNull() && !data.CtsManualPolicyStaticTrusted.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/cts/manual/policy/static/trusted", data.getPath()))
	}
	if !data.CtsManual.IsNull() && !data.CtsManual.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/cts/manual", data.getPath()))
	}

	if !data.DeviceTracking.IsNull() && !data.DeviceTracking.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/device-tracking", data.getPath()))
	}
	if !data.SubscriberAgingProbe.IsNull() && !data.SubscriberAgingProbe.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/subscriber/aging/probe", data.getPath()))
	}
	if !data.SubscriberAgingInactivityTimerProbe.IsNull() && !data.SubscriberAgingInactivityTimerProbe.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/subscriber/aging/inactivity-timer/probe", data.getPath()))
	}

	if !data.IpDhcpSnoopingTrust.IsNull() && !data.IpDhcpSnoopingTrust.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/ip/dhcp/snooping/trust", data.getPath()))
	}
	if !data.StormControlActionTrap.IsNull() && !data.StormControlActionTrap.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/storm-control/action/trap", data.getPath()))
	}
	if !data.StormControlActionShutdown.IsNull() && !data.StormControlActionShutdown.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/storm-control/action/shutdown", data.getPath()))
	}
	if !data.SpanningTreePortfastNetwork.IsNull() && !data.SpanningTreePortfastNetwork.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/spanning-tree/portfast/network", data.getPath()))
	}
	if !data.SpanningTreePortfastEdge.IsNull() && !data.SpanningTreePortfastEdge.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/spanning-tree/portfast/edge", data.getPath()))
	}
	if !data.SpanningTreePortfastDisable.IsNull() && !data.SpanningTreePortfastDisable.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/spanning-tree/portfast/disable", data.getPath()))
	}
	if !data.SpanningTreePortfast.IsNull() && !data.SpanningTreePortfast.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/spanning-tree/portfast", data.getPath()))
	}
	if !data.SpanningTreeServicePolicy.IsNull() && !data.SpanningTreeServicePolicy.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/spanning-tree/service-policy", data.getPath()))
	}
	if !data.SpanningTreeBpduguardEnable.IsNull() && !data.SpanningTreeBpduguardEnable.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/spanning-tree/bpduguard/enable", data.getPath()))
	}
	if !data.AuthenticationTimerReauthenticateServer.IsNull() && !data.AuthenticationTimerReauthenticateServer.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/authentication/timer/reauthenticate/server", data.getPath()))
	}
	if !data.AuthenticationPeriodic.IsNull() && !data.AuthenticationPeriodic.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/authentication/periodic", data.getPath()))
	}
	if !data.AccessSessionInterfaceTemplateSticky.IsNull() && !data.AccessSessionInterfaceTemplateSticky.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/access-session/interface-template/sticky", data.getPath()))
	}
	if !data.AccessSessionClosed.IsNull() && !data.AccessSessionClosed.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/access-session/closed", data.getPath()))
	}
	if !data.MabEap.IsNull() && !data.MabEap.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/mab/eap", data.getPath()))
	}
	if !data.Mab.IsNull() && !data.Mab.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/mab", data.getPath()))
	}
	if !data.SwitchportTrunkAllowedVlansAll.IsNull() && !data.SwitchportTrunkAllowedVlansAll.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/switchport/trunk/allowed/vlan/all", data.getPath()))
	}
	if !data.SwitchportTrunkAllowedVlansNone.IsNull() && !data.SwitchportTrunkAllowedVlansNone.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/switchport/trunk/allowed/vlan/none", data.getPath()))
	}
	if !data.SwitchportPortSecurityViolationShutdown.IsNull() && !data.SwitchportPortSecurityViolationShutdown.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/switchport/port-security/violation/shutdown", data.getPath()))
	}
	if !data.SwitchportPortSecurityViolationRestrict.IsNull() && !data.SwitchportPortSecurityViolationRestrict.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/switchport/port-security/violation/restrict", data.getPath()))
	}
	if !data.SwitchportPortSecurityViolationProtect.IsNull() && !data.SwitchportPortSecurityViolationProtect.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/switchport/port-security/violation/protect", data.getPath()))
	}

	for i := range data.SwitchportPortSecurityMaximumRange {
		keyValues := [...]string{strconv.FormatInt(data.SwitchportPortSecurityMaximumRange[i].Range.ValueInt64(), 10)}
		if !data.SwitchportPortSecurityMaximumRange[i].VlanAccess.IsNull() && !data.SwitchportPortSecurityMaximumRange[i].VlanAccess.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/switchport/port-security/maximum/range=%v/vlan/access", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.SwitchportPortSecurityMaximumRange[i].Vlan.IsNull() && !data.SwitchportPortSecurityMaximumRange[i].Vlan.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/switchport/port-security/maximum/range=%v/vlan", data.getPath(), strings.Join(keyValues[:], ",")))
		}
	}
	if !data.SwitchportPortSecurityAgingTypeInactivity.IsNull() && !data.SwitchportPortSecurityAgingTypeInactivity.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/switchport/port-security/aging/type/inactivity", data.getPath()))
	}
	if !data.SwitchportPortSecurityAgingType.IsNull() && !data.SwitchportPortSecurityAgingType.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/switchport/port-security/aging/type", data.getPath()))
	}
	if !data.SwitchportPortSecurityAgingStatic.IsNull() && !data.SwitchportPortSecurityAgingStatic.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/switchport/port-security/aging/static", data.getPath()))
	}
	if !data.SwitchportPortSecurity.IsNull() && !data.SwitchportPortSecurity.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/switchport/port-security", data.getPath()))
	}
	if !data.SwitchportBlockUnicast.IsNull() && !data.SwitchportBlockUnicast.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/switchport/block/unicast", data.getPath()))
	}
	if !data.SwitchportNonegotiate.IsNull() && !data.SwitchportNonegotiate.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/switchport/nonegotiate", data.getPath()))
	}
	if !data.SwitchportModeAccess.IsNull() && !data.SwitchportModeAccess.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/switchport/mode/access", data.getPath()))
	}
	if !data.SwitchportModeTrunk.IsNull() && !data.SwitchportModeTrunk.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/switchport/mode/trunk", data.getPath()))
	}

	return emptyLeafsDelete
}

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

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

func (data *Template) getDeletePaths(ctx context.Context) []string {
	var deletePaths []string
	if !data.CtsRoleBasedEnforcement.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/cts/role-based/enforcement", data.getPath()))
	}
	if !data.CtsManualPropagateSgt.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/cts/manual/propagate/sgt", data.getPath()))
	}
	if !data.CtsManualPolicyStaticTrusted.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/cts/manual/policy/static/trusted", data.getPath()))
	}
	if !data.CtsManualPolicyStaticSgt.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/cts/manual/policy/static/sgt", data.getPath()))
	}
	if !data.CtsManual.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/cts/manual", data.getPath()))
	}
	if !data.DeviceTrackingVlanRange.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/device-tracking/vlan/vlan-range", data.getPath()))
	}
	for i := range data.DeviceTrackingAttachPolicy {
		keyValues := [...]string{data.DeviceTrackingAttachPolicy[i].PolicyName.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/device-tracking/attach-policy/policy-name=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	if !data.DeviceTracking.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/device-tracking", data.getPath()))
	}
	if !data.SubscriberAgingProbe.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/subscriber/aging/probe", data.getPath()))
	}
	if !data.SubscriberAgingInactivityTimerProbe.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/subscriber/aging/inactivity-timer/probe", data.getPath()))
	}
	if !data.SubscriberAgingInactivityTimerValue.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/subscriber/aging/inactivity-timer/value", data.getPath()))
	}
	for i := range data.IpAccessGroup {
		keyValues := [...]string{data.IpAccessGroup[i].Direction.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/ip/access-group=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	if !data.IpDhcpSnoopingTrust.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/ip/dhcp/snooping/trust", data.getPath()))
	}
	if !data.IpDhcpSnoopingLimitRate.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/ip/dhcp/snooping/limit/rate", data.getPath()))
	}
	if !data.LoadInterval.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/load-interval", data.getPath()))
	}
	if !data.StormControlActionTrap.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/storm-control/action/trap", data.getPath()))
	}
	if !data.StormControlActionShutdown.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/storm-control/action/shutdown", data.getPath()))
	}
	if !data.StormControlMulticastLevelThreshold.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/storm-control/multicast/level/threshold", data.getPath()))
	}
	if !data.StormControlMulticastLevelBpsThreshold.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/storm-control/multicast/level/bps/threshold", data.getPath()))
	}
	if !data.StormControlMulticastLevelPpsThreshold.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/storm-control/multicast/level/pps/threshold", data.getPath()))
	}
	if !data.StormControlBroadcastLevelThreshold.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/storm-control/broadcast/level/threshold", data.getPath()))
	}
	if !data.StormControlBroadcastLevelBpsThreshold.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/storm-control/broadcast/level/bps/threshold", data.getPath()))
	}
	if !data.StormControlBroadcastLevelPpsThreshold.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/storm-control/broadcast/level/pps/threshold", data.getPath()))
	}
	if !data.SpanningTreePortfastNetwork.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/spanning-tree/portfast/network", data.getPath()))
	}
	if !data.SpanningTreePortfastEdge.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/spanning-tree/portfast/edge", data.getPath()))
	}
	if !data.SpanningTreePortfastDisable.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/spanning-tree/portfast/disable", data.getPath()))
	}
	if !data.SpanningTreeServicePolicy.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/spanning-tree/service-policy", data.getPath()))
	}
	if !data.SpanningTreeBpduguardEnable.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/spanning-tree/bpduguard/enable", data.getPath()))
	}
	if !data.AuthenticationTimerReauthenticateRange.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/authentication/timer/reauthenticate/range", data.getPath()))
	}
	if !data.AuthenticationTimerReauthenticateServer.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/authentication/timer/reauthenticate/server", data.getPath()))
	}
	if !data.AuthenticationPeriodic.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/authentication/periodic", data.getPath()))
	}
	if !data.AccessSessionInterfaceTemplateStickyTimer.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/access-session/interface-template/sticky/timer", data.getPath()))
	}
	if !data.AccessSessionInterfaceTemplateSticky.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/access-session/interface-template/sticky", data.getPath()))
	}
	if !data.AccessSessionHostMode.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/access-session/host-mode", data.getPath()))
	}
	if !data.AccessSessionControlDirection.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/access-session/control-direction", data.getPath()))
	}
	if !data.AccessSessionPortControl.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/access-session/port-control", data.getPath()))
	}
	if !data.AccessSessionMonitor.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/access-session/monitor", data.getPath()))
	}
	if !data.AccessSessionClosed.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/access-session/closed", data.getPath()))
	}
	if !data.MabEap.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/mab/eap", data.getPath()))
	}
	if !data.Mab.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/mab", data.getPath()))
	}
	if !data.SwitchportTrunkNativeVlanVlanId.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/trunk/native/vlan/vlan-id", data.getPath()))
	}
	if !data.SwitchportTrunkNativeVlanTag.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/trunk/native/vlan/tag", data.getPath()))
	}
	if !data.SwitchportTrunkAllowedVlansAll.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/trunk/allowed/vlan/all", data.getPath()))
	}
	if !data.SwitchportTrunkAllowedVlansNone.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/trunk/allowed/vlan/none", data.getPath()))
	}
	if !data.SwitchportTrunkAllowedVlans.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/trunk/allowed/vlan/vlans", data.getPath()))
	}
	if !data.SwitchportPrivateVlanHostAssociationSecondaryRange.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/private-vlan/host-association", data.getPath()))
	}
	if !data.SwitchportPrivateVlanHostAssociationPrimaryRange.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/private-vlan/host-association", data.getPath()))
	}
	if !data.SwitchportVoiceVlan.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/voice/vlan", data.getPath()))
	}
	if !data.SwitchportAccessVlan.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/access/vlan", data.getPath()))
	}
	if !data.SwitchportPortSecurityViolationShutdown.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/port-security/violation/shutdown", data.getPath()))
	}
	if !data.SwitchportPortSecurityViolationRestrict.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/port-security/violation/restrict", data.getPath()))
	}
	if !data.SwitchportPortSecurityViolationProtect.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/port-security/violation/protect", data.getPath()))
	}
	for i := range data.SwitchportPortSecurityMaximumRange {
		keyValues := [...]string{strconv.FormatInt(data.SwitchportPortSecurityMaximumRange[i].Range.ValueInt64(), 10)}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/port-security/maximum/range=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	if !data.SwitchportPortSecurityAgingTypeInactivity.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/port-security/aging/type", data.getPath()))
	}
	if !data.SwitchportPortSecurityAgingType.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/port-security/aging/type", data.getPath()))
	}
	if !data.SwitchportPortSecurityAgingTime.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/port-security/aging/time", data.getPath()))
	}
	if !data.SwitchportPortSecurityAgingStatic.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/port-security/aging/static", data.getPath()))
	}
	if !data.SwitchportPortSecurity.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/port-security", data.getPath()))
	}
	if !data.SwitchportBlockUnicast.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/block/unicast", data.getPath()))
	}
	if !data.SwitchportNonegotiate.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/nonegotiate", data.getPath()))
	}
	if !data.SwitchportModeAccess.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/mode/access", data.getPath()))
	}
	if !data.SwitchportModeTrunk.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/switchport/mode/trunk", data.getPath()))
	}
	if !data.SourceTemplate.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/source/template", data.getPath()))
	}
	if !data.ServicePolicyOutput.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/service-policy/output/policy-map-name", data.getPath()))
	}
	if !data.ServicePolicyInput.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/service-policy/input/policy-map-name", data.getPath()))
	}
	if !data.ServicePolicyTypeControlSubscriber.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/service-policy/type/control/subscriber", data.getPath()))
	}
	if !data.Dot1xTimeoutTxPeriod.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/dot1x/timeout/tx-period", data.getPath()))
	}
	if !data.Dot1xMaxReq.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/dot1x/max-req", data.getPath()))
	}
	if !data.Dot1xMaxReauthReq.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/dot1x/max-reauth-req", data.getPath()))
	}
	if !data.Dot1xPae.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/dot1x/pae", data.getPath()))
	}

	return deletePaths
}

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