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

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

package provider

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

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

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

// Section below is generated&owned by "gen/generator.go". //template:begin types
type AAA struct {
	Device                             types.String                          `tfsdk:"device"`
	Id                                 types.String                          `tfsdk:"id"`
	NewModel                           types.Bool                            `tfsdk:"new_model"`
	ServerRadiusDynamicAuthor          types.Bool                            `tfsdk:"server_radius_dynamic_author"`
	SessionId                          types.String                          `tfsdk:"session_id"`
	ServerRadiusDynamicAuthorClients   []AAAServerRadiusDynamicAuthorClients `tfsdk:"server_radius_dynamic_author_clients"`
	GroupServerRadius                  []AAAGroupServerRadius                `tfsdk:"group_server_radius"`
	GroupServerTacacsplus              []AAAGroupServerTacacsplus            `tfsdk:"group_server_tacacsplus"`
	LocalAuthenticationType            types.String                          `tfsdk:"local_authentication_type"`
	LocalAuthorization                 types.String                          `tfsdk:"local_authorization"`
	LocalAuthenticationMaxFailAttempts types.Int64                           `tfsdk:"local_authentication_max_fail_attempts"`
}

type AAAData struct {
	Device                             types.String                          `tfsdk:"device"`
	Id                                 types.String                          `tfsdk:"id"`
	NewModel                           types.Bool                            `tfsdk:"new_model"`
	ServerRadiusDynamicAuthor          types.Bool                            `tfsdk:"server_radius_dynamic_author"`
	SessionId                          types.String                          `tfsdk:"session_id"`
	ServerRadiusDynamicAuthorClients   []AAAServerRadiusDynamicAuthorClients `tfsdk:"server_radius_dynamic_author_clients"`
	GroupServerRadius                  []AAAGroupServerRadius                `tfsdk:"group_server_radius"`
	GroupServerTacacsplus              []AAAGroupServerTacacsplus            `tfsdk:"group_server_tacacsplus"`
	LocalAuthenticationType            types.String                          `tfsdk:"local_authentication_type"`
	LocalAuthorization                 types.String                          `tfsdk:"local_authorization"`
	LocalAuthenticationMaxFailAttempts types.Int64                           `tfsdk:"local_authentication_max_fail_attempts"`
}
type AAAServerRadiusDynamicAuthorClients struct {
	Ip            types.String `tfsdk:"ip"`
	ServerKeyType types.String `tfsdk:"server_key_type"`
	ServerKey     types.String `tfsdk:"server_key"`
}
type AAAGroupServerRadius struct {
	Name                                             types.String                      `tfsdk:"name"`
	ServerNames                                      []AAAGroupServerRadiusServerNames `tfsdk:"server_names"`
	IpRadiusSourceInterfaceLoopback                  types.Int64                       `tfsdk:"ip_radius_source_interface_loopback"`
	IpRadiusSourceInterfaceVlan                      types.Int64                       `tfsdk:"ip_radius_source_interface_vlan"`
	IpRadiusSourceInterfaceGigabitEthernet           types.String                      `tfsdk:"ip_radius_source_interface_gigabit_ethernet"`
	IpRadiusSourceInterfaceTwoGigabitEthernet        types.String                      `tfsdk:"ip_radius_source_interface_two_gigabit_ethernet"`
	IpRadiusSourceInterfaceFiveGigabitEthernet       types.String                      `tfsdk:"ip_radius_source_interface_five_gigabit_ethernet"`
	IpRadiusSourceInterfaceTenGigabitEthernet        types.String                      `tfsdk:"ip_radius_source_interface_ten_gigabit_ethernet"`
	IpRadiusSourceInterfaceTwentyFiveGigabitEthernet types.String                      `tfsdk:"ip_radius_source_interface_twenty_five_gigabit_ethernet"`
	IpRadiusSourceInterfaceFortyGigabitEthernet      types.String                      `tfsdk:"ip_radius_source_interface_forty_gigabit_ethernet"`
	IpRadiusSourceInterfaceHundredGigabitEthernet    types.String                      `tfsdk:"ip_radius_source_interface_hundred_gigabit_ethernet"`
}
type AAAGroupServerTacacsplus struct {
	Name                                             types.String                          `tfsdk:"name"`
	ServerNames                                      []AAAGroupServerTacacsplusServerNames `tfsdk:"server_names"`
	IpTacacsSourceInterfaceLoopback                  types.Int64                           `tfsdk:"ip_tacacs_source_interface_loopback"`
	IpTacacsSourceInterfaceVlan                      types.Int64                           `tfsdk:"ip_tacacs_source_interface_vlan"`
	IpTacacsSourceInterfaceGigabitEthernet           types.String                          `tfsdk:"ip_tacacs_source_interface_gigabit_ethernet"`
	IpTacacsSourceInterfaceTwoGigabitEthernet        types.String                          `tfsdk:"ip_tacacs_source_interface_two_gigabit_ethernet"`
	IpTacacsSourceInterfaceFiveGigabitEthernet       types.String                          `tfsdk:"ip_tacacs_source_interface_five_gigabit_ethernet"`
	IpTacacsSourceInterfaceTenGigabitEthernet        types.String                          `tfsdk:"ip_tacacs_source_interface_ten_gigabit_ethernet"`
	IpTacacsSourceInterfaceTwentyFiveGigabitEthernet types.String                          `tfsdk:"ip_tacacs_source_interface_twenty_five_gigabit_ethernet"`
	IpTacacsSourceInterfaceFortyGigabitEthernet      types.String                          `tfsdk:"ip_tacacs_source_interface_forty_gigabit_ethernet"`
	IpTacacsSourceInterfaceHundredGigabitEthernet    types.String                          `tfsdk:"ip_tacacs_source_interface_hundred_gigabit_ethernet"`
	Vrf                                              types.String                          `tfsdk:"vrf"`
}
type AAAGroupServerRadiusServerNames struct {
	Name types.String `tfsdk:"name"`
}
type AAAGroupServerTacacsplusServerNames struct {
	Name types.String `tfsdk:"name"`
}

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

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

func (data AAA) getPath() string {
	return "Cisco-IOS-XE-native:native/aaa"
}

func (data AAAData) getPath() string {
	return "Cisco-IOS-XE-native:native/aaa"
}

// if last path element has a key -> remove it
func (data AAA) 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 AAA) toBody(ctx context.Context) string {
	body := `{"` + helpers.LastElement(data.getPath()) + `":{}}`
	if !data.NewModel.IsNull() && !data.NewModel.IsUnknown() {
		if data.NewModel.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:new-model", map[string]string{})
		}
	}
	if !data.ServerRadiusDynamicAuthor.IsNull() && !data.ServerRadiusDynamicAuthor.IsUnknown() {
		if data.ServerRadiusDynamicAuthor.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:server.radius.dynamic-author", map[string]string{})
		}
	}
	if !data.SessionId.IsNull() && !data.SessionId.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:session-id", data.SessionId.ValueString())
	}
	if !data.LocalAuthenticationType.IsNull() && !data.LocalAuthenticationType.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:local.authentication.authorization.authen-type", data.LocalAuthenticationType.ValueString())
	}
	if !data.LocalAuthorization.IsNull() && !data.LocalAuthorization.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:local.authentication.authorization.authorization", data.LocalAuthorization.ValueString())
	}
	if !data.LocalAuthenticationMaxFailAttempts.IsNull() && !data.LocalAuthenticationMaxFailAttempts.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:local.authentication.attempts.max-fail", strconv.FormatInt(data.LocalAuthenticationMaxFailAttempts.ValueInt64(), 10))
	}
	if len(data.ServerRadiusDynamicAuthorClients) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:server.radius.dynamic-author.client", []interface{}{})
		for index, item := range data.ServerRadiusDynamicAuthorClients {
			if !item.Ip.IsNull() && !item.Ip.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:server.radius.dynamic-author.client"+"."+strconv.Itoa(index)+"."+"ip", item.Ip.ValueString())
			}
			if !item.ServerKeyType.IsNull() && !item.ServerKeyType.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:server.radius.dynamic-author.client"+"."+strconv.Itoa(index)+"."+"server-key.key", item.ServerKeyType.ValueString())
			}
			if !item.ServerKey.IsNull() && !item.ServerKey.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:server.radius.dynamic-author.client"+"."+strconv.Itoa(index)+"."+"server-key.string", item.ServerKey.ValueString())
			}
		}
	}
	if len(data.GroupServerRadius) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.radius", []interface{}{})
		for index, item := range data.GroupServerRadius {
			if !item.Name.IsNull() && !item.Name.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.radius"+"."+strconv.Itoa(index)+"."+"name", item.Name.ValueString())
			}
			if !item.IpRadiusSourceInterfaceLoopback.IsNull() && !item.IpRadiusSourceInterfaceLoopback.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.radius"+"."+strconv.Itoa(index)+"."+"ip.radius.source-interface.Loopback", strconv.FormatInt(item.IpRadiusSourceInterfaceLoopback.ValueInt64(), 10))
			}
			if !item.IpRadiusSourceInterfaceVlan.IsNull() && !item.IpRadiusSourceInterfaceVlan.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.radius"+"."+strconv.Itoa(index)+"."+"ip.radius.source-interface.Vlan", strconv.FormatInt(item.IpRadiusSourceInterfaceVlan.ValueInt64(), 10))
			}
			if !item.IpRadiusSourceInterfaceGigabitEthernet.IsNull() && !item.IpRadiusSourceInterfaceGigabitEthernet.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.radius"+"."+strconv.Itoa(index)+"."+"ip.radius.source-interface.GigabitEthernet", item.IpRadiusSourceInterfaceGigabitEthernet.ValueString())
			}
			if !item.IpRadiusSourceInterfaceTwoGigabitEthernet.IsNull() && !item.IpRadiusSourceInterfaceTwoGigabitEthernet.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.radius"+"."+strconv.Itoa(index)+"."+"ip.radius.source-interface.TwoGigabitEthernet", item.IpRadiusSourceInterfaceTwoGigabitEthernet.ValueString())
			}
			if !item.IpRadiusSourceInterfaceFiveGigabitEthernet.IsNull() && !item.IpRadiusSourceInterfaceFiveGigabitEthernet.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.radius"+"."+strconv.Itoa(index)+"."+"ip.radius.source-interface.FiveGigabitEthernet", item.IpRadiusSourceInterfaceFiveGigabitEthernet.ValueString())
			}
			if !item.IpRadiusSourceInterfaceTenGigabitEthernet.IsNull() && !item.IpRadiusSourceInterfaceTenGigabitEthernet.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.radius"+"."+strconv.Itoa(index)+"."+"ip.radius.source-interface.TenGigabitEthernet", item.IpRadiusSourceInterfaceTenGigabitEthernet.ValueString())
			}
			if !item.IpRadiusSourceInterfaceTwentyFiveGigabitEthernet.IsNull() && !item.IpRadiusSourceInterfaceTwentyFiveGigabitEthernet.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.radius"+"."+strconv.Itoa(index)+"."+"ip.radius.source-interface.TwentyFiveGigE", item.IpRadiusSourceInterfaceTwentyFiveGigabitEthernet.ValueString())
			}
			if !item.IpRadiusSourceInterfaceFortyGigabitEthernet.IsNull() && !item.IpRadiusSourceInterfaceFortyGigabitEthernet.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.radius"+"."+strconv.Itoa(index)+"."+"ip.radius.source-interface.FortyGigabitEthernet", item.IpRadiusSourceInterfaceFortyGigabitEthernet.ValueString())
			}
			if !item.IpRadiusSourceInterfaceHundredGigabitEthernet.IsNull() && !item.IpRadiusSourceInterfaceHundredGigabitEthernet.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.radius"+"."+strconv.Itoa(index)+"."+"ip.radius.source-interface.HundredGigE", item.IpRadiusSourceInterfaceHundredGigabitEthernet.ValueString())
			}
			if len(item.ServerNames) > 0 {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.radius"+"."+strconv.Itoa(index)+"."+"server.name", []interface{}{})
				for cindex, citem := range item.ServerNames {
					if !citem.Name.IsNull() && !citem.Name.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.radius"+"."+strconv.Itoa(index)+"."+"server.name"+"."+strconv.Itoa(cindex)+"."+"name", citem.Name.ValueString())
					}
				}
			}
		}
	}
	if len(data.GroupServerTacacsplus) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.tacacsplus", []interface{}{})
		for index, item := range data.GroupServerTacacsplus {
			if !item.Name.IsNull() && !item.Name.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.tacacsplus"+"."+strconv.Itoa(index)+"."+"name", item.Name.ValueString())
			}
			if !item.IpTacacsSourceInterfaceLoopback.IsNull() && !item.IpTacacsSourceInterfaceLoopback.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.tacacsplus"+"."+strconv.Itoa(index)+"."+"ip.tacacs.source-interface.Loopback", strconv.FormatInt(item.IpTacacsSourceInterfaceLoopback.ValueInt64(), 10))
			}
			if !item.IpTacacsSourceInterfaceVlan.IsNull() && !item.IpTacacsSourceInterfaceVlan.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.tacacsplus"+"."+strconv.Itoa(index)+"."+"ip.tacacs.source-interface.Vlan", strconv.FormatInt(item.IpTacacsSourceInterfaceVlan.ValueInt64(), 10))
			}
			if !item.IpTacacsSourceInterfaceGigabitEthernet.IsNull() && !item.IpTacacsSourceInterfaceGigabitEthernet.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.tacacsplus"+"."+strconv.Itoa(index)+"."+"ip.tacacs.source-interface.GigabitEthernet", item.IpTacacsSourceInterfaceGigabitEthernet.ValueString())
			}
			if !item.IpTacacsSourceInterfaceTwoGigabitEthernet.IsNull() && !item.IpTacacsSourceInterfaceTwoGigabitEthernet.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.tacacsplus"+"."+strconv.Itoa(index)+"."+"ip.tacacs.source-interface.TwoGigabitEthernet", item.IpTacacsSourceInterfaceTwoGigabitEthernet.ValueString())
			}
			if !item.IpTacacsSourceInterfaceFiveGigabitEthernet.IsNull() && !item.IpTacacsSourceInterfaceFiveGigabitEthernet.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.tacacsplus"+"."+strconv.Itoa(index)+"."+"ip.tacacs.source-interface.FiveGigabitEthernet", item.IpTacacsSourceInterfaceFiveGigabitEthernet.ValueString())
			}
			if !item.IpTacacsSourceInterfaceTenGigabitEthernet.IsNull() && !item.IpTacacsSourceInterfaceTenGigabitEthernet.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.tacacsplus"+"."+strconv.Itoa(index)+"."+"ip.tacacs.source-interface.TenGigabitEthernet", item.IpTacacsSourceInterfaceTenGigabitEthernet.ValueString())
			}
			if !item.IpTacacsSourceInterfaceTwentyFiveGigabitEthernet.IsNull() && !item.IpTacacsSourceInterfaceTwentyFiveGigabitEthernet.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.tacacsplus"+"."+strconv.Itoa(index)+"."+"ip.tacacs.source-interface.TwentyFiveGigE", item.IpTacacsSourceInterfaceTwentyFiveGigabitEthernet.ValueString())
			}
			if !item.IpTacacsSourceInterfaceFortyGigabitEthernet.IsNull() && !item.IpTacacsSourceInterfaceFortyGigabitEthernet.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.tacacsplus"+"."+strconv.Itoa(index)+"."+"ip.tacacs.source-interface.FortyGigabitEthernet", item.IpTacacsSourceInterfaceFortyGigabitEthernet.ValueString())
			}
			if !item.IpTacacsSourceInterfaceHundredGigabitEthernet.IsNull() && !item.IpTacacsSourceInterfaceHundredGigabitEthernet.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.tacacsplus"+"."+strconv.Itoa(index)+"."+"ip.tacacs.source-interface.HundredGigE", item.IpTacacsSourceInterfaceHundredGigabitEthernet.ValueString())
			}
			if !item.Vrf.IsNull() && !item.Vrf.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.tacacsplus"+"."+strconv.Itoa(index)+"."+"ip.vrf.forwarding", item.Vrf.ValueString())
			}
			if len(item.ServerNames) > 0 {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.tacacsplus"+"."+strconv.Itoa(index)+"."+"server.name", []interface{}{})
				for cindex, citem := range item.ServerNames {
					if !citem.Name.IsNull() && !citem.Name.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-aaa:group.server.tacacsplus"+"."+strconv.Itoa(index)+"."+"server.name"+"."+strconv.Itoa(cindex)+"."+"name", citem.Name.ValueString())
					}
				}
			}
		}
	}
	return body
}

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

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

func (data *AAA) 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 + "Cisco-IOS-XE-aaa:new-model"); !data.NewModel.IsNull() {
		if value.Exists() {
			data.NewModel = types.BoolValue(true)
		} else {
			data.NewModel = types.BoolValue(false)
		}
	} else {
		data.NewModel = types.BoolNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-aaa:server.radius.dynamic-author"); !data.ServerRadiusDynamicAuthor.IsNull() {
		if value.Exists() {
			data.ServerRadiusDynamicAuthor = types.BoolValue(true)
		} else {
			data.ServerRadiusDynamicAuthor = types.BoolValue(false)
		}
	} else {
		data.ServerRadiusDynamicAuthor = types.BoolNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-aaa:session-id"); value.Exists() && !data.SessionId.IsNull() {
		data.SessionId = types.StringValue(value.String())
	} else {
		data.SessionId = types.StringNull()
	}
	for i := range data.ServerRadiusDynamicAuthorClients {
		keys := [...]string{"ip"}
		keyValues := [...]string{data.ServerRadiusDynamicAuthorClients[i].Ip.ValueString()}

		var r gjson.Result
		res.Get(prefix + "Cisco-IOS-XE-aaa:server.radius.dynamic-author.client").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("ip"); value.Exists() && !data.ServerRadiusDynamicAuthorClients[i].Ip.IsNull() {
			data.ServerRadiusDynamicAuthorClients[i].Ip = types.StringValue(value.String())
		} else {
			data.ServerRadiusDynamicAuthorClients[i].Ip = types.StringNull()
		}
	}
	for i := range data.GroupServerRadius {
		keys := [...]string{"name"}
		keyValues := [...]string{data.GroupServerRadius[i].Name.ValueString()}

		var r gjson.Result
		res.Get(prefix + "Cisco-IOS-XE-aaa:group.server.radius").ForEach(
			func(_, v gjson.Result) bool {
				found := false
				for ik := range keys {
					if v.Get(keys[ik]).String() == keyValues[ik] {
						found = true
						continue
					}
					found = false
					break
				}
				if found {
					r = v
					return false
				}
				return true
			},
		)
		if value := r.Get("name"); value.Exists() && !data.GroupServerRadius[i].Name.IsNull() {
			data.GroupServerRadius[i].Name = types.StringValue(value.String())
		} else {
			data.GroupServerRadius[i].Name = types.StringNull()
		}
		for ci := range data.GroupServerRadius[i].ServerNames {
			keys := [...]string{"name"}
			keyValues := [...]string{data.GroupServerRadius[i].ServerNames[ci].Name.ValueString()}

			var cr gjson.Result
			r.Get("server.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 {
						cr = v
						return false
					}
					return true
				},
			)
			if value := cr.Get("name"); value.Exists() && !data.GroupServerRadius[i].ServerNames[ci].Name.IsNull() {
				data.GroupServerRadius[i].ServerNames[ci].Name = types.StringValue(value.String())
			} else {
				data.GroupServerRadius[i].ServerNames[ci].Name = types.StringNull()
			}
		}
		if value := r.Get("ip.radius.source-interface.Loopback"); value.Exists() && !data.GroupServerRadius[i].IpRadiusSourceInterfaceLoopback.IsNull() {
			data.GroupServerRadius[i].IpRadiusSourceInterfaceLoopback = types.Int64Value(value.Int())
		} else {
			data.GroupServerRadius[i].IpRadiusSourceInterfaceLoopback = types.Int64Null()
		}
		if value := r.Get("ip.radius.source-interface.Vlan"); value.Exists() && !data.GroupServerRadius[i].IpRadiusSourceInterfaceVlan.IsNull() {
			data.GroupServerRadius[i].IpRadiusSourceInterfaceVlan = types.Int64Value(value.Int())
		} else {
			data.GroupServerRadius[i].IpRadiusSourceInterfaceVlan = types.Int64Null()
		}
		if value := r.Get("ip.radius.source-interface.GigabitEthernet"); value.Exists() && !data.GroupServerRadius[i].IpRadiusSourceInterfaceGigabitEthernet.IsNull() {
			data.GroupServerRadius[i].IpRadiusSourceInterfaceGigabitEthernet = types.StringValue(value.String())
		} else {
			data.GroupServerRadius[i].IpRadiusSourceInterfaceGigabitEthernet = types.StringNull()
		}
		if value := r.Get("ip.radius.source-interface.TwoGigabitEthernet"); value.Exists() && !data.GroupServerRadius[i].IpRadiusSourceInterfaceTwoGigabitEthernet.IsNull() {
			data.GroupServerRadius[i].IpRadiusSourceInterfaceTwoGigabitEthernet = types.StringValue(value.String())
		} else {
			data.GroupServerRadius[i].IpRadiusSourceInterfaceTwoGigabitEthernet = types.StringNull()
		}
		if value := r.Get("ip.radius.source-interface.FiveGigabitEthernet"); value.Exists() && !data.GroupServerRadius[i].IpRadiusSourceInterfaceFiveGigabitEthernet.IsNull() {
			data.GroupServerRadius[i].IpRadiusSourceInterfaceFiveGigabitEthernet = types.StringValue(value.String())
		} else {
			data.GroupServerRadius[i].IpRadiusSourceInterfaceFiveGigabitEthernet = types.StringNull()
		}
		if value := r.Get("ip.radius.source-interface.TenGigabitEthernet"); value.Exists() && !data.GroupServerRadius[i].IpRadiusSourceInterfaceTenGigabitEthernet.IsNull() {
			data.GroupServerRadius[i].IpRadiusSourceInterfaceTenGigabitEthernet = types.StringValue(value.String())
		} else {
			data.GroupServerRadius[i].IpRadiusSourceInterfaceTenGigabitEthernet = types.StringNull()
		}
		if value := r.Get("ip.radius.source-interface.TwentyFiveGigE"); value.Exists() && !data.GroupServerRadius[i].IpRadiusSourceInterfaceTwentyFiveGigabitEthernet.IsNull() {
			data.GroupServerRadius[i].IpRadiusSourceInterfaceTwentyFiveGigabitEthernet = types.StringValue(value.String())
		} else {
			data.GroupServerRadius[i].IpRadiusSourceInterfaceTwentyFiveGigabitEthernet = types.StringNull()
		}
		if value := r.Get("ip.radius.source-interface.FortyGigabitEthernet"); value.Exists() && !data.GroupServerRadius[i].IpRadiusSourceInterfaceFortyGigabitEthernet.IsNull() {
			data.GroupServerRadius[i].IpRadiusSourceInterfaceFortyGigabitEthernet = types.StringValue(value.String())
		} else {
			data.GroupServerRadius[i].IpRadiusSourceInterfaceFortyGigabitEthernet = types.StringNull()
		}
		if value := r.Get("ip.radius.source-interface.HundredGigE"); value.Exists() && !data.GroupServerRadius[i].IpRadiusSourceInterfaceHundredGigabitEthernet.IsNull() {
			data.GroupServerRadius[i].IpRadiusSourceInterfaceHundredGigabitEthernet = types.StringValue(value.String())
		} else {
			data.GroupServerRadius[i].IpRadiusSourceInterfaceHundredGigabitEthernet = types.StringNull()
		}
	}
	for i := range data.GroupServerTacacsplus {
		keys := [...]string{"name"}
		keyValues := [...]string{data.GroupServerTacacsplus[i].Name.ValueString()}

		var r gjson.Result
		res.Get(prefix + "Cisco-IOS-XE-aaa:group.server.tacacsplus").ForEach(
			func(_, v gjson.Result) bool {
				found := false
				for ik := range keys {
					if v.Get(keys[ik]).String() == keyValues[ik] {
						found = true
						continue
					}
					found = false
					break
				}
				if found {
					r = v
					return false
				}
				return true
			},
		)
		if value := r.Get("name"); value.Exists() && !data.GroupServerTacacsplus[i].Name.IsNull() {
			data.GroupServerTacacsplus[i].Name = types.StringValue(value.String())
		} else {
			data.GroupServerTacacsplus[i].Name = types.StringNull()
		}
		for ci := range data.GroupServerTacacsplus[i].ServerNames {
			keys := [...]string{"name"}
			keyValues := [...]string{data.GroupServerTacacsplus[i].ServerNames[ci].Name.ValueString()}

			var cr gjson.Result
			r.Get("server.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 {
						cr = v
						return false
					}
					return true
				},
			)
			if value := cr.Get("name"); value.Exists() && !data.GroupServerTacacsplus[i].ServerNames[ci].Name.IsNull() {
				data.GroupServerTacacsplus[i].ServerNames[ci].Name = types.StringValue(value.String())
			} else {
				data.GroupServerTacacsplus[i].ServerNames[ci].Name = types.StringNull()
			}
		}
		if value := r.Get("ip.tacacs.source-interface.Loopback"); value.Exists() && !data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceLoopback.IsNull() {
			data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceLoopback = types.Int64Value(value.Int())
		} else {
			data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceLoopback = types.Int64Null()
		}
		if value := r.Get("ip.tacacs.source-interface.Vlan"); value.Exists() && !data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceVlan.IsNull() {
			data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceVlan = types.Int64Value(value.Int())
		} else {
			data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceVlan = types.Int64Null()
		}
		if value := r.Get("ip.tacacs.source-interface.GigabitEthernet"); value.Exists() && !data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceGigabitEthernet.IsNull() {
			data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceGigabitEthernet = types.StringValue(value.String())
		} else {
			data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceGigabitEthernet = types.StringNull()
		}
		if value := r.Get("ip.tacacs.source-interface.TwoGigabitEthernet"); value.Exists() && !data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceTwoGigabitEthernet.IsNull() {
			data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceTwoGigabitEthernet = types.StringValue(value.String())
		} else {
			data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceTwoGigabitEthernet = types.StringNull()
		}
		if value := r.Get("ip.tacacs.source-interface.FiveGigabitEthernet"); value.Exists() && !data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceFiveGigabitEthernet.IsNull() {
			data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceFiveGigabitEthernet = types.StringValue(value.String())
		} else {
			data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceFiveGigabitEthernet = types.StringNull()
		}
		if value := r.Get("ip.tacacs.source-interface.TenGigabitEthernet"); value.Exists() && !data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceTenGigabitEthernet.IsNull() {
			data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceTenGigabitEthernet = types.StringValue(value.String())
		} else {
			data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceTenGigabitEthernet = types.StringNull()
		}
		if value := r.Get("ip.tacacs.source-interface.TwentyFiveGigE"); value.Exists() && !data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceTwentyFiveGigabitEthernet.IsNull() {
			data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceTwentyFiveGigabitEthernet = types.StringValue(value.String())
		} else {
			data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceTwentyFiveGigabitEthernet = types.StringNull()
		}
		if value := r.Get("ip.tacacs.source-interface.FortyGigabitEthernet"); value.Exists() && !data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceFortyGigabitEthernet.IsNull() {
			data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceFortyGigabitEthernet = types.StringValue(value.String())
		} else {
			data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceFortyGigabitEthernet = types.StringNull()
		}
		if value := r.Get("ip.tacacs.source-interface.HundredGigE"); value.Exists() && !data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceHundredGigabitEthernet.IsNull() {
			data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceHundredGigabitEthernet = types.StringValue(value.String())
		} else {
			data.GroupServerTacacsplus[i].IpTacacsSourceInterfaceHundredGigabitEthernet = types.StringNull()
		}
		if value := r.Get("ip.vrf.forwarding"); value.Exists() && !data.GroupServerTacacsplus[i].Vrf.IsNull() {
			data.GroupServerTacacsplus[i].Vrf = types.StringValue(value.String())
		} else {
			data.GroupServerTacacsplus[i].Vrf = types.StringNull()
		}
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-aaa:local.authentication.authorization.authen-type"); value.Exists() && !data.LocalAuthenticationType.IsNull() {
		data.LocalAuthenticationType = types.StringValue(value.String())
	} else {
		data.LocalAuthenticationType = types.StringNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-aaa:local.authentication.authorization.authorization"); value.Exists() && !data.LocalAuthorization.IsNull() {
		data.LocalAuthorization = types.StringValue(value.String())
	} else {
		data.LocalAuthorization = types.StringNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-aaa:local.authentication.attempts.max-fail"); value.Exists() && !data.LocalAuthenticationMaxFailAttempts.IsNull() {
		data.LocalAuthenticationMaxFailAttempts = types.Int64Value(value.Int())
	} else {
		data.LocalAuthenticationMaxFailAttempts = types.Int64Null()
	}
}

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

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

func (data *AAA) 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 + "Cisco-IOS-XE-aaa:new-model"); value.Exists() {
		data.NewModel = types.BoolValue(true)
	} else {
		data.NewModel = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-aaa:server.radius.dynamic-author"); value.Exists() {
		data.ServerRadiusDynamicAuthor = types.BoolValue(true)
	} else {
		data.ServerRadiusDynamicAuthor = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-aaa:session-id"); value.Exists() {
		data.SessionId = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-aaa:server.radius.dynamic-author.client"); value.Exists() {
		data.ServerRadiusDynamicAuthorClients = make([]AAAServerRadiusDynamicAuthorClients, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := AAAServerRadiusDynamicAuthorClients{}
			if cValue := v.Get("ip"); cValue.Exists() {
				item.Ip = types.StringValue(cValue.String())
			}
			if cValue := v.Get("server-key.key"); cValue.Exists() {
				item.ServerKeyType = types.StringValue(cValue.String())
			}
			if cValue := v.Get("server-key.string"); cValue.Exists() {
				item.ServerKey = types.StringValue(cValue.String())
			}
			data.ServerRadiusDynamicAuthorClients = append(data.ServerRadiusDynamicAuthorClients, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-aaa:group.server.radius"); value.Exists() {
		data.GroupServerRadius = make([]AAAGroupServerRadius, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := AAAGroupServerRadius{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			if cValue := v.Get("server.name"); cValue.Exists() {
				item.ServerNames = make([]AAAGroupServerRadiusServerNames, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := AAAGroupServerRadiusServerNames{}
					if ccValue := cv.Get("name"); ccValue.Exists() {
						cItem.Name = types.StringValue(ccValue.String())
					}
					item.ServerNames = append(item.ServerNames, cItem)
					return true
				})
			}
			if cValue := v.Get("ip.radius.source-interface.Loopback"); cValue.Exists() {
				item.IpRadiusSourceInterfaceLoopback = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("ip.radius.source-interface.Vlan"); cValue.Exists() {
				item.IpRadiusSourceInterfaceVlan = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("ip.radius.source-interface.GigabitEthernet"); cValue.Exists() {
				item.IpRadiusSourceInterfaceGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.radius.source-interface.TwoGigabitEthernet"); cValue.Exists() {
				item.IpRadiusSourceInterfaceTwoGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.radius.source-interface.FiveGigabitEthernet"); cValue.Exists() {
				item.IpRadiusSourceInterfaceFiveGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.radius.source-interface.TenGigabitEthernet"); cValue.Exists() {
				item.IpRadiusSourceInterfaceTenGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.radius.source-interface.TwentyFiveGigE"); cValue.Exists() {
				item.IpRadiusSourceInterfaceTwentyFiveGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.radius.source-interface.FortyGigabitEthernet"); cValue.Exists() {
				item.IpRadiusSourceInterfaceFortyGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.radius.source-interface.HundredGigE"); cValue.Exists() {
				item.IpRadiusSourceInterfaceHundredGigabitEthernet = types.StringValue(cValue.String())
			}
			data.GroupServerRadius = append(data.GroupServerRadius, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-aaa:group.server.tacacsplus"); value.Exists() {
		data.GroupServerTacacsplus = make([]AAAGroupServerTacacsplus, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := AAAGroupServerTacacsplus{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			if cValue := v.Get("server.name"); cValue.Exists() {
				item.ServerNames = make([]AAAGroupServerTacacsplusServerNames, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := AAAGroupServerTacacsplusServerNames{}
					if ccValue := cv.Get("name"); ccValue.Exists() {
						cItem.Name = types.StringValue(ccValue.String())
					}
					item.ServerNames = append(item.ServerNames, cItem)
					return true
				})
			}
			if cValue := v.Get("ip.tacacs.source-interface.Loopback"); cValue.Exists() {
				item.IpTacacsSourceInterfaceLoopback = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("ip.tacacs.source-interface.Vlan"); cValue.Exists() {
				item.IpTacacsSourceInterfaceVlan = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("ip.tacacs.source-interface.GigabitEthernet"); cValue.Exists() {
				item.IpTacacsSourceInterfaceGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.tacacs.source-interface.TwoGigabitEthernet"); cValue.Exists() {
				item.IpTacacsSourceInterfaceTwoGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.tacacs.source-interface.FiveGigabitEthernet"); cValue.Exists() {
				item.IpTacacsSourceInterfaceFiveGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.tacacs.source-interface.TenGigabitEthernet"); cValue.Exists() {
				item.IpTacacsSourceInterfaceTenGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.tacacs.source-interface.TwentyFiveGigE"); cValue.Exists() {
				item.IpTacacsSourceInterfaceTwentyFiveGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.tacacs.source-interface.FortyGigabitEthernet"); cValue.Exists() {
				item.IpTacacsSourceInterfaceFortyGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.tacacs.source-interface.HundredGigE"); cValue.Exists() {
				item.IpTacacsSourceInterfaceHundredGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.vrf.forwarding"); cValue.Exists() {
				item.Vrf = types.StringValue(cValue.String())
			}
			data.GroupServerTacacsplus = append(data.GroupServerTacacsplus, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-aaa:local.authentication.authorization.authen-type"); value.Exists() {
		data.LocalAuthenticationType = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-aaa:local.authentication.authorization.authorization"); value.Exists() {
		data.LocalAuthorization = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-aaa:local.authentication.attempts.max-fail"); value.Exists() {
		data.LocalAuthenticationMaxFailAttempts = types.Int64Value(value.Int())
	}
}

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

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

func (data *AAAData) 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 + "Cisco-IOS-XE-aaa:new-model"); value.Exists() {
		data.NewModel = types.BoolValue(true)
	} else {
		data.NewModel = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-aaa:server.radius.dynamic-author"); value.Exists() {
		data.ServerRadiusDynamicAuthor = types.BoolValue(true)
	} else {
		data.ServerRadiusDynamicAuthor = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-aaa:session-id"); value.Exists() {
		data.SessionId = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-aaa:server.radius.dynamic-author.client"); value.Exists() {
		data.ServerRadiusDynamicAuthorClients = make([]AAAServerRadiusDynamicAuthorClients, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := AAAServerRadiusDynamicAuthorClients{}
			if cValue := v.Get("ip"); cValue.Exists() {
				item.Ip = types.StringValue(cValue.String())
			}
			if cValue := v.Get("server-key.key"); cValue.Exists() {
				item.ServerKeyType = types.StringValue(cValue.String())
			}
			if cValue := v.Get("server-key.string"); cValue.Exists() {
				item.ServerKey = types.StringValue(cValue.String())
			}
			data.ServerRadiusDynamicAuthorClients = append(data.ServerRadiusDynamicAuthorClients, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-aaa:group.server.radius"); value.Exists() {
		data.GroupServerRadius = make([]AAAGroupServerRadius, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := AAAGroupServerRadius{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			if cValue := v.Get("server.name"); cValue.Exists() {
				item.ServerNames = make([]AAAGroupServerRadiusServerNames, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := AAAGroupServerRadiusServerNames{}
					if ccValue := cv.Get("name"); ccValue.Exists() {
						cItem.Name = types.StringValue(ccValue.String())
					}
					item.ServerNames = append(item.ServerNames, cItem)
					return true
				})
			}
			if cValue := v.Get("ip.radius.source-interface.Loopback"); cValue.Exists() {
				item.IpRadiusSourceInterfaceLoopback = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("ip.radius.source-interface.Vlan"); cValue.Exists() {
				item.IpRadiusSourceInterfaceVlan = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("ip.radius.source-interface.GigabitEthernet"); cValue.Exists() {
				item.IpRadiusSourceInterfaceGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.radius.source-interface.TwoGigabitEthernet"); cValue.Exists() {
				item.IpRadiusSourceInterfaceTwoGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.radius.source-interface.FiveGigabitEthernet"); cValue.Exists() {
				item.IpRadiusSourceInterfaceFiveGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.radius.source-interface.TenGigabitEthernet"); cValue.Exists() {
				item.IpRadiusSourceInterfaceTenGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.radius.source-interface.TwentyFiveGigE"); cValue.Exists() {
				item.IpRadiusSourceInterfaceTwentyFiveGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.radius.source-interface.FortyGigabitEthernet"); cValue.Exists() {
				item.IpRadiusSourceInterfaceFortyGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.radius.source-interface.HundredGigE"); cValue.Exists() {
				item.IpRadiusSourceInterfaceHundredGigabitEthernet = types.StringValue(cValue.String())
			}
			data.GroupServerRadius = append(data.GroupServerRadius, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-aaa:group.server.tacacsplus"); value.Exists() {
		data.GroupServerTacacsplus = make([]AAAGroupServerTacacsplus, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := AAAGroupServerTacacsplus{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			if cValue := v.Get("server.name"); cValue.Exists() {
				item.ServerNames = make([]AAAGroupServerTacacsplusServerNames, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := AAAGroupServerTacacsplusServerNames{}
					if ccValue := cv.Get("name"); ccValue.Exists() {
						cItem.Name = types.StringValue(ccValue.String())
					}
					item.ServerNames = append(item.ServerNames, cItem)
					return true
				})
			}
			if cValue := v.Get("ip.tacacs.source-interface.Loopback"); cValue.Exists() {
				item.IpTacacsSourceInterfaceLoopback = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("ip.tacacs.source-interface.Vlan"); cValue.Exists() {
				item.IpTacacsSourceInterfaceVlan = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("ip.tacacs.source-interface.GigabitEthernet"); cValue.Exists() {
				item.IpTacacsSourceInterfaceGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.tacacs.source-interface.TwoGigabitEthernet"); cValue.Exists() {
				item.IpTacacsSourceInterfaceTwoGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.tacacs.source-interface.FiveGigabitEthernet"); cValue.Exists() {
				item.IpTacacsSourceInterfaceFiveGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.tacacs.source-interface.TenGigabitEthernet"); cValue.Exists() {
				item.IpTacacsSourceInterfaceTenGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.tacacs.source-interface.TwentyFiveGigE"); cValue.Exists() {
				item.IpTacacsSourceInterfaceTwentyFiveGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.tacacs.source-interface.FortyGigabitEthernet"); cValue.Exists() {
				item.IpTacacsSourceInterfaceFortyGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.tacacs.source-interface.HundredGigE"); cValue.Exists() {
				item.IpTacacsSourceInterfaceHundredGigabitEthernet = types.StringValue(cValue.String())
			}
			if cValue := v.Get("ip.vrf.forwarding"); cValue.Exists() {
				item.Vrf = types.StringValue(cValue.String())
			}
			data.GroupServerTacacsplus = append(data.GroupServerTacacsplus, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-aaa:local.authentication.authorization.authen-type"); value.Exists() {
		data.LocalAuthenticationType = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-aaa:local.authentication.authorization.authorization"); value.Exists() {
		data.LocalAuthorization = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-aaa:local.authentication.attempts.max-fail"); value.Exists() {
		data.LocalAuthenticationMaxFailAttempts = types.Int64Value(value.Int())
	}
}

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

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

func (data *AAA) getDeletedItems(ctx context.Context, state AAA) []string {
	deletedItems := make([]string, 0)
	if !state.LocalAuthenticationMaxFailAttempts.IsNull() && data.LocalAuthenticationMaxFailAttempts.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:local/authentication/attempts/max-fail", state.getPath()))
	}
	if !state.LocalAuthorization.IsNull() && data.LocalAuthorization.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:local/authentication/authorization/authorization", state.getPath()))
	}
	if !state.LocalAuthenticationType.IsNull() && data.LocalAuthenticationType.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:local/authentication/authorization/authen-type", state.getPath()))
	}
	for i := range state.GroupServerTacacsplus {
		stateKeyValues := [...]string{state.GroupServerTacacsplus[i].Name.ValueString()}

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

		found := false
		for j := range data.GroupServerTacacsplus {
			found = true
			if state.GroupServerTacacsplus[i].Name.ValueString() != data.GroupServerTacacsplus[j].Name.ValueString() {
				found = false
			}
			if found {
				if !state.GroupServerTacacsplus[i].Vrf.IsNull() && data.GroupServerTacacsplus[j].Vrf.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/tacacsplus=%v/ip/vrf/forwarding", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.GroupServerTacacsplus[i].IpTacacsSourceInterfaceHundredGigabitEthernet.IsNull() && data.GroupServerTacacsplus[j].IpTacacsSourceInterfaceHundredGigabitEthernet.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/tacacsplus=%v/ip/tacacs/source-interface/HundredGigE", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.GroupServerTacacsplus[i].IpTacacsSourceInterfaceFortyGigabitEthernet.IsNull() && data.GroupServerTacacsplus[j].IpTacacsSourceInterfaceFortyGigabitEthernet.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/tacacsplus=%v/ip/tacacs/source-interface/FortyGigabitEthernet", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.GroupServerTacacsplus[i].IpTacacsSourceInterfaceTwentyFiveGigabitEthernet.IsNull() && data.GroupServerTacacsplus[j].IpTacacsSourceInterfaceTwentyFiveGigabitEthernet.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/tacacsplus=%v/ip/tacacs/source-interface/TwentyFiveGigE", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.GroupServerTacacsplus[i].IpTacacsSourceInterfaceTenGigabitEthernet.IsNull() && data.GroupServerTacacsplus[j].IpTacacsSourceInterfaceTenGigabitEthernet.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/tacacsplus=%v/ip/tacacs/source-interface/TenGigabitEthernet", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.GroupServerTacacsplus[i].IpTacacsSourceInterfaceFiveGigabitEthernet.IsNull() && data.GroupServerTacacsplus[j].IpTacacsSourceInterfaceFiveGigabitEthernet.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/tacacsplus=%v/ip/tacacs/source-interface/FiveGigabitEthernet", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.GroupServerTacacsplus[i].IpTacacsSourceInterfaceTwoGigabitEthernet.IsNull() && data.GroupServerTacacsplus[j].IpTacacsSourceInterfaceTwoGigabitEthernet.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/tacacsplus=%v/ip/tacacs/source-interface/TwoGigabitEthernet", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.GroupServerTacacsplus[i].IpTacacsSourceInterfaceGigabitEthernet.IsNull() && data.GroupServerTacacsplus[j].IpTacacsSourceInterfaceGigabitEthernet.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/tacacsplus=%v/ip/tacacs/source-interface/GigabitEthernet", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.GroupServerTacacsplus[i].IpTacacsSourceInterfaceVlan.IsNull() && data.GroupServerTacacsplus[j].IpTacacsSourceInterfaceVlan.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/tacacsplus=%v/ip/tacacs/source-interface/Vlan", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.GroupServerTacacsplus[i].IpTacacsSourceInterfaceLoopback.IsNull() && data.GroupServerTacacsplus[j].IpTacacsSourceInterfaceLoopback.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/tacacsplus=%v/ip/tacacs/source-interface/Loopback", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				for ci := range state.GroupServerTacacsplus[i].ServerNames {
					cstateKeyValues := [...]string{state.GroupServerTacacsplus[i].ServerNames[ci].Name.ValueString()}

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

					found := false
					for cj := range data.GroupServerTacacsplus[j].ServerNames {
						found = true
						if state.GroupServerTacacsplus[i].ServerNames[ci].Name.ValueString() != data.GroupServerTacacsplus[j].ServerNames[cj].Name.ValueString() {
							found = false
						}
						if found {
							break
						}
					}
					if !found {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/tacacsplus=%v/server/name=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
					}
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/tacacsplus=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.GroupServerRadius {
		stateKeyValues := [...]string{state.GroupServerRadius[i].Name.ValueString()}

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

		found := false
		for j := range data.GroupServerRadius {
			found = true
			if state.GroupServerRadius[i].Name.ValueString() != data.GroupServerRadius[j].Name.ValueString() {
				found = false
			}
			if found {
				if !state.GroupServerRadius[i].IpRadiusSourceInterfaceHundredGigabitEthernet.IsNull() && data.GroupServerRadius[j].IpRadiusSourceInterfaceHundredGigabitEthernet.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/radius=%v/ip/radius/source-interface/HundredGigE", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.GroupServerRadius[i].IpRadiusSourceInterfaceFortyGigabitEthernet.IsNull() && data.GroupServerRadius[j].IpRadiusSourceInterfaceFortyGigabitEthernet.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/radius=%v/ip/radius/source-interface/FortyGigabitEthernet", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.GroupServerRadius[i].IpRadiusSourceInterfaceTwentyFiveGigabitEthernet.IsNull() && data.GroupServerRadius[j].IpRadiusSourceInterfaceTwentyFiveGigabitEthernet.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/radius=%v/ip/radius/source-interface/TwentyFiveGigE", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.GroupServerRadius[i].IpRadiusSourceInterfaceTenGigabitEthernet.IsNull() && data.GroupServerRadius[j].IpRadiusSourceInterfaceTenGigabitEthernet.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/radius=%v/ip/radius/source-interface/TenGigabitEthernet", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.GroupServerRadius[i].IpRadiusSourceInterfaceFiveGigabitEthernet.IsNull() && data.GroupServerRadius[j].IpRadiusSourceInterfaceFiveGigabitEthernet.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/radius=%v/ip/radius/source-interface/FiveGigabitEthernet", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.GroupServerRadius[i].IpRadiusSourceInterfaceTwoGigabitEthernet.IsNull() && data.GroupServerRadius[j].IpRadiusSourceInterfaceTwoGigabitEthernet.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/radius=%v/ip/radius/source-interface/TwoGigabitEthernet", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.GroupServerRadius[i].IpRadiusSourceInterfaceGigabitEthernet.IsNull() && data.GroupServerRadius[j].IpRadiusSourceInterfaceGigabitEthernet.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/radius=%v/ip/radius/source-interface/GigabitEthernet", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.GroupServerRadius[i].IpRadiusSourceInterfaceVlan.IsNull() && data.GroupServerRadius[j].IpRadiusSourceInterfaceVlan.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/radius=%v/ip/radius/source-interface/Vlan", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.GroupServerRadius[i].IpRadiusSourceInterfaceLoopback.IsNull() && data.GroupServerRadius[j].IpRadiusSourceInterfaceLoopback.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/radius=%v/ip/radius/source-interface/Loopback", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				for ci := range state.GroupServerRadius[i].ServerNames {
					cstateKeyValues := [...]string{state.GroupServerRadius[i].ServerNames[ci].Name.ValueString()}

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

					found := false
					for cj := range data.GroupServerRadius[j].ServerNames {
						found = true
						if state.GroupServerRadius[i].ServerNames[ci].Name.ValueString() != data.GroupServerRadius[j].ServerNames[cj].Name.ValueString() {
							found = false
						}
						if found {
							break
						}
					}
					if !found {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/radius=%v/server/name=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
					}
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/radius=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.ServerRadiusDynamicAuthorClients {
		stateKeyValues := [...]string{state.ServerRadiusDynamicAuthorClients[i].Ip.ValueString()}

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

		found := false
		for j := range data.ServerRadiusDynamicAuthorClients {
			found = true
			if state.ServerRadiusDynamicAuthorClients[i].Ip.ValueString() != data.ServerRadiusDynamicAuthorClients[j].Ip.ValueString() {
				found = false
			}
			if found {
				if !state.ServerRadiusDynamicAuthorClients[i].ServerKey.IsNull() && data.ServerRadiusDynamicAuthorClients[j].ServerKey.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:server/radius/dynamic-author/client=%v/server-key/string", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.ServerRadiusDynamicAuthorClients[i].ServerKeyType.IsNull() && data.ServerRadiusDynamicAuthorClients[j].ServerKeyType.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:server/radius/dynamic-author/client=%v/server-key/key", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:server/radius/dynamic-author/client=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	if !state.SessionId.IsNull() && data.SessionId.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:session-id", state.getPath()))
	}
	if !state.ServerRadiusDynamicAuthor.IsNull() && data.ServerRadiusDynamicAuthor.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:server/radius/dynamic-author", state.getPath()))
	}
	if !state.NewModel.IsNull() && data.NewModel.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:new-model", state.getPath()))
	}

	return deletedItems
}

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

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

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

	if !data.ServerRadiusDynamicAuthor.IsNull() && !data.ServerRadiusDynamicAuthor.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:server/radius/dynamic-author", data.getPath()))
	}
	if !data.NewModel.IsNull() && !data.NewModel.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:new-model", data.getPath()))
	}

	return emptyLeafsDelete
}

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

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

func (data *AAA) getDeletePaths(ctx context.Context) []string {
	var deletePaths []string
	if !data.LocalAuthenticationMaxFailAttempts.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:local/authentication/attempts/max-fail", data.getPath()))
	}
	if !data.LocalAuthorization.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:local/authentication/authorization/authorization", data.getPath()))
	}
	if !data.LocalAuthenticationType.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:local/authentication/authorization/authen-type", data.getPath()))
	}
	for i := range data.GroupServerTacacsplus {
		keyValues := [...]string{data.GroupServerTacacsplus[i].Name.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/tacacsplus=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.GroupServerRadius {
		keyValues := [...]string{data.GroupServerRadius[i].Name.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:group/server/radius=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.ServerRadiusDynamicAuthorClients {
		keyValues := [...]string{data.ServerRadiusDynamicAuthorClients[i].Ip.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:server/radius/dynamic-author/client=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	if !data.SessionId.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:session-id", data.getPath()))
	}
	if !data.ServerRadiusDynamicAuthor.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:server/radius/dynamic-author", data.getPath()))
	}
	if !data.NewModel.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-aaa:new-model", data.getPath()))
	}

	return deletePaths
}

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