// 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 AAAAuthentication struct {
	Device                    types.String              `tfsdk:"device"`
	Id                        types.String              `tfsdk:"id"`
	DeleteMode                types.String              `tfsdk:"delete_mode"`
	Logins                    []AAAAuthenticationLogins `tfsdk:"logins"`
	Dot1x                     []AAAAuthenticationDot1x  `tfsdk:"dot1x"`
	Dot1xDefaultA1Group       types.String              `tfsdk:"dot1x_default_a1_group"`
	Dot1xDefaultA1Local       types.Bool                `tfsdk:"dot1x_default_a1_local"`
	Dot1xDefaultA2Group       types.String              `tfsdk:"dot1x_default_a2_group"`
	Dot1xDefaultA2Local       types.Bool                `tfsdk:"dot1x_default_a2_local"`
	Dot1xDefaultA3Group       types.String              `tfsdk:"dot1x_default_a3_group"`
	Dot1xDefaultA3Local       types.Bool                `tfsdk:"dot1x_default_a3_local"`
	Dot1xDefaultA4Group       types.String              `tfsdk:"dot1x_default_a4_group"`
	Dot1xDefaultA4Local       types.Bool                `tfsdk:"dot1x_default_a4_local"`
	EnableDefaultGroup1Cache  types.String              `tfsdk:"enable_default_group1_cache"`
	EnableDefaultGroup1Enable types.Bool                `tfsdk:"enable_default_group1_enable"`
	EnableDefaultGroup1Group  types.String              `tfsdk:"enable_default_group1_group"`
	EnableDefaultGroup1Line   types.Bool                `tfsdk:"enable_default_group1_line"`
	EnableDefaultGroup1None   types.Bool                `tfsdk:"enable_default_group1_none"`
	EnableDefaultGroup2Cache  types.String              `tfsdk:"enable_default_group2_cache"`
	EnableDefaultGroup2Enable types.Bool                `tfsdk:"enable_default_group2_enable"`
	EnableDefaultGroup2Group  types.String              `tfsdk:"enable_default_group2_group"`
	EnableDefaultGroup2Line   types.Bool                `tfsdk:"enable_default_group2_line"`
	EnableDefaultGroup2None   types.Bool                `tfsdk:"enable_default_group2_none"`
	EnableDefaultGroup3Cache  types.String              `tfsdk:"enable_default_group3_cache"`
	EnableDefaultGroup3Enable types.Bool                `tfsdk:"enable_default_group3_enable"`
	EnableDefaultGroup3Group  types.String              `tfsdk:"enable_default_group3_group"`
	EnableDefaultGroup3Line   types.Bool                `tfsdk:"enable_default_group3_line"`
	EnableDefaultGroup3None   types.Bool                `tfsdk:"enable_default_group3_none"`
	EnableDefaultGroup4Cache  types.String              `tfsdk:"enable_default_group4_cache"`
	EnableDefaultGroup4Enable types.Bool                `tfsdk:"enable_default_group4_enable"`
	EnableDefaultGroup4Group  types.String              `tfsdk:"enable_default_group4_group"`
	EnableDefaultGroup4Line   types.Bool                `tfsdk:"enable_default_group4_line"`
	EnableDefaultGroup4None   types.Bool                `tfsdk:"enable_default_group4_none"`
}

type AAAAuthenticationData struct {
	Device                    types.String              `tfsdk:"device"`
	Id                        types.String              `tfsdk:"id"`
	Logins                    []AAAAuthenticationLogins `tfsdk:"logins"`
	Dot1x                     []AAAAuthenticationDot1x  `tfsdk:"dot1x"`
	Dot1xDefaultA1Group       types.String              `tfsdk:"dot1x_default_a1_group"`
	Dot1xDefaultA1Local       types.Bool                `tfsdk:"dot1x_default_a1_local"`
	Dot1xDefaultA2Group       types.String              `tfsdk:"dot1x_default_a2_group"`
	Dot1xDefaultA2Local       types.Bool                `tfsdk:"dot1x_default_a2_local"`
	Dot1xDefaultA3Group       types.String              `tfsdk:"dot1x_default_a3_group"`
	Dot1xDefaultA3Local       types.Bool                `tfsdk:"dot1x_default_a3_local"`
	Dot1xDefaultA4Group       types.String              `tfsdk:"dot1x_default_a4_group"`
	Dot1xDefaultA4Local       types.Bool                `tfsdk:"dot1x_default_a4_local"`
	EnableDefaultGroup1Cache  types.String              `tfsdk:"enable_default_group1_cache"`
	EnableDefaultGroup1Enable types.Bool                `tfsdk:"enable_default_group1_enable"`
	EnableDefaultGroup1Group  types.String              `tfsdk:"enable_default_group1_group"`
	EnableDefaultGroup1Line   types.Bool                `tfsdk:"enable_default_group1_line"`
	EnableDefaultGroup1None   types.Bool                `tfsdk:"enable_default_group1_none"`
	EnableDefaultGroup2Cache  types.String              `tfsdk:"enable_default_group2_cache"`
	EnableDefaultGroup2Enable types.Bool                `tfsdk:"enable_default_group2_enable"`
	EnableDefaultGroup2Group  types.String              `tfsdk:"enable_default_group2_group"`
	EnableDefaultGroup2Line   types.Bool                `tfsdk:"enable_default_group2_line"`
	EnableDefaultGroup2None   types.Bool                `tfsdk:"enable_default_group2_none"`
	EnableDefaultGroup3Cache  types.String              `tfsdk:"enable_default_group3_cache"`
	EnableDefaultGroup3Enable types.Bool                `tfsdk:"enable_default_group3_enable"`
	EnableDefaultGroup3Group  types.String              `tfsdk:"enable_default_group3_group"`
	EnableDefaultGroup3Line   types.Bool                `tfsdk:"enable_default_group3_line"`
	EnableDefaultGroup3None   types.Bool                `tfsdk:"enable_default_group3_none"`
	EnableDefaultGroup4Cache  types.String              `tfsdk:"enable_default_group4_cache"`
	EnableDefaultGroup4Enable types.Bool                `tfsdk:"enable_default_group4_enable"`
	EnableDefaultGroup4Group  types.String              `tfsdk:"enable_default_group4_group"`
	EnableDefaultGroup4Line   types.Bool                `tfsdk:"enable_default_group4_line"`
	EnableDefaultGroup4None   types.Bool                `tfsdk:"enable_default_group4_none"`
}
type AAAAuthenticationLogins struct {
	Name     types.String `tfsdk:"name"`
	A1None   types.Bool   `tfsdk:"a1_none"`
	A1Line   types.Bool   `tfsdk:"a1_line"`
	A1Enable types.Bool   `tfsdk:"a1_enable"`
	A1Local  types.Bool   `tfsdk:"a1_local"`
	A1Group  types.String `tfsdk:"a1_group"`
	A2None   types.Bool   `tfsdk:"a2_none"`
	A2Line   types.Bool   `tfsdk:"a2_line"`
	A2Enable types.Bool   `tfsdk:"a2_enable"`
	A2Local  types.Bool   `tfsdk:"a2_local"`
	A2Group  types.String `tfsdk:"a2_group"`
	A3None   types.Bool   `tfsdk:"a3_none"`
	A3Line   types.Bool   `tfsdk:"a3_line"`
	A3Enable types.Bool   `tfsdk:"a3_enable"`
	A3Local  types.Bool   `tfsdk:"a3_local"`
	A3Group  types.String `tfsdk:"a3_group"`
	A4None   types.Bool   `tfsdk:"a4_none"`
	A4Line   types.Bool   `tfsdk:"a4_line"`
	A4Enable types.Bool   `tfsdk:"a4_enable"`
	A4Local  types.Bool   `tfsdk:"a4_local"`
	A4Group  types.String `tfsdk:"a4_group"`
}
type AAAAuthenticationDot1x struct {
	Name     types.String `tfsdk:"name"`
	A1Group  types.String `tfsdk:"a1_group"`
	A1Local  types.Bool   `tfsdk:"a1_local"`
	A1Cache  types.String `tfsdk:"a1_cache"`
	A1Radius types.Bool   `tfsdk:"a1_radius"`
	A2Group  types.String `tfsdk:"a2_group"`
	A2Local  types.Bool   `tfsdk:"a2_local"`
	A2Cache  types.String `tfsdk:"a2_cache"`
	A2Radius types.Bool   `tfsdk:"a2_radius"`
	A3Group  types.String `tfsdk:"a3_group"`
	A3Local  types.Bool   `tfsdk:"a3_local"`
	A3Cache  types.String `tfsdk:"a3_cache"`
	A3Radius types.Bool   `tfsdk:"a3_radius"`
	A4Group  types.String `tfsdk:"a4_group"`
	A4Local  types.Bool   `tfsdk:"a4_local"`
	A4Cache  types.String `tfsdk:"a4_cache"`
	A4Radius types.Bool   `tfsdk:"a4_radius"`
}

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

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

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

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

// if last path element has a key -> remove it
func (data AAAAuthentication) 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 AAAAuthentication) toBody(ctx context.Context) string {
	body := `{"` + helpers.LastElement(data.getPath()) + `":{}}`
	if !data.Dot1xDefaultA1Group.IsNull() && !data.Dot1xDefaultA1Group.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.default.a1-config.group", data.Dot1xDefaultA1Group.ValueString())
	}
	if !data.Dot1xDefaultA1Local.IsNull() && !data.Dot1xDefaultA1Local.IsUnknown() {
		if data.Dot1xDefaultA1Local.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.default.a1-config.local", map[string]string{})
		}
	}
	if !data.Dot1xDefaultA2Group.IsNull() && !data.Dot1xDefaultA2Group.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.default.a2-config.group", data.Dot1xDefaultA2Group.ValueString())
	}
	if !data.Dot1xDefaultA2Local.IsNull() && !data.Dot1xDefaultA2Local.IsUnknown() {
		if data.Dot1xDefaultA2Local.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.default.a2-config.local", map[string]string{})
		}
	}
	if !data.Dot1xDefaultA3Group.IsNull() && !data.Dot1xDefaultA3Group.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.default.a3-config.group", data.Dot1xDefaultA3Group.ValueString())
	}
	if !data.Dot1xDefaultA3Local.IsNull() && !data.Dot1xDefaultA3Local.IsUnknown() {
		if data.Dot1xDefaultA3Local.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.default.a3-config.local", map[string]string{})
		}
	}
	if !data.Dot1xDefaultA4Group.IsNull() && !data.Dot1xDefaultA4Group.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.default.a4-config.group", data.Dot1xDefaultA4Group.ValueString())
	}
	if !data.Dot1xDefaultA4Local.IsNull() && !data.Dot1xDefaultA4Local.IsUnknown() {
		if data.Dot1xDefaultA4Local.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.default.a4-config.local", map[string]string{})
		}
	}
	if !data.EnableDefaultGroup1Cache.IsNull() && !data.EnableDefaultGroup1Cache.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"enable.default.group1.cache", data.EnableDefaultGroup1Cache.ValueString())
	}
	if !data.EnableDefaultGroup1Enable.IsNull() && !data.EnableDefaultGroup1Enable.IsUnknown() {
		if data.EnableDefaultGroup1Enable.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"enable.default.group1.enable", map[string]string{})
		}
	}
	if !data.EnableDefaultGroup1Group.IsNull() && !data.EnableDefaultGroup1Group.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"enable.default.group1.group", data.EnableDefaultGroup1Group.ValueString())
	}
	if !data.EnableDefaultGroup1Line.IsNull() && !data.EnableDefaultGroup1Line.IsUnknown() {
		if data.EnableDefaultGroup1Line.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"enable.default.group1.line", map[string]string{})
		}
	}
	if !data.EnableDefaultGroup1None.IsNull() && !data.EnableDefaultGroup1None.IsUnknown() {
		if data.EnableDefaultGroup1None.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"enable.default.group1.none", map[string]string{})
		}
	}
	if !data.EnableDefaultGroup2Cache.IsNull() && !data.EnableDefaultGroup2Cache.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"enable.default.group2.cache", data.EnableDefaultGroup2Cache.ValueString())
	}
	if !data.EnableDefaultGroup2Enable.IsNull() && !data.EnableDefaultGroup2Enable.IsUnknown() {
		if data.EnableDefaultGroup2Enable.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"enable.default.group2.enable", map[string]string{})
		}
	}
	if !data.EnableDefaultGroup2Group.IsNull() && !data.EnableDefaultGroup2Group.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"enable.default.group2.group", data.EnableDefaultGroup2Group.ValueString())
	}
	if !data.EnableDefaultGroup2Line.IsNull() && !data.EnableDefaultGroup2Line.IsUnknown() {
		if data.EnableDefaultGroup2Line.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"enable.default.group2.line", map[string]string{})
		}
	}
	if !data.EnableDefaultGroup2None.IsNull() && !data.EnableDefaultGroup2None.IsUnknown() {
		if data.EnableDefaultGroup2None.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"enable.default.group2.none", map[string]string{})
		}
	}
	if !data.EnableDefaultGroup3Cache.IsNull() && !data.EnableDefaultGroup3Cache.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"enable.default.group3.cache", data.EnableDefaultGroup3Cache.ValueString())
	}
	if !data.EnableDefaultGroup3Enable.IsNull() && !data.EnableDefaultGroup3Enable.IsUnknown() {
		if data.EnableDefaultGroup3Enable.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"enable.default.group3.enable", map[string]string{})
		}
	}
	if !data.EnableDefaultGroup3Group.IsNull() && !data.EnableDefaultGroup3Group.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"enable.default.group3.group", data.EnableDefaultGroup3Group.ValueString())
	}
	if !data.EnableDefaultGroup3Line.IsNull() && !data.EnableDefaultGroup3Line.IsUnknown() {
		if data.EnableDefaultGroup3Line.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"enable.default.group3.line", map[string]string{})
		}
	}
	if !data.EnableDefaultGroup3None.IsNull() && !data.EnableDefaultGroup3None.IsUnknown() {
		if data.EnableDefaultGroup3None.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"enable.default.group3.none", map[string]string{})
		}
	}
	if !data.EnableDefaultGroup4Cache.IsNull() && !data.EnableDefaultGroup4Cache.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"enable.default.group4.cache", data.EnableDefaultGroup4Cache.ValueString())
	}
	if !data.EnableDefaultGroup4Enable.IsNull() && !data.EnableDefaultGroup4Enable.IsUnknown() {
		if data.EnableDefaultGroup4Enable.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"enable.default.group4.enable", map[string]string{})
		}
	}
	if !data.EnableDefaultGroup4Group.IsNull() && !data.EnableDefaultGroup4Group.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"enable.default.group4.group", data.EnableDefaultGroup4Group.ValueString())
	}
	if !data.EnableDefaultGroup4Line.IsNull() && !data.EnableDefaultGroup4Line.IsUnknown() {
		if data.EnableDefaultGroup4Line.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"enable.default.group4.line", map[string]string{})
		}
	}
	if !data.EnableDefaultGroup4None.IsNull() && !data.EnableDefaultGroup4None.IsUnknown() {
		if data.EnableDefaultGroup4None.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"enable.default.group4.none", map[string]string{})
		}
	}
	if len(data.Logins) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login", []interface{}{})
		for index, item := range data.Logins {
			if !item.Name.IsNull() && !item.Name.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login"+"."+strconv.Itoa(index)+"."+"name", item.Name.ValueString())
			}
			if !item.A1None.IsNull() && !item.A1None.IsUnknown() {
				if item.A1None.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login"+"."+strconv.Itoa(index)+"."+"a1.none", map[string]string{})
				}
			}
			if !item.A1Line.IsNull() && !item.A1Line.IsUnknown() {
				if item.A1Line.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login"+"."+strconv.Itoa(index)+"."+"a1.line", map[string]string{})
				}
			}
			if !item.A1Enable.IsNull() && !item.A1Enable.IsUnknown() {
				if item.A1Enable.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login"+"."+strconv.Itoa(index)+"."+"a1.enable", map[string]string{})
				}
			}
			if !item.A1Local.IsNull() && !item.A1Local.IsUnknown() {
				if item.A1Local.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login"+"."+strconv.Itoa(index)+"."+"a1.local", map[string]string{})
				}
			}
			if !item.A1Group.IsNull() && !item.A1Group.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login"+"."+strconv.Itoa(index)+"."+"a1.group", item.A1Group.ValueString())
			}
			if !item.A2None.IsNull() && !item.A2None.IsUnknown() {
				if item.A2None.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login"+"."+strconv.Itoa(index)+"."+"a2.none", map[string]string{})
				}
			}
			if !item.A2Line.IsNull() && !item.A2Line.IsUnknown() {
				if item.A2Line.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login"+"."+strconv.Itoa(index)+"."+"a2.line", map[string]string{})
				}
			}
			if !item.A2Enable.IsNull() && !item.A2Enable.IsUnknown() {
				if item.A2Enable.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login"+"."+strconv.Itoa(index)+"."+"a2.enable", map[string]string{})
				}
			}
			if !item.A2Local.IsNull() && !item.A2Local.IsUnknown() {
				if item.A2Local.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login"+"."+strconv.Itoa(index)+"."+"a2.local", map[string]string{})
				}
			}
			if !item.A2Group.IsNull() && !item.A2Group.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login"+"."+strconv.Itoa(index)+"."+"a2.group", item.A2Group.ValueString())
			}
			if !item.A3None.IsNull() && !item.A3None.IsUnknown() {
				if item.A3None.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login"+"."+strconv.Itoa(index)+"."+"a3.none", map[string]string{})
				}
			}
			if !item.A3Line.IsNull() && !item.A3Line.IsUnknown() {
				if item.A3Line.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login"+"."+strconv.Itoa(index)+"."+"a3.line", map[string]string{})
				}
			}
			if !item.A3Enable.IsNull() && !item.A3Enable.IsUnknown() {
				if item.A3Enable.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login"+"."+strconv.Itoa(index)+"."+"a3.enable", map[string]string{})
				}
			}
			if !item.A3Local.IsNull() && !item.A3Local.IsUnknown() {
				if item.A3Local.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login"+"."+strconv.Itoa(index)+"."+"a3.local", map[string]string{})
				}
			}
			if !item.A3Group.IsNull() && !item.A3Group.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login"+"."+strconv.Itoa(index)+"."+"a3.group", item.A3Group.ValueString())
			}
			if !item.A4None.IsNull() && !item.A4None.IsUnknown() {
				if item.A4None.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login"+"."+strconv.Itoa(index)+"."+"a4.none", map[string]string{})
				}
			}
			if !item.A4Line.IsNull() && !item.A4Line.IsUnknown() {
				if item.A4Line.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login"+"."+strconv.Itoa(index)+"."+"a4.line", map[string]string{})
				}
			}
			if !item.A4Enable.IsNull() && !item.A4Enable.IsUnknown() {
				if item.A4Enable.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login"+"."+strconv.Itoa(index)+"."+"a4.enable", map[string]string{})
				}
			}
			if !item.A4Local.IsNull() && !item.A4Local.IsUnknown() {
				if item.A4Local.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login"+"."+strconv.Itoa(index)+"."+"a4.local", map[string]string{})
				}
			}
			if !item.A4Group.IsNull() && !item.A4Group.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"login"+"."+strconv.Itoa(index)+"."+"a4.group", item.A4Group.ValueString())
			}
		}
	}
	if len(data.Dot1x) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.dot1x-list", []interface{}{})
		for index, item := range data.Dot1x {
			if !item.Name.IsNull() && !item.Name.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.dot1x-list"+"."+strconv.Itoa(index)+"."+"name", item.Name.ValueString())
			}
			if !item.A1Group.IsNull() && !item.A1Group.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.dot1x-list"+"."+strconv.Itoa(index)+"."+"a1-config.group", item.A1Group.ValueString())
			}
			if !item.A1Local.IsNull() && !item.A1Local.IsUnknown() {
				if item.A1Local.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.dot1x-list"+"."+strconv.Itoa(index)+"."+"a1-config.local", map[string]string{})
				}
			}
			if !item.A1Cache.IsNull() && !item.A1Cache.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.dot1x-list"+"."+strconv.Itoa(index)+"."+"a1-config.cache", item.A1Cache.ValueString())
			}
			if !item.A1Radius.IsNull() && !item.A1Radius.IsUnknown() {
				if item.A1Radius.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.dot1x-list"+"."+strconv.Itoa(index)+"."+"a1-config.radius", map[string]string{})
				}
			}
			if !item.A2Group.IsNull() && !item.A2Group.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.dot1x-list"+"."+strconv.Itoa(index)+"."+"a2-config.group", item.A2Group.ValueString())
			}
			if !item.A2Local.IsNull() && !item.A2Local.IsUnknown() {
				if item.A2Local.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.dot1x-list"+"."+strconv.Itoa(index)+"."+"a2-config.local", map[string]string{})
				}
			}
			if !item.A2Cache.IsNull() && !item.A2Cache.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.dot1x-list"+"."+strconv.Itoa(index)+"."+"a2-config.cache", item.A2Cache.ValueString())
			}
			if !item.A2Radius.IsNull() && !item.A2Radius.IsUnknown() {
				if item.A2Radius.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.dot1x-list"+"."+strconv.Itoa(index)+"."+"a2-config.radius", map[string]string{})
				}
			}
			if !item.A3Group.IsNull() && !item.A3Group.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.dot1x-list"+"."+strconv.Itoa(index)+"."+"a3-config.group", item.A3Group.ValueString())
			}
			if !item.A3Local.IsNull() && !item.A3Local.IsUnknown() {
				if item.A3Local.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.dot1x-list"+"."+strconv.Itoa(index)+"."+"a3-config.local", map[string]string{})
				}
			}
			if !item.A3Cache.IsNull() && !item.A3Cache.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.dot1x-list"+"."+strconv.Itoa(index)+"."+"a3-config.cache", item.A3Cache.ValueString())
			}
			if !item.A3Radius.IsNull() && !item.A3Radius.IsUnknown() {
				if item.A3Radius.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.dot1x-list"+"."+strconv.Itoa(index)+"."+"a3-config.radius", map[string]string{})
				}
			}
			if !item.A4Group.IsNull() && !item.A4Group.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.dot1x-list"+"."+strconv.Itoa(index)+"."+"a4-config.group", item.A4Group.ValueString())
			}
			if !item.A4Local.IsNull() && !item.A4Local.IsUnknown() {
				if item.A4Local.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.dot1x-list"+"."+strconv.Itoa(index)+"."+"a4-config.local", map[string]string{})
				}
			}
			if !item.A4Cache.IsNull() && !item.A4Cache.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.dot1x-list"+"."+strconv.Itoa(index)+"."+"a4-config.cache", item.A4Cache.ValueString())
			}
			if !item.A4Radius.IsNull() && !item.A4Radius.IsUnknown() {
				if item.A4Radius.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"dot1x.dot1x-list"+"."+strconv.Itoa(index)+"."+"a4-config.radius", map[string]string{})
				}
			}
		}
	}
	return body
}

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

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

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

		var r gjson.Result
		res.Get(prefix + "login").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.Logins[i].Name.IsNull() {
			data.Logins[i].Name = types.StringValue(value.String())
		} else {
			data.Logins[i].Name = types.StringNull()
		}
		if value := r.Get("a1.none"); !data.Logins[i].A1None.IsNull() {
			if value.Exists() {
				data.Logins[i].A1None = types.BoolValue(true)
			} else {
				data.Logins[i].A1None = types.BoolValue(false)
			}
		} else {
			data.Logins[i].A1None = types.BoolNull()
		}
		if value := r.Get("a1.line"); !data.Logins[i].A1Line.IsNull() {
			if value.Exists() {
				data.Logins[i].A1Line = types.BoolValue(true)
			} else {
				data.Logins[i].A1Line = types.BoolValue(false)
			}
		} else {
			data.Logins[i].A1Line = types.BoolNull()
		}
		if value := r.Get("a1.enable"); !data.Logins[i].A1Enable.IsNull() {
			if value.Exists() {
				data.Logins[i].A1Enable = types.BoolValue(true)
			} else {
				data.Logins[i].A1Enable = types.BoolValue(false)
			}
		} else {
			data.Logins[i].A1Enable = types.BoolNull()
		}
		if value := r.Get("a1.local"); !data.Logins[i].A1Local.IsNull() {
			if value.Exists() {
				data.Logins[i].A1Local = types.BoolValue(true)
			} else {
				data.Logins[i].A1Local = types.BoolValue(false)
			}
		} else {
			data.Logins[i].A1Local = types.BoolNull()
		}
		if value := r.Get("a1.group"); value.Exists() && !data.Logins[i].A1Group.IsNull() {
			data.Logins[i].A1Group = types.StringValue(value.String())
		} else {
			data.Logins[i].A1Group = types.StringNull()
		}
		if value := r.Get("a2.none"); !data.Logins[i].A2None.IsNull() {
			if value.Exists() {
				data.Logins[i].A2None = types.BoolValue(true)
			} else {
				data.Logins[i].A2None = types.BoolValue(false)
			}
		} else {
			data.Logins[i].A2None = types.BoolNull()
		}
		if value := r.Get("a2.line"); !data.Logins[i].A2Line.IsNull() {
			if value.Exists() {
				data.Logins[i].A2Line = types.BoolValue(true)
			} else {
				data.Logins[i].A2Line = types.BoolValue(false)
			}
		} else {
			data.Logins[i].A2Line = types.BoolNull()
		}
		if value := r.Get("a2.enable"); !data.Logins[i].A2Enable.IsNull() {
			if value.Exists() {
				data.Logins[i].A2Enable = types.BoolValue(true)
			} else {
				data.Logins[i].A2Enable = types.BoolValue(false)
			}
		} else {
			data.Logins[i].A2Enable = types.BoolNull()
		}
		if value := r.Get("a2.local"); !data.Logins[i].A2Local.IsNull() {
			if value.Exists() {
				data.Logins[i].A2Local = types.BoolValue(true)
			} else {
				data.Logins[i].A2Local = types.BoolValue(false)
			}
		} else {
			data.Logins[i].A2Local = types.BoolNull()
		}
		if value := r.Get("a2.group"); value.Exists() && !data.Logins[i].A2Group.IsNull() {
			data.Logins[i].A2Group = types.StringValue(value.String())
		} else {
			data.Logins[i].A2Group = types.StringNull()
		}
		if value := r.Get("a3.none"); !data.Logins[i].A3None.IsNull() {
			if value.Exists() {
				data.Logins[i].A3None = types.BoolValue(true)
			} else {
				data.Logins[i].A3None = types.BoolValue(false)
			}
		} else {
			data.Logins[i].A3None = types.BoolNull()
		}
		if value := r.Get("a3.line"); !data.Logins[i].A3Line.IsNull() {
			if value.Exists() {
				data.Logins[i].A3Line = types.BoolValue(true)
			} else {
				data.Logins[i].A3Line = types.BoolValue(false)
			}
		} else {
			data.Logins[i].A3Line = types.BoolNull()
		}
		if value := r.Get("a3.enable"); !data.Logins[i].A3Enable.IsNull() {
			if value.Exists() {
				data.Logins[i].A3Enable = types.BoolValue(true)
			} else {
				data.Logins[i].A3Enable = types.BoolValue(false)
			}
		} else {
			data.Logins[i].A3Enable = types.BoolNull()
		}
		if value := r.Get("a3.local"); !data.Logins[i].A3Local.IsNull() {
			if value.Exists() {
				data.Logins[i].A3Local = types.BoolValue(true)
			} else {
				data.Logins[i].A3Local = types.BoolValue(false)
			}
		} else {
			data.Logins[i].A3Local = types.BoolNull()
		}
		if value := r.Get("a3.group"); value.Exists() && !data.Logins[i].A3Group.IsNull() {
			data.Logins[i].A3Group = types.StringValue(value.String())
		} else {
			data.Logins[i].A3Group = types.StringNull()
		}
		if value := r.Get("a4.none"); !data.Logins[i].A4None.IsNull() {
			if value.Exists() {
				data.Logins[i].A4None = types.BoolValue(true)
			} else {
				data.Logins[i].A4None = types.BoolValue(false)
			}
		} else {
			data.Logins[i].A4None = types.BoolNull()
		}
		if value := r.Get("a4.line"); !data.Logins[i].A4Line.IsNull() {
			if value.Exists() {
				data.Logins[i].A4Line = types.BoolValue(true)
			} else {
				data.Logins[i].A4Line = types.BoolValue(false)
			}
		} else {
			data.Logins[i].A4Line = types.BoolNull()
		}
		if value := r.Get("a4.enable"); !data.Logins[i].A4Enable.IsNull() {
			if value.Exists() {
				data.Logins[i].A4Enable = types.BoolValue(true)
			} else {
				data.Logins[i].A4Enable = types.BoolValue(false)
			}
		} else {
			data.Logins[i].A4Enable = types.BoolNull()
		}
		if value := r.Get("a4.local"); !data.Logins[i].A4Local.IsNull() {
			if value.Exists() {
				data.Logins[i].A4Local = types.BoolValue(true)
			} else {
				data.Logins[i].A4Local = types.BoolValue(false)
			}
		} else {
			data.Logins[i].A4Local = types.BoolNull()
		}
		if value := r.Get("a4.group"); value.Exists() && !data.Logins[i].A4Group.IsNull() {
			data.Logins[i].A4Group = types.StringValue(value.String())
		} else {
			data.Logins[i].A4Group = types.StringNull()
		}
	}
	for i := range data.Dot1x {
		keys := [...]string{"name"}
		keyValues := [...]string{data.Dot1x[i].Name.ValueString()}

		var r gjson.Result
		res.Get(prefix + "dot1x.dot1x-list").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.Dot1x[i].Name.IsNull() {
			data.Dot1x[i].Name = types.StringValue(value.String())
		} else {
			data.Dot1x[i].Name = types.StringNull()
		}
		if value := r.Get("a1-config.group"); value.Exists() && !data.Dot1x[i].A1Group.IsNull() {
			data.Dot1x[i].A1Group = types.StringValue(value.String())
		} else {
			data.Dot1x[i].A1Group = types.StringNull()
		}
		if value := r.Get("a1-config.local"); !data.Dot1x[i].A1Local.IsNull() {
			if value.Exists() {
				data.Dot1x[i].A1Local = types.BoolValue(true)
			} else {
				data.Dot1x[i].A1Local = types.BoolValue(false)
			}
		} else {
			data.Dot1x[i].A1Local = types.BoolNull()
		}
		if value := r.Get("a1-config.cache"); value.Exists() && !data.Dot1x[i].A1Cache.IsNull() {
			data.Dot1x[i].A1Cache = types.StringValue(value.String())
		} else {
			data.Dot1x[i].A1Cache = types.StringNull()
		}
		if value := r.Get("a1-config.radius"); !data.Dot1x[i].A1Radius.IsNull() {
			if value.Exists() {
				data.Dot1x[i].A1Radius = types.BoolValue(true)
			} else {
				data.Dot1x[i].A1Radius = types.BoolValue(false)
			}
		} else {
			data.Dot1x[i].A1Radius = types.BoolNull()
		}
		if value := r.Get("a2-config.group"); value.Exists() && !data.Dot1x[i].A2Group.IsNull() {
			data.Dot1x[i].A2Group = types.StringValue(value.String())
		} else {
			data.Dot1x[i].A2Group = types.StringNull()
		}
		if value := r.Get("a2-config.local"); !data.Dot1x[i].A2Local.IsNull() {
			if value.Exists() {
				data.Dot1x[i].A2Local = types.BoolValue(true)
			} else {
				data.Dot1x[i].A2Local = types.BoolValue(false)
			}
		} else {
			data.Dot1x[i].A2Local = types.BoolNull()
		}
		if value := r.Get("a2-config.cache"); value.Exists() && !data.Dot1x[i].A2Cache.IsNull() {
			data.Dot1x[i].A2Cache = types.StringValue(value.String())
		} else {
			data.Dot1x[i].A2Cache = types.StringNull()
		}
		if value := r.Get("a2-config.radius"); !data.Dot1x[i].A2Radius.IsNull() {
			if value.Exists() {
				data.Dot1x[i].A2Radius = types.BoolValue(true)
			} else {
				data.Dot1x[i].A2Radius = types.BoolValue(false)
			}
		} else {
			data.Dot1x[i].A2Radius = types.BoolNull()
		}
		if value := r.Get("a3-config.group"); value.Exists() && !data.Dot1x[i].A3Group.IsNull() {
			data.Dot1x[i].A3Group = types.StringValue(value.String())
		} else {
			data.Dot1x[i].A3Group = types.StringNull()
		}
		if value := r.Get("a3-config.local"); !data.Dot1x[i].A3Local.IsNull() {
			if value.Exists() {
				data.Dot1x[i].A3Local = types.BoolValue(true)
			} else {
				data.Dot1x[i].A3Local = types.BoolValue(false)
			}
		} else {
			data.Dot1x[i].A3Local = types.BoolNull()
		}
		if value := r.Get("a3-config.cache"); value.Exists() && !data.Dot1x[i].A3Cache.IsNull() {
			data.Dot1x[i].A3Cache = types.StringValue(value.String())
		} else {
			data.Dot1x[i].A3Cache = types.StringNull()
		}
		if value := r.Get("a3-config.radius"); !data.Dot1x[i].A3Radius.IsNull() {
			if value.Exists() {
				data.Dot1x[i].A3Radius = types.BoolValue(true)
			} else {
				data.Dot1x[i].A3Radius = types.BoolValue(false)
			}
		} else {
			data.Dot1x[i].A3Radius = types.BoolNull()
		}
		if value := r.Get("a4-config.group"); value.Exists() && !data.Dot1x[i].A4Group.IsNull() {
			data.Dot1x[i].A4Group = types.StringValue(value.String())
		} else {
			data.Dot1x[i].A4Group = types.StringNull()
		}
		if value := r.Get("a4-config.local"); !data.Dot1x[i].A4Local.IsNull() {
			if value.Exists() {
				data.Dot1x[i].A4Local = types.BoolValue(true)
			} else {
				data.Dot1x[i].A4Local = types.BoolValue(false)
			}
		} else {
			data.Dot1x[i].A4Local = types.BoolNull()
		}
		if value := r.Get("a4-config.cache"); value.Exists() && !data.Dot1x[i].A4Cache.IsNull() {
			data.Dot1x[i].A4Cache = types.StringValue(value.String())
		} else {
			data.Dot1x[i].A4Cache = types.StringNull()
		}
		if value := r.Get("a4-config.radius"); !data.Dot1x[i].A4Radius.IsNull() {
			if value.Exists() {
				data.Dot1x[i].A4Radius = types.BoolValue(true)
			} else {
				data.Dot1x[i].A4Radius = types.BoolValue(false)
			}
		} else {
			data.Dot1x[i].A4Radius = types.BoolNull()
		}
	}
	if value := res.Get(prefix + "dot1x.default.a1-config.group"); value.Exists() && !data.Dot1xDefaultA1Group.IsNull() {
		data.Dot1xDefaultA1Group = types.StringValue(value.String())
	} else {
		data.Dot1xDefaultA1Group = types.StringNull()
	}
	if value := res.Get(prefix + "dot1x.default.a1-config.local"); !data.Dot1xDefaultA1Local.IsNull() {
		if value.Exists() {
			data.Dot1xDefaultA1Local = types.BoolValue(true)
		} else {
			data.Dot1xDefaultA1Local = types.BoolValue(false)
		}
	} else {
		data.Dot1xDefaultA1Local = types.BoolNull()
	}
	if value := res.Get(prefix + "dot1x.default.a2-config.group"); value.Exists() && !data.Dot1xDefaultA2Group.IsNull() {
		data.Dot1xDefaultA2Group = types.StringValue(value.String())
	} else {
		data.Dot1xDefaultA2Group = types.StringNull()
	}
	if value := res.Get(prefix + "dot1x.default.a2-config.local"); !data.Dot1xDefaultA2Local.IsNull() {
		if value.Exists() {
			data.Dot1xDefaultA2Local = types.BoolValue(true)
		} else {
			data.Dot1xDefaultA2Local = types.BoolValue(false)
		}
	} else {
		data.Dot1xDefaultA2Local = types.BoolNull()
	}
	if value := res.Get(prefix + "dot1x.default.a3-config.group"); value.Exists() && !data.Dot1xDefaultA3Group.IsNull() {
		data.Dot1xDefaultA3Group = types.StringValue(value.String())
	} else {
		data.Dot1xDefaultA3Group = types.StringNull()
	}
	if value := res.Get(prefix + "dot1x.default.a3-config.local"); !data.Dot1xDefaultA3Local.IsNull() {
		if value.Exists() {
			data.Dot1xDefaultA3Local = types.BoolValue(true)
		} else {
			data.Dot1xDefaultA3Local = types.BoolValue(false)
		}
	} else {
		data.Dot1xDefaultA3Local = types.BoolNull()
	}
	if value := res.Get(prefix + "dot1x.default.a4-config.group"); value.Exists() && !data.Dot1xDefaultA4Group.IsNull() {
		data.Dot1xDefaultA4Group = types.StringValue(value.String())
	} else {
		data.Dot1xDefaultA4Group = types.StringNull()
	}
	if value := res.Get(prefix + "dot1x.default.a4-config.local"); !data.Dot1xDefaultA4Local.IsNull() {
		if value.Exists() {
			data.Dot1xDefaultA4Local = types.BoolValue(true)
		} else {
			data.Dot1xDefaultA4Local = types.BoolValue(false)
		}
	} else {
		data.Dot1xDefaultA4Local = types.BoolNull()
	}
	if value := res.Get(prefix + "enable.default.group1.cache"); value.Exists() && !data.EnableDefaultGroup1Cache.IsNull() {
		data.EnableDefaultGroup1Cache = types.StringValue(value.String())
	} else {
		data.EnableDefaultGroup1Cache = types.StringNull()
	}
	if value := res.Get(prefix + "enable.default.group1.enable"); !data.EnableDefaultGroup1Enable.IsNull() {
		if value.Exists() {
			data.EnableDefaultGroup1Enable = types.BoolValue(true)
		} else {
			data.EnableDefaultGroup1Enable = types.BoolValue(false)
		}
	} else {
		data.EnableDefaultGroup1Enable = types.BoolNull()
	}
	if value := res.Get(prefix + "enable.default.group1.group"); value.Exists() && !data.EnableDefaultGroup1Group.IsNull() {
		data.EnableDefaultGroup1Group = types.StringValue(value.String())
	} else {
		data.EnableDefaultGroup1Group = types.StringNull()
	}
	if value := res.Get(prefix + "enable.default.group1.line"); !data.EnableDefaultGroup1Line.IsNull() {
		if value.Exists() {
			data.EnableDefaultGroup1Line = types.BoolValue(true)
		} else {
			data.EnableDefaultGroup1Line = types.BoolValue(false)
		}
	} else {
		data.EnableDefaultGroup1Line = types.BoolNull()
	}
	if value := res.Get(prefix + "enable.default.group1.none"); !data.EnableDefaultGroup1None.IsNull() {
		if value.Exists() {
			data.EnableDefaultGroup1None = types.BoolValue(true)
		} else {
			data.EnableDefaultGroup1None = types.BoolValue(false)
		}
	} else {
		data.EnableDefaultGroup1None = types.BoolNull()
	}
	if value := res.Get(prefix + "enable.default.group2.cache"); value.Exists() && !data.EnableDefaultGroup2Cache.IsNull() {
		data.EnableDefaultGroup2Cache = types.StringValue(value.String())
	} else {
		data.EnableDefaultGroup2Cache = types.StringNull()
	}
	if value := res.Get(prefix + "enable.default.group2.enable"); !data.EnableDefaultGroup2Enable.IsNull() {
		if value.Exists() {
			data.EnableDefaultGroup2Enable = types.BoolValue(true)
		} else {
			data.EnableDefaultGroup2Enable = types.BoolValue(false)
		}
	} else {
		data.EnableDefaultGroup2Enable = types.BoolNull()
	}
	if value := res.Get(prefix + "enable.default.group2.group"); value.Exists() && !data.EnableDefaultGroup2Group.IsNull() {
		data.EnableDefaultGroup2Group = types.StringValue(value.String())
	} else {
		data.EnableDefaultGroup2Group = types.StringNull()
	}
	if value := res.Get(prefix + "enable.default.group2.line"); !data.EnableDefaultGroup2Line.IsNull() {
		if value.Exists() {
			data.EnableDefaultGroup2Line = types.BoolValue(true)
		} else {
			data.EnableDefaultGroup2Line = types.BoolValue(false)
		}
	} else {
		data.EnableDefaultGroup2Line = types.BoolNull()
	}
	if value := res.Get(prefix + "enable.default.group2.none"); !data.EnableDefaultGroup2None.IsNull() {
		if value.Exists() {
			data.EnableDefaultGroup2None = types.BoolValue(true)
		} else {
			data.EnableDefaultGroup2None = types.BoolValue(false)
		}
	} else {
		data.EnableDefaultGroup2None = types.BoolNull()
	}
	if value := res.Get(prefix + "enable.default.group3.cache"); value.Exists() && !data.EnableDefaultGroup3Cache.IsNull() {
		data.EnableDefaultGroup3Cache = types.StringValue(value.String())
	} else {
		data.EnableDefaultGroup3Cache = types.StringNull()
	}
	if value := res.Get(prefix + "enable.default.group3.enable"); !data.EnableDefaultGroup3Enable.IsNull() {
		if value.Exists() {
			data.EnableDefaultGroup3Enable = types.BoolValue(true)
		} else {
			data.EnableDefaultGroup3Enable = types.BoolValue(false)
		}
	} else {
		data.EnableDefaultGroup3Enable = types.BoolNull()
	}
	if value := res.Get(prefix + "enable.default.group3.group"); value.Exists() && !data.EnableDefaultGroup3Group.IsNull() {
		data.EnableDefaultGroup3Group = types.StringValue(value.String())
	} else {
		data.EnableDefaultGroup3Group = types.StringNull()
	}
	if value := res.Get(prefix + "enable.default.group3.line"); !data.EnableDefaultGroup3Line.IsNull() {
		if value.Exists() {
			data.EnableDefaultGroup3Line = types.BoolValue(true)
		} else {
			data.EnableDefaultGroup3Line = types.BoolValue(false)
		}
	} else {
		data.EnableDefaultGroup3Line = types.BoolNull()
	}
	if value := res.Get(prefix + "enable.default.group3.none"); !data.EnableDefaultGroup3None.IsNull() {
		if value.Exists() {
			data.EnableDefaultGroup3None = types.BoolValue(true)
		} else {
			data.EnableDefaultGroup3None = types.BoolValue(false)
		}
	} else {
		data.EnableDefaultGroup3None = types.BoolNull()
	}
	if value := res.Get(prefix + "enable.default.group4.cache"); value.Exists() && !data.EnableDefaultGroup4Cache.IsNull() {
		data.EnableDefaultGroup4Cache = types.StringValue(value.String())
	} else {
		data.EnableDefaultGroup4Cache = types.StringNull()
	}
	if value := res.Get(prefix + "enable.default.group4.enable"); !data.EnableDefaultGroup4Enable.IsNull() {
		if value.Exists() {
			data.EnableDefaultGroup4Enable = types.BoolValue(true)
		} else {
			data.EnableDefaultGroup4Enable = types.BoolValue(false)
		}
	} else {
		data.EnableDefaultGroup4Enable = types.BoolNull()
	}
	if value := res.Get(prefix + "enable.default.group4.group"); value.Exists() && !data.EnableDefaultGroup4Group.IsNull() {
		data.EnableDefaultGroup4Group = types.StringValue(value.String())
	} else {
		data.EnableDefaultGroup4Group = types.StringNull()
	}
	if value := res.Get(prefix + "enable.default.group4.line"); !data.EnableDefaultGroup4Line.IsNull() {
		if value.Exists() {
			data.EnableDefaultGroup4Line = types.BoolValue(true)
		} else {
			data.EnableDefaultGroup4Line = types.BoolValue(false)
		}
	} else {
		data.EnableDefaultGroup4Line = types.BoolNull()
	}
	if value := res.Get(prefix + "enable.default.group4.none"); !data.EnableDefaultGroup4None.IsNull() {
		if value.Exists() {
			data.EnableDefaultGroup4None = types.BoolValue(true)
		} else {
			data.EnableDefaultGroup4None = types.BoolValue(false)
		}
	} else {
		data.EnableDefaultGroup4None = types.BoolNull()
	}
}

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

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

func (data *AAAAuthentication) 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 + "login"); value.Exists() {
		data.Logins = make([]AAAAuthenticationLogins, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := AAAAuthenticationLogins{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a1.none"); cValue.Exists() {
				item.A1None = types.BoolValue(true)
			} else {
				item.A1None = types.BoolValue(false)
			}
			if cValue := v.Get("a1.line"); cValue.Exists() {
				item.A1Line = types.BoolValue(true)
			} else {
				item.A1Line = types.BoolValue(false)
			}
			if cValue := v.Get("a1.enable"); cValue.Exists() {
				item.A1Enable = types.BoolValue(true)
			} else {
				item.A1Enable = types.BoolValue(false)
			}
			if cValue := v.Get("a1.local"); cValue.Exists() {
				item.A1Local = types.BoolValue(true)
			} else {
				item.A1Local = types.BoolValue(false)
			}
			if cValue := v.Get("a1.group"); cValue.Exists() {
				item.A1Group = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a2.none"); cValue.Exists() {
				item.A2None = types.BoolValue(true)
			} else {
				item.A2None = types.BoolValue(false)
			}
			if cValue := v.Get("a2.line"); cValue.Exists() {
				item.A2Line = types.BoolValue(true)
			} else {
				item.A2Line = types.BoolValue(false)
			}
			if cValue := v.Get("a2.enable"); cValue.Exists() {
				item.A2Enable = types.BoolValue(true)
			} else {
				item.A2Enable = types.BoolValue(false)
			}
			if cValue := v.Get("a2.local"); cValue.Exists() {
				item.A2Local = types.BoolValue(true)
			} else {
				item.A2Local = types.BoolValue(false)
			}
			if cValue := v.Get("a2.group"); cValue.Exists() {
				item.A2Group = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a3.none"); cValue.Exists() {
				item.A3None = types.BoolValue(true)
			} else {
				item.A3None = types.BoolValue(false)
			}
			if cValue := v.Get("a3.line"); cValue.Exists() {
				item.A3Line = types.BoolValue(true)
			} else {
				item.A3Line = types.BoolValue(false)
			}
			if cValue := v.Get("a3.enable"); cValue.Exists() {
				item.A3Enable = types.BoolValue(true)
			} else {
				item.A3Enable = types.BoolValue(false)
			}
			if cValue := v.Get("a3.local"); cValue.Exists() {
				item.A3Local = types.BoolValue(true)
			} else {
				item.A3Local = types.BoolValue(false)
			}
			if cValue := v.Get("a3.group"); cValue.Exists() {
				item.A3Group = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a4.none"); cValue.Exists() {
				item.A4None = types.BoolValue(true)
			} else {
				item.A4None = types.BoolValue(false)
			}
			if cValue := v.Get("a4.line"); cValue.Exists() {
				item.A4Line = types.BoolValue(true)
			} else {
				item.A4Line = types.BoolValue(false)
			}
			if cValue := v.Get("a4.enable"); cValue.Exists() {
				item.A4Enable = types.BoolValue(true)
			} else {
				item.A4Enable = types.BoolValue(false)
			}
			if cValue := v.Get("a4.local"); cValue.Exists() {
				item.A4Local = types.BoolValue(true)
			} else {
				item.A4Local = types.BoolValue(false)
			}
			if cValue := v.Get("a4.group"); cValue.Exists() {
				item.A4Group = types.StringValue(cValue.String())
			}
			data.Logins = append(data.Logins, item)
			return true
		})
	}
	if value := res.Get(prefix + "dot1x.dot1x-list"); value.Exists() {
		data.Dot1x = make([]AAAAuthenticationDot1x, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := AAAAuthenticationDot1x{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a1-config.group"); cValue.Exists() {
				item.A1Group = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a1-config.local"); cValue.Exists() {
				item.A1Local = types.BoolValue(true)
			} else {
				item.A1Local = types.BoolValue(false)
			}
			if cValue := v.Get("a1-config.cache"); cValue.Exists() {
				item.A1Cache = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a1-config.radius"); cValue.Exists() {
				item.A1Radius = types.BoolValue(true)
			} else {
				item.A1Radius = types.BoolValue(false)
			}
			if cValue := v.Get("a2-config.group"); cValue.Exists() {
				item.A2Group = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a2-config.local"); cValue.Exists() {
				item.A2Local = types.BoolValue(true)
			} else {
				item.A2Local = types.BoolValue(false)
			}
			if cValue := v.Get("a2-config.cache"); cValue.Exists() {
				item.A2Cache = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a2-config.radius"); cValue.Exists() {
				item.A2Radius = types.BoolValue(true)
			} else {
				item.A2Radius = types.BoolValue(false)
			}
			if cValue := v.Get("a3-config.group"); cValue.Exists() {
				item.A3Group = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a3-config.local"); cValue.Exists() {
				item.A3Local = types.BoolValue(true)
			} else {
				item.A3Local = types.BoolValue(false)
			}
			if cValue := v.Get("a3-config.cache"); cValue.Exists() {
				item.A3Cache = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a3-config.radius"); cValue.Exists() {
				item.A3Radius = types.BoolValue(true)
			} else {
				item.A3Radius = types.BoolValue(false)
			}
			if cValue := v.Get("a4-config.group"); cValue.Exists() {
				item.A4Group = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a4-config.local"); cValue.Exists() {
				item.A4Local = types.BoolValue(true)
			} else {
				item.A4Local = types.BoolValue(false)
			}
			if cValue := v.Get("a4-config.cache"); cValue.Exists() {
				item.A4Cache = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a4-config.radius"); cValue.Exists() {
				item.A4Radius = types.BoolValue(true)
			} else {
				item.A4Radius = types.BoolValue(false)
			}
			data.Dot1x = append(data.Dot1x, item)
			return true
		})
	}
	if value := res.Get(prefix + "dot1x.default.a1-config.group"); value.Exists() {
		data.Dot1xDefaultA1Group = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "dot1x.default.a1-config.local"); value.Exists() {
		data.Dot1xDefaultA1Local = types.BoolValue(true)
	} else {
		data.Dot1xDefaultA1Local = types.BoolValue(false)
	}
	if value := res.Get(prefix + "dot1x.default.a2-config.group"); value.Exists() {
		data.Dot1xDefaultA2Group = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "dot1x.default.a2-config.local"); value.Exists() {
		data.Dot1xDefaultA2Local = types.BoolValue(true)
	} else {
		data.Dot1xDefaultA2Local = types.BoolValue(false)
	}
	if value := res.Get(prefix + "dot1x.default.a3-config.group"); value.Exists() {
		data.Dot1xDefaultA3Group = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "dot1x.default.a3-config.local"); value.Exists() {
		data.Dot1xDefaultA3Local = types.BoolValue(true)
	} else {
		data.Dot1xDefaultA3Local = types.BoolValue(false)
	}
	if value := res.Get(prefix + "dot1x.default.a4-config.group"); value.Exists() {
		data.Dot1xDefaultA4Group = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "dot1x.default.a4-config.local"); value.Exists() {
		data.Dot1xDefaultA4Local = types.BoolValue(true)
	} else {
		data.Dot1xDefaultA4Local = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group1.cache"); value.Exists() {
		data.EnableDefaultGroup1Cache = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "enable.default.group1.enable"); value.Exists() {
		data.EnableDefaultGroup1Enable = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup1Enable = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group1.group"); value.Exists() {
		data.EnableDefaultGroup1Group = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "enable.default.group1.line"); value.Exists() {
		data.EnableDefaultGroup1Line = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup1Line = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group1.none"); value.Exists() {
		data.EnableDefaultGroup1None = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup1None = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group2.cache"); value.Exists() {
		data.EnableDefaultGroup2Cache = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "enable.default.group2.enable"); value.Exists() {
		data.EnableDefaultGroup2Enable = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup2Enable = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group2.group"); value.Exists() {
		data.EnableDefaultGroup2Group = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "enable.default.group2.line"); value.Exists() {
		data.EnableDefaultGroup2Line = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup2Line = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group2.none"); value.Exists() {
		data.EnableDefaultGroup2None = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup2None = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group3.cache"); value.Exists() {
		data.EnableDefaultGroup3Cache = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "enable.default.group3.enable"); value.Exists() {
		data.EnableDefaultGroup3Enable = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup3Enable = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group3.group"); value.Exists() {
		data.EnableDefaultGroup3Group = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "enable.default.group3.line"); value.Exists() {
		data.EnableDefaultGroup3Line = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup3Line = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group3.none"); value.Exists() {
		data.EnableDefaultGroup3None = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup3None = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group4.cache"); value.Exists() {
		data.EnableDefaultGroup4Cache = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "enable.default.group4.enable"); value.Exists() {
		data.EnableDefaultGroup4Enable = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup4Enable = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group4.group"); value.Exists() {
		data.EnableDefaultGroup4Group = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "enable.default.group4.line"); value.Exists() {
		data.EnableDefaultGroup4Line = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup4Line = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group4.none"); value.Exists() {
		data.EnableDefaultGroup4None = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup4None = types.BoolValue(false)
	}
}

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

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

func (data *AAAAuthenticationData) 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 + "login"); value.Exists() {
		data.Logins = make([]AAAAuthenticationLogins, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := AAAAuthenticationLogins{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a1.none"); cValue.Exists() {
				item.A1None = types.BoolValue(true)
			} else {
				item.A1None = types.BoolValue(false)
			}
			if cValue := v.Get("a1.line"); cValue.Exists() {
				item.A1Line = types.BoolValue(true)
			} else {
				item.A1Line = types.BoolValue(false)
			}
			if cValue := v.Get("a1.enable"); cValue.Exists() {
				item.A1Enable = types.BoolValue(true)
			} else {
				item.A1Enable = types.BoolValue(false)
			}
			if cValue := v.Get("a1.local"); cValue.Exists() {
				item.A1Local = types.BoolValue(true)
			} else {
				item.A1Local = types.BoolValue(false)
			}
			if cValue := v.Get("a1.group"); cValue.Exists() {
				item.A1Group = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a2.none"); cValue.Exists() {
				item.A2None = types.BoolValue(true)
			} else {
				item.A2None = types.BoolValue(false)
			}
			if cValue := v.Get("a2.line"); cValue.Exists() {
				item.A2Line = types.BoolValue(true)
			} else {
				item.A2Line = types.BoolValue(false)
			}
			if cValue := v.Get("a2.enable"); cValue.Exists() {
				item.A2Enable = types.BoolValue(true)
			} else {
				item.A2Enable = types.BoolValue(false)
			}
			if cValue := v.Get("a2.local"); cValue.Exists() {
				item.A2Local = types.BoolValue(true)
			} else {
				item.A2Local = types.BoolValue(false)
			}
			if cValue := v.Get("a2.group"); cValue.Exists() {
				item.A2Group = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a3.none"); cValue.Exists() {
				item.A3None = types.BoolValue(true)
			} else {
				item.A3None = types.BoolValue(false)
			}
			if cValue := v.Get("a3.line"); cValue.Exists() {
				item.A3Line = types.BoolValue(true)
			} else {
				item.A3Line = types.BoolValue(false)
			}
			if cValue := v.Get("a3.enable"); cValue.Exists() {
				item.A3Enable = types.BoolValue(true)
			} else {
				item.A3Enable = types.BoolValue(false)
			}
			if cValue := v.Get("a3.local"); cValue.Exists() {
				item.A3Local = types.BoolValue(true)
			} else {
				item.A3Local = types.BoolValue(false)
			}
			if cValue := v.Get("a3.group"); cValue.Exists() {
				item.A3Group = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a4.none"); cValue.Exists() {
				item.A4None = types.BoolValue(true)
			} else {
				item.A4None = types.BoolValue(false)
			}
			if cValue := v.Get("a4.line"); cValue.Exists() {
				item.A4Line = types.BoolValue(true)
			} else {
				item.A4Line = types.BoolValue(false)
			}
			if cValue := v.Get("a4.enable"); cValue.Exists() {
				item.A4Enable = types.BoolValue(true)
			} else {
				item.A4Enable = types.BoolValue(false)
			}
			if cValue := v.Get("a4.local"); cValue.Exists() {
				item.A4Local = types.BoolValue(true)
			} else {
				item.A4Local = types.BoolValue(false)
			}
			if cValue := v.Get("a4.group"); cValue.Exists() {
				item.A4Group = types.StringValue(cValue.String())
			}
			data.Logins = append(data.Logins, item)
			return true
		})
	}
	if value := res.Get(prefix + "dot1x.dot1x-list"); value.Exists() {
		data.Dot1x = make([]AAAAuthenticationDot1x, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := AAAAuthenticationDot1x{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a1-config.group"); cValue.Exists() {
				item.A1Group = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a1-config.local"); cValue.Exists() {
				item.A1Local = types.BoolValue(true)
			} else {
				item.A1Local = types.BoolValue(false)
			}
			if cValue := v.Get("a1-config.cache"); cValue.Exists() {
				item.A1Cache = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a1-config.radius"); cValue.Exists() {
				item.A1Radius = types.BoolValue(true)
			} else {
				item.A1Radius = types.BoolValue(false)
			}
			if cValue := v.Get("a2-config.group"); cValue.Exists() {
				item.A2Group = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a2-config.local"); cValue.Exists() {
				item.A2Local = types.BoolValue(true)
			} else {
				item.A2Local = types.BoolValue(false)
			}
			if cValue := v.Get("a2-config.cache"); cValue.Exists() {
				item.A2Cache = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a2-config.radius"); cValue.Exists() {
				item.A2Radius = types.BoolValue(true)
			} else {
				item.A2Radius = types.BoolValue(false)
			}
			if cValue := v.Get("a3-config.group"); cValue.Exists() {
				item.A3Group = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a3-config.local"); cValue.Exists() {
				item.A3Local = types.BoolValue(true)
			} else {
				item.A3Local = types.BoolValue(false)
			}
			if cValue := v.Get("a3-config.cache"); cValue.Exists() {
				item.A3Cache = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a3-config.radius"); cValue.Exists() {
				item.A3Radius = types.BoolValue(true)
			} else {
				item.A3Radius = types.BoolValue(false)
			}
			if cValue := v.Get("a4-config.group"); cValue.Exists() {
				item.A4Group = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a4-config.local"); cValue.Exists() {
				item.A4Local = types.BoolValue(true)
			} else {
				item.A4Local = types.BoolValue(false)
			}
			if cValue := v.Get("a4-config.cache"); cValue.Exists() {
				item.A4Cache = types.StringValue(cValue.String())
			}
			if cValue := v.Get("a4-config.radius"); cValue.Exists() {
				item.A4Radius = types.BoolValue(true)
			} else {
				item.A4Radius = types.BoolValue(false)
			}
			data.Dot1x = append(data.Dot1x, item)
			return true
		})
	}
	if value := res.Get(prefix + "dot1x.default.a1-config.group"); value.Exists() {
		data.Dot1xDefaultA1Group = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "dot1x.default.a1-config.local"); value.Exists() {
		data.Dot1xDefaultA1Local = types.BoolValue(true)
	} else {
		data.Dot1xDefaultA1Local = types.BoolValue(false)
	}
	if value := res.Get(prefix + "dot1x.default.a2-config.group"); value.Exists() {
		data.Dot1xDefaultA2Group = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "dot1x.default.a2-config.local"); value.Exists() {
		data.Dot1xDefaultA2Local = types.BoolValue(true)
	} else {
		data.Dot1xDefaultA2Local = types.BoolValue(false)
	}
	if value := res.Get(prefix + "dot1x.default.a3-config.group"); value.Exists() {
		data.Dot1xDefaultA3Group = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "dot1x.default.a3-config.local"); value.Exists() {
		data.Dot1xDefaultA3Local = types.BoolValue(true)
	} else {
		data.Dot1xDefaultA3Local = types.BoolValue(false)
	}
	if value := res.Get(prefix + "dot1x.default.a4-config.group"); value.Exists() {
		data.Dot1xDefaultA4Group = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "dot1x.default.a4-config.local"); value.Exists() {
		data.Dot1xDefaultA4Local = types.BoolValue(true)
	} else {
		data.Dot1xDefaultA4Local = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group1.cache"); value.Exists() {
		data.EnableDefaultGroup1Cache = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "enable.default.group1.enable"); value.Exists() {
		data.EnableDefaultGroup1Enable = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup1Enable = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group1.group"); value.Exists() {
		data.EnableDefaultGroup1Group = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "enable.default.group1.line"); value.Exists() {
		data.EnableDefaultGroup1Line = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup1Line = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group1.none"); value.Exists() {
		data.EnableDefaultGroup1None = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup1None = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group2.cache"); value.Exists() {
		data.EnableDefaultGroup2Cache = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "enable.default.group2.enable"); value.Exists() {
		data.EnableDefaultGroup2Enable = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup2Enable = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group2.group"); value.Exists() {
		data.EnableDefaultGroup2Group = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "enable.default.group2.line"); value.Exists() {
		data.EnableDefaultGroup2Line = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup2Line = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group2.none"); value.Exists() {
		data.EnableDefaultGroup2None = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup2None = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group3.cache"); value.Exists() {
		data.EnableDefaultGroup3Cache = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "enable.default.group3.enable"); value.Exists() {
		data.EnableDefaultGroup3Enable = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup3Enable = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group3.group"); value.Exists() {
		data.EnableDefaultGroup3Group = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "enable.default.group3.line"); value.Exists() {
		data.EnableDefaultGroup3Line = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup3Line = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group3.none"); value.Exists() {
		data.EnableDefaultGroup3None = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup3None = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group4.cache"); value.Exists() {
		data.EnableDefaultGroup4Cache = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "enable.default.group4.enable"); value.Exists() {
		data.EnableDefaultGroup4Enable = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup4Enable = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group4.group"); value.Exists() {
		data.EnableDefaultGroup4Group = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "enable.default.group4.line"); value.Exists() {
		data.EnableDefaultGroup4Line = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup4Line = types.BoolValue(false)
	}
	if value := res.Get(prefix + "enable.default.group4.none"); value.Exists() {
		data.EnableDefaultGroup4None = types.BoolValue(true)
	} else {
		data.EnableDefaultGroup4None = types.BoolValue(false)
	}
}

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

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

func (data *AAAAuthentication) getDeletedItems(ctx context.Context, state AAAAuthentication) []string {
	deletedItems := make([]string, 0)
	if !state.EnableDefaultGroup4None.IsNull() && data.EnableDefaultGroup4None.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/enable/default/group4/none", state.getPath()))
	}
	if !state.EnableDefaultGroup4Line.IsNull() && data.EnableDefaultGroup4Line.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/enable/default/group4/line", state.getPath()))
	}
	if !state.EnableDefaultGroup4Group.IsNull() && data.EnableDefaultGroup4Group.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/enable/default/group4/group", state.getPath()))
	}
	if !state.EnableDefaultGroup4Enable.IsNull() && data.EnableDefaultGroup4Enable.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/enable/default/group4/enable", state.getPath()))
	}
	if !state.EnableDefaultGroup4Cache.IsNull() && data.EnableDefaultGroup4Cache.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/enable/default/group4/cache", state.getPath()))
	}
	if !state.EnableDefaultGroup3None.IsNull() && data.EnableDefaultGroup3None.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/enable/default/group3/none", state.getPath()))
	}
	if !state.EnableDefaultGroup3Line.IsNull() && data.EnableDefaultGroup3Line.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/enable/default/group3/line", state.getPath()))
	}
	if !state.EnableDefaultGroup3Group.IsNull() && data.EnableDefaultGroup3Group.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/enable/default/group3/group", state.getPath()))
	}
	if !state.EnableDefaultGroup3Enable.IsNull() && data.EnableDefaultGroup3Enable.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/enable/default/group3/enable", state.getPath()))
	}
	if !state.EnableDefaultGroup3Cache.IsNull() && data.EnableDefaultGroup3Cache.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/enable/default/group3/cache", state.getPath()))
	}
	if !state.EnableDefaultGroup2None.IsNull() && data.EnableDefaultGroup2None.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/enable/default/group2/none", state.getPath()))
	}
	if !state.EnableDefaultGroup2Line.IsNull() && data.EnableDefaultGroup2Line.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/enable/default/group2/line", state.getPath()))
	}
	if !state.EnableDefaultGroup2Group.IsNull() && data.EnableDefaultGroup2Group.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/enable/default/group2/group", state.getPath()))
	}
	if !state.EnableDefaultGroup2Enable.IsNull() && data.EnableDefaultGroup2Enable.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/enable/default/group2/enable", state.getPath()))
	}
	if !state.EnableDefaultGroup2Cache.IsNull() && data.EnableDefaultGroup2Cache.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/enable/default/group2/cache", state.getPath()))
	}
	if !state.EnableDefaultGroup1None.IsNull() && data.EnableDefaultGroup1None.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/enable/default/group1/none", state.getPath()))
	}
	if !state.EnableDefaultGroup1Line.IsNull() && data.EnableDefaultGroup1Line.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/enable/default/group1/line", state.getPath()))
	}
	if !state.EnableDefaultGroup1Group.IsNull() && data.EnableDefaultGroup1Group.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/enable/default/group1/group", state.getPath()))
	}
	if !state.EnableDefaultGroup1Enable.IsNull() && data.EnableDefaultGroup1Enable.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/enable/default/group1/enable", state.getPath()))
	}
	if !state.EnableDefaultGroup1Cache.IsNull() && data.EnableDefaultGroup1Cache.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/enable/default/group1/cache", state.getPath()))
	}
	if !state.Dot1xDefaultA4Local.IsNull() && data.Dot1xDefaultA4Local.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/default/a4-config/local", state.getPath()))
	}
	if !state.Dot1xDefaultA4Group.IsNull() && data.Dot1xDefaultA4Group.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/default/a4-config/group", state.getPath()))
	}
	if !state.Dot1xDefaultA3Local.IsNull() && data.Dot1xDefaultA3Local.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/default/a3-config/local", state.getPath()))
	}
	if !state.Dot1xDefaultA3Group.IsNull() && data.Dot1xDefaultA3Group.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/default/a3-config/group", state.getPath()))
	}
	if !state.Dot1xDefaultA2Local.IsNull() && data.Dot1xDefaultA2Local.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/default/a2-config/local", state.getPath()))
	}
	if !state.Dot1xDefaultA2Group.IsNull() && data.Dot1xDefaultA2Group.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/default/a2-config/group", state.getPath()))
	}
	if !state.Dot1xDefaultA1Local.IsNull() && data.Dot1xDefaultA1Local.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/default/a1-config/local", state.getPath()))
	}
	if !state.Dot1xDefaultA1Group.IsNull() && data.Dot1xDefaultA1Group.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/default/a1-config/group", state.getPath()))
	}
	for i := range state.Dot1x {
		stateKeyValues := [...]string{state.Dot1x[i].Name.ValueString()}

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

		found := false
		for j := range data.Dot1x {
			found = true
			if state.Dot1x[i].Name.ValueString() != data.Dot1x[j].Name.ValueString() {
				found = false
			}
			if found {
				if !state.Dot1x[i].A4Radius.IsNull() && data.Dot1x[j].A4Radius.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a4-config/radius", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Dot1x[i].A4Cache.IsNull() && data.Dot1x[j].A4Cache.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a4-config/cache", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Dot1x[i].A4Local.IsNull() && data.Dot1x[j].A4Local.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a4-config/local", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Dot1x[i].A4Group.IsNull() && data.Dot1x[j].A4Group.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a4-config/group", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Dot1x[i].A3Radius.IsNull() && data.Dot1x[j].A3Radius.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a3-config/radius", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Dot1x[i].A3Cache.IsNull() && data.Dot1x[j].A3Cache.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a3-config/cache", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Dot1x[i].A3Local.IsNull() && data.Dot1x[j].A3Local.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a3-config/local", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Dot1x[i].A3Group.IsNull() && data.Dot1x[j].A3Group.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a3-config/group", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Dot1x[i].A2Radius.IsNull() && data.Dot1x[j].A2Radius.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a2-config/radius", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Dot1x[i].A2Cache.IsNull() && data.Dot1x[j].A2Cache.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a2-config/cache", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Dot1x[i].A2Local.IsNull() && data.Dot1x[j].A2Local.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a2-config/local", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Dot1x[i].A2Group.IsNull() && data.Dot1x[j].A2Group.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a2-config/group", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Dot1x[i].A1Radius.IsNull() && data.Dot1x[j].A1Radius.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a1-config/radius", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Dot1x[i].A1Cache.IsNull() && data.Dot1x[j].A1Cache.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a1-config/cache", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Dot1x[i].A1Local.IsNull() && data.Dot1x[j].A1Local.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a1-config/local", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Dot1x[i].A1Group.IsNull() && data.Dot1x[j].A1Group.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a1-config/group", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/dot1x/dot1x-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.Logins {
		stateKeyValues := [...]string{state.Logins[i].Name.ValueString()}

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

		found := false
		for j := range data.Logins {
			found = true
			if state.Logins[i].Name.ValueString() != data.Logins[j].Name.ValueString() {
				found = false
			}
			if found {
				if !state.Logins[i].A4Group.IsNull() && data.Logins[j].A4Group.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/login=%v/a4/group", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Logins[i].A4Local.IsNull() && data.Logins[j].A4Local.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/login=%v/a4/local", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Logins[i].A4Enable.IsNull() && data.Logins[j].A4Enable.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/login=%v/a4/enable", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Logins[i].A4Line.IsNull() && data.Logins[j].A4Line.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/login=%v/a4/line", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Logins[i].A4None.IsNull() && data.Logins[j].A4None.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/login=%v/a4/none", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Logins[i].A3Group.IsNull() && data.Logins[j].A3Group.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/login=%v/a3/group", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Logins[i].A3Local.IsNull() && data.Logins[j].A3Local.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/login=%v/a3/local", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Logins[i].A3Enable.IsNull() && data.Logins[j].A3Enable.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/login=%v/a3/enable", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Logins[i].A3Line.IsNull() && data.Logins[j].A3Line.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/login=%v/a3/line", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Logins[i].A3None.IsNull() && data.Logins[j].A3None.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/login=%v/a3/none", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Logins[i].A2Group.IsNull() && data.Logins[j].A2Group.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/login=%v/a2/group", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Logins[i].A2Local.IsNull() && data.Logins[j].A2Local.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/login=%v/a2/local", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Logins[i].A2Enable.IsNull() && data.Logins[j].A2Enable.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/login=%v/a2/enable", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Logins[i].A2Line.IsNull() && data.Logins[j].A2Line.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/login=%v/a2/line", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Logins[i].A2None.IsNull() && data.Logins[j].A2None.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/login=%v/a2/none", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Logins[i].A1Group.IsNull() && data.Logins[j].A1Group.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/login=%v/a1/group", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Logins[i].A1Local.IsNull() && data.Logins[j].A1Local.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/login=%v/a1/local", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Logins[i].A1Enable.IsNull() && data.Logins[j].A1Enable.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/login=%v/a1/enable", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Logins[i].A1Line.IsNull() && data.Logins[j].A1Line.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/login=%v/a1/line", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Logins[i].A1None.IsNull() && data.Logins[j].A1None.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/login=%v/a1/none", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/login=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}

	return deletedItems
}

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

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

func (data *AAAAuthentication) getEmptyLeafsDelete(ctx context.Context) []string {
	emptyLeafsDelete := make([]string, 0)
	if !data.EnableDefaultGroup4None.IsNull() && !data.EnableDefaultGroup4None.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/enable/default/group4/none", data.getPath()))
	}
	if !data.EnableDefaultGroup4Line.IsNull() && !data.EnableDefaultGroup4Line.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/enable/default/group4/line", data.getPath()))
	}
	if !data.EnableDefaultGroup4Enable.IsNull() && !data.EnableDefaultGroup4Enable.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/enable/default/group4/enable", data.getPath()))
	}
	if !data.EnableDefaultGroup3None.IsNull() && !data.EnableDefaultGroup3None.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/enable/default/group3/none", data.getPath()))
	}
	if !data.EnableDefaultGroup3Line.IsNull() && !data.EnableDefaultGroup3Line.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/enable/default/group3/line", data.getPath()))
	}
	if !data.EnableDefaultGroup3Enable.IsNull() && !data.EnableDefaultGroup3Enable.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/enable/default/group3/enable", data.getPath()))
	}
	if !data.EnableDefaultGroup2None.IsNull() && !data.EnableDefaultGroup2None.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/enable/default/group2/none", data.getPath()))
	}
	if !data.EnableDefaultGroup2Line.IsNull() && !data.EnableDefaultGroup2Line.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/enable/default/group2/line", data.getPath()))
	}
	if !data.EnableDefaultGroup2Enable.IsNull() && !data.EnableDefaultGroup2Enable.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/enable/default/group2/enable", data.getPath()))
	}
	if !data.EnableDefaultGroup1None.IsNull() && !data.EnableDefaultGroup1None.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/enable/default/group1/none", data.getPath()))
	}
	if !data.EnableDefaultGroup1Line.IsNull() && !data.EnableDefaultGroup1Line.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/enable/default/group1/line", data.getPath()))
	}
	if !data.EnableDefaultGroup1Enable.IsNull() && !data.EnableDefaultGroup1Enable.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/enable/default/group1/enable", data.getPath()))
	}
	if !data.Dot1xDefaultA4Local.IsNull() && !data.Dot1xDefaultA4Local.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/dot1x/default/a4-config/local", data.getPath()))
	}
	if !data.Dot1xDefaultA3Local.IsNull() && !data.Dot1xDefaultA3Local.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/dot1x/default/a3-config/local", data.getPath()))
	}
	if !data.Dot1xDefaultA2Local.IsNull() && !data.Dot1xDefaultA2Local.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/dot1x/default/a2-config/local", data.getPath()))
	}
	if !data.Dot1xDefaultA1Local.IsNull() && !data.Dot1xDefaultA1Local.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/dot1x/default/a1-config/local", data.getPath()))
	}

	for i := range data.Dot1x {
		keyValues := [...]string{data.Dot1x[i].Name.ValueString()}
		if !data.Dot1x[i].A4Radius.IsNull() && !data.Dot1x[i].A4Radius.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a4-config/radius", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Dot1x[i].A4Local.IsNull() && !data.Dot1x[i].A4Local.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a4-config/local", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Dot1x[i].A3Radius.IsNull() && !data.Dot1x[i].A3Radius.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a3-config/radius", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Dot1x[i].A3Local.IsNull() && !data.Dot1x[i].A3Local.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a3-config/local", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Dot1x[i].A2Radius.IsNull() && !data.Dot1x[i].A2Radius.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a2-config/radius", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Dot1x[i].A2Local.IsNull() && !data.Dot1x[i].A2Local.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a2-config/local", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Dot1x[i].A1Radius.IsNull() && !data.Dot1x[i].A1Radius.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a1-config/radius", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Dot1x[i].A1Local.IsNull() && !data.Dot1x[i].A1Local.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/dot1x/dot1x-list=%v/a1-config/local", data.getPath(), strings.Join(keyValues[:], ",")))
		}
	}

	for i := range data.Logins {
		keyValues := [...]string{data.Logins[i].Name.ValueString()}
		if !data.Logins[i].A4Local.IsNull() && !data.Logins[i].A4Local.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/login=%v/a4/local", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Logins[i].A4Enable.IsNull() && !data.Logins[i].A4Enable.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/login=%v/a4/enable", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Logins[i].A4Line.IsNull() && !data.Logins[i].A4Line.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/login=%v/a4/line", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Logins[i].A4None.IsNull() && !data.Logins[i].A4None.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/login=%v/a4/none", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Logins[i].A3Local.IsNull() && !data.Logins[i].A3Local.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/login=%v/a3/local", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Logins[i].A3Enable.IsNull() && !data.Logins[i].A3Enable.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/login=%v/a3/enable", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Logins[i].A3Line.IsNull() && !data.Logins[i].A3Line.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/login=%v/a3/line", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Logins[i].A3None.IsNull() && !data.Logins[i].A3None.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/login=%v/a3/none", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Logins[i].A2Local.IsNull() && !data.Logins[i].A2Local.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/login=%v/a2/local", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Logins[i].A2Enable.IsNull() && !data.Logins[i].A2Enable.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/login=%v/a2/enable", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Logins[i].A2Line.IsNull() && !data.Logins[i].A2Line.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/login=%v/a2/line", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Logins[i].A2None.IsNull() && !data.Logins[i].A2None.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/login=%v/a2/none", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Logins[i].A1Local.IsNull() && !data.Logins[i].A1Local.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/login=%v/a1/local", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Logins[i].A1Enable.IsNull() && !data.Logins[i].A1Enable.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/login=%v/a1/enable", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Logins[i].A1Line.IsNull() && !data.Logins[i].A1Line.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/login=%v/a1/line", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Logins[i].A1None.IsNull() && !data.Logins[i].A1None.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/login=%v/a1/none", data.getPath(), strings.Join(keyValues[:], ",")))
		}
	}

	return emptyLeafsDelete
}

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

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

func (data *AAAAuthentication) getDeletePaths(ctx context.Context) []string {
	var deletePaths []string
	if !data.EnableDefaultGroup4None.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/enable/default/group4/none", data.getPath()))
	}
	if !data.EnableDefaultGroup4Line.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/enable/default/group4/line", data.getPath()))
	}
	if !data.EnableDefaultGroup4Group.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/enable/default/group4/group", data.getPath()))
	}
	if !data.EnableDefaultGroup4Enable.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/enable/default/group4/enable", data.getPath()))
	}
	if !data.EnableDefaultGroup4Cache.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/enable/default/group4/cache", data.getPath()))
	}
	if !data.EnableDefaultGroup3None.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/enable/default/group3/none", data.getPath()))
	}
	if !data.EnableDefaultGroup3Line.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/enable/default/group3/line", data.getPath()))
	}
	if !data.EnableDefaultGroup3Group.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/enable/default/group3/group", data.getPath()))
	}
	if !data.EnableDefaultGroup3Enable.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/enable/default/group3/enable", data.getPath()))
	}
	if !data.EnableDefaultGroup3Cache.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/enable/default/group3/cache", data.getPath()))
	}
	if !data.EnableDefaultGroup2None.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/enable/default/group2/none", data.getPath()))
	}
	if !data.EnableDefaultGroup2Line.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/enable/default/group2/line", data.getPath()))
	}
	if !data.EnableDefaultGroup2Group.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/enable/default/group2/group", data.getPath()))
	}
	if !data.EnableDefaultGroup2Enable.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/enable/default/group2/enable", data.getPath()))
	}
	if !data.EnableDefaultGroup2Cache.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/enable/default/group2/cache", data.getPath()))
	}
	if !data.EnableDefaultGroup1None.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/enable/default/group1/none", data.getPath()))
	}
	if !data.EnableDefaultGroup1Line.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/enable/default/group1/line", data.getPath()))
	}
	if !data.EnableDefaultGroup1Group.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/enable/default/group1/group", data.getPath()))
	}
	if !data.EnableDefaultGroup1Enable.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/enable/default/group1/enable", data.getPath()))
	}
	if !data.EnableDefaultGroup1Cache.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/enable/default/group1/cache", data.getPath()))
	}
	if !data.Dot1xDefaultA4Local.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/dot1x/default/a4-config/local", data.getPath()))
	}
	if !data.Dot1xDefaultA4Group.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/dot1x/default/a4-config/group", data.getPath()))
	}
	if !data.Dot1xDefaultA3Local.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/dot1x/default/a3-config/local", data.getPath()))
	}
	if !data.Dot1xDefaultA3Group.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/dot1x/default/a3-config/group", data.getPath()))
	}
	if !data.Dot1xDefaultA2Local.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/dot1x/default/a2-config/local", data.getPath()))
	}
	if !data.Dot1xDefaultA2Group.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/dot1x/default/a2-config/group", data.getPath()))
	}
	if !data.Dot1xDefaultA1Local.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/dot1x/default/a1-config/local", data.getPath()))
	}
	if !data.Dot1xDefaultA1Group.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/dot1x/default/a1-config/group", data.getPath()))
	}
	for i := range data.Dot1x {
		keyValues := [...]string{data.Dot1x[i].Name.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/dot1x/dot1x-list=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.Logins {
		keyValues := [...]string{data.Logins[i].Name.ValueString()}

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

	return deletePaths
}

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