// 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 BFD struct {
	Device           types.String          `tfsdk:"device"`
	Id               types.String          `tfsdk:"id"`
	DeleteMode       types.String          `tfsdk:"delete_mode"`
	Ipv4BothVrfs     []BFDIpv4BothVrfs     `tfsdk:"ipv4_both_vrfs"`
	Ipv4WithoutVrfs  []BFDIpv4WithoutVrfs  `tfsdk:"ipv4_without_vrfs"`
	Ipv4WithSrcVrfs  []BFDIpv4WithSrcVrfs  `tfsdk:"ipv4_with_src_vrfs"`
	Ipv4WithDstVrfs  []BFDIpv4WithDstVrfs  `tfsdk:"ipv4_with_dst_vrfs"`
	Ipv6WithBothVrfs []BFDIpv6WithBothVrfs `tfsdk:"ipv6_with_both_vrfs"`
	Ipv6WithoutVrfs  []BFDIpv6WithoutVrfs  `tfsdk:"ipv6_without_vrfs"`
	Ipv6WithSrcVrfs  []BFDIpv6WithSrcVrfs  `tfsdk:"ipv6_with_src_vrfs"`
	Ipv6WithDstVrfs  []BFDIpv6WithDstVrfs  `tfsdk:"ipv6_with_dst_vrfs"`
	SlowTimers       types.Int64           `tfsdk:"slow_timers"`
}

type BFDData struct {
	Device           types.String          `tfsdk:"device"`
	Id               types.String          `tfsdk:"id"`
	Ipv4BothVrfs     []BFDIpv4BothVrfs     `tfsdk:"ipv4_both_vrfs"`
	Ipv4WithoutVrfs  []BFDIpv4WithoutVrfs  `tfsdk:"ipv4_without_vrfs"`
	Ipv4WithSrcVrfs  []BFDIpv4WithSrcVrfs  `tfsdk:"ipv4_with_src_vrfs"`
	Ipv4WithDstVrfs  []BFDIpv4WithDstVrfs  `tfsdk:"ipv4_with_dst_vrfs"`
	Ipv6WithBothVrfs []BFDIpv6WithBothVrfs `tfsdk:"ipv6_with_both_vrfs"`
	Ipv6WithoutVrfs  []BFDIpv6WithoutVrfs  `tfsdk:"ipv6_without_vrfs"`
	Ipv6WithSrcVrfs  []BFDIpv6WithSrcVrfs  `tfsdk:"ipv6_with_src_vrfs"`
	Ipv6WithDstVrfs  []BFDIpv6WithDstVrfs  `tfsdk:"ipv6_with_dst_vrfs"`
	SlowTimers       types.Int64           `tfsdk:"slow_timers"`
}
type BFDIpv4BothVrfs struct {
	DstVrf       types.String `tfsdk:"dst_vrf"`
	DestIp       types.String `tfsdk:"dest_ip"`
	SrcVrf       types.String `tfsdk:"src_vrf"`
	SrcIp        types.String `tfsdk:"src_ip"`
	TemplateName types.String `tfsdk:"template_name"`
}
type BFDIpv4WithoutVrfs struct {
	DestIp       types.String `tfsdk:"dest_ip"`
	SrcIp        types.String `tfsdk:"src_ip"`
	TemplateName types.String `tfsdk:"template_name"`
}
type BFDIpv4WithSrcVrfs struct {
	DestIp       types.String `tfsdk:"dest_ip"`
	SrcVrf       types.String `tfsdk:"src_vrf"`
	SrcIp        types.String `tfsdk:"src_ip"`
	TemplateName types.String `tfsdk:"template_name"`
}
type BFDIpv4WithDstVrfs struct {
	DstVrf       types.String `tfsdk:"dst_vrf"`
	DestIp       types.String `tfsdk:"dest_ip"`
	SrcIp        types.String `tfsdk:"src_ip"`
	TemplateName types.String `tfsdk:"template_name"`
}
type BFDIpv6WithBothVrfs struct {
	DstVrf       types.String `tfsdk:"dst_vrf"`
	DestIpv6     types.String `tfsdk:"dest_ipv6"`
	SrcVrf       types.String `tfsdk:"src_vrf"`
	SrcIpv6      types.String `tfsdk:"src_ipv6"`
	TemplateName types.String `tfsdk:"template_name"`
}
type BFDIpv6WithoutVrfs struct {
	DestIpv6     types.String `tfsdk:"dest_ipv6"`
	SrcIpv6      types.String `tfsdk:"src_ipv6"`
	TemplateName types.String `tfsdk:"template_name"`
}
type BFDIpv6WithSrcVrfs struct {
	DestIpv6     types.String `tfsdk:"dest_ipv6"`
	SrcVrf       types.String `tfsdk:"src_vrf"`
	SrcIpv6      types.String `tfsdk:"src_ipv6"`
	TemplateName types.String `tfsdk:"template_name"`
}
type BFDIpv6WithDstVrfs struct {
	DstVrf       types.String `tfsdk:"dst_vrf"`
	DestIpv6     types.String `tfsdk:"dest_ipv6"`
	SrcIpv6      types.String `tfsdk:"src_ipv6"`
	TemplateName types.String `tfsdk:"template_name"`
}

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

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

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

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

// if last path element has a key -> remove it
func (data BFD) 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 BFD) toBody(ctx context.Context) string {
	body := `{"` + helpers.LastElement(data.getPath()) + `":{}}`
	if !data.SlowTimers.IsNull() && !data.SlowTimers.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:slow-timers", strconv.FormatInt(data.SlowTimers.ValueInt64(), 10))
	}
	if len(data.Ipv4BothVrfs) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv4-list-with-both-vrf.ipv4", []interface{}{})
		for index, item := range data.Ipv4BothVrfs {
			if !item.DstVrf.IsNull() && !item.DstVrf.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv4-list-with-both-vrf.ipv4"+"."+strconv.Itoa(index)+"."+"dst-vrf", item.DstVrf.ValueString())
			}
			if !item.DestIp.IsNull() && !item.DestIp.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv4-list-with-both-vrf.ipv4"+"."+strconv.Itoa(index)+"."+"dest-ip", item.DestIp.ValueString())
			}
			if !item.SrcVrf.IsNull() && !item.SrcVrf.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv4-list-with-both-vrf.ipv4"+"."+strconv.Itoa(index)+"."+"src-vrf", item.SrcVrf.ValueString())
			}
			if !item.SrcIp.IsNull() && !item.SrcIp.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv4-list-with-both-vrf.ipv4"+"."+strconv.Itoa(index)+"."+"src-ip", item.SrcIp.ValueString())
			}
			if !item.TemplateName.IsNull() && !item.TemplateName.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv4-list-with-both-vrf.ipv4"+"."+strconv.Itoa(index)+"."+"template-name", item.TemplateName.ValueString())
			}
		}
	}
	if len(data.Ipv4WithoutVrfs) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv4-list-without-vrf.ipv4", []interface{}{})
		for index, item := range data.Ipv4WithoutVrfs {
			if !item.DestIp.IsNull() && !item.DestIp.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv4-list-without-vrf.ipv4"+"."+strconv.Itoa(index)+"."+"dest-ip", item.DestIp.ValueString())
			}
			if !item.SrcIp.IsNull() && !item.SrcIp.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv4-list-without-vrf.ipv4"+"."+strconv.Itoa(index)+"."+"src-ip", item.SrcIp.ValueString())
			}
			if !item.TemplateName.IsNull() && !item.TemplateName.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv4-list-without-vrf.ipv4"+"."+strconv.Itoa(index)+"."+"template-name", item.TemplateName.ValueString())
			}
		}
	}
	if len(data.Ipv4WithSrcVrfs) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv4-list-with-src-vrf.ipv4", []interface{}{})
		for index, item := range data.Ipv4WithSrcVrfs {
			if !item.DestIp.IsNull() && !item.DestIp.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv4-list-with-src-vrf.ipv4"+"."+strconv.Itoa(index)+"."+"dest-ip", item.DestIp.ValueString())
			}
			if !item.SrcVrf.IsNull() && !item.SrcVrf.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv4-list-with-src-vrf.ipv4"+"."+strconv.Itoa(index)+"."+"src-vrf", item.SrcVrf.ValueString())
			}
			if !item.SrcIp.IsNull() && !item.SrcIp.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv4-list-with-src-vrf.ipv4"+"."+strconv.Itoa(index)+"."+"src-ip", item.SrcIp.ValueString())
			}
			if !item.TemplateName.IsNull() && !item.TemplateName.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv4-list-with-src-vrf.ipv4"+"."+strconv.Itoa(index)+"."+"template-name", item.TemplateName.ValueString())
			}
		}
	}
	if len(data.Ipv4WithDstVrfs) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv4-list-with-dst-vrf.ipv4", []interface{}{})
		for index, item := range data.Ipv4WithDstVrfs {
			if !item.DstVrf.IsNull() && !item.DstVrf.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv4-list-with-dst-vrf.ipv4"+"."+strconv.Itoa(index)+"."+"dst-vrf", item.DstVrf.ValueString())
			}
			if !item.DestIp.IsNull() && !item.DestIp.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv4-list-with-dst-vrf.ipv4"+"."+strconv.Itoa(index)+"."+"dest-ip", item.DestIp.ValueString())
			}
			if !item.SrcIp.IsNull() && !item.SrcIp.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv4-list-with-dst-vrf.ipv4"+"."+strconv.Itoa(index)+"."+"src-ip", item.SrcIp.ValueString())
			}
			if !item.TemplateName.IsNull() && !item.TemplateName.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv4-list-with-dst-vrf.ipv4"+"."+strconv.Itoa(index)+"."+"template-name", item.TemplateName.ValueString())
			}
		}
	}
	if len(data.Ipv6WithBothVrfs) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv6-list-with-both-vrf.ipv6", []interface{}{})
		for index, item := range data.Ipv6WithBothVrfs {
			if !item.DstVrf.IsNull() && !item.DstVrf.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv6-list-with-both-vrf.ipv6"+"."+strconv.Itoa(index)+"."+"dst-vrf", item.DstVrf.ValueString())
			}
			if !item.DestIpv6.IsNull() && !item.DestIpv6.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv6-list-with-both-vrf.ipv6"+"."+strconv.Itoa(index)+"."+"dest-ipv6", item.DestIpv6.ValueString())
			}
			if !item.SrcVrf.IsNull() && !item.SrcVrf.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv6-list-with-both-vrf.ipv6"+"."+strconv.Itoa(index)+"."+"src-vrf", item.SrcVrf.ValueString())
			}
			if !item.SrcIpv6.IsNull() && !item.SrcIpv6.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv6-list-with-both-vrf.ipv6"+"."+strconv.Itoa(index)+"."+"src-ipv6", item.SrcIpv6.ValueString())
			}
			if !item.TemplateName.IsNull() && !item.TemplateName.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv6-list-with-both-vrf.ipv6"+"."+strconv.Itoa(index)+"."+"template-name", item.TemplateName.ValueString())
			}
		}
	}
	if len(data.Ipv6WithoutVrfs) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv6-list-without-vrf.ipv6", []interface{}{})
		for index, item := range data.Ipv6WithoutVrfs {
			if !item.DestIpv6.IsNull() && !item.DestIpv6.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv6-list-without-vrf.ipv6"+"."+strconv.Itoa(index)+"."+"dest-ipv6", item.DestIpv6.ValueString())
			}
			if !item.SrcIpv6.IsNull() && !item.SrcIpv6.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv6-list-without-vrf.ipv6"+"."+strconv.Itoa(index)+"."+"src-ipv6", item.SrcIpv6.ValueString())
			}
			if !item.TemplateName.IsNull() && !item.TemplateName.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv6-list-without-vrf.ipv6"+"."+strconv.Itoa(index)+"."+"template-name", item.TemplateName.ValueString())
			}
		}
	}
	if len(data.Ipv6WithSrcVrfs) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv6-list-with-src-vrf.ipv6", []interface{}{})
		for index, item := range data.Ipv6WithSrcVrfs {
			if !item.DestIpv6.IsNull() && !item.DestIpv6.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv6-list-with-src-vrf.ipv6"+"."+strconv.Itoa(index)+"."+"dest-ipv6", item.DestIpv6.ValueString())
			}
			if !item.SrcVrf.IsNull() && !item.SrcVrf.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv6-list-with-src-vrf.ipv6"+"."+strconv.Itoa(index)+"."+"src-vrf", item.SrcVrf.ValueString())
			}
			if !item.SrcIpv6.IsNull() && !item.SrcIpv6.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv6-list-with-src-vrf.ipv6"+"."+strconv.Itoa(index)+"."+"src-ipv6", item.SrcIpv6.ValueString())
			}
			if !item.TemplateName.IsNull() && !item.TemplateName.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv6-list-with-src-vrf.ipv6"+"."+strconv.Itoa(index)+"."+"template-name", item.TemplateName.ValueString())
			}
		}
	}
	if len(data.Ipv6WithDstVrfs) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv6-list-with-dst-vrf.ipv6", []interface{}{})
		for index, item := range data.Ipv6WithDstVrfs {
			if !item.DstVrf.IsNull() && !item.DstVrf.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv6-list-with-dst-vrf.ipv6"+"."+strconv.Itoa(index)+"."+"dst-vrf", item.DstVrf.ValueString())
			}
			if !item.DestIpv6.IsNull() && !item.DestIpv6.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv6-list-with-dst-vrf.ipv6"+"."+strconv.Itoa(index)+"."+"dest-ipv6", item.DestIpv6.ValueString())
			}
			if !item.SrcIpv6.IsNull() && !item.SrcIpv6.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv6-list-with-dst-vrf.ipv6"+"."+strconv.Itoa(index)+"."+"src-ipv6", item.SrcIpv6.ValueString())
			}
			if !item.TemplateName.IsNull() && !item.TemplateName.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-bfd:map.ipv6-list-with-dst-vrf.ipv6"+"."+strconv.Itoa(index)+"."+"template-name", item.TemplateName.ValueString())
			}
		}
	}
	return body
}

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

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

func (data *BFD) 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.Ipv4BothVrfs {
		keys := [...]string{"dst-vrf", "dest-ip", "src-vrf", "src-ip"}
		keyValues := [...]string{data.Ipv4BothVrfs[i].DstVrf.ValueString(), data.Ipv4BothVrfs[i].DestIp.ValueString(), data.Ipv4BothVrfs[i].SrcVrf.ValueString(), data.Ipv4BothVrfs[i].SrcIp.ValueString()}

		var r gjson.Result
		res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv4-list-with-both-vrf.ipv4").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("dst-vrf"); value.Exists() && !data.Ipv4BothVrfs[i].DstVrf.IsNull() {
			data.Ipv4BothVrfs[i].DstVrf = types.StringValue(value.String())
		} else {
			data.Ipv4BothVrfs[i].DstVrf = types.StringNull()
		}
		if value := r.Get("dest-ip"); value.Exists() && !data.Ipv4BothVrfs[i].DestIp.IsNull() {
			data.Ipv4BothVrfs[i].DestIp = types.StringValue(value.String())
		} else {
			data.Ipv4BothVrfs[i].DestIp = types.StringNull()
		}
		if value := r.Get("src-vrf"); value.Exists() && !data.Ipv4BothVrfs[i].SrcVrf.IsNull() {
			data.Ipv4BothVrfs[i].SrcVrf = types.StringValue(value.String())
		} else {
			data.Ipv4BothVrfs[i].SrcVrf = types.StringNull()
		}
		if value := r.Get("src-ip"); value.Exists() && !data.Ipv4BothVrfs[i].SrcIp.IsNull() {
			data.Ipv4BothVrfs[i].SrcIp = types.StringValue(value.String())
		} else {
			data.Ipv4BothVrfs[i].SrcIp = types.StringNull()
		}
		if value := r.Get("template-name"); value.Exists() && !data.Ipv4BothVrfs[i].TemplateName.IsNull() {
			data.Ipv4BothVrfs[i].TemplateName = types.StringValue(value.String())
		} else {
			data.Ipv4BothVrfs[i].TemplateName = types.StringNull()
		}
	}
	for i := range data.Ipv4WithoutVrfs {
		keys := [...]string{"dest-ip", "src-ip"}
		keyValues := [...]string{data.Ipv4WithoutVrfs[i].DestIp.ValueString(), data.Ipv4WithoutVrfs[i].SrcIp.ValueString()}

		var r gjson.Result
		res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv4-list-without-vrf.ipv4").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("dest-ip"); value.Exists() && !data.Ipv4WithoutVrfs[i].DestIp.IsNull() {
			data.Ipv4WithoutVrfs[i].DestIp = types.StringValue(value.String())
		} else {
			data.Ipv4WithoutVrfs[i].DestIp = types.StringNull()
		}
		if value := r.Get("src-ip"); value.Exists() && !data.Ipv4WithoutVrfs[i].SrcIp.IsNull() {
			data.Ipv4WithoutVrfs[i].SrcIp = types.StringValue(value.String())
		} else {
			data.Ipv4WithoutVrfs[i].SrcIp = types.StringNull()
		}
		if value := r.Get("template-name"); value.Exists() && !data.Ipv4WithoutVrfs[i].TemplateName.IsNull() {
			data.Ipv4WithoutVrfs[i].TemplateName = types.StringValue(value.String())
		} else {
			data.Ipv4WithoutVrfs[i].TemplateName = types.StringNull()
		}
	}
	for i := range data.Ipv4WithSrcVrfs {
		keys := [...]string{"dest-ip", "src-vrf", "src-ip"}
		keyValues := [...]string{data.Ipv4WithSrcVrfs[i].DestIp.ValueString(), data.Ipv4WithSrcVrfs[i].SrcVrf.ValueString(), data.Ipv4WithSrcVrfs[i].SrcIp.ValueString()}

		var r gjson.Result
		res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv4-list-with-src-vrf.ipv4").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("dest-ip"); value.Exists() && !data.Ipv4WithSrcVrfs[i].DestIp.IsNull() {
			data.Ipv4WithSrcVrfs[i].DestIp = types.StringValue(value.String())
		} else {
			data.Ipv4WithSrcVrfs[i].DestIp = types.StringNull()
		}
		if value := r.Get("src-vrf"); value.Exists() && !data.Ipv4WithSrcVrfs[i].SrcVrf.IsNull() {
			data.Ipv4WithSrcVrfs[i].SrcVrf = types.StringValue(value.String())
		} else {
			data.Ipv4WithSrcVrfs[i].SrcVrf = types.StringNull()
		}
		if value := r.Get("src-ip"); value.Exists() && !data.Ipv4WithSrcVrfs[i].SrcIp.IsNull() {
			data.Ipv4WithSrcVrfs[i].SrcIp = types.StringValue(value.String())
		} else {
			data.Ipv4WithSrcVrfs[i].SrcIp = types.StringNull()
		}
		if value := r.Get("template-name"); value.Exists() && !data.Ipv4WithSrcVrfs[i].TemplateName.IsNull() {
			data.Ipv4WithSrcVrfs[i].TemplateName = types.StringValue(value.String())
		} else {
			data.Ipv4WithSrcVrfs[i].TemplateName = types.StringNull()
		}
	}
	for i := range data.Ipv4WithDstVrfs {
		keys := [...]string{"dst-vrf", "dest-ip", "src-ip"}
		keyValues := [...]string{data.Ipv4WithDstVrfs[i].DstVrf.ValueString(), data.Ipv4WithDstVrfs[i].DestIp.ValueString(), data.Ipv4WithDstVrfs[i].SrcIp.ValueString()}

		var r gjson.Result
		res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv4-list-with-dst-vrf.ipv4").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("dst-vrf"); value.Exists() && !data.Ipv4WithDstVrfs[i].DstVrf.IsNull() {
			data.Ipv4WithDstVrfs[i].DstVrf = types.StringValue(value.String())
		} else {
			data.Ipv4WithDstVrfs[i].DstVrf = types.StringNull()
		}
		if value := r.Get("dest-ip"); value.Exists() && !data.Ipv4WithDstVrfs[i].DestIp.IsNull() {
			data.Ipv4WithDstVrfs[i].DestIp = types.StringValue(value.String())
		} else {
			data.Ipv4WithDstVrfs[i].DestIp = types.StringNull()
		}
		if value := r.Get("src-ip"); value.Exists() && !data.Ipv4WithDstVrfs[i].SrcIp.IsNull() {
			data.Ipv4WithDstVrfs[i].SrcIp = types.StringValue(value.String())
		} else {
			data.Ipv4WithDstVrfs[i].SrcIp = types.StringNull()
		}
		if value := r.Get("template-name"); value.Exists() && !data.Ipv4WithDstVrfs[i].TemplateName.IsNull() {
			data.Ipv4WithDstVrfs[i].TemplateName = types.StringValue(value.String())
		} else {
			data.Ipv4WithDstVrfs[i].TemplateName = types.StringNull()
		}
	}
	for i := range data.Ipv6WithBothVrfs {
		keys := [...]string{"dst-vrf", "dest-ipv6", "src-vrf", "src-ipv6"}
		keyValues := [...]string{data.Ipv6WithBothVrfs[i].DstVrf.ValueString(), data.Ipv6WithBothVrfs[i].DestIpv6.ValueString(), data.Ipv6WithBothVrfs[i].SrcVrf.ValueString(), data.Ipv6WithBothVrfs[i].SrcIpv6.ValueString()}

		var r gjson.Result
		res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv6-list-with-both-vrf.ipv6").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("dst-vrf"); value.Exists() && !data.Ipv6WithBothVrfs[i].DstVrf.IsNull() {
			data.Ipv6WithBothVrfs[i].DstVrf = types.StringValue(value.String())
		} else {
			data.Ipv6WithBothVrfs[i].DstVrf = types.StringNull()
		}
		if value := r.Get("dest-ipv6"); value.Exists() && !data.Ipv6WithBothVrfs[i].DestIpv6.IsNull() {
			data.Ipv6WithBothVrfs[i].DestIpv6 = types.StringValue(value.String())
		} else {
			data.Ipv6WithBothVrfs[i].DestIpv6 = types.StringNull()
		}
		if value := r.Get("src-vrf"); value.Exists() && !data.Ipv6WithBothVrfs[i].SrcVrf.IsNull() {
			data.Ipv6WithBothVrfs[i].SrcVrf = types.StringValue(value.String())
		} else {
			data.Ipv6WithBothVrfs[i].SrcVrf = types.StringNull()
		}
		if value := r.Get("src-ipv6"); value.Exists() && !data.Ipv6WithBothVrfs[i].SrcIpv6.IsNull() {
			data.Ipv6WithBothVrfs[i].SrcIpv6 = types.StringValue(value.String())
		} else {
			data.Ipv6WithBothVrfs[i].SrcIpv6 = types.StringNull()
		}
		if value := r.Get("template-name"); value.Exists() && !data.Ipv6WithBothVrfs[i].TemplateName.IsNull() {
			data.Ipv6WithBothVrfs[i].TemplateName = types.StringValue(value.String())
		} else {
			data.Ipv6WithBothVrfs[i].TemplateName = types.StringNull()
		}
	}
	for i := range data.Ipv6WithoutVrfs {
		keys := [...]string{"dest-ipv6", "src-ipv6"}
		keyValues := [...]string{data.Ipv6WithoutVrfs[i].DestIpv6.ValueString(), data.Ipv6WithoutVrfs[i].SrcIpv6.ValueString()}

		var r gjson.Result
		res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv6-list-without-vrf.ipv6").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("dest-ipv6"); value.Exists() && !data.Ipv6WithoutVrfs[i].DestIpv6.IsNull() {
			data.Ipv6WithoutVrfs[i].DestIpv6 = types.StringValue(value.String())
		} else {
			data.Ipv6WithoutVrfs[i].DestIpv6 = types.StringNull()
		}
		if value := r.Get("src-ipv6"); value.Exists() && !data.Ipv6WithoutVrfs[i].SrcIpv6.IsNull() {
			data.Ipv6WithoutVrfs[i].SrcIpv6 = types.StringValue(value.String())
		} else {
			data.Ipv6WithoutVrfs[i].SrcIpv6 = types.StringNull()
		}
		if value := r.Get("template-name"); value.Exists() && !data.Ipv6WithoutVrfs[i].TemplateName.IsNull() {
			data.Ipv6WithoutVrfs[i].TemplateName = types.StringValue(value.String())
		} else {
			data.Ipv6WithoutVrfs[i].TemplateName = types.StringNull()
		}
	}
	for i := range data.Ipv6WithSrcVrfs {
		keys := [...]string{"dest-ipv6", "src-vrf", "src-ipv6"}
		keyValues := [...]string{data.Ipv6WithSrcVrfs[i].DestIpv6.ValueString(), data.Ipv6WithSrcVrfs[i].SrcVrf.ValueString(), data.Ipv6WithSrcVrfs[i].SrcIpv6.ValueString()}

		var r gjson.Result
		res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv6-list-with-src-vrf.ipv6").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("dest-ipv6"); value.Exists() && !data.Ipv6WithSrcVrfs[i].DestIpv6.IsNull() {
			data.Ipv6WithSrcVrfs[i].DestIpv6 = types.StringValue(value.String())
		} else {
			data.Ipv6WithSrcVrfs[i].DestIpv6 = types.StringNull()
		}
		if value := r.Get("src-vrf"); value.Exists() && !data.Ipv6WithSrcVrfs[i].SrcVrf.IsNull() {
			data.Ipv6WithSrcVrfs[i].SrcVrf = types.StringValue(value.String())
		} else {
			data.Ipv6WithSrcVrfs[i].SrcVrf = types.StringNull()
		}
		if value := r.Get("src-ipv6"); value.Exists() && !data.Ipv6WithSrcVrfs[i].SrcIpv6.IsNull() {
			data.Ipv6WithSrcVrfs[i].SrcIpv6 = types.StringValue(value.String())
		} else {
			data.Ipv6WithSrcVrfs[i].SrcIpv6 = types.StringNull()
		}
		if value := r.Get("template-name"); value.Exists() && !data.Ipv6WithSrcVrfs[i].TemplateName.IsNull() {
			data.Ipv6WithSrcVrfs[i].TemplateName = types.StringValue(value.String())
		} else {
			data.Ipv6WithSrcVrfs[i].TemplateName = types.StringNull()
		}
	}
	for i := range data.Ipv6WithDstVrfs {
		keys := [...]string{"dst-vrf", "dest-ipv6", "src-ipv6"}
		keyValues := [...]string{data.Ipv6WithDstVrfs[i].DstVrf.ValueString(), data.Ipv6WithDstVrfs[i].DestIpv6.ValueString(), data.Ipv6WithDstVrfs[i].SrcIpv6.ValueString()}

		var r gjson.Result
		res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv6-list-with-dst-vrf.ipv6").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("dst-vrf"); value.Exists() && !data.Ipv6WithDstVrfs[i].DstVrf.IsNull() {
			data.Ipv6WithDstVrfs[i].DstVrf = types.StringValue(value.String())
		} else {
			data.Ipv6WithDstVrfs[i].DstVrf = types.StringNull()
		}
		if value := r.Get("dest-ipv6"); value.Exists() && !data.Ipv6WithDstVrfs[i].DestIpv6.IsNull() {
			data.Ipv6WithDstVrfs[i].DestIpv6 = types.StringValue(value.String())
		} else {
			data.Ipv6WithDstVrfs[i].DestIpv6 = types.StringNull()
		}
		if value := r.Get("src-ipv6"); value.Exists() && !data.Ipv6WithDstVrfs[i].SrcIpv6.IsNull() {
			data.Ipv6WithDstVrfs[i].SrcIpv6 = types.StringValue(value.String())
		} else {
			data.Ipv6WithDstVrfs[i].SrcIpv6 = types.StringNull()
		}
		if value := r.Get("template-name"); value.Exists() && !data.Ipv6WithDstVrfs[i].TemplateName.IsNull() {
			data.Ipv6WithDstVrfs[i].TemplateName = types.StringValue(value.String())
		} else {
			data.Ipv6WithDstVrfs[i].TemplateName = types.StringNull()
		}
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-bfd:slow-timers"); value.Exists() && !data.SlowTimers.IsNull() {
		data.SlowTimers = types.Int64Value(value.Int())
	} else {
		data.SlowTimers = types.Int64Null()
	}
}

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

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

func (data *BFD) fromBody(ctx context.Context, res gjson.Result) {
	prefix := helpers.LastElement(data.getPath()) + "."
	if res.Get(helpers.LastElement(data.getPath())).IsArray() {
		prefix += "0."
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv4-list-with-both-vrf.ipv4"); value.Exists() {
		data.Ipv4BothVrfs = make([]BFDIpv4BothVrfs, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := BFDIpv4BothVrfs{}
			if cValue := v.Get("dst-vrf"); cValue.Exists() {
				item.DstVrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("dest-ip"); cValue.Exists() {
				item.DestIp = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-vrf"); cValue.Exists() {
				item.SrcVrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-ip"); cValue.Exists() {
				item.SrcIp = types.StringValue(cValue.String())
			}
			if cValue := v.Get("template-name"); cValue.Exists() {
				item.TemplateName = types.StringValue(cValue.String())
			}
			data.Ipv4BothVrfs = append(data.Ipv4BothVrfs, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv4-list-without-vrf.ipv4"); value.Exists() {
		data.Ipv4WithoutVrfs = make([]BFDIpv4WithoutVrfs, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := BFDIpv4WithoutVrfs{}
			if cValue := v.Get("dest-ip"); cValue.Exists() {
				item.DestIp = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-ip"); cValue.Exists() {
				item.SrcIp = types.StringValue(cValue.String())
			}
			if cValue := v.Get("template-name"); cValue.Exists() {
				item.TemplateName = types.StringValue(cValue.String())
			}
			data.Ipv4WithoutVrfs = append(data.Ipv4WithoutVrfs, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv4-list-with-src-vrf.ipv4"); value.Exists() {
		data.Ipv4WithSrcVrfs = make([]BFDIpv4WithSrcVrfs, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := BFDIpv4WithSrcVrfs{}
			if cValue := v.Get("dest-ip"); cValue.Exists() {
				item.DestIp = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-vrf"); cValue.Exists() {
				item.SrcVrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-ip"); cValue.Exists() {
				item.SrcIp = types.StringValue(cValue.String())
			}
			if cValue := v.Get("template-name"); cValue.Exists() {
				item.TemplateName = types.StringValue(cValue.String())
			}
			data.Ipv4WithSrcVrfs = append(data.Ipv4WithSrcVrfs, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv4-list-with-dst-vrf.ipv4"); value.Exists() {
		data.Ipv4WithDstVrfs = make([]BFDIpv4WithDstVrfs, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := BFDIpv4WithDstVrfs{}
			if cValue := v.Get("dst-vrf"); cValue.Exists() {
				item.DstVrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("dest-ip"); cValue.Exists() {
				item.DestIp = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-ip"); cValue.Exists() {
				item.SrcIp = types.StringValue(cValue.String())
			}
			if cValue := v.Get("template-name"); cValue.Exists() {
				item.TemplateName = types.StringValue(cValue.String())
			}
			data.Ipv4WithDstVrfs = append(data.Ipv4WithDstVrfs, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv6-list-with-both-vrf.ipv6"); value.Exists() {
		data.Ipv6WithBothVrfs = make([]BFDIpv6WithBothVrfs, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := BFDIpv6WithBothVrfs{}
			if cValue := v.Get("dst-vrf"); cValue.Exists() {
				item.DstVrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("dest-ipv6"); cValue.Exists() {
				item.DestIpv6 = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-vrf"); cValue.Exists() {
				item.SrcVrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-ipv6"); cValue.Exists() {
				item.SrcIpv6 = types.StringValue(cValue.String())
			}
			if cValue := v.Get("template-name"); cValue.Exists() {
				item.TemplateName = types.StringValue(cValue.String())
			}
			data.Ipv6WithBothVrfs = append(data.Ipv6WithBothVrfs, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv6-list-without-vrf.ipv6"); value.Exists() {
		data.Ipv6WithoutVrfs = make([]BFDIpv6WithoutVrfs, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := BFDIpv6WithoutVrfs{}
			if cValue := v.Get("dest-ipv6"); cValue.Exists() {
				item.DestIpv6 = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-ipv6"); cValue.Exists() {
				item.SrcIpv6 = types.StringValue(cValue.String())
			}
			if cValue := v.Get("template-name"); cValue.Exists() {
				item.TemplateName = types.StringValue(cValue.String())
			}
			data.Ipv6WithoutVrfs = append(data.Ipv6WithoutVrfs, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv6-list-with-src-vrf.ipv6"); value.Exists() {
		data.Ipv6WithSrcVrfs = make([]BFDIpv6WithSrcVrfs, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := BFDIpv6WithSrcVrfs{}
			if cValue := v.Get("dest-ipv6"); cValue.Exists() {
				item.DestIpv6 = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-vrf"); cValue.Exists() {
				item.SrcVrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-ipv6"); cValue.Exists() {
				item.SrcIpv6 = types.StringValue(cValue.String())
			}
			if cValue := v.Get("template-name"); cValue.Exists() {
				item.TemplateName = types.StringValue(cValue.String())
			}
			data.Ipv6WithSrcVrfs = append(data.Ipv6WithSrcVrfs, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv6-list-with-dst-vrf.ipv6"); value.Exists() {
		data.Ipv6WithDstVrfs = make([]BFDIpv6WithDstVrfs, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := BFDIpv6WithDstVrfs{}
			if cValue := v.Get("dst-vrf"); cValue.Exists() {
				item.DstVrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("dest-ipv6"); cValue.Exists() {
				item.DestIpv6 = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-ipv6"); cValue.Exists() {
				item.SrcIpv6 = types.StringValue(cValue.String())
			}
			if cValue := v.Get("template-name"); cValue.Exists() {
				item.TemplateName = types.StringValue(cValue.String())
			}
			data.Ipv6WithDstVrfs = append(data.Ipv6WithDstVrfs, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-bfd:slow-timers"); value.Exists() {
		data.SlowTimers = types.Int64Value(value.Int())
	}
}

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

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

func (data *BFDData) fromBody(ctx context.Context, res gjson.Result) {
	prefix := helpers.LastElement(data.getPath()) + "."
	if res.Get(helpers.LastElement(data.getPath())).IsArray() {
		prefix += "0."
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv4-list-with-both-vrf.ipv4"); value.Exists() {
		data.Ipv4BothVrfs = make([]BFDIpv4BothVrfs, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := BFDIpv4BothVrfs{}
			if cValue := v.Get("dst-vrf"); cValue.Exists() {
				item.DstVrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("dest-ip"); cValue.Exists() {
				item.DestIp = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-vrf"); cValue.Exists() {
				item.SrcVrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-ip"); cValue.Exists() {
				item.SrcIp = types.StringValue(cValue.String())
			}
			if cValue := v.Get("template-name"); cValue.Exists() {
				item.TemplateName = types.StringValue(cValue.String())
			}
			data.Ipv4BothVrfs = append(data.Ipv4BothVrfs, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv4-list-without-vrf.ipv4"); value.Exists() {
		data.Ipv4WithoutVrfs = make([]BFDIpv4WithoutVrfs, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := BFDIpv4WithoutVrfs{}
			if cValue := v.Get("dest-ip"); cValue.Exists() {
				item.DestIp = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-ip"); cValue.Exists() {
				item.SrcIp = types.StringValue(cValue.String())
			}
			if cValue := v.Get("template-name"); cValue.Exists() {
				item.TemplateName = types.StringValue(cValue.String())
			}
			data.Ipv4WithoutVrfs = append(data.Ipv4WithoutVrfs, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv4-list-with-src-vrf.ipv4"); value.Exists() {
		data.Ipv4WithSrcVrfs = make([]BFDIpv4WithSrcVrfs, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := BFDIpv4WithSrcVrfs{}
			if cValue := v.Get("dest-ip"); cValue.Exists() {
				item.DestIp = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-vrf"); cValue.Exists() {
				item.SrcVrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-ip"); cValue.Exists() {
				item.SrcIp = types.StringValue(cValue.String())
			}
			if cValue := v.Get("template-name"); cValue.Exists() {
				item.TemplateName = types.StringValue(cValue.String())
			}
			data.Ipv4WithSrcVrfs = append(data.Ipv4WithSrcVrfs, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv4-list-with-dst-vrf.ipv4"); value.Exists() {
		data.Ipv4WithDstVrfs = make([]BFDIpv4WithDstVrfs, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := BFDIpv4WithDstVrfs{}
			if cValue := v.Get("dst-vrf"); cValue.Exists() {
				item.DstVrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("dest-ip"); cValue.Exists() {
				item.DestIp = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-ip"); cValue.Exists() {
				item.SrcIp = types.StringValue(cValue.String())
			}
			if cValue := v.Get("template-name"); cValue.Exists() {
				item.TemplateName = types.StringValue(cValue.String())
			}
			data.Ipv4WithDstVrfs = append(data.Ipv4WithDstVrfs, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv6-list-with-both-vrf.ipv6"); value.Exists() {
		data.Ipv6WithBothVrfs = make([]BFDIpv6WithBothVrfs, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := BFDIpv6WithBothVrfs{}
			if cValue := v.Get("dst-vrf"); cValue.Exists() {
				item.DstVrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("dest-ipv6"); cValue.Exists() {
				item.DestIpv6 = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-vrf"); cValue.Exists() {
				item.SrcVrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-ipv6"); cValue.Exists() {
				item.SrcIpv6 = types.StringValue(cValue.String())
			}
			if cValue := v.Get("template-name"); cValue.Exists() {
				item.TemplateName = types.StringValue(cValue.String())
			}
			data.Ipv6WithBothVrfs = append(data.Ipv6WithBothVrfs, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv6-list-without-vrf.ipv6"); value.Exists() {
		data.Ipv6WithoutVrfs = make([]BFDIpv6WithoutVrfs, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := BFDIpv6WithoutVrfs{}
			if cValue := v.Get("dest-ipv6"); cValue.Exists() {
				item.DestIpv6 = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-ipv6"); cValue.Exists() {
				item.SrcIpv6 = types.StringValue(cValue.String())
			}
			if cValue := v.Get("template-name"); cValue.Exists() {
				item.TemplateName = types.StringValue(cValue.String())
			}
			data.Ipv6WithoutVrfs = append(data.Ipv6WithoutVrfs, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv6-list-with-src-vrf.ipv6"); value.Exists() {
		data.Ipv6WithSrcVrfs = make([]BFDIpv6WithSrcVrfs, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := BFDIpv6WithSrcVrfs{}
			if cValue := v.Get("dest-ipv6"); cValue.Exists() {
				item.DestIpv6 = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-vrf"); cValue.Exists() {
				item.SrcVrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-ipv6"); cValue.Exists() {
				item.SrcIpv6 = types.StringValue(cValue.String())
			}
			if cValue := v.Get("template-name"); cValue.Exists() {
				item.TemplateName = types.StringValue(cValue.String())
			}
			data.Ipv6WithSrcVrfs = append(data.Ipv6WithSrcVrfs, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-bfd:map.ipv6-list-with-dst-vrf.ipv6"); value.Exists() {
		data.Ipv6WithDstVrfs = make([]BFDIpv6WithDstVrfs, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := BFDIpv6WithDstVrfs{}
			if cValue := v.Get("dst-vrf"); cValue.Exists() {
				item.DstVrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("dest-ipv6"); cValue.Exists() {
				item.DestIpv6 = types.StringValue(cValue.String())
			}
			if cValue := v.Get("src-ipv6"); cValue.Exists() {
				item.SrcIpv6 = types.StringValue(cValue.String())
			}
			if cValue := v.Get("template-name"); cValue.Exists() {
				item.TemplateName = types.StringValue(cValue.String())
			}
			data.Ipv6WithDstVrfs = append(data.Ipv6WithDstVrfs, item)
			return true
		})
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-bfd:slow-timers"); value.Exists() {
		data.SlowTimers = types.Int64Value(value.Int())
	}
}

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

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

func (data *BFD) getDeletedItems(ctx context.Context, state BFD) []string {
	deletedItems := make([]string, 0)
	if !state.SlowTimers.IsNull() && data.SlowTimers.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:slow-timers", state.getPath()))
	}
	for i := range state.Ipv6WithDstVrfs {
		stateKeyValues := [...]string{state.Ipv6WithDstVrfs[i].DstVrf.ValueString(), state.Ipv6WithDstVrfs[i].DestIpv6.ValueString(), state.Ipv6WithDstVrfs[i].SrcIpv6.ValueString()}

		emptyKeys := true
		if !reflect.ValueOf(state.Ipv6WithDstVrfs[i].DstVrf.ValueString()).IsZero() {
			emptyKeys = false
		}
		if !reflect.ValueOf(state.Ipv6WithDstVrfs[i].DestIpv6.ValueString()).IsZero() {
			emptyKeys = false
		}
		if !reflect.ValueOf(state.Ipv6WithDstVrfs[i].SrcIpv6.ValueString()).IsZero() {
			emptyKeys = false
		}
		if emptyKeys {
			continue
		}

		found := false
		for j := range data.Ipv6WithDstVrfs {
			found = true
			if state.Ipv6WithDstVrfs[i].DstVrf.ValueString() != data.Ipv6WithDstVrfs[j].DstVrf.ValueString() {
				found = false
			}
			if state.Ipv6WithDstVrfs[i].DestIpv6.ValueString() != data.Ipv6WithDstVrfs[j].DestIpv6.ValueString() {
				found = false
			}
			if state.Ipv6WithDstVrfs[i].SrcIpv6.ValueString() != data.Ipv6WithDstVrfs[j].SrcIpv6.ValueString() {
				found = false
			}
			if found {
				if !state.Ipv6WithDstVrfs[i].TemplateName.IsNull() && data.Ipv6WithDstVrfs[j].TemplateName.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv6-list-with-dst-vrf/ipv6=%v/template-name", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv6-list-with-dst-vrf/ipv6=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.Ipv6WithSrcVrfs {
		stateKeyValues := [...]string{state.Ipv6WithSrcVrfs[i].DestIpv6.ValueString(), state.Ipv6WithSrcVrfs[i].SrcVrf.ValueString(), state.Ipv6WithSrcVrfs[i].SrcIpv6.ValueString()}

		emptyKeys := true
		if !reflect.ValueOf(state.Ipv6WithSrcVrfs[i].DestIpv6.ValueString()).IsZero() {
			emptyKeys = false
		}
		if !reflect.ValueOf(state.Ipv6WithSrcVrfs[i].SrcVrf.ValueString()).IsZero() {
			emptyKeys = false
		}
		if !reflect.ValueOf(state.Ipv6WithSrcVrfs[i].SrcIpv6.ValueString()).IsZero() {
			emptyKeys = false
		}
		if emptyKeys {
			continue
		}

		found := false
		for j := range data.Ipv6WithSrcVrfs {
			found = true
			if state.Ipv6WithSrcVrfs[i].DestIpv6.ValueString() != data.Ipv6WithSrcVrfs[j].DestIpv6.ValueString() {
				found = false
			}
			if state.Ipv6WithSrcVrfs[i].SrcVrf.ValueString() != data.Ipv6WithSrcVrfs[j].SrcVrf.ValueString() {
				found = false
			}
			if state.Ipv6WithSrcVrfs[i].SrcIpv6.ValueString() != data.Ipv6WithSrcVrfs[j].SrcIpv6.ValueString() {
				found = false
			}
			if found {
				if !state.Ipv6WithSrcVrfs[i].TemplateName.IsNull() && data.Ipv6WithSrcVrfs[j].TemplateName.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv6-list-with-src-vrf/ipv6=%v/template-name", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv6-list-with-src-vrf/ipv6=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.Ipv6WithoutVrfs {
		stateKeyValues := [...]string{state.Ipv6WithoutVrfs[i].DestIpv6.ValueString(), state.Ipv6WithoutVrfs[i].SrcIpv6.ValueString()}

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

		found := false
		for j := range data.Ipv6WithoutVrfs {
			found = true
			if state.Ipv6WithoutVrfs[i].DestIpv6.ValueString() != data.Ipv6WithoutVrfs[j].DestIpv6.ValueString() {
				found = false
			}
			if state.Ipv6WithoutVrfs[i].SrcIpv6.ValueString() != data.Ipv6WithoutVrfs[j].SrcIpv6.ValueString() {
				found = false
			}
			if found {
				if !state.Ipv6WithoutVrfs[i].TemplateName.IsNull() && data.Ipv6WithoutVrfs[j].TemplateName.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv6-list-without-vrf/ipv6=%v/template-name", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv6-list-without-vrf/ipv6=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.Ipv6WithBothVrfs {
		stateKeyValues := [...]string{state.Ipv6WithBothVrfs[i].DstVrf.ValueString(), state.Ipv6WithBothVrfs[i].DestIpv6.ValueString(), state.Ipv6WithBothVrfs[i].SrcVrf.ValueString(), state.Ipv6WithBothVrfs[i].SrcIpv6.ValueString()}

		emptyKeys := true
		if !reflect.ValueOf(state.Ipv6WithBothVrfs[i].DstVrf.ValueString()).IsZero() {
			emptyKeys = false
		}
		if !reflect.ValueOf(state.Ipv6WithBothVrfs[i].DestIpv6.ValueString()).IsZero() {
			emptyKeys = false
		}
		if !reflect.ValueOf(state.Ipv6WithBothVrfs[i].SrcVrf.ValueString()).IsZero() {
			emptyKeys = false
		}
		if !reflect.ValueOf(state.Ipv6WithBothVrfs[i].SrcIpv6.ValueString()).IsZero() {
			emptyKeys = false
		}
		if emptyKeys {
			continue
		}

		found := false
		for j := range data.Ipv6WithBothVrfs {
			found = true
			if state.Ipv6WithBothVrfs[i].DstVrf.ValueString() != data.Ipv6WithBothVrfs[j].DstVrf.ValueString() {
				found = false
			}
			if state.Ipv6WithBothVrfs[i].DestIpv6.ValueString() != data.Ipv6WithBothVrfs[j].DestIpv6.ValueString() {
				found = false
			}
			if state.Ipv6WithBothVrfs[i].SrcVrf.ValueString() != data.Ipv6WithBothVrfs[j].SrcVrf.ValueString() {
				found = false
			}
			if state.Ipv6WithBothVrfs[i].SrcIpv6.ValueString() != data.Ipv6WithBothVrfs[j].SrcIpv6.ValueString() {
				found = false
			}
			if found {
				if !state.Ipv6WithBothVrfs[i].TemplateName.IsNull() && data.Ipv6WithBothVrfs[j].TemplateName.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv6-list-with-both-vrf/ipv6=%v/template-name", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv6-list-with-both-vrf/ipv6=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.Ipv4WithDstVrfs {
		stateKeyValues := [...]string{state.Ipv4WithDstVrfs[i].DstVrf.ValueString(), state.Ipv4WithDstVrfs[i].DestIp.ValueString(), state.Ipv4WithDstVrfs[i].SrcIp.ValueString()}

		emptyKeys := true
		if !reflect.ValueOf(state.Ipv4WithDstVrfs[i].DstVrf.ValueString()).IsZero() {
			emptyKeys = false
		}
		if !reflect.ValueOf(state.Ipv4WithDstVrfs[i].DestIp.ValueString()).IsZero() {
			emptyKeys = false
		}
		if !reflect.ValueOf(state.Ipv4WithDstVrfs[i].SrcIp.ValueString()).IsZero() {
			emptyKeys = false
		}
		if emptyKeys {
			continue
		}

		found := false
		for j := range data.Ipv4WithDstVrfs {
			found = true
			if state.Ipv4WithDstVrfs[i].DstVrf.ValueString() != data.Ipv4WithDstVrfs[j].DstVrf.ValueString() {
				found = false
			}
			if state.Ipv4WithDstVrfs[i].DestIp.ValueString() != data.Ipv4WithDstVrfs[j].DestIp.ValueString() {
				found = false
			}
			if state.Ipv4WithDstVrfs[i].SrcIp.ValueString() != data.Ipv4WithDstVrfs[j].SrcIp.ValueString() {
				found = false
			}
			if found {
				if !state.Ipv4WithDstVrfs[i].TemplateName.IsNull() && data.Ipv4WithDstVrfs[j].TemplateName.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv4-list-with-dst-vrf/ipv4=%v/template-name", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv4-list-with-dst-vrf/ipv4=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.Ipv4WithSrcVrfs {
		stateKeyValues := [...]string{state.Ipv4WithSrcVrfs[i].DestIp.ValueString(), state.Ipv4WithSrcVrfs[i].SrcVrf.ValueString(), state.Ipv4WithSrcVrfs[i].SrcIp.ValueString()}

		emptyKeys := true
		if !reflect.ValueOf(state.Ipv4WithSrcVrfs[i].DestIp.ValueString()).IsZero() {
			emptyKeys = false
		}
		if !reflect.ValueOf(state.Ipv4WithSrcVrfs[i].SrcVrf.ValueString()).IsZero() {
			emptyKeys = false
		}
		if !reflect.ValueOf(state.Ipv4WithSrcVrfs[i].SrcIp.ValueString()).IsZero() {
			emptyKeys = false
		}
		if emptyKeys {
			continue
		}

		found := false
		for j := range data.Ipv4WithSrcVrfs {
			found = true
			if state.Ipv4WithSrcVrfs[i].DestIp.ValueString() != data.Ipv4WithSrcVrfs[j].DestIp.ValueString() {
				found = false
			}
			if state.Ipv4WithSrcVrfs[i].SrcVrf.ValueString() != data.Ipv4WithSrcVrfs[j].SrcVrf.ValueString() {
				found = false
			}
			if state.Ipv4WithSrcVrfs[i].SrcIp.ValueString() != data.Ipv4WithSrcVrfs[j].SrcIp.ValueString() {
				found = false
			}
			if found {
				if !state.Ipv4WithSrcVrfs[i].TemplateName.IsNull() && data.Ipv4WithSrcVrfs[j].TemplateName.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv4-list-with-src-vrf/ipv4=%v/template-name", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv4-list-with-src-vrf/ipv4=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.Ipv4WithoutVrfs {
		stateKeyValues := [...]string{state.Ipv4WithoutVrfs[i].DestIp.ValueString(), state.Ipv4WithoutVrfs[i].SrcIp.ValueString()}

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

		found := false
		for j := range data.Ipv4WithoutVrfs {
			found = true
			if state.Ipv4WithoutVrfs[i].DestIp.ValueString() != data.Ipv4WithoutVrfs[j].DestIp.ValueString() {
				found = false
			}
			if state.Ipv4WithoutVrfs[i].SrcIp.ValueString() != data.Ipv4WithoutVrfs[j].SrcIp.ValueString() {
				found = false
			}
			if found {
				if !state.Ipv4WithoutVrfs[i].TemplateName.IsNull() && data.Ipv4WithoutVrfs[j].TemplateName.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv4-list-without-vrf/ipv4=%v/template-name", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv4-list-without-vrf/ipv4=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.Ipv4BothVrfs {
		stateKeyValues := [...]string{state.Ipv4BothVrfs[i].DstVrf.ValueString(), state.Ipv4BothVrfs[i].DestIp.ValueString(), state.Ipv4BothVrfs[i].SrcVrf.ValueString(), state.Ipv4BothVrfs[i].SrcIp.ValueString()}

		emptyKeys := true
		if !reflect.ValueOf(state.Ipv4BothVrfs[i].DstVrf.ValueString()).IsZero() {
			emptyKeys = false
		}
		if !reflect.ValueOf(state.Ipv4BothVrfs[i].DestIp.ValueString()).IsZero() {
			emptyKeys = false
		}
		if !reflect.ValueOf(state.Ipv4BothVrfs[i].SrcVrf.ValueString()).IsZero() {
			emptyKeys = false
		}
		if !reflect.ValueOf(state.Ipv4BothVrfs[i].SrcIp.ValueString()).IsZero() {
			emptyKeys = false
		}
		if emptyKeys {
			continue
		}

		found := false
		for j := range data.Ipv4BothVrfs {
			found = true
			if state.Ipv4BothVrfs[i].DstVrf.ValueString() != data.Ipv4BothVrfs[j].DstVrf.ValueString() {
				found = false
			}
			if state.Ipv4BothVrfs[i].DestIp.ValueString() != data.Ipv4BothVrfs[j].DestIp.ValueString() {
				found = false
			}
			if state.Ipv4BothVrfs[i].SrcVrf.ValueString() != data.Ipv4BothVrfs[j].SrcVrf.ValueString() {
				found = false
			}
			if state.Ipv4BothVrfs[i].SrcIp.ValueString() != data.Ipv4BothVrfs[j].SrcIp.ValueString() {
				found = false
			}
			if found {
				if !state.Ipv4BothVrfs[i].TemplateName.IsNull() && data.Ipv4BothVrfs[j].TemplateName.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv4-list-with-both-vrf/ipv4=%v/template-name", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv4-list-with-both-vrf/ipv4=%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 *BFD) getEmptyLeafsDelete(ctx context.Context) []string {
	emptyLeafsDelete := make([]string, 0)

	return emptyLeafsDelete
}

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

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

func (data *BFD) getDeletePaths(ctx context.Context) []string {
	var deletePaths []string
	if !data.SlowTimers.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:slow-timers", data.getPath()))
	}
	for i := range data.Ipv6WithDstVrfs {
		keyValues := [...]string{data.Ipv6WithDstVrfs[i].DstVrf.ValueString(), data.Ipv6WithDstVrfs[i].DestIpv6.ValueString(), data.Ipv6WithDstVrfs[i].SrcIpv6.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv6-list-with-dst-vrf/ipv6=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.Ipv6WithSrcVrfs {
		keyValues := [...]string{data.Ipv6WithSrcVrfs[i].DestIpv6.ValueString(), data.Ipv6WithSrcVrfs[i].SrcVrf.ValueString(), data.Ipv6WithSrcVrfs[i].SrcIpv6.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv6-list-with-src-vrf/ipv6=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.Ipv6WithoutVrfs {
		keyValues := [...]string{data.Ipv6WithoutVrfs[i].DestIpv6.ValueString(), data.Ipv6WithoutVrfs[i].SrcIpv6.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv6-list-without-vrf/ipv6=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.Ipv6WithBothVrfs {
		keyValues := [...]string{data.Ipv6WithBothVrfs[i].DstVrf.ValueString(), data.Ipv6WithBothVrfs[i].DestIpv6.ValueString(), data.Ipv6WithBothVrfs[i].SrcVrf.ValueString(), data.Ipv6WithBothVrfs[i].SrcIpv6.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv6-list-with-both-vrf/ipv6=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.Ipv4WithDstVrfs {
		keyValues := [...]string{data.Ipv4WithDstVrfs[i].DstVrf.ValueString(), data.Ipv4WithDstVrfs[i].DestIp.ValueString(), data.Ipv4WithDstVrfs[i].SrcIp.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv4-list-with-dst-vrf/ipv4=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.Ipv4WithSrcVrfs {
		keyValues := [...]string{data.Ipv4WithSrcVrfs[i].DestIp.ValueString(), data.Ipv4WithSrcVrfs[i].SrcVrf.ValueString(), data.Ipv4WithSrcVrfs[i].SrcIp.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv4-list-with-src-vrf/ipv4=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.Ipv4WithoutVrfs {
		keyValues := [...]string{data.Ipv4WithoutVrfs[i].DestIp.ValueString(), data.Ipv4WithoutVrfs[i].SrcIp.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv4-list-without-vrf/ipv4=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.Ipv4BothVrfs {
		keyValues := [...]string{data.Ipv4BothVrfs[i].DstVrf.ValueString(), data.Ipv4BothVrfs[i].DestIp.ValueString(), data.Ipv4BothVrfs[i].SrcVrf.ValueString(), data.Ipv4BothVrfs[i].SrcIp.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-bfd:map/ipv4-list-with-both-vrf/ipv4=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}

	return deletePaths
}

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