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

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

package provider

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

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

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

// Section below is generated&owned by "gen/generator.go". //template:begin types
type OSPF struct {
	Device                                             types.String                                             `tfsdk:"device"`
	Id                                                 types.String                                             `tfsdk:"id"`
	DeleteMode                                         types.String                                             `tfsdk:"delete_mode"`
	ProcessId                                          types.Int64                                              `tfsdk:"process_id"`
	BfdAllInterfaces                                   types.Bool                                               `tfsdk:"bfd_all_interfaces"`
	DefaultInformationOriginate                        types.Bool                                               `tfsdk:"default_information_originate"`
	DefaultInformationOriginateAlways                  types.Bool                                               `tfsdk:"default_information_originate_always"`
	DefaultMetric                                      types.Int64                                              `tfsdk:"default_metric"`
	Distance                                           types.Int64                                              `tfsdk:"distance"`
	DomainTag                                          types.Int64                                              `tfsdk:"domain_tag"`
	MplsLdpAutoconfig                                  types.Bool                                               `tfsdk:"mpls_ldp_autoconfig"`
	MplsLdpSync                                        types.Bool                                               `tfsdk:"mpls_ldp_sync"`
	Neighbors                                          []OSPFNeighbors                                          `tfsdk:"neighbors"`
	Networks                                           []OSPFNetworks                                           `tfsdk:"networks"`
	Priority                                           types.Int64                                              `tfsdk:"priority"`
	RouterId                                           types.String                                             `tfsdk:"router_id"`
	Shutdown                                           types.Bool                                               `tfsdk:"shutdown"`
	SummaryAddresses                                   []OSPFSummaryAddresses                                   `tfsdk:"summary_addresses"`
	Areas                                              []OSPFAreas                                              `tfsdk:"areas"`
	AutoCostReferenceBandwidth                         types.Int64                                              `tfsdk:"auto_cost_reference_bandwidth"`
	PassiveInterfaceDefault                            types.Bool                                               `tfsdk:"passive_interface_default"`
	PassiveInterface                                   types.List                                               `tfsdk:"passive_interface"`
	PassiveInterfaceDisableGigabitEthernets            []OSPFPassiveInterfaceDisableGigabitEthernets            `tfsdk:"passive_interface_disable_gigabit_ethernets"`
	PassiveInterfaceDisableTwoGigabitEthernets         []OSPFPassiveInterfaceDisableTwoGigabitEthernets         `tfsdk:"passive_interface_disable_two_gigabit_ethernets"`
	PassiveInterfaceDisableFiveGigabitEthernets        []OSPFPassiveInterfaceDisableFiveGigabitEthernets        `tfsdk:"passive_interface_disable_five_gigabit_ethernets"`
	PassiveInterfaceDisableTenGigabitEthernets         []OSPFPassiveInterfaceDisableTenGigabitEthernets         `tfsdk:"passive_interface_disable_ten_gigabit_ethernets"`
	PassiveInterfaceDisableTwentyFiveGigabitEthernets  []OSPFPassiveInterfaceDisableTwentyFiveGigabitEthernets  `tfsdk:"passive_interface_disable_twenty_five_gigabit_ethernets"`
	PassiveInterfaceDisableFortyGigabitEthernets       []OSPFPassiveInterfaceDisableFortyGigabitEthernets       `tfsdk:"passive_interface_disable_forty_gigabit_ethernets"`
	PassiveInterfaceDisableHundredGigabitEthernets     []OSPFPassiveInterfaceDisableHundredGigabitEthernets     `tfsdk:"passive_interface_disable_hundred_gigabit_ethernets"`
	PassiveInterfaceDisableTwoHundredGigabitEthernets  []OSPFPassiveInterfaceDisableTwoHundredGigabitEthernets  `tfsdk:"passive_interface_disable_two_hundred_gigabit_ethernets"`
	PassiveInterfaceDisableFourHundredGigabitEthernets []OSPFPassiveInterfaceDisableFourHundredGigabitEthernets `tfsdk:"passive_interface_disable_four_hundred_gigabit_ethernets"`
	PassiveInterfaceDisableLoopbacks                   []OSPFPassiveInterfaceDisableLoopbacks                   `tfsdk:"passive_interface_disable_loopbacks"`
	PassiveInterfaceDisableVlans                       []OSPFPassiveInterfaceDisableVlans                       `tfsdk:"passive_interface_disable_vlans"`
	PassiveInterfaceDisableTunnels                     []OSPFPassiveInterfaceDisableTunnels                     `tfsdk:"passive_interface_disable_tunnels"`
	PassiveInterfaceDisablePortChannels                []OSPFPassiveInterfaceDisablePortChannels                `tfsdk:"passive_interface_disable_port_channels"`
	PassiveInterfaceDisablePortChannelSubinterfaces    []OSPFPassiveInterfaceDisablePortChannelSubinterfaces    `tfsdk:"passive_interface_disable_port_channel_subinterfaces"`
}

type OSPFData struct {
	Device                                             types.String                                             `tfsdk:"device"`
	Id                                                 types.String                                             `tfsdk:"id"`
	ProcessId                                          types.Int64                                              `tfsdk:"process_id"`
	BfdAllInterfaces                                   types.Bool                                               `tfsdk:"bfd_all_interfaces"`
	DefaultInformationOriginate                        types.Bool                                               `tfsdk:"default_information_originate"`
	DefaultInformationOriginateAlways                  types.Bool                                               `tfsdk:"default_information_originate_always"`
	DefaultMetric                                      types.Int64                                              `tfsdk:"default_metric"`
	Distance                                           types.Int64                                              `tfsdk:"distance"`
	DomainTag                                          types.Int64                                              `tfsdk:"domain_tag"`
	MplsLdpAutoconfig                                  types.Bool                                               `tfsdk:"mpls_ldp_autoconfig"`
	MplsLdpSync                                        types.Bool                                               `tfsdk:"mpls_ldp_sync"`
	Neighbors                                          []OSPFNeighbors                                          `tfsdk:"neighbors"`
	Networks                                           []OSPFNetworks                                           `tfsdk:"networks"`
	Priority                                           types.Int64                                              `tfsdk:"priority"`
	RouterId                                           types.String                                             `tfsdk:"router_id"`
	Shutdown                                           types.Bool                                               `tfsdk:"shutdown"`
	SummaryAddresses                                   []OSPFSummaryAddresses                                   `tfsdk:"summary_addresses"`
	Areas                                              []OSPFAreas                                              `tfsdk:"areas"`
	AutoCostReferenceBandwidth                         types.Int64                                              `tfsdk:"auto_cost_reference_bandwidth"`
	PassiveInterfaceDefault                            types.Bool                                               `tfsdk:"passive_interface_default"`
	PassiveInterface                                   types.List                                               `tfsdk:"passive_interface"`
	PassiveInterfaceDisableGigabitEthernets            []OSPFPassiveInterfaceDisableGigabitEthernets            `tfsdk:"passive_interface_disable_gigabit_ethernets"`
	PassiveInterfaceDisableTwoGigabitEthernets         []OSPFPassiveInterfaceDisableTwoGigabitEthernets         `tfsdk:"passive_interface_disable_two_gigabit_ethernets"`
	PassiveInterfaceDisableFiveGigabitEthernets        []OSPFPassiveInterfaceDisableFiveGigabitEthernets        `tfsdk:"passive_interface_disable_five_gigabit_ethernets"`
	PassiveInterfaceDisableTenGigabitEthernets         []OSPFPassiveInterfaceDisableTenGigabitEthernets         `tfsdk:"passive_interface_disable_ten_gigabit_ethernets"`
	PassiveInterfaceDisableTwentyFiveGigabitEthernets  []OSPFPassiveInterfaceDisableTwentyFiveGigabitEthernets  `tfsdk:"passive_interface_disable_twenty_five_gigabit_ethernets"`
	PassiveInterfaceDisableFortyGigabitEthernets       []OSPFPassiveInterfaceDisableFortyGigabitEthernets       `tfsdk:"passive_interface_disable_forty_gigabit_ethernets"`
	PassiveInterfaceDisableHundredGigabitEthernets     []OSPFPassiveInterfaceDisableHundredGigabitEthernets     `tfsdk:"passive_interface_disable_hundred_gigabit_ethernets"`
	PassiveInterfaceDisableTwoHundredGigabitEthernets  []OSPFPassiveInterfaceDisableTwoHundredGigabitEthernets  `tfsdk:"passive_interface_disable_two_hundred_gigabit_ethernets"`
	PassiveInterfaceDisableFourHundredGigabitEthernets []OSPFPassiveInterfaceDisableFourHundredGigabitEthernets `tfsdk:"passive_interface_disable_four_hundred_gigabit_ethernets"`
	PassiveInterfaceDisableLoopbacks                   []OSPFPassiveInterfaceDisableLoopbacks                   `tfsdk:"passive_interface_disable_loopbacks"`
	PassiveInterfaceDisableVlans                       []OSPFPassiveInterfaceDisableVlans                       `tfsdk:"passive_interface_disable_vlans"`
	PassiveInterfaceDisableTunnels                     []OSPFPassiveInterfaceDisableTunnels                     `tfsdk:"passive_interface_disable_tunnels"`
	PassiveInterfaceDisablePortChannels                []OSPFPassiveInterfaceDisablePortChannels                `tfsdk:"passive_interface_disable_port_channels"`
	PassiveInterfaceDisablePortChannelSubinterfaces    []OSPFPassiveInterfaceDisablePortChannelSubinterfaces    `tfsdk:"passive_interface_disable_port_channel_subinterfaces"`
}
type OSPFNeighbors struct {
	Ip       types.String `tfsdk:"ip"`
	Priority types.Int64  `tfsdk:"priority"`
	Cost     types.Int64  `tfsdk:"cost"`
}
type OSPFNetworks struct {
	Ip       types.String `tfsdk:"ip"`
	Wildcard types.String `tfsdk:"wildcard"`
	Area     types.String `tfsdk:"area"`
}
type OSPFSummaryAddresses struct {
	Ip   types.String `tfsdk:"ip"`
	Mask types.String `tfsdk:"mask"`
}
type OSPFAreas struct {
	AreaId                                    types.String `tfsdk:"area_id"`
	AuthenticationMessageDigest               types.Bool   `tfsdk:"authentication_message_digest"`
	Nssa                                      types.Bool   `tfsdk:"nssa"`
	NssaDefaultInformationOriginate           types.Bool   `tfsdk:"nssa_default_information_originate"`
	NssaDefaultInformationOriginateMetric     types.Int64  `tfsdk:"nssa_default_information_originate_metric"`
	NssaDefaultInformationOriginateMetricType types.Int64  `tfsdk:"nssa_default_information_originate_metric_type"`
	NssaNoSummary                             types.Bool   `tfsdk:"nssa_no_summary"`
	NssaNoRedistribution                      types.Bool   `tfsdk:"nssa_no_redistribution"`
}
type OSPFPassiveInterfaceDisableGigabitEthernets struct {
	Name types.String `tfsdk:"name"`
}
type OSPFPassiveInterfaceDisableTwoGigabitEthernets struct {
	Name types.String `tfsdk:"name"`
}
type OSPFPassiveInterfaceDisableFiveGigabitEthernets struct {
	Name types.String `tfsdk:"name"`
}
type OSPFPassiveInterfaceDisableTenGigabitEthernets struct {
	Name types.String `tfsdk:"name"`
}
type OSPFPassiveInterfaceDisableTwentyFiveGigabitEthernets struct {
	Name types.String `tfsdk:"name"`
}
type OSPFPassiveInterfaceDisableFortyGigabitEthernets struct {
	Name types.String `tfsdk:"name"`
}
type OSPFPassiveInterfaceDisableHundredGigabitEthernets struct {
	Name types.String `tfsdk:"name"`
}
type OSPFPassiveInterfaceDisableTwoHundredGigabitEthernets struct {
	Name types.String `tfsdk:"name"`
}
type OSPFPassiveInterfaceDisableFourHundredGigabitEthernets struct {
	Name types.String `tfsdk:"name"`
}
type OSPFPassiveInterfaceDisableLoopbacks struct {
	Name types.String `tfsdk:"name"`
}
type OSPFPassiveInterfaceDisableVlans struct {
	Name types.String `tfsdk:"name"`
}
type OSPFPassiveInterfaceDisableTunnels struct {
	Name types.String `tfsdk:"name"`
}
type OSPFPassiveInterfaceDisablePortChannels struct {
	Name types.String `tfsdk:"name"`
}
type OSPFPassiveInterfaceDisablePortChannelSubinterfaces struct {
	Name types.String `tfsdk:"name"`
}

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

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

func (data OSPF) getPath() string {
	return fmt.Sprintf("Cisco-IOS-XE-native:native/router/Cisco-IOS-XE-ospf:router-ospf/ospf/process-id=%v", url.QueryEscape(fmt.Sprintf("%v", data.ProcessId.ValueInt64())))
}

func (data OSPFData) getPath() string {
	return fmt.Sprintf("Cisco-IOS-XE-native:native/router/Cisco-IOS-XE-ospf:router-ospf/ospf/process-id=%v", url.QueryEscape(fmt.Sprintf("%v", data.ProcessId.ValueInt64())))
}

// if last path element has a key -> remove it
func (data OSPF) 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 OSPF) toBody(ctx context.Context) string {
	body := `{"` + helpers.LastElement(data.getPath()) + `":{}}`
	if !data.ProcessId.IsNull() && !data.ProcessId.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"id", strconv.FormatInt(data.ProcessId.ValueInt64(), 10))
	}
	if !data.BfdAllInterfaces.IsNull() && !data.BfdAllInterfaces.IsUnknown() {
		if data.BfdAllInterfaces.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"bfd.all-interfaces", map[string]string{})
		}
	}
	if !data.DefaultInformationOriginate.IsNull() && !data.DefaultInformationOriginate.IsUnknown() {
		if data.DefaultInformationOriginate.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"default-information.originate", map[string]string{})
		}
	}
	if !data.DefaultInformationOriginateAlways.IsNull() && !data.DefaultInformationOriginateAlways.IsUnknown() {
		if data.DefaultInformationOriginateAlways.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"default-information.originate.always", map[string]string{})
		}
	}
	if !data.DefaultMetric.IsNull() && !data.DefaultMetric.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"default-metric", strconv.FormatInt(data.DefaultMetric.ValueInt64(), 10))
	}
	if !data.Distance.IsNull() && !data.Distance.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"distance.distance", strconv.FormatInt(data.Distance.ValueInt64(), 10))
	}
	if !data.DomainTag.IsNull() && !data.DomainTag.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"domain-tag", strconv.FormatInt(data.DomainTag.ValueInt64(), 10))
	}
	if !data.MplsLdpAutoconfig.IsNull() && !data.MplsLdpAutoconfig.IsUnknown() {
		if data.MplsLdpAutoconfig.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"mpls.ldp.autoconfig", map[string]string{})
		}
	}
	if !data.MplsLdpSync.IsNull() && !data.MplsLdpSync.IsUnknown() {
		if data.MplsLdpSync.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"mpls.ldp.sync", map[string]string{})
		}
	}
	if !data.Priority.IsNull() && !data.Priority.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"priority", strconv.FormatInt(data.Priority.ValueInt64(), 10))
	}
	if !data.RouterId.IsNull() && !data.RouterId.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"router-id", data.RouterId.ValueString())
	}
	if !data.Shutdown.IsNull() && !data.Shutdown.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"shutdown", data.Shutdown.ValueBool())
	}
	if !data.AutoCostReferenceBandwidth.IsNull() && !data.AutoCostReferenceBandwidth.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"auto-cost.reference-bandwidth", strconv.FormatInt(data.AutoCostReferenceBandwidth.ValueInt64(), 10))
	}
	if !data.PassiveInterfaceDefault.IsNull() && !data.PassiveInterfaceDefault.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface.default", data.PassiveInterfaceDefault.ValueBool())
	}
	if !data.PassiveInterface.IsNull() && !data.PassiveInterface.IsUnknown() {
		var values []string
		data.PassiveInterface.ElementsAs(ctx, &values, false)
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface.interface", values)
	}
	if len(data.Neighbors) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"neighbor", []interface{}{})
		for index, item := range data.Neighbors {
			if !item.Ip.IsNull() && !item.Ip.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"neighbor"+"."+strconv.Itoa(index)+"."+"ip", item.Ip.ValueString())
			}
			if !item.Priority.IsNull() && !item.Priority.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"neighbor"+"."+strconv.Itoa(index)+"."+"priority", strconv.FormatInt(item.Priority.ValueInt64(), 10))
			}
			if !item.Cost.IsNull() && !item.Cost.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"neighbor"+"."+strconv.Itoa(index)+"."+"cost", strconv.FormatInt(item.Cost.ValueInt64(), 10))
			}
		}
	}
	if len(data.Networks) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"network", []interface{}{})
		for index, item := range data.Networks {
			if !item.Ip.IsNull() && !item.Ip.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"network"+"."+strconv.Itoa(index)+"."+"ip", item.Ip.ValueString())
			}
			if !item.Wildcard.IsNull() && !item.Wildcard.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"network"+"."+strconv.Itoa(index)+"."+"wildcard", item.Wildcard.ValueString())
			}
			if !item.Area.IsNull() && !item.Area.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"network"+"."+strconv.Itoa(index)+"."+"area", item.Area.ValueString())
			}
		}
	}
	if len(data.SummaryAddresses) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"summary-address", []interface{}{})
		for index, item := range data.SummaryAddresses {
			if !item.Ip.IsNull() && !item.Ip.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"summary-address"+"."+strconv.Itoa(index)+"."+"ip", item.Ip.ValueString())
			}
			if !item.Mask.IsNull() && !item.Mask.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"summary-address"+"."+strconv.Itoa(index)+"."+"mask", item.Mask.ValueString())
			}
		}
	}
	if len(data.Areas) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"area", []interface{}{})
		for index, item := range data.Areas {
			if !item.AreaId.IsNull() && !item.AreaId.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"area"+"."+strconv.Itoa(index)+"."+"area-id", item.AreaId.ValueString())
			}
			if !item.AuthenticationMessageDigest.IsNull() && !item.AuthenticationMessageDigest.IsUnknown() {
				if item.AuthenticationMessageDigest.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"area"+"."+strconv.Itoa(index)+"."+"authentication.message-digest", map[string]string{})
				}
			}
			if !item.Nssa.IsNull() && !item.Nssa.IsUnknown() {
				if item.Nssa.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"area"+"."+strconv.Itoa(index)+"."+"nssa", map[string]string{})
				}
			}
			if !item.NssaDefaultInformationOriginate.IsNull() && !item.NssaDefaultInformationOriginate.IsUnknown() {
				if item.NssaDefaultInformationOriginate.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"area"+"."+strconv.Itoa(index)+"."+"nssa.nssa-options.default-information-originate", map[string]string{})
				}
			}
			if !item.NssaDefaultInformationOriginateMetric.IsNull() && !item.NssaDefaultInformationOriginateMetric.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"area"+"."+strconv.Itoa(index)+"."+"nssa.nssa-options.default-information-originate.metric", strconv.FormatInt(item.NssaDefaultInformationOriginateMetric.ValueInt64(), 10))
			}
			if !item.NssaDefaultInformationOriginateMetricType.IsNull() && !item.NssaDefaultInformationOriginateMetricType.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"area"+"."+strconv.Itoa(index)+"."+"nssa.nssa-options.default-information-originate.metric-type", strconv.FormatInt(item.NssaDefaultInformationOriginateMetricType.ValueInt64(), 10))
			}
			if !item.NssaNoSummary.IsNull() && !item.NssaNoSummary.IsUnknown() {
				if item.NssaNoSummary.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"area"+"."+strconv.Itoa(index)+"."+"nssa.nssa-options.no-summary", map[string]string{})
				}
			}
			if !item.NssaNoRedistribution.IsNull() && !item.NssaNoRedistribution.IsUnknown() {
				if item.NssaNoRedistribution.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"area"+"."+strconv.Itoa(index)+"."+"nssa.nssa-options.no-redistribution", map[string]string{})
				}
			}
		}
	}
	if len(data.PassiveInterfaceDisableGigabitEthernets) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.GigabitEthernet", []interface{}{})
		for index, item := range data.PassiveInterfaceDisableGigabitEthernets {
			if !item.Name.IsNull() && !item.Name.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.GigabitEthernet"+"."+strconv.Itoa(index)+"."+"name", item.Name.ValueString())
			}
		}
	}
	if len(data.PassiveInterfaceDisableTwoGigabitEthernets) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.TwoGigabitEthernet", []interface{}{})
		for index, item := range data.PassiveInterfaceDisableTwoGigabitEthernets {
			if !item.Name.IsNull() && !item.Name.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.TwoGigabitEthernet"+"."+strconv.Itoa(index)+"."+"name", item.Name.ValueString())
			}
		}
	}
	if len(data.PassiveInterfaceDisableFiveGigabitEthernets) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.FiveGigabitEthernet", []interface{}{})
		for index, item := range data.PassiveInterfaceDisableFiveGigabitEthernets {
			if !item.Name.IsNull() && !item.Name.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.FiveGigabitEthernet"+"."+strconv.Itoa(index)+"."+"name", item.Name.ValueString())
			}
		}
	}
	if len(data.PassiveInterfaceDisableTenGigabitEthernets) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.TenGigabitEthernet", []interface{}{})
		for index, item := range data.PassiveInterfaceDisableTenGigabitEthernets {
			if !item.Name.IsNull() && !item.Name.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.TenGigabitEthernet"+"."+strconv.Itoa(index)+"."+"name", item.Name.ValueString())
			}
		}
	}
	if len(data.PassiveInterfaceDisableTwentyFiveGigabitEthernets) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.TwentyFiveGigabitE", []interface{}{})
		for index, item := range data.PassiveInterfaceDisableTwentyFiveGigabitEthernets {
			if !item.Name.IsNull() && !item.Name.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.TwentyFiveGigabitE"+"."+strconv.Itoa(index)+"."+"name", item.Name.ValueString())
			}
		}
	}
	if len(data.PassiveInterfaceDisableFortyGigabitEthernets) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.FortyGigabitEthernet", []interface{}{})
		for index, item := range data.PassiveInterfaceDisableFortyGigabitEthernets {
			if !item.Name.IsNull() && !item.Name.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.FortyGigabitEthernet"+"."+strconv.Itoa(index)+"."+"name", item.Name.ValueString())
			}
		}
	}
	if len(data.PassiveInterfaceDisableHundredGigabitEthernets) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.HundredGigabitE", []interface{}{})
		for index, item := range data.PassiveInterfaceDisableHundredGigabitEthernets {
			if !item.Name.IsNull() && !item.Name.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.HundredGigabitE"+"."+strconv.Itoa(index)+"."+"name", item.Name.ValueString())
			}
		}
	}
	if len(data.PassiveInterfaceDisableTwoHundredGigabitEthernets) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.TwoHundredGigabitE", []interface{}{})
		for index, item := range data.PassiveInterfaceDisableTwoHundredGigabitEthernets {
			if !item.Name.IsNull() && !item.Name.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.TwoHundredGigabitE"+"."+strconv.Itoa(index)+"."+"name", item.Name.ValueString())
			}
		}
	}
	if len(data.PassiveInterfaceDisableFourHundredGigabitEthernets) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.FourHundredGigabitE", []interface{}{})
		for index, item := range data.PassiveInterfaceDisableFourHundredGigabitEthernets {
			if !item.Name.IsNull() && !item.Name.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.FourHundredGigabitE"+"."+strconv.Itoa(index)+"."+"name", item.Name.ValueString())
			}
		}
	}
	if len(data.PassiveInterfaceDisableLoopbacks) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.Loopback", []interface{}{})
		for index, item := range data.PassiveInterfaceDisableLoopbacks {
			if !item.Name.IsNull() && !item.Name.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.Loopback"+"."+strconv.Itoa(index)+"."+"name", item.Name.ValueString())
			}
		}
	}
	if len(data.PassiveInterfaceDisableVlans) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.Vlan", []interface{}{})
		for index, item := range data.PassiveInterfaceDisableVlans {
			if !item.Name.IsNull() && !item.Name.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.Vlan"+"."+strconv.Itoa(index)+"."+"name", item.Name.ValueString())
			}
		}
	}
	if len(data.PassiveInterfaceDisableTunnels) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.Tunnel", []interface{}{})
		for index, item := range data.PassiveInterfaceDisableTunnels {
			if !item.Name.IsNull() && !item.Name.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.Tunnel"+"."+strconv.Itoa(index)+"."+"name", item.Name.ValueString())
			}
		}
	}
	if len(data.PassiveInterfaceDisablePortChannels) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.Port-channel", []interface{}{})
		for index, item := range data.PassiveInterfaceDisablePortChannels {
			if !item.Name.IsNull() && !item.Name.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.Port-channel"+"."+strconv.Itoa(index)+"."+"name", item.Name.ValueString())
			}
		}
	}
	if len(data.PassiveInterfaceDisablePortChannelSubinterfaces) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.Port-channel-subinterface.Port-channel", []interface{}{})
		for index, item := range data.PassiveInterfaceDisablePortChannelSubinterfaces {
			if !item.Name.IsNull() && !item.Name.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"passive-interface-config.disable-interface.Port-channel-subinterface.Port-channel"+"."+strconv.Itoa(index)+"."+"name", item.Name.ValueString())
			}
		}
	}
	return body
}

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

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

func (data *OSPF) updateFromBody(ctx context.Context, res gjson.Result) {
	prefix := helpers.LastElement(data.getPath()) + "."
	if res.Get(helpers.LastElement(data.getPath())).IsArray() {
		prefix += "0."
	}
	if value := res.Get(prefix + "id"); value.Exists() && !data.ProcessId.IsNull() {
		data.ProcessId = types.Int64Value(value.Int())
	} else {
		data.ProcessId = types.Int64Null()
	}
	if value := res.Get(prefix + "bfd.all-interfaces"); !data.BfdAllInterfaces.IsNull() {
		if value.Exists() {
			data.BfdAllInterfaces = types.BoolValue(true)
		} else {
			data.BfdAllInterfaces = types.BoolValue(false)
		}
	} else {
		data.BfdAllInterfaces = types.BoolNull()
	}
	if value := res.Get(prefix + "default-information.originate"); !data.DefaultInformationOriginate.IsNull() {
		if value.Exists() {
			data.DefaultInformationOriginate = types.BoolValue(true)
		} else {
			data.DefaultInformationOriginate = types.BoolValue(false)
		}
	} else {
		data.DefaultInformationOriginate = types.BoolNull()
	}
	if value := res.Get(prefix + "default-information.originate.always"); !data.DefaultInformationOriginateAlways.IsNull() {
		if value.Exists() {
			data.DefaultInformationOriginateAlways = types.BoolValue(true)
		} else {
			data.DefaultInformationOriginateAlways = types.BoolValue(false)
		}
	} else {
		data.DefaultInformationOriginateAlways = types.BoolNull()
	}
	if value := res.Get(prefix + "default-metric"); value.Exists() && !data.DefaultMetric.IsNull() {
		data.DefaultMetric = types.Int64Value(value.Int())
	} else {
		data.DefaultMetric = types.Int64Null()
	}
	if value := res.Get(prefix + "distance.distance"); value.Exists() && !data.Distance.IsNull() {
		data.Distance = types.Int64Value(value.Int())
	} else {
		data.Distance = types.Int64Null()
	}
	if value := res.Get(prefix + "domain-tag"); value.Exists() && !data.DomainTag.IsNull() {
		data.DomainTag = types.Int64Value(value.Int())
	} else {
		data.DomainTag = types.Int64Null()
	}
	if value := res.Get(prefix + "mpls.ldp.autoconfig"); !data.MplsLdpAutoconfig.IsNull() {
		if value.Exists() {
			data.MplsLdpAutoconfig = types.BoolValue(true)
		} else {
			data.MplsLdpAutoconfig = types.BoolValue(false)
		}
	} else {
		data.MplsLdpAutoconfig = types.BoolNull()
	}
	if value := res.Get(prefix + "mpls.ldp.sync"); !data.MplsLdpSync.IsNull() {
		if value.Exists() {
			data.MplsLdpSync = types.BoolValue(true)
		} else {
			data.MplsLdpSync = types.BoolValue(false)
		}
	} else {
		data.MplsLdpSync = types.BoolNull()
	}
	for i := range data.Neighbors {
		keys := [...]string{"ip"}
		keyValues := [...]string{data.Neighbors[i].Ip.ValueString()}

		var r gjson.Result
		res.Get(prefix + "neighbor").ForEach(
			func(_, v gjson.Result) bool {
				found := false
				for ik := range keys {
					if v.Get(keys[ik]).String() == keyValues[ik] {
						found = true
						continue
					}
					found = false
					break
				}
				if found {
					r = v
					return false
				}
				return true
			},
		)
		if value := r.Get("ip"); value.Exists() && !data.Neighbors[i].Ip.IsNull() {
			data.Neighbors[i].Ip = types.StringValue(value.String())
		} else {
			data.Neighbors[i].Ip = types.StringNull()
		}
		if value := r.Get("priority"); value.Exists() && !data.Neighbors[i].Priority.IsNull() {
			data.Neighbors[i].Priority = types.Int64Value(value.Int())
		} else {
			data.Neighbors[i].Priority = types.Int64Null()
		}
		if value := r.Get("cost"); value.Exists() && !data.Neighbors[i].Cost.IsNull() {
			data.Neighbors[i].Cost = types.Int64Value(value.Int())
		} else {
			data.Neighbors[i].Cost = types.Int64Null()
		}
	}
	for i := range data.Networks {
		keys := [...]string{"ip"}
		keyValues := [...]string{data.Networks[i].Ip.ValueString()}

		var r gjson.Result
		res.Get(prefix + "network").ForEach(
			func(_, v gjson.Result) bool {
				found := false
				for ik := range keys {
					if v.Get(keys[ik]).String() == keyValues[ik] {
						found = true
						continue
					}
					found = false
					break
				}
				if found {
					r = v
					return false
				}
				return true
			},
		)
		if value := r.Get("ip"); value.Exists() && !data.Networks[i].Ip.IsNull() {
			data.Networks[i].Ip = types.StringValue(value.String())
		} else {
			data.Networks[i].Ip = types.StringNull()
		}
		if value := r.Get("wildcard"); value.Exists() && !data.Networks[i].Wildcard.IsNull() {
			data.Networks[i].Wildcard = types.StringValue(value.String())
		} else {
			data.Networks[i].Wildcard = types.StringNull()
		}
		if value := r.Get("area"); value.Exists() && !data.Networks[i].Area.IsNull() {
			data.Networks[i].Area = types.StringValue(value.String())
		} else {
			data.Networks[i].Area = types.StringNull()
		}
	}
	if value := res.Get(prefix + "priority"); value.Exists() && !data.Priority.IsNull() {
		data.Priority = types.Int64Value(value.Int())
	} else {
		data.Priority = types.Int64Null()
	}
	if value := res.Get(prefix + "router-id"); value.Exists() && !data.RouterId.IsNull() {
		data.RouterId = types.StringValue(value.String())
	} else {
		data.RouterId = types.StringNull()
	}
	if value := res.Get(prefix + "shutdown"); !data.Shutdown.IsNull() {
		if value.Exists() {
			data.Shutdown = types.BoolValue(value.Bool())
		}
	} else {
		data.Shutdown = types.BoolNull()
	}
	for i := range data.SummaryAddresses {
		keys := [...]string{"ip"}
		keyValues := [...]string{data.SummaryAddresses[i].Ip.ValueString()}

		var r gjson.Result
		res.Get(prefix + "summary-address").ForEach(
			func(_, v gjson.Result) bool {
				found := false
				for ik := range keys {
					if v.Get(keys[ik]).String() == keyValues[ik] {
						found = true
						continue
					}
					found = false
					break
				}
				if found {
					r = v
					return false
				}
				return true
			},
		)
		if value := r.Get("ip"); value.Exists() && !data.SummaryAddresses[i].Ip.IsNull() {
			data.SummaryAddresses[i].Ip = types.StringValue(value.String())
		} else {
			data.SummaryAddresses[i].Ip = types.StringNull()
		}
		if value := r.Get("mask"); value.Exists() && !data.SummaryAddresses[i].Mask.IsNull() {
			data.SummaryAddresses[i].Mask = types.StringValue(value.String())
		} else {
			data.SummaryAddresses[i].Mask = types.StringNull()
		}
	}
	for i := range data.Areas {
		keys := [...]string{"area-id"}
		keyValues := [...]string{data.Areas[i].AreaId.ValueString()}

		var r gjson.Result
		res.Get(prefix + "area").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("area-id"); value.Exists() && !data.Areas[i].AreaId.IsNull() {
			data.Areas[i].AreaId = types.StringValue(value.String())
		} else {
			data.Areas[i].AreaId = types.StringNull()
		}
		if value := r.Get("authentication.message-digest"); !data.Areas[i].AuthenticationMessageDigest.IsNull() {
			if value.Exists() {
				data.Areas[i].AuthenticationMessageDigest = types.BoolValue(true)
			} else {
				data.Areas[i].AuthenticationMessageDigest = types.BoolValue(false)
			}
		} else {
			data.Areas[i].AuthenticationMessageDigest = types.BoolNull()
		}
		if value := r.Get("nssa"); !data.Areas[i].Nssa.IsNull() {
			if value.Exists() {
				data.Areas[i].Nssa = types.BoolValue(true)
			} else {
				data.Areas[i].Nssa = types.BoolValue(false)
			}
		} else {
			data.Areas[i].Nssa = types.BoolNull()
		}
		if value := r.Get("nssa.nssa-options.default-information-originate"); !data.Areas[i].NssaDefaultInformationOriginate.IsNull() {
			if value.Exists() {
				data.Areas[i].NssaDefaultInformationOriginate = types.BoolValue(true)
			} else {
				data.Areas[i].NssaDefaultInformationOriginate = types.BoolValue(false)
			}
		} else {
			data.Areas[i].NssaDefaultInformationOriginate = types.BoolNull()
		}
		if value := r.Get("nssa.nssa-options.default-information-originate.metric"); value.Exists() && !data.Areas[i].NssaDefaultInformationOriginateMetric.IsNull() {
			data.Areas[i].NssaDefaultInformationOriginateMetric = types.Int64Value(value.Int())
		} else {
			data.Areas[i].NssaDefaultInformationOriginateMetric = types.Int64Null()
		}
		if value := r.Get("nssa.nssa-options.default-information-originate.metric-type"); value.Exists() && !data.Areas[i].NssaDefaultInformationOriginateMetricType.IsNull() {
			data.Areas[i].NssaDefaultInformationOriginateMetricType = types.Int64Value(value.Int())
		} else {
			data.Areas[i].NssaDefaultInformationOriginateMetricType = types.Int64Null()
		}
		if value := r.Get("nssa.nssa-options.no-summary"); !data.Areas[i].NssaNoSummary.IsNull() {
			if value.Exists() {
				data.Areas[i].NssaNoSummary = types.BoolValue(true)
			} else {
				data.Areas[i].NssaNoSummary = types.BoolValue(false)
			}
		} else {
			data.Areas[i].NssaNoSummary = types.BoolNull()
		}
		if value := r.Get("nssa.nssa-options.no-redistribution"); !data.Areas[i].NssaNoRedistribution.IsNull() {
			if value.Exists() {
				data.Areas[i].NssaNoRedistribution = types.BoolValue(true)
			} else {
				data.Areas[i].NssaNoRedistribution = types.BoolValue(false)
			}
		} else {
			data.Areas[i].NssaNoRedistribution = types.BoolNull()
		}
	}
	if value := res.Get(prefix + "auto-cost.reference-bandwidth"); value.Exists() && !data.AutoCostReferenceBandwidth.IsNull() {
		data.AutoCostReferenceBandwidth = types.Int64Value(value.Int())
	} else {
		data.AutoCostReferenceBandwidth = types.Int64Null()
	}
	if value := res.Get(prefix + "passive-interface.default"); !data.PassiveInterfaceDefault.IsNull() {
		if value.Exists() {
			data.PassiveInterfaceDefault = types.BoolValue(value.Bool())
		}
	} else {
		data.PassiveInterfaceDefault = types.BoolNull()
	}
	if value := res.Get(prefix + "passive-interface.interface"); value.Exists() && !data.PassiveInterface.IsNull() {
		data.PassiveInterface = helpers.GetStringList(value.Array())
	} else {
		data.PassiveInterface = types.ListNull(types.StringType)
	}
	for i := range data.PassiveInterfaceDisableGigabitEthernets {
		keys := [...]string{"name"}
		keyValues := [...]string{data.PassiveInterfaceDisableGigabitEthernets[i].Name.ValueString()}

		var r gjson.Result
		res.Get(prefix + "passive-interface-config.disable-interface.GigabitEthernet").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.PassiveInterfaceDisableGigabitEthernets[i].Name.IsNull() {
			data.PassiveInterfaceDisableGigabitEthernets[i].Name = types.StringValue(value.String())
		} else {
			data.PassiveInterfaceDisableGigabitEthernets[i].Name = types.StringNull()
		}
	}
	for i := range data.PassiveInterfaceDisableTwoGigabitEthernets {
		keys := [...]string{"name"}
		keyValues := [...]string{data.PassiveInterfaceDisableTwoGigabitEthernets[i].Name.ValueString()}

		var r gjson.Result
		res.Get(prefix + "passive-interface-config.disable-interface.TwoGigabitEthernet").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.PassiveInterfaceDisableTwoGigabitEthernets[i].Name.IsNull() {
			data.PassiveInterfaceDisableTwoGigabitEthernets[i].Name = types.StringValue(value.String())
		} else {
			data.PassiveInterfaceDisableTwoGigabitEthernets[i].Name = types.StringNull()
		}
	}
	for i := range data.PassiveInterfaceDisableFiveGigabitEthernets {
		keys := [...]string{"name"}
		keyValues := [...]string{data.PassiveInterfaceDisableFiveGigabitEthernets[i].Name.ValueString()}

		var r gjson.Result
		res.Get(prefix + "passive-interface-config.disable-interface.FiveGigabitEthernet").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.PassiveInterfaceDisableFiveGigabitEthernets[i].Name.IsNull() {
			data.PassiveInterfaceDisableFiveGigabitEthernets[i].Name = types.StringValue(value.String())
		} else {
			data.PassiveInterfaceDisableFiveGigabitEthernets[i].Name = types.StringNull()
		}
	}
	for i := range data.PassiveInterfaceDisableTenGigabitEthernets {
		keys := [...]string{"name"}
		keyValues := [...]string{data.PassiveInterfaceDisableTenGigabitEthernets[i].Name.ValueString()}

		var r gjson.Result
		res.Get(prefix + "passive-interface-config.disable-interface.TenGigabitEthernet").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.PassiveInterfaceDisableTenGigabitEthernets[i].Name.IsNull() {
			data.PassiveInterfaceDisableTenGigabitEthernets[i].Name = types.StringValue(value.String())
		} else {
			data.PassiveInterfaceDisableTenGigabitEthernets[i].Name = types.StringNull()
		}
	}
	for i := range data.PassiveInterfaceDisableTwentyFiveGigabitEthernets {
		keys := [...]string{"name"}
		keyValues := [...]string{data.PassiveInterfaceDisableTwentyFiveGigabitEthernets[i].Name.ValueString()}

		var r gjson.Result
		res.Get(prefix + "passive-interface-config.disable-interface.TwentyFiveGigabitE").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.PassiveInterfaceDisableTwentyFiveGigabitEthernets[i].Name.IsNull() {
			data.PassiveInterfaceDisableTwentyFiveGigabitEthernets[i].Name = types.StringValue(value.String())
		} else {
			data.PassiveInterfaceDisableTwentyFiveGigabitEthernets[i].Name = types.StringNull()
		}
	}
	for i := range data.PassiveInterfaceDisableFortyGigabitEthernets {
		keys := [...]string{"name"}
		keyValues := [...]string{data.PassiveInterfaceDisableFortyGigabitEthernets[i].Name.ValueString()}

		var r gjson.Result
		res.Get(prefix + "passive-interface-config.disable-interface.FortyGigabitEthernet").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.PassiveInterfaceDisableFortyGigabitEthernets[i].Name.IsNull() {
			data.PassiveInterfaceDisableFortyGigabitEthernets[i].Name = types.StringValue(value.String())
		} else {
			data.PassiveInterfaceDisableFortyGigabitEthernets[i].Name = types.StringNull()
		}
	}
	for i := range data.PassiveInterfaceDisableHundredGigabitEthernets {
		keys := [...]string{"name"}
		keyValues := [...]string{data.PassiveInterfaceDisableHundredGigabitEthernets[i].Name.ValueString()}

		var r gjson.Result
		res.Get(prefix + "passive-interface-config.disable-interface.HundredGigabitE").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.PassiveInterfaceDisableHundredGigabitEthernets[i].Name.IsNull() {
			data.PassiveInterfaceDisableHundredGigabitEthernets[i].Name = types.StringValue(value.String())
		} else {
			data.PassiveInterfaceDisableHundredGigabitEthernets[i].Name = types.StringNull()
		}
	}
	for i := range data.PassiveInterfaceDisableTwoHundredGigabitEthernets {
		keys := [...]string{"name"}
		keyValues := [...]string{data.PassiveInterfaceDisableTwoHundredGigabitEthernets[i].Name.ValueString()}

		var r gjson.Result
		res.Get(prefix + "passive-interface-config.disable-interface.TwoHundredGigabitE").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.PassiveInterfaceDisableTwoHundredGigabitEthernets[i].Name.IsNull() {
			data.PassiveInterfaceDisableTwoHundredGigabitEthernets[i].Name = types.StringValue(value.String())
		} else {
			data.PassiveInterfaceDisableTwoHundredGigabitEthernets[i].Name = types.StringNull()
		}
	}
	for i := range data.PassiveInterfaceDisableFourHundredGigabitEthernets {
		keys := [...]string{"name"}
		keyValues := [...]string{data.PassiveInterfaceDisableFourHundredGigabitEthernets[i].Name.ValueString()}

		var r gjson.Result
		res.Get(prefix + "passive-interface-config.disable-interface.FourHundredGigabitE").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.PassiveInterfaceDisableFourHundredGigabitEthernets[i].Name.IsNull() {
			data.PassiveInterfaceDisableFourHundredGigabitEthernets[i].Name = types.StringValue(value.String())
		} else {
			data.PassiveInterfaceDisableFourHundredGigabitEthernets[i].Name = types.StringNull()
		}
	}
	for i := range data.PassiveInterfaceDisableLoopbacks {
		keys := [...]string{"name"}
		keyValues := [...]string{data.PassiveInterfaceDisableLoopbacks[i].Name.ValueString()}

		var r gjson.Result
		res.Get(prefix + "passive-interface-config.disable-interface.Loopback").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.PassiveInterfaceDisableLoopbacks[i].Name.IsNull() {
			data.PassiveInterfaceDisableLoopbacks[i].Name = types.StringValue(value.String())
		} else {
			data.PassiveInterfaceDisableLoopbacks[i].Name = types.StringNull()
		}
	}
	for i := range data.PassiveInterfaceDisableVlans {
		keys := [...]string{"name"}
		keyValues := [...]string{data.PassiveInterfaceDisableVlans[i].Name.ValueString()}

		var r gjson.Result
		res.Get(prefix + "passive-interface-config.disable-interface.Vlan").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.PassiveInterfaceDisableVlans[i].Name.IsNull() {
			data.PassiveInterfaceDisableVlans[i].Name = types.StringValue(value.String())
		} else {
			data.PassiveInterfaceDisableVlans[i].Name = types.StringNull()
		}
	}
	for i := range data.PassiveInterfaceDisableTunnels {
		keys := [...]string{"name"}
		keyValues := [...]string{data.PassiveInterfaceDisableTunnels[i].Name.ValueString()}

		var r gjson.Result
		res.Get(prefix + "passive-interface-config.disable-interface.Tunnel").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.PassiveInterfaceDisableTunnels[i].Name.IsNull() {
			data.PassiveInterfaceDisableTunnels[i].Name = types.StringValue(value.String())
		} else {
			data.PassiveInterfaceDisableTunnels[i].Name = types.StringNull()
		}
	}
	for i := range data.PassiveInterfaceDisablePortChannels {
		keys := [...]string{"name"}
		keyValues := [...]string{data.PassiveInterfaceDisablePortChannels[i].Name.ValueString()}

		var r gjson.Result
		res.Get(prefix + "passive-interface-config.disable-interface.Port-channel").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.PassiveInterfaceDisablePortChannels[i].Name.IsNull() {
			data.PassiveInterfaceDisablePortChannels[i].Name = types.StringValue(value.String())
		} else {
			data.PassiveInterfaceDisablePortChannels[i].Name = types.StringNull()
		}
	}
	for i := range data.PassiveInterfaceDisablePortChannelSubinterfaces {
		keys := [...]string{"name"}
		keyValues := [...]string{data.PassiveInterfaceDisablePortChannelSubinterfaces[i].Name.ValueString()}

		var r gjson.Result
		res.Get(prefix + "passive-interface-config.disable-interface.Port-channel-subinterface.Port-channel").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.PassiveInterfaceDisablePortChannelSubinterfaces[i].Name.IsNull() {
			data.PassiveInterfaceDisablePortChannelSubinterfaces[i].Name = types.StringValue(value.String())
		} else {
			data.PassiveInterfaceDisablePortChannelSubinterfaces[i].Name = types.StringNull()
		}
	}
}

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

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

func (data *OSPF) 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 + "bfd.all-interfaces"); value.Exists() {
		data.BfdAllInterfaces = types.BoolValue(true)
	} else {
		data.BfdAllInterfaces = types.BoolValue(false)
	}
	if value := res.Get(prefix + "default-information.originate"); value.Exists() {
		data.DefaultInformationOriginate = types.BoolValue(true)
	} else {
		data.DefaultInformationOriginate = types.BoolValue(false)
	}
	if value := res.Get(prefix + "default-information.originate.always"); value.Exists() {
		data.DefaultInformationOriginateAlways = types.BoolValue(true)
	} else {
		data.DefaultInformationOriginateAlways = types.BoolValue(false)
	}
	if value := res.Get(prefix + "default-metric"); value.Exists() {
		data.DefaultMetric = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "distance.distance"); value.Exists() {
		data.Distance = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "domain-tag"); value.Exists() {
		data.DomainTag = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "mpls.ldp.autoconfig"); value.Exists() {
		data.MplsLdpAutoconfig = types.BoolValue(true)
	} else {
		data.MplsLdpAutoconfig = types.BoolValue(false)
	}
	if value := res.Get(prefix + "mpls.ldp.sync"); value.Exists() {
		data.MplsLdpSync = types.BoolValue(true)
	} else {
		data.MplsLdpSync = types.BoolValue(false)
	}
	if value := res.Get(prefix + "neighbor"); value.Exists() {
		data.Neighbors = make([]OSPFNeighbors, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFNeighbors{}
			if cValue := v.Get("ip"); cValue.Exists() {
				item.Ip = types.StringValue(cValue.String())
			}
			if cValue := v.Get("priority"); cValue.Exists() {
				item.Priority = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("cost"); cValue.Exists() {
				item.Cost = types.Int64Value(cValue.Int())
			}
			data.Neighbors = append(data.Neighbors, item)
			return true
		})
	}
	if value := res.Get(prefix + "network"); value.Exists() {
		data.Networks = make([]OSPFNetworks, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFNetworks{}
			if cValue := v.Get("ip"); cValue.Exists() {
				item.Ip = types.StringValue(cValue.String())
			}
			if cValue := v.Get("wildcard"); cValue.Exists() {
				item.Wildcard = types.StringValue(cValue.String())
			}
			if cValue := v.Get("area"); cValue.Exists() {
				item.Area = types.StringValue(cValue.String())
			}
			data.Networks = append(data.Networks, item)
			return true
		})
	}
	if value := res.Get(prefix + "priority"); value.Exists() {
		data.Priority = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "router-id"); value.Exists() {
		data.RouterId = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "shutdown"); value.Exists() {
		data.Shutdown = types.BoolValue(value.Bool())
	} else {
		data.Shutdown = types.BoolNull()
	}
	if value := res.Get(prefix + "summary-address"); value.Exists() {
		data.SummaryAddresses = make([]OSPFSummaryAddresses, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFSummaryAddresses{}
			if cValue := v.Get("ip"); cValue.Exists() {
				item.Ip = types.StringValue(cValue.String())
			}
			if cValue := v.Get("mask"); cValue.Exists() {
				item.Mask = types.StringValue(cValue.String())
			}
			data.SummaryAddresses = append(data.SummaryAddresses, item)
			return true
		})
	}
	if value := res.Get(prefix + "area"); value.Exists() {
		data.Areas = make([]OSPFAreas, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFAreas{}
			if cValue := v.Get("area-id"); cValue.Exists() {
				item.AreaId = types.StringValue(cValue.String())
			}
			if cValue := v.Get("authentication.message-digest"); cValue.Exists() {
				item.AuthenticationMessageDigest = types.BoolValue(true)
			} else {
				item.AuthenticationMessageDigest = types.BoolValue(false)
			}
			if cValue := v.Get("nssa"); cValue.Exists() {
				item.Nssa = types.BoolValue(true)
			} else {
				item.Nssa = types.BoolValue(false)
			}
			if cValue := v.Get("nssa.nssa-options.default-information-originate"); cValue.Exists() {
				item.NssaDefaultInformationOriginate = types.BoolValue(true)
			} else {
				item.NssaDefaultInformationOriginate = types.BoolValue(false)
			}
			if cValue := v.Get("nssa.nssa-options.default-information-originate.metric"); cValue.Exists() {
				item.NssaDefaultInformationOriginateMetric = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("nssa.nssa-options.default-information-originate.metric-type"); cValue.Exists() {
				item.NssaDefaultInformationOriginateMetricType = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("nssa.nssa-options.no-summary"); cValue.Exists() {
				item.NssaNoSummary = types.BoolValue(true)
			} else {
				item.NssaNoSummary = types.BoolValue(false)
			}
			if cValue := v.Get("nssa.nssa-options.no-redistribution"); cValue.Exists() {
				item.NssaNoRedistribution = types.BoolValue(true)
			} else {
				item.NssaNoRedistribution = types.BoolValue(false)
			}
			data.Areas = append(data.Areas, item)
			return true
		})
	}
	if value := res.Get(prefix + "auto-cost.reference-bandwidth"); value.Exists() {
		data.AutoCostReferenceBandwidth = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "passive-interface.default"); value.Exists() {
		data.PassiveInterfaceDefault = types.BoolValue(value.Bool())
	} else {
		data.PassiveInterfaceDefault = types.BoolNull()
	}
	if value := res.Get(prefix + "passive-interface.interface"); value.Exists() {
		data.PassiveInterface = helpers.GetStringList(value.Array())
	} else {
		data.PassiveInterface = types.ListNull(types.StringType)
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.GigabitEthernet"); value.Exists() {
		data.PassiveInterfaceDisableGigabitEthernets = make([]OSPFPassiveInterfaceDisableGigabitEthernets, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableGigabitEthernets{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableGigabitEthernets = append(data.PassiveInterfaceDisableGigabitEthernets, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.TwoGigabitEthernet"); value.Exists() {
		data.PassiveInterfaceDisableTwoGigabitEthernets = make([]OSPFPassiveInterfaceDisableTwoGigabitEthernets, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableTwoGigabitEthernets{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableTwoGigabitEthernets = append(data.PassiveInterfaceDisableTwoGigabitEthernets, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.FiveGigabitEthernet"); value.Exists() {
		data.PassiveInterfaceDisableFiveGigabitEthernets = make([]OSPFPassiveInterfaceDisableFiveGigabitEthernets, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableFiveGigabitEthernets{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableFiveGigabitEthernets = append(data.PassiveInterfaceDisableFiveGigabitEthernets, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.TenGigabitEthernet"); value.Exists() {
		data.PassiveInterfaceDisableTenGigabitEthernets = make([]OSPFPassiveInterfaceDisableTenGigabitEthernets, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableTenGigabitEthernets{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableTenGigabitEthernets = append(data.PassiveInterfaceDisableTenGigabitEthernets, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.TwentyFiveGigabitE"); value.Exists() {
		data.PassiveInterfaceDisableTwentyFiveGigabitEthernets = make([]OSPFPassiveInterfaceDisableTwentyFiveGigabitEthernets, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableTwentyFiveGigabitEthernets{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableTwentyFiveGigabitEthernets = append(data.PassiveInterfaceDisableTwentyFiveGigabitEthernets, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.FortyGigabitEthernet"); value.Exists() {
		data.PassiveInterfaceDisableFortyGigabitEthernets = make([]OSPFPassiveInterfaceDisableFortyGigabitEthernets, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableFortyGigabitEthernets{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableFortyGigabitEthernets = append(data.PassiveInterfaceDisableFortyGigabitEthernets, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.HundredGigabitE"); value.Exists() {
		data.PassiveInterfaceDisableHundredGigabitEthernets = make([]OSPFPassiveInterfaceDisableHundredGigabitEthernets, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableHundredGigabitEthernets{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableHundredGigabitEthernets = append(data.PassiveInterfaceDisableHundredGigabitEthernets, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.TwoHundredGigabitE"); value.Exists() {
		data.PassiveInterfaceDisableTwoHundredGigabitEthernets = make([]OSPFPassiveInterfaceDisableTwoHundredGigabitEthernets, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableTwoHundredGigabitEthernets{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableTwoHundredGigabitEthernets = append(data.PassiveInterfaceDisableTwoHundredGigabitEthernets, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.FourHundredGigabitE"); value.Exists() {
		data.PassiveInterfaceDisableFourHundredGigabitEthernets = make([]OSPFPassiveInterfaceDisableFourHundredGigabitEthernets, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableFourHundredGigabitEthernets{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableFourHundredGigabitEthernets = append(data.PassiveInterfaceDisableFourHundredGigabitEthernets, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.Loopback"); value.Exists() {
		data.PassiveInterfaceDisableLoopbacks = make([]OSPFPassiveInterfaceDisableLoopbacks, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableLoopbacks{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableLoopbacks = append(data.PassiveInterfaceDisableLoopbacks, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.Vlan"); value.Exists() {
		data.PassiveInterfaceDisableVlans = make([]OSPFPassiveInterfaceDisableVlans, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableVlans{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableVlans = append(data.PassiveInterfaceDisableVlans, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.Tunnel"); value.Exists() {
		data.PassiveInterfaceDisableTunnels = make([]OSPFPassiveInterfaceDisableTunnels, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableTunnels{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableTunnels = append(data.PassiveInterfaceDisableTunnels, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.Port-channel"); value.Exists() {
		data.PassiveInterfaceDisablePortChannels = make([]OSPFPassiveInterfaceDisablePortChannels, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisablePortChannels{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisablePortChannels = append(data.PassiveInterfaceDisablePortChannels, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.Port-channel-subinterface.Port-channel"); value.Exists() {
		data.PassiveInterfaceDisablePortChannelSubinterfaces = make([]OSPFPassiveInterfaceDisablePortChannelSubinterfaces, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisablePortChannelSubinterfaces{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisablePortChannelSubinterfaces = append(data.PassiveInterfaceDisablePortChannelSubinterfaces, item)
			return true
		})
	}
}

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

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

func (data *OSPFData) 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 + "bfd.all-interfaces"); value.Exists() {
		data.BfdAllInterfaces = types.BoolValue(true)
	} else {
		data.BfdAllInterfaces = types.BoolValue(false)
	}
	if value := res.Get(prefix + "default-information.originate"); value.Exists() {
		data.DefaultInformationOriginate = types.BoolValue(true)
	} else {
		data.DefaultInformationOriginate = types.BoolValue(false)
	}
	if value := res.Get(prefix + "default-information.originate.always"); value.Exists() {
		data.DefaultInformationOriginateAlways = types.BoolValue(true)
	} else {
		data.DefaultInformationOriginateAlways = types.BoolValue(false)
	}
	if value := res.Get(prefix + "default-metric"); value.Exists() {
		data.DefaultMetric = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "distance.distance"); value.Exists() {
		data.Distance = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "domain-tag"); value.Exists() {
		data.DomainTag = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "mpls.ldp.autoconfig"); value.Exists() {
		data.MplsLdpAutoconfig = types.BoolValue(true)
	} else {
		data.MplsLdpAutoconfig = types.BoolValue(false)
	}
	if value := res.Get(prefix + "mpls.ldp.sync"); value.Exists() {
		data.MplsLdpSync = types.BoolValue(true)
	} else {
		data.MplsLdpSync = types.BoolValue(false)
	}
	if value := res.Get(prefix + "neighbor"); value.Exists() {
		data.Neighbors = make([]OSPFNeighbors, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFNeighbors{}
			if cValue := v.Get("ip"); cValue.Exists() {
				item.Ip = types.StringValue(cValue.String())
			}
			if cValue := v.Get("priority"); cValue.Exists() {
				item.Priority = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("cost"); cValue.Exists() {
				item.Cost = types.Int64Value(cValue.Int())
			}
			data.Neighbors = append(data.Neighbors, item)
			return true
		})
	}
	if value := res.Get(prefix + "network"); value.Exists() {
		data.Networks = make([]OSPFNetworks, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFNetworks{}
			if cValue := v.Get("ip"); cValue.Exists() {
				item.Ip = types.StringValue(cValue.String())
			}
			if cValue := v.Get("wildcard"); cValue.Exists() {
				item.Wildcard = types.StringValue(cValue.String())
			}
			if cValue := v.Get("area"); cValue.Exists() {
				item.Area = types.StringValue(cValue.String())
			}
			data.Networks = append(data.Networks, item)
			return true
		})
	}
	if value := res.Get(prefix + "priority"); value.Exists() {
		data.Priority = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "router-id"); value.Exists() {
		data.RouterId = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "shutdown"); value.Exists() {
		data.Shutdown = types.BoolValue(value.Bool())
	} else {
		data.Shutdown = types.BoolNull()
	}
	if value := res.Get(prefix + "summary-address"); value.Exists() {
		data.SummaryAddresses = make([]OSPFSummaryAddresses, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFSummaryAddresses{}
			if cValue := v.Get("ip"); cValue.Exists() {
				item.Ip = types.StringValue(cValue.String())
			}
			if cValue := v.Get("mask"); cValue.Exists() {
				item.Mask = types.StringValue(cValue.String())
			}
			data.SummaryAddresses = append(data.SummaryAddresses, item)
			return true
		})
	}
	if value := res.Get(prefix + "area"); value.Exists() {
		data.Areas = make([]OSPFAreas, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFAreas{}
			if cValue := v.Get("area-id"); cValue.Exists() {
				item.AreaId = types.StringValue(cValue.String())
			}
			if cValue := v.Get("authentication.message-digest"); cValue.Exists() {
				item.AuthenticationMessageDigest = types.BoolValue(true)
			} else {
				item.AuthenticationMessageDigest = types.BoolValue(false)
			}
			if cValue := v.Get("nssa"); cValue.Exists() {
				item.Nssa = types.BoolValue(true)
			} else {
				item.Nssa = types.BoolValue(false)
			}
			if cValue := v.Get("nssa.nssa-options.default-information-originate"); cValue.Exists() {
				item.NssaDefaultInformationOriginate = types.BoolValue(true)
			} else {
				item.NssaDefaultInformationOriginate = types.BoolValue(false)
			}
			if cValue := v.Get("nssa.nssa-options.default-information-originate.metric"); cValue.Exists() {
				item.NssaDefaultInformationOriginateMetric = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("nssa.nssa-options.default-information-originate.metric-type"); cValue.Exists() {
				item.NssaDefaultInformationOriginateMetricType = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("nssa.nssa-options.no-summary"); cValue.Exists() {
				item.NssaNoSummary = types.BoolValue(true)
			} else {
				item.NssaNoSummary = types.BoolValue(false)
			}
			if cValue := v.Get("nssa.nssa-options.no-redistribution"); cValue.Exists() {
				item.NssaNoRedistribution = types.BoolValue(true)
			} else {
				item.NssaNoRedistribution = types.BoolValue(false)
			}
			data.Areas = append(data.Areas, item)
			return true
		})
	}
	if value := res.Get(prefix + "auto-cost.reference-bandwidth"); value.Exists() {
		data.AutoCostReferenceBandwidth = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "passive-interface.default"); value.Exists() {
		data.PassiveInterfaceDefault = types.BoolValue(value.Bool())
	} else {
		data.PassiveInterfaceDefault = types.BoolNull()
	}
	if value := res.Get(prefix + "passive-interface.interface"); value.Exists() {
		data.PassiveInterface = helpers.GetStringList(value.Array())
	} else {
		data.PassiveInterface = types.ListNull(types.StringType)
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.GigabitEthernet"); value.Exists() {
		data.PassiveInterfaceDisableGigabitEthernets = make([]OSPFPassiveInterfaceDisableGigabitEthernets, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableGigabitEthernets{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableGigabitEthernets = append(data.PassiveInterfaceDisableGigabitEthernets, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.TwoGigabitEthernet"); value.Exists() {
		data.PassiveInterfaceDisableTwoGigabitEthernets = make([]OSPFPassiveInterfaceDisableTwoGigabitEthernets, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableTwoGigabitEthernets{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableTwoGigabitEthernets = append(data.PassiveInterfaceDisableTwoGigabitEthernets, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.FiveGigabitEthernet"); value.Exists() {
		data.PassiveInterfaceDisableFiveGigabitEthernets = make([]OSPFPassiveInterfaceDisableFiveGigabitEthernets, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableFiveGigabitEthernets{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableFiveGigabitEthernets = append(data.PassiveInterfaceDisableFiveGigabitEthernets, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.TenGigabitEthernet"); value.Exists() {
		data.PassiveInterfaceDisableTenGigabitEthernets = make([]OSPFPassiveInterfaceDisableTenGigabitEthernets, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableTenGigabitEthernets{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableTenGigabitEthernets = append(data.PassiveInterfaceDisableTenGigabitEthernets, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.TwentyFiveGigabitE"); value.Exists() {
		data.PassiveInterfaceDisableTwentyFiveGigabitEthernets = make([]OSPFPassiveInterfaceDisableTwentyFiveGigabitEthernets, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableTwentyFiveGigabitEthernets{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableTwentyFiveGigabitEthernets = append(data.PassiveInterfaceDisableTwentyFiveGigabitEthernets, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.FortyGigabitEthernet"); value.Exists() {
		data.PassiveInterfaceDisableFortyGigabitEthernets = make([]OSPFPassiveInterfaceDisableFortyGigabitEthernets, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableFortyGigabitEthernets{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableFortyGigabitEthernets = append(data.PassiveInterfaceDisableFortyGigabitEthernets, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.HundredGigabitE"); value.Exists() {
		data.PassiveInterfaceDisableHundredGigabitEthernets = make([]OSPFPassiveInterfaceDisableHundredGigabitEthernets, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableHundredGigabitEthernets{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableHundredGigabitEthernets = append(data.PassiveInterfaceDisableHundredGigabitEthernets, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.TwoHundredGigabitE"); value.Exists() {
		data.PassiveInterfaceDisableTwoHundredGigabitEthernets = make([]OSPFPassiveInterfaceDisableTwoHundredGigabitEthernets, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableTwoHundredGigabitEthernets{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableTwoHundredGigabitEthernets = append(data.PassiveInterfaceDisableTwoHundredGigabitEthernets, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.FourHundredGigabitE"); value.Exists() {
		data.PassiveInterfaceDisableFourHundredGigabitEthernets = make([]OSPFPassiveInterfaceDisableFourHundredGigabitEthernets, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableFourHundredGigabitEthernets{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableFourHundredGigabitEthernets = append(data.PassiveInterfaceDisableFourHundredGigabitEthernets, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.Loopback"); value.Exists() {
		data.PassiveInterfaceDisableLoopbacks = make([]OSPFPassiveInterfaceDisableLoopbacks, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableLoopbacks{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableLoopbacks = append(data.PassiveInterfaceDisableLoopbacks, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.Vlan"); value.Exists() {
		data.PassiveInterfaceDisableVlans = make([]OSPFPassiveInterfaceDisableVlans, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableVlans{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableVlans = append(data.PassiveInterfaceDisableVlans, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.Tunnel"); value.Exists() {
		data.PassiveInterfaceDisableTunnels = make([]OSPFPassiveInterfaceDisableTunnels, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisableTunnels{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisableTunnels = append(data.PassiveInterfaceDisableTunnels, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.Port-channel"); value.Exists() {
		data.PassiveInterfaceDisablePortChannels = make([]OSPFPassiveInterfaceDisablePortChannels, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisablePortChannels{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisablePortChannels = append(data.PassiveInterfaceDisablePortChannels, item)
			return true
		})
	}
	if value := res.Get(prefix + "passive-interface-config.disable-interface.Port-channel-subinterface.Port-channel"); value.Exists() {
		data.PassiveInterfaceDisablePortChannelSubinterfaces = make([]OSPFPassiveInterfaceDisablePortChannelSubinterfaces, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := OSPFPassiveInterfaceDisablePortChannelSubinterfaces{}
			if cValue := v.Get("name"); cValue.Exists() {
				item.Name = types.StringValue(cValue.String())
			}
			data.PassiveInterfaceDisablePortChannelSubinterfaces = append(data.PassiveInterfaceDisablePortChannelSubinterfaces, item)
			return true
		})
	}
}

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

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

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

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

		found := false
		for j := range data.PassiveInterfaceDisablePortChannelSubinterfaces {
			found = true
			if state.PassiveInterfaceDisablePortChannelSubinterfaces[i].Name.ValueString() != data.PassiveInterfaceDisablePortChannelSubinterfaces[j].Name.ValueString() {
				found = false
			}
			if found {
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/passive-interface-config/disable-interface/Port-channel-subinterface/Port-channel=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.PassiveInterfaceDisablePortChannels {
		stateKeyValues := [...]string{state.PassiveInterfaceDisablePortChannels[i].Name.ValueString()}

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

		found := false
		for j := range data.PassiveInterfaceDisablePortChannels {
			found = true
			if state.PassiveInterfaceDisablePortChannels[i].Name.ValueString() != data.PassiveInterfaceDisablePortChannels[j].Name.ValueString() {
				found = false
			}
			if found {
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/passive-interface-config/disable-interface/Port-channel=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.PassiveInterfaceDisableTunnels {
		stateKeyValues := [...]string{state.PassiveInterfaceDisableTunnels[i].Name.ValueString()}

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

		found := false
		for j := range data.PassiveInterfaceDisableTunnels {
			found = true
			if state.PassiveInterfaceDisableTunnels[i].Name.ValueString() != data.PassiveInterfaceDisableTunnels[j].Name.ValueString() {
				found = false
			}
			if found {
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/passive-interface-config/disable-interface/Tunnel=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.PassiveInterfaceDisableVlans {
		stateKeyValues := [...]string{state.PassiveInterfaceDisableVlans[i].Name.ValueString()}

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

		found := false
		for j := range data.PassiveInterfaceDisableVlans {
			found = true
			if state.PassiveInterfaceDisableVlans[i].Name.ValueString() != data.PassiveInterfaceDisableVlans[j].Name.ValueString() {
				found = false
			}
			if found {
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/passive-interface-config/disable-interface/Vlan=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.PassiveInterfaceDisableLoopbacks {
		stateKeyValues := [...]string{state.PassiveInterfaceDisableLoopbacks[i].Name.ValueString()}

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

		found := false
		for j := range data.PassiveInterfaceDisableLoopbacks {
			found = true
			if state.PassiveInterfaceDisableLoopbacks[i].Name.ValueString() != data.PassiveInterfaceDisableLoopbacks[j].Name.ValueString() {
				found = false
			}
			if found {
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/passive-interface-config/disable-interface/Loopback=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.PassiveInterfaceDisableFourHundredGigabitEthernets {
		stateKeyValues := [...]string{state.PassiveInterfaceDisableFourHundredGigabitEthernets[i].Name.ValueString()}

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

		found := false
		for j := range data.PassiveInterfaceDisableFourHundredGigabitEthernets {
			found = true
			if state.PassiveInterfaceDisableFourHundredGigabitEthernets[i].Name.ValueString() != data.PassiveInterfaceDisableFourHundredGigabitEthernets[j].Name.ValueString() {
				found = false
			}
			if found {
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/passive-interface-config/disable-interface/FourHundredGigabitE=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.PassiveInterfaceDisableTwoHundredGigabitEthernets {
		stateKeyValues := [...]string{state.PassiveInterfaceDisableTwoHundredGigabitEthernets[i].Name.ValueString()}

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

		found := false
		for j := range data.PassiveInterfaceDisableTwoHundredGigabitEthernets {
			found = true
			if state.PassiveInterfaceDisableTwoHundredGigabitEthernets[i].Name.ValueString() != data.PassiveInterfaceDisableTwoHundredGigabitEthernets[j].Name.ValueString() {
				found = false
			}
			if found {
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/passive-interface-config/disable-interface/TwoHundredGigabitE=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.PassiveInterfaceDisableHundredGigabitEthernets {
		stateKeyValues := [...]string{state.PassiveInterfaceDisableHundredGigabitEthernets[i].Name.ValueString()}

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

		found := false
		for j := range data.PassiveInterfaceDisableHundredGigabitEthernets {
			found = true
			if state.PassiveInterfaceDisableHundredGigabitEthernets[i].Name.ValueString() != data.PassiveInterfaceDisableHundredGigabitEthernets[j].Name.ValueString() {
				found = false
			}
			if found {
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/passive-interface-config/disable-interface/HundredGigabitE=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.PassiveInterfaceDisableFortyGigabitEthernets {
		stateKeyValues := [...]string{state.PassiveInterfaceDisableFortyGigabitEthernets[i].Name.ValueString()}

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

		found := false
		for j := range data.PassiveInterfaceDisableFortyGigabitEthernets {
			found = true
			if state.PassiveInterfaceDisableFortyGigabitEthernets[i].Name.ValueString() != data.PassiveInterfaceDisableFortyGigabitEthernets[j].Name.ValueString() {
				found = false
			}
			if found {
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/passive-interface-config/disable-interface/FortyGigabitEthernet=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.PassiveInterfaceDisableTwentyFiveGigabitEthernets {
		stateKeyValues := [...]string{state.PassiveInterfaceDisableTwentyFiveGigabitEthernets[i].Name.ValueString()}

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

		found := false
		for j := range data.PassiveInterfaceDisableTwentyFiveGigabitEthernets {
			found = true
			if state.PassiveInterfaceDisableTwentyFiveGigabitEthernets[i].Name.ValueString() != data.PassiveInterfaceDisableTwentyFiveGigabitEthernets[j].Name.ValueString() {
				found = false
			}
			if found {
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/passive-interface-config/disable-interface/TwentyFiveGigabitE=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.PassiveInterfaceDisableTenGigabitEthernets {
		stateKeyValues := [...]string{state.PassiveInterfaceDisableTenGigabitEthernets[i].Name.ValueString()}

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

		found := false
		for j := range data.PassiveInterfaceDisableTenGigabitEthernets {
			found = true
			if state.PassiveInterfaceDisableTenGigabitEthernets[i].Name.ValueString() != data.PassiveInterfaceDisableTenGigabitEthernets[j].Name.ValueString() {
				found = false
			}
			if found {
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/passive-interface-config/disable-interface/TenGigabitEthernet=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.PassiveInterfaceDisableFiveGigabitEthernets {
		stateKeyValues := [...]string{state.PassiveInterfaceDisableFiveGigabitEthernets[i].Name.ValueString()}

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

		found := false
		for j := range data.PassiveInterfaceDisableFiveGigabitEthernets {
			found = true
			if state.PassiveInterfaceDisableFiveGigabitEthernets[i].Name.ValueString() != data.PassiveInterfaceDisableFiveGigabitEthernets[j].Name.ValueString() {
				found = false
			}
			if found {
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/passive-interface-config/disable-interface/FiveGigabitEthernet=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.PassiveInterfaceDisableTwoGigabitEthernets {
		stateKeyValues := [...]string{state.PassiveInterfaceDisableTwoGigabitEthernets[i].Name.ValueString()}

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

		found := false
		for j := range data.PassiveInterfaceDisableTwoGigabitEthernets {
			found = true
			if state.PassiveInterfaceDisableTwoGigabitEthernets[i].Name.ValueString() != data.PassiveInterfaceDisableTwoGigabitEthernets[j].Name.ValueString() {
				found = false
			}
			if found {
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/passive-interface-config/disable-interface/TwoGigabitEthernet=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.PassiveInterfaceDisableGigabitEthernets {
		stateKeyValues := [...]string{state.PassiveInterfaceDisableGigabitEthernets[i].Name.ValueString()}

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

		found := false
		for j := range data.PassiveInterfaceDisableGigabitEthernets {
			found = true
			if state.PassiveInterfaceDisableGigabitEthernets[i].Name.ValueString() != data.PassiveInterfaceDisableGigabitEthernets[j].Name.ValueString() {
				found = false
			}
			if found {
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/passive-interface-config/disable-interface/GigabitEthernet=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	if !state.PassiveInterface.IsNull() {
		if data.PassiveInterface.IsNull() {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/passive-interface/interface", state.getPath()))
		} else {
			var dataValues, stateValues []string
			data.PassiveInterface.ElementsAs(ctx, &dataValues, false)
			state.PassiveInterface.ElementsAs(ctx, &stateValues, false)
			for _, v := range stateValues {
				found := false
				for _, vv := range dataValues {
					if v == vv {
						found = true
						break
					}
				}
				if !found {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/passive-interface/interface=%v", state.getPath(), v))
				}
			}
		}
	}
	if !state.PassiveInterfaceDefault.IsNull() && data.PassiveInterfaceDefault.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/passive-interface/default", state.getPath()))
	}
	if !state.AutoCostReferenceBandwidth.IsNull() && data.AutoCostReferenceBandwidth.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/auto-cost/reference-bandwidth", state.getPath()))
	}
	for i := range state.Areas {
		stateKeyValues := [...]string{state.Areas[i].AreaId.ValueString()}

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

		found := false
		for j := range data.Areas {
			found = true
			if state.Areas[i].AreaId.ValueString() != data.Areas[j].AreaId.ValueString() {
				found = false
			}
			if found {
				if !state.Areas[i].NssaNoRedistribution.IsNull() && data.Areas[j].NssaNoRedistribution.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/area=%v/nssa/nssa-options/no-redistribution", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Areas[i].NssaNoSummary.IsNull() && data.Areas[j].NssaNoSummary.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/area=%v/nssa/nssa-options/no-summary", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Areas[i].NssaDefaultInformationOriginateMetricType.IsNull() && data.Areas[j].NssaDefaultInformationOriginateMetricType.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/area=%v/nssa/nssa-options/default-information-originate/metric-type", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Areas[i].NssaDefaultInformationOriginateMetric.IsNull() && data.Areas[j].NssaDefaultInformationOriginateMetric.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/area=%v/nssa/nssa-options/default-information-originate/metric", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Areas[i].NssaDefaultInformationOriginate.IsNull() && data.Areas[j].NssaDefaultInformationOriginate.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/area=%v/nssa/nssa-options/default-information-originate", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Areas[i].Nssa.IsNull() && data.Areas[j].Nssa.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/area=%v/nssa", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Areas[i].AuthenticationMessageDigest.IsNull() && data.Areas[j].AuthenticationMessageDigest.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/area=%v/authentication/message-digest", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/area=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.SummaryAddresses {
		stateKeyValues := [...]string{state.SummaryAddresses[i].Ip.ValueString()}

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

		found := false
		for j := range data.SummaryAddresses {
			found = true
			if state.SummaryAddresses[i].Ip.ValueString() != data.SummaryAddresses[j].Ip.ValueString() {
				found = false
			}
			if found {
				if !state.SummaryAddresses[i].Mask.IsNull() && data.SummaryAddresses[j].Mask.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/summary-address=%v/mask", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/summary-address=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	if !state.Shutdown.IsNull() && data.Shutdown.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/shutdown", state.getPath()))
	}
	if !state.RouterId.IsNull() && data.RouterId.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/router-id", state.getPath()))
	}
	if !state.Priority.IsNull() && data.Priority.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/priority", state.getPath()))
	}
	for i := range state.Networks {
		stateKeyValues := [...]string{state.Networks[i].Ip.ValueString()}

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

		found := false
		for j := range data.Networks {
			found = true
			if state.Networks[i].Ip.ValueString() != data.Networks[j].Ip.ValueString() {
				found = false
			}
			if found {
				if !state.Networks[i].Area.IsNull() && data.Networks[j].Area.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/network=%v/area", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Networks[i].Wildcard.IsNull() && data.Networks[j].Wildcard.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/network=%v/wildcard", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/network=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.Neighbors {
		stateKeyValues := [...]string{state.Neighbors[i].Ip.ValueString()}

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

		found := false
		for j := range data.Neighbors {
			found = true
			if state.Neighbors[i].Ip.ValueString() != data.Neighbors[j].Ip.ValueString() {
				found = false
			}
			if found {
				if !state.Neighbors[i].Cost.IsNull() && data.Neighbors[j].Cost.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/neighbor=%v/cost", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Neighbors[i].Priority.IsNull() && data.Neighbors[j].Priority.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/neighbor=%v/priority", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/neighbor=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	if !state.MplsLdpSync.IsNull() && data.MplsLdpSync.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/mpls/ldp/sync", state.getPath()))
	}
	if !state.MplsLdpAutoconfig.IsNull() && data.MplsLdpAutoconfig.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/mpls/ldp/autoconfig", state.getPath()))
	}
	if !state.DomainTag.IsNull() && data.DomainTag.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/domain-tag", state.getPath()))
	}
	if !state.Distance.IsNull() && data.Distance.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/distance/distance", state.getPath()))
	}
	if !state.DefaultMetric.IsNull() && data.DefaultMetric.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/default-metric", state.getPath()))
	}
	if !state.DefaultInformationOriginateAlways.IsNull() && data.DefaultInformationOriginateAlways.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/default-information/originate/always", state.getPath()))
	}
	if !state.DefaultInformationOriginate.IsNull() && data.DefaultInformationOriginate.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/default-information/originate", state.getPath()))
	}
	if !state.BfdAllInterfaces.IsNull() && data.BfdAllInterfaces.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/bfd/all-interfaces", state.getPath()))
	}

	return deletedItems
}

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

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

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

	for i := range data.Areas {
		keyValues := [...]string{data.Areas[i].AreaId.ValueString()}
		if !data.Areas[i].NssaNoRedistribution.IsNull() && !data.Areas[i].NssaNoRedistribution.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/area=%v/nssa/nssa-options/no-redistribution", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Areas[i].NssaNoSummary.IsNull() && !data.Areas[i].NssaNoSummary.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/area=%v/nssa/nssa-options/no-summary", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Areas[i].NssaDefaultInformationOriginate.IsNull() && !data.Areas[i].NssaDefaultInformationOriginate.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/area=%v/nssa/nssa-options/default-information-originate", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Areas[i].Nssa.IsNull() && !data.Areas[i].Nssa.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/area=%v/nssa", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Areas[i].AuthenticationMessageDigest.IsNull() && !data.Areas[i].AuthenticationMessageDigest.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/area=%v/authentication/message-digest", data.getPath(), strings.Join(keyValues[:], ",")))
		}
	}

	if !data.MplsLdpSync.IsNull() && !data.MplsLdpSync.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/mpls/ldp/sync", data.getPath()))
	}
	if !data.MplsLdpAutoconfig.IsNull() && !data.MplsLdpAutoconfig.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/mpls/ldp/autoconfig", data.getPath()))
	}
	if !data.DefaultInformationOriginateAlways.IsNull() && !data.DefaultInformationOriginateAlways.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/default-information/originate/always", data.getPath()))
	}
	if !data.DefaultInformationOriginate.IsNull() && !data.DefaultInformationOriginate.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/default-information/originate", data.getPath()))
	}
	if !data.BfdAllInterfaces.IsNull() && !data.BfdAllInterfaces.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/bfd/all-interfaces", data.getPath()))
	}

	return emptyLeafsDelete
}

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

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

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

		deletePaths = append(deletePaths, fmt.Sprintf("%v/passive-interface-config/disable-interface/Port-channel-subinterface/Port-channel=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.PassiveInterfaceDisablePortChannels {
		keyValues := [...]string{data.PassiveInterfaceDisablePortChannels[i].Name.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/passive-interface-config/disable-interface/Port-channel=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.PassiveInterfaceDisableTunnels {
		keyValues := [...]string{data.PassiveInterfaceDisableTunnels[i].Name.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/passive-interface-config/disable-interface/Tunnel=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.PassiveInterfaceDisableVlans {
		keyValues := [...]string{data.PassiveInterfaceDisableVlans[i].Name.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/passive-interface-config/disable-interface/Vlan=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.PassiveInterfaceDisableLoopbacks {
		keyValues := [...]string{data.PassiveInterfaceDisableLoopbacks[i].Name.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/passive-interface-config/disable-interface/Loopback=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.PassiveInterfaceDisableFourHundredGigabitEthernets {
		keyValues := [...]string{data.PassiveInterfaceDisableFourHundredGigabitEthernets[i].Name.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/passive-interface-config/disable-interface/FourHundredGigabitE=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.PassiveInterfaceDisableTwoHundredGigabitEthernets {
		keyValues := [...]string{data.PassiveInterfaceDisableTwoHundredGigabitEthernets[i].Name.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/passive-interface-config/disable-interface/TwoHundredGigabitE=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.PassiveInterfaceDisableHundredGigabitEthernets {
		keyValues := [...]string{data.PassiveInterfaceDisableHundredGigabitEthernets[i].Name.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/passive-interface-config/disable-interface/HundredGigabitE=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.PassiveInterfaceDisableFortyGigabitEthernets {
		keyValues := [...]string{data.PassiveInterfaceDisableFortyGigabitEthernets[i].Name.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/passive-interface-config/disable-interface/FortyGigabitEthernet=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.PassiveInterfaceDisableTwentyFiveGigabitEthernets {
		keyValues := [...]string{data.PassiveInterfaceDisableTwentyFiveGigabitEthernets[i].Name.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/passive-interface-config/disable-interface/TwentyFiveGigabitE=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.PassiveInterfaceDisableTenGigabitEthernets {
		keyValues := [...]string{data.PassiveInterfaceDisableTenGigabitEthernets[i].Name.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/passive-interface-config/disable-interface/TenGigabitEthernet=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.PassiveInterfaceDisableFiveGigabitEthernets {
		keyValues := [...]string{data.PassiveInterfaceDisableFiveGigabitEthernets[i].Name.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/passive-interface-config/disable-interface/FiveGigabitEthernet=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.PassiveInterfaceDisableTwoGigabitEthernets {
		keyValues := [...]string{data.PassiveInterfaceDisableTwoGigabitEthernets[i].Name.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/passive-interface-config/disable-interface/TwoGigabitEthernet=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.PassiveInterfaceDisableGigabitEthernets {
		keyValues := [...]string{data.PassiveInterfaceDisableGigabitEthernets[i].Name.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/passive-interface-config/disable-interface/GigabitEthernet=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	if !data.PassiveInterface.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/passive-interface/interface", data.getPath()))
	}
	if !data.PassiveInterfaceDefault.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/passive-interface/default", data.getPath()))
	}
	if !data.AutoCostReferenceBandwidth.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/auto-cost/reference-bandwidth", data.getPath()))
	}
	for i := range data.Areas {
		keyValues := [...]string{data.Areas[i].AreaId.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/area=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.SummaryAddresses {
		keyValues := [...]string{data.SummaryAddresses[i].Ip.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/summary-address=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	if !data.Shutdown.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/shutdown", data.getPath()))
	}
	if !data.RouterId.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/router-id", data.getPath()))
	}
	if !data.Priority.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/priority", data.getPath()))
	}
	for i := range data.Networks {
		keyValues := [...]string{data.Networks[i].Ip.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/network=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.Neighbors {
		keyValues := [...]string{data.Neighbors[i].Ip.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/neighbor=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	if !data.MplsLdpSync.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/mpls/ldp/sync", data.getPath()))
	}
	if !data.MplsLdpAutoconfig.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/mpls/ldp/autoconfig", data.getPath()))
	}
	if !data.DomainTag.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/domain-tag", data.getPath()))
	}
	if !data.Distance.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/distance/distance", data.getPath()))
	}
	if !data.DefaultMetric.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/default-metric", data.getPath()))
	}
	if !data.DefaultInformationOriginateAlways.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/default-information/originate/always", data.getPath()))
	}
	if !data.DefaultInformationOriginate.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/default-information/originate", data.getPath()))
	}
	if !data.BfdAllInterfaces.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/bfd/all-interfaces", data.getPath()))
	}

	return deletePaths
}

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