// 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 RouteMap struct {
	Device  types.String      `tfsdk:"device"`
	Id      types.String      `tfsdk:"id"`
	Name    types.String      `tfsdk:"name"`
	Entries []RouteMapEntries `tfsdk:"entries"`
}

type RouteMapData struct {
	Device  types.String      `tfsdk:"device"`
	Id      types.String      `tfsdk:"id"`
	Name    types.String      `tfsdk:"name"`
	Entries []RouteMapEntries `tfsdk:"entries"`
}
type RouteMapEntries struct {
	Seq                                    types.Int64                         `tfsdk:"seq"`
	Operation                              types.String                        `tfsdk:"operation"`
	Description                            types.String                        `tfsdk:"description"`
	Continue                               types.Bool                          `tfsdk:"continue"`
	ContinueSequenceNumber                 types.Int64                         `tfsdk:"continue_sequence_number"`
	MatchInterfaces                        types.List                          `tfsdk:"match_interfaces"`
	MatchIpAddressAccessLists              types.List                          `tfsdk:"match_ip_address_access_lists"`
	MatchIpAddressPrefixLists              types.List                          `tfsdk:"match_ip_address_prefix_lists"`
	MatchIpNextHopAccessLists              types.List                          `tfsdk:"match_ip_next_hop_access_lists"`
	MatchIpNextHopPrefixLists              types.List                          `tfsdk:"match_ip_next_hop_prefix_lists"`
	MatchIpv6AddressAccessLists            types.String                        `tfsdk:"match_ipv6_address_access_lists"`
	MatchIpv6AddressPrefixLists            types.String                        `tfsdk:"match_ipv6_address_prefix_lists"`
	MatchIpv6NextHopAccessLists            types.String                        `tfsdk:"match_ipv6_next_hop_access_lists"`
	MatchIpv6NextHopPrefixLists            types.String                        `tfsdk:"match_ipv6_next_hop_prefix_lists"`
	MatchRouteTypeExternal                 types.Bool                          `tfsdk:"match_route_type_external"`
	MatchRouteTypeExternalType1            types.Bool                          `tfsdk:"match_route_type_external_type_1"`
	MatchRouteTypeExternalType2            types.Bool                          `tfsdk:"match_route_type_external_type_2"`
	MatchRouteTypeInternal                 types.Bool                          `tfsdk:"match_route_type_internal"`
	MatchRouteTypeLevel1                   types.Bool                          `tfsdk:"match_route_type_level_1"`
	MatchRouteTypeLevel2                   types.Bool                          `tfsdk:"match_route_type_level_2"`
	MatchRouteTypeLocalLegacy              types.Bool                          `tfsdk:"match_route_type_local_legacy"`
	MatchRouteTypeLocal                    types.Bool                          `tfsdk:"match_route_type_local"`
	MatchSourceProtocolBgp                 types.List                          `tfsdk:"match_source_protocol_bgp"`
	MatchSourceProtocolConnected           types.Bool                          `tfsdk:"match_source_protocol_connected"`
	MatchSourceProtocolEigrp               types.List                          `tfsdk:"match_source_protocol_eigrp"`
	MatchSourceProtocolIsis                types.Bool                          `tfsdk:"match_source_protocol_isis"`
	MatchSourceProtocolLisp                types.Bool                          `tfsdk:"match_source_protocol_lisp"`
	MatchSourceProtocolOspf                types.List                          `tfsdk:"match_source_protocol_ospf"`
	MatchSourceProtocolOspfv3              types.List                          `tfsdk:"match_source_protocol_ospfv3"`
	MatchSourceProtocolRip                 types.Bool                          `tfsdk:"match_source_protocol_rip"`
	MatchSourceProtocolStatic              types.Bool                          `tfsdk:"match_source_protocol_static"`
	MatchTags                              types.List                          `tfsdk:"match_tags"`
	MatchTrack                             types.Int64                         `tfsdk:"match_track"`
	MatchAsPathsLegacy                     types.List                          `tfsdk:"match_as_paths_legacy"`
	MatchCommunityListsLegacy              types.List                          `tfsdk:"match_community_lists_legacy"`
	MatchExtcommunityListsLegacy           types.List                          `tfsdk:"match_extcommunity_lists_legacy"`
	MatchLocalPreferencesLegacy            types.List                          `tfsdk:"match_local_preferences_legacy"`
	MatchAsPaths                           types.List                          `tfsdk:"match_as_paths"`
	MatchCommunityLists                    types.List                          `tfsdk:"match_community_lists"`
	MatchCommunityListExactMatch           types.Bool                          `tfsdk:"match_community_list_exact_match"`
	MatchExtcommunityLists                 types.List                          `tfsdk:"match_extcommunity_lists"`
	MatchLocalPreferences                  types.List                          `tfsdk:"match_local_preferences"`
	SetDefaultInterfaces                   types.List                          `tfsdk:"set_default_interfaces"`
	SetGlobal                              types.Bool                          `tfsdk:"set_global"`
	SetInterfaces                          types.List                          `tfsdk:"set_interfaces"`
	SetIpAddress                           types.String                        `tfsdk:"set_ip_address"`
	SetIpDefaultGlobalNextHopAddress       types.List                          `tfsdk:"set_ip_default_global_next_hop_address"`
	SetIpDefaultNextHopAddress             types.List                          `tfsdk:"set_ip_default_next_hop_address"`
	SetIpGlobalNextHopAddress              types.List                          `tfsdk:"set_ip_global_next_hop_address"`
	SetIpNextHopAddress                    types.List                          `tfsdk:"set_ip_next_hop_address"`
	SetIpNextHopSelf                       types.Bool                          `tfsdk:"set_ip_next_hop_self"`
	SetIpQosGroup                          types.Int64                         `tfsdk:"set_ip_qos_group"`
	SetIpv6Address                         types.List                          `tfsdk:"set_ipv6_address"`
	SetIpv6DefaultGlobalNextHop            types.String                        `tfsdk:"set_ipv6_default_global_next_hop"`
	SetIpv6DefaultNextHop                  types.List                          `tfsdk:"set_ipv6_default_next_hop"`
	SetIpv6NextHop                         types.List                          `tfsdk:"set_ipv6_next_hop"`
	SetLevel1                              types.Bool                          `tfsdk:"set_level_1"`
	SetLevel12                             types.Bool                          `tfsdk:"set_level_1_2"`
	SetLevel2                              types.Bool                          `tfsdk:"set_level_2"`
	SetMetricChange                        types.String                        `tfsdk:"set_metric_change"`
	SetMetricValue                         types.Int64                         `tfsdk:"set_metric_value"`
	SetMetricDelay                         types.String                        `tfsdk:"set_metric_delay"`
	SetMetricReliability                   types.Int64                         `tfsdk:"set_metric_reliability"`
	SetMetricLoading                       types.Int64                         `tfsdk:"set_metric_loading"`
	SetMetricMtu                           types.Int64                         `tfsdk:"set_metric_mtu"`
	SetMetricType                          types.String                        `tfsdk:"set_metric_type"`
	SetTag                                 types.Int64                         `tfsdk:"set_tag"`
	SetVrf                                 types.String                        `tfsdk:"set_vrf"`
	SetAsPathPrependAsLegacy               types.String                        `tfsdk:"set_as_path_prepend_as_legacy"`
	SetAsPathPrependLastAsLegacy           types.Int64                         `tfsdk:"set_as_path_prepend_last_as_legacy"`
	SetAsPathTagLegacy                     types.Bool                          `tfsdk:"set_as_path_tag_legacy"`
	SetCommunityNoneLegacy                 types.Bool                          `tfsdk:"set_community_none_legacy"`
	SetCommunitiesLegacy                   types.List                          `tfsdk:"set_communities_legacy"`
	SetCommunitiesAdditiveLegacy           types.Bool                          `tfsdk:"set_communities_additive_legacy"`
	SetCommunityListDeleteLegacy           types.Bool                          `tfsdk:"set_community_list_delete_legacy"`
	SetCommunityListStandardLegacy         types.Int64                         `tfsdk:"set_community_list_standard_legacy"`
	SetCommunityListExpandedLegacy         types.Int64                         `tfsdk:"set_community_list_expanded_legacy"`
	SetCommunityListNameLegacy             types.String                        `tfsdk:"set_community_list_name_legacy"`
	SetExtcomunityRtLegacy                 types.List                          `tfsdk:"set_extcomunity_rt_legacy"`
	SetExtcomunitySooLegacy                types.String                        `tfsdk:"set_extcomunity_soo_legacy"`
	SetExtcomunityVpnDistinguisherLegacy   types.String                        `tfsdk:"set_extcomunity_vpn_distinguisher_legacy"`
	SetLocalPreferenceLegacy               types.Int64                         `tfsdk:"set_local_preference_legacy"`
	SetWeightLegacy                        types.Int64                         `tfsdk:"set_weight_legacy"`
	SetAsPathPrependAs                     types.String                        `tfsdk:"set_as_path_prepend_as"`
	SetAsPathPrependLastAs                 types.Int64                         `tfsdk:"set_as_path_prepend_last_as"`
	SetAsPathTag                           types.Bool                          `tfsdk:"set_as_path_tag"`
	SetAsPathReplaceAny                    types.Bool                          `tfsdk:"set_as_path_replace_any"`
	SetAsPathReplaceAs                     []RouteMapEntriesSetAsPathReplaceAs `tfsdk:"set_as_path_replace_as"`
	SetCommunityNone                       types.Bool                          `tfsdk:"set_community_none"`
	SetCommunities                         types.List                          `tfsdk:"set_communities"`
	SetCommunitiesAdditive                 types.Bool                          `tfsdk:"set_communities_additive"`
	SetCommunityListDelete                 types.Bool                          `tfsdk:"set_community_list_delete"`
	SetCommunityListStandard               types.Int64                         `tfsdk:"set_community_list_standard"`
	SetCommunityListExpanded               types.Int64                         `tfsdk:"set_community_list_expanded"`
	SetCommunityListName                   types.String                        `tfsdk:"set_community_list_name"`
	SetExtcomunityRt                       types.List                          `tfsdk:"set_extcomunity_rt"`
	SetExtcomunitySoo                      types.String                        `tfsdk:"set_extcomunity_soo"`
	SetExtcomunityVpnDistinguisher         types.String                        `tfsdk:"set_extcomunity_vpn_distinguisher"`
	SetExtcomunityVpnDistinguisherAdditive types.Bool                          `tfsdk:"set_extcomunity_vpn_distinguisher_additive"`
	SetLocalPreference                     types.Int64                         `tfsdk:"set_local_preference"`
	SetWeight                              types.Int64                         `tfsdk:"set_weight"`
}
type RouteMapEntriesSetAsPathReplaceAs struct {
	AsNumber types.String `tfsdk:"as_number"`
}

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

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

func (data RouteMap) getPath() string {
	return fmt.Sprintf("Cisco-IOS-XE-native:native/route-map=%v", url.QueryEscape(fmt.Sprintf("%v", data.Name.ValueString())))
}

func (data RouteMapData) getPath() string {
	return fmt.Sprintf("Cisco-IOS-XE-native:native/route-map=%v", url.QueryEscape(fmt.Sprintf("%v", data.Name.ValueString())))
}

// if last path element has a key -> remove it
func (data RouteMap) 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 RouteMap) toBody(ctx context.Context) string {
	body := `{"` + helpers.LastElement(data.getPath()) + `":{}}`
	if !data.Name.IsNull() && !data.Name.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"name", data.Name.ValueString())
	}
	if len(data.Entries) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq", []interface{}{})
		for index, item := range data.Entries {
			if !item.Seq.IsNull() && !item.Seq.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"seq_no", strconv.FormatInt(item.Seq.ValueInt64(), 10))
			}
			if !item.Operation.IsNull() && !item.Operation.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"operation", item.Operation.ValueString())
			}
			if !item.Description.IsNull() && !item.Description.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"description", item.Description.ValueString())
			}
			if !item.Continue.IsNull() && !item.Continue.IsUnknown() {
				if item.Continue.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"continue", map[string]string{})
				}
			}
			if !item.ContinueSequenceNumber.IsNull() && !item.ContinueSequenceNumber.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"continue.sequence-number", strconv.FormatInt(item.ContinueSequenceNumber.ValueInt64(), 10))
			}
			if !item.MatchInterfaces.IsNull() && !item.MatchInterfaces.IsUnknown() {
				var values []string
				item.MatchInterfaces.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.interface.interface", values)
			}
			if !item.MatchIpAddressAccessLists.IsNull() && !item.MatchIpAddressAccessLists.IsUnknown() {
				var values []string
				item.MatchIpAddressAccessLists.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.ip.address.access-list", values)
			}
			if !item.MatchIpAddressPrefixLists.IsNull() && !item.MatchIpAddressPrefixLists.IsUnknown() {
				var values []string
				item.MatchIpAddressPrefixLists.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.ip.address.prefix-list", values)
			}
			if !item.MatchIpNextHopAccessLists.IsNull() && !item.MatchIpNextHopAccessLists.IsUnknown() {
				var values []string
				item.MatchIpNextHopAccessLists.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.ip.next-hop.access-list", values)
			}
			if !item.MatchIpNextHopPrefixLists.IsNull() && !item.MatchIpNextHopPrefixLists.IsUnknown() {
				var values []string
				item.MatchIpNextHopPrefixLists.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.ip.next-hop.prefix-list", values)
			}
			if !item.MatchIpv6AddressAccessLists.IsNull() && !item.MatchIpv6AddressAccessLists.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.ipv6.address.access-list", item.MatchIpv6AddressAccessLists.ValueString())
			}
			if !item.MatchIpv6AddressPrefixLists.IsNull() && !item.MatchIpv6AddressPrefixLists.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.ipv6.address.prefix-list", item.MatchIpv6AddressPrefixLists.ValueString())
			}
			if !item.MatchIpv6NextHopAccessLists.IsNull() && !item.MatchIpv6NextHopAccessLists.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.ipv6.next-hop.access-list", item.MatchIpv6NextHopAccessLists.ValueString())
			}
			if !item.MatchIpv6NextHopPrefixLists.IsNull() && !item.MatchIpv6NextHopPrefixLists.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.ipv6.next-hop.prefix-list", item.MatchIpv6NextHopPrefixLists.ValueString())
			}
			if !item.MatchRouteTypeExternal.IsNull() && !item.MatchRouteTypeExternal.IsUnknown() {
				if item.MatchRouteTypeExternal.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.route-type.external", map[string]string{})
				}
			}
			if !item.MatchRouteTypeExternalType1.IsNull() && !item.MatchRouteTypeExternalType1.IsUnknown() {
				if item.MatchRouteTypeExternalType1.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.route-type.external.type-1", map[string]string{})
				}
			}
			if !item.MatchRouteTypeExternalType2.IsNull() && !item.MatchRouteTypeExternalType2.IsUnknown() {
				if item.MatchRouteTypeExternalType2.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.route-type.external.type-2", map[string]string{})
				}
			}
			if !item.MatchRouteTypeInternal.IsNull() && !item.MatchRouteTypeInternal.IsUnknown() {
				if item.MatchRouteTypeInternal.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.route-type.internal", map[string]string{})
				}
			}
			if !item.MatchRouteTypeLevel1.IsNull() && !item.MatchRouteTypeLevel1.IsUnknown() {
				if item.MatchRouteTypeLevel1.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.route-type.level-1", map[string]string{})
				}
			}
			if !item.MatchRouteTypeLevel2.IsNull() && !item.MatchRouteTypeLevel2.IsUnknown() {
				if item.MatchRouteTypeLevel2.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.route-type.level-2", map[string]string{})
				}
			}
			if !item.MatchRouteTypeLocalLegacy.IsNull() && !item.MatchRouteTypeLocalLegacy.IsUnknown() {
				if item.MatchRouteTypeLocalLegacy.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.route-type.local", map[string]string{})
				}
			}
			if !item.MatchRouteTypeLocal.IsNull() && !item.MatchRouteTypeLocal.IsUnknown() {
				if item.MatchRouteTypeLocal.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.Cisco-IOS-XE-bgp:bgp-route-map-match.route-type.local", map[string]string{})
				}
			}
			if !item.MatchSourceProtocolBgp.IsNull() && !item.MatchSourceProtocolBgp.IsUnknown() {
				var values []string
				item.MatchSourceProtocolBgp.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.source-protocol.bgp", values)
			}
			if !item.MatchSourceProtocolConnected.IsNull() && !item.MatchSourceProtocolConnected.IsUnknown() {
				if item.MatchSourceProtocolConnected.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.source-protocol.connected", map[string]string{})
				}
			}
			if !item.MatchSourceProtocolEigrp.IsNull() && !item.MatchSourceProtocolEigrp.IsUnknown() {
				var values []string
				item.MatchSourceProtocolEigrp.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.source-protocol.eigrp", values)
			}
			if !item.MatchSourceProtocolIsis.IsNull() && !item.MatchSourceProtocolIsis.IsUnknown() {
				if item.MatchSourceProtocolIsis.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.source-protocol.isis", map[string]string{})
				}
			}
			if !item.MatchSourceProtocolLisp.IsNull() && !item.MatchSourceProtocolLisp.IsUnknown() {
				if item.MatchSourceProtocolLisp.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.source-protocol.lisp", map[string]string{})
				}
			}
			if !item.MatchSourceProtocolOspf.IsNull() && !item.MatchSourceProtocolOspf.IsUnknown() {
				var values []string
				item.MatchSourceProtocolOspf.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.source-protocol.ospf", values)
			}
			if !item.MatchSourceProtocolOspfv3.IsNull() && !item.MatchSourceProtocolOspfv3.IsUnknown() {
				var values []string
				item.MatchSourceProtocolOspfv3.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.source-protocol.ospfv3", values)
			}
			if !item.MatchSourceProtocolRip.IsNull() && !item.MatchSourceProtocolRip.IsUnknown() {
				if item.MatchSourceProtocolRip.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.source-protocol.rip", map[string]string{})
				}
			}
			if !item.MatchSourceProtocolStatic.IsNull() && !item.MatchSourceProtocolStatic.IsUnknown() {
				if item.MatchSourceProtocolStatic.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.source-protocol.static", map[string]string{})
				}
			}
			if !item.MatchTags.IsNull() && !item.MatchTags.IsUnknown() {
				var values []int
				item.MatchTags.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.tag.tag_value", values)
			}
			if !item.MatchTrack.IsNull() && !item.MatchTrack.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.track", strconv.FormatInt(item.MatchTrack.ValueInt64(), 10))
			}
			if !item.MatchAsPathsLegacy.IsNull() && !item.MatchAsPathsLegacy.IsUnknown() {
				var values []int
				item.MatchAsPathsLegacy.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.as-path.access-list", values)
			}
			if !item.MatchCommunityListsLegacy.IsNull() && !item.MatchCommunityListsLegacy.IsUnknown() {
				var values []string
				item.MatchCommunityListsLegacy.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.community.name", values)
			}
			if !item.MatchExtcommunityListsLegacy.IsNull() && !item.MatchExtcommunityListsLegacy.IsUnknown() {
				var values []string
				item.MatchExtcommunityListsLegacy.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.extcommunity.name", values)
			}
			if !item.MatchLocalPreferencesLegacy.IsNull() && !item.MatchLocalPreferencesLegacy.IsUnknown() {
				var values []int
				item.MatchLocalPreferencesLegacy.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.local-preference.values", values)
			}
			if !item.MatchAsPaths.IsNull() && !item.MatchAsPaths.IsUnknown() {
				var values []int
				item.MatchAsPaths.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.Cisco-IOS-XE-bgp:bgp-route-map-match.as-path.access-list", values)
			}
			if !item.MatchCommunityLists.IsNull() && !item.MatchCommunityLists.IsUnknown() {
				var values []string
				item.MatchCommunityLists.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.Cisco-IOS-XE-bgp:bgp-route-map-match.bgp-community.community-list", values)
			}
			if !item.MatchCommunityListExactMatch.IsNull() && !item.MatchCommunityListExactMatch.IsUnknown() {
				if item.MatchCommunityListExactMatch.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.Cisco-IOS-XE-bgp:bgp-route-map-match.bgp-community.exact-match", map[string]string{})
				}
			}
			if !item.MatchExtcommunityLists.IsNull() && !item.MatchExtcommunityLists.IsUnknown() {
				var values []string
				item.MatchExtcommunityLists.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.Cisco-IOS-XE-bgp:bgp-route-map-match.extcommunity.extcommunity-list", values)
			}
			if !item.MatchLocalPreferences.IsNull() && !item.MatchLocalPreferences.IsUnknown() {
				var values []int
				item.MatchLocalPreferences.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"match.Cisco-IOS-XE-bgp:bgp-route-map-match.local-preference.values", values)
			}
			if !item.SetDefaultInterfaces.IsNull() && !item.SetDefaultInterfaces.IsUnknown() {
				var values []string
				item.SetDefaultInterfaces.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.default.interface-list", values)
			}
			if !item.SetGlobal.IsNull() && !item.SetGlobal.IsUnknown() {
				if item.SetGlobal.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.global", map[string]string{})
				}
			}
			if !item.SetInterfaces.IsNull() && !item.SetInterfaces.IsUnknown() {
				var values []string
				item.SetInterfaces.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.interface-list", values)
			}
			if !item.SetIpAddress.IsNull() && !item.SetIpAddress.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.ip.address.prefix-list", item.SetIpAddress.ValueString())
			}
			if !item.SetIpDefaultGlobalNextHopAddress.IsNull() && !item.SetIpDefaultGlobalNextHopAddress.IsUnknown() {
				var values []string
				item.SetIpDefaultGlobalNextHopAddress.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.ip.default.global.next-hop.address", values)
			}
			if !item.SetIpDefaultNextHopAddress.IsNull() && !item.SetIpDefaultNextHopAddress.IsUnknown() {
				var values []string
				item.SetIpDefaultNextHopAddress.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.ip.default.next-hop.address", values)
			}
			if !item.SetIpGlobalNextHopAddress.IsNull() && !item.SetIpGlobalNextHopAddress.IsUnknown() {
				var values []string
				item.SetIpGlobalNextHopAddress.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.ip.global.next-hop.address", values)
			}
			if !item.SetIpNextHopAddress.IsNull() && !item.SetIpNextHopAddress.IsUnknown() {
				var values []string
				item.SetIpNextHopAddress.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.ip.next-hop.address", values)
			}
			if !item.SetIpNextHopSelf.IsNull() && !item.SetIpNextHopSelf.IsUnknown() {
				if item.SetIpNextHopSelf.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.ip.next-hop.self", map[string]string{})
				}
			}
			if !item.SetIpQosGroup.IsNull() && !item.SetIpQosGroup.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.ip.qos-group.qos-id", strconv.FormatInt(item.SetIpQosGroup.ValueInt64(), 10))
			}
			if !item.SetIpv6Address.IsNull() && !item.SetIpv6Address.IsUnknown() {
				var values []string
				item.SetIpv6Address.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.ipv6.address.prefix-list", values)
			}
			if !item.SetIpv6DefaultGlobalNextHop.IsNull() && !item.SetIpv6DefaultGlobalNextHop.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.ipv6.default.global.next-hop", item.SetIpv6DefaultGlobalNextHop.ValueString())
			}
			if !item.SetIpv6DefaultNextHop.IsNull() && !item.SetIpv6DefaultNextHop.IsUnknown() {
				var values []string
				item.SetIpv6DefaultNextHop.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.ipv6.default.next-hop.ipv6", values)
			}
			if !item.SetIpv6NextHop.IsNull() && !item.SetIpv6NextHop.IsUnknown() {
				var values []string
				item.SetIpv6NextHop.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.ipv6.next-hop.ipv6", values)
			}
			if !item.SetLevel1.IsNull() && !item.SetLevel1.IsUnknown() {
				if item.SetLevel1.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.level.level-1", map[string]string{})
				}
			}
			if !item.SetLevel12.IsNull() && !item.SetLevel12.IsUnknown() {
				if item.SetLevel12.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.level.level-1-2", map[string]string{})
				}
			}
			if !item.SetLevel2.IsNull() && !item.SetLevel2.IsUnknown() {
				if item.SetLevel2.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.level.level-2", map[string]string{})
				}
			}
			if !item.SetMetricChange.IsNull() && !item.SetMetricChange.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.metric.metric-change", item.SetMetricChange.ValueString())
			}
			if !item.SetMetricValue.IsNull() && !item.SetMetricValue.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.metric.values.value", strconv.FormatInt(item.SetMetricValue.ValueInt64(), 10))
			}
			if !item.SetMetricDelay.IsNull() && !item.SetMetricDelay.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.metric.values.delay", item.SetMetricDelay.ValueString())
			}
			if !item.SetMetricReliability.IsNull() && !item.SetMetricReliability.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.metric.values.reliability", strconv.FormatInt(item.SetMetricReliability.ValueInt64(), 10))
			}
			if !item.SetMetricLoading.IsNull() && !item.SetMetricLoading.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.metric.values.loading", strconv.FormatInt(item.SetMetricLoading.ValueInt64(), 10))
			}
			if !item.SetMetricMtu.IsNull() && !item.SetMetricMtu.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.metric.values.MTU", strconv.FormatInt(item.SetMetricMtu.ValueInt64(), 10))
			}
			if !item.SetMetricType.IsNull() && !item.SetMetricType.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.metric-type", item.SetMetricType.ValueString())
			}
			if !item.SetTag.IsNull() && !item.SetTag.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.tag.tag-val", strconv.FormatInt(item.SetTag.ValueInt64(), 10))
			}
			if !item.SetVrf.IsNull() && !item.SetVrf.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.vrf", item.SetVrf.ValueString())
			}
			if !item.SetAsPathPrependAsLegacy.IsNull() && !item.SetAsPathPrependAsLegacy.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.as-path.prepend.as-container.as-number", item.SetAsPathPrependAsLegacy.ValueString())
			}
			if !item.SetAsPathPrependLastAsLegacy.IsNull() && !item.SetAsPathPrependLastAsLegacy.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.as-path.prepend.last-as-cont.last-as", strconv.FormatInt(item.SetAsPathPrependLastAsLegacy.ValueInt64(), 10))
			}
			if !item.SetAsPathTagLegacy.IsNull() && !item.SetAsPathTagLegacy.IsUnknown() {
				if item.SetAsPathTagLegacy.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.as-path.tag", map[string]string{})
				}
			}
			if !item.SetCommunityNoneLegacy.IsNull() && !item.SetCommunityNoneLegacy.IsUnknown() {
				if item.SetCommunityNoneLegacy.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.community.none", map[string]string{})
				}
			}
			if !item.SetCommunitiesLegacy.IsNull() && !item.SetCommunitiesLegacy.IsUnknown() {
				var values []string
				item.SetCommunitiesLegacy.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.community.community-well-known.community-list", values)
			}
			if !item.SetCommunitiesAdditiveLegacy.IsNull() && !item.SetCommunitiesAdditiveLegacy.IsUnknown() {
				if item.SetCommunitiesAdditiveLegacy.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.community.community-well-known.additive", map[string]string{})
				}
			}
			if !item.SetCommunityListDeleteLegacy.IsNull() && !item.SetCommunityListDeleteLegacy.IsUnknown() {
				if item.SetCommunityListDeleteLegacy.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.comm-list.delete", map[string]string{})
				}
			}
			if !item.SetCommunityListStandardLegacy.IsNull() && !item.SetCommunityListStandardLegacy.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.comm-list.comm-list-standard", strconv.FormatInt(item.SetCommunityListStandardLegacy.ValueInt64(), 10))
			}
			if !item.SetCommunityListExpandedLegacy.IsNull() && !item.SetCommunityListExpandedLegacy.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.Cisco-IOS-XE-bgp:bgp-route-map-set.comm-list.comm-list-expanded", strconv.FormatInt(item.SetCommunityListExpandedLegacy.ValueInt64(), 10))
			}
			if !item.SetCommunityListNameLegacy.IsNull() && !item.SetCommunityListNameLegacy.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.comm-list.comm-list-name", item.SetCommunityListNameLegacy.ValueString())
			}
			if !item.SetExtcomunityRtLegacy.IsNull() && !item.SetExtcomunityRtLegacy.IsUnknown() {
				var values []string
				item.SetExtcomunityRtLegacy.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.extcommunity.rt.asn-nn", values)
			}
			if !item.SetExtcomunitySooLegacy.IsNull() && !item.SetExtcomunitySooLegacy.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.extcommunity.soo.asn-nn", item.SetExtcomunitySooLegacy.ValueString())
			}
			if !item.SetExtcomunityVpnDistinguisherLegacy.IsNull() && !item.SetExtcomunityVpnDistinguisherLegacy.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.extcommunity.vpn-distinguisher.asn-nn", item.SetExtcomunityVpnDistinguisherLegacy.ValueString())
			}
			if !item.SetLocalPreferenceLegacy.IsNull() && !item.SetLocalPreferenceLegacy.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.local-preference", strconv.FormatInt(item.SetLocalPreferenceLegacy.ValueInt64(), 10))
			}
			if !item.SetWeightLegacy.IsNull() && !item.SetWeightLegacy.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.weight", strconv.FormatInt(item.SetWeightLegacy.ValueInt64(), 10))
			}
			if !item.SetAsPathPrependAs.IsNull() && !item.SetAsPathPrependAs.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.Cisco-IOS-XE-bgp:bgp-route-map-set.as-path.prepend.as-container.as-number", item.SetAsPathPrependAs.ValueString())
			}
			if !item.SetAsPathPrependLastAs.IsNull() && !item.SetAsPathPrependLastAs.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.Cisco-IOS-XE-bgp:bgp-route-map-set.as-path.prepend.last-as-cont.last-as", strconv.FormatInt(item.SetAsPathPrependLastAs.ValueInt64(), 10))
			}
			if !item.SetAsPathTag.IsNull() && !item.SetAsPathTag.IsUnknown() {
				if item.SetAsPathTag.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.Cisco-IOS-XE-bgp:bgp-route-map-set.as-path.tag", map[string]string{})
				}
			}
			if !item.SetAsPathReplaceAny.IsNull() && !item.SetAsPathReplaceAny.IsUnknown() {
				if item.SetAsPathReplaceAny.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.Cisco-IOS-XE-bgp:bgp-route-map-set.as-path.replace.any", map[string]string{})
				}
			}
			if !item.SetCommunityNone.IsNull() && !item.SetCommunityNone.IsUnknown() {
				if item.SetCommunityNone.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.Cisco-IOS-XE-bgp:bgp-route-map-set.bgp-community.none", map[string]string{})
				}
			}
			if !item.SetCommunities.IsNull() && !item.SetCommunities.IsUnknown() {
				var values []string
				item.SetCommunities.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.Cisco-IOS-XE-bgp:bgp-route-map-set.bgp-community.community-well-known.community-list", values)
			}
			if !item.SetCommunitiesAdditive.IsNull() && !item.SetCommunitiesAdditive.IsUnknown() {
				if item.SetCommunitiesAdditive.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.Cisco-IOS-XE-bgp:bgp-route-map-set.bgp-community.community-well-known.additive", map[string]string{})
				}
			}
			if !item.SetCommunityListDelete.IsNull() && !item.SetCommunityListDelete.IsUnknown() {
				if item.SetCommunityListDelete.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.Cisco-IOS-XE-bgp:bgp-route-map-set.comm-list.delete", map[string]string{})
				}
			}
			if !item.SetCommunityListStandard.IsNull() && !item.SetCommunityListStandard.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.Cisco-IOS-XE-bgp:bgp-route-map-set.comm-list.comm-list-standard", strconv.FormatInt(item.SetCommunityListStandard.ValueInt64(), 10))
			}
			if !item.SetCommunityListExpanded.IsNull() && !item.SetCommunityListExpanded.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.Cisco-IOS-XE-bgp:bgp-route-map-set.comm-list.comm-list-expanded", strconv.FormatInt(item.SetCommunityListExpanded.ValueInt64(), 10))
			}
			if !item.SetCommunityListName.IsNull() && !item.SetCommunityListName.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.Cisco-IOS-XE-bgp:bgp-route-map-set.comm-list.comm-list-name", item.SetCommunityListName.ValueString())
			}
			if !item.SetExtcomunityRt.IsNull() && !item.SetExtcomunityRt.IsUnknown() {
				var values []string
				item.SetExtcomunityRt.ElementsAs(ctx, &values, false)
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.Cisco-IOS-XE-bgp:bgp-route-map-set.extcommunity.rt.asn-nn", values)
			}
			if !item.SetExtcomunitySoo.IsNull() && !item.SetExtcomunitySoo.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.Cisco-IOS-XE-bgp:bgp-route-map-set.extcommunity.soo.asn-nn", item.SetExtcomunitySoo.ValueString())
			}
			if !item.SetExtcomunityVpnDistinguisher.IsNull() && !item.SetExtcomunityVpnDistinguisher.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.Cisco-IOS-XE-bgp:bgp-route-map-set.extcommunity.vpn-distinguisher.asn-nn", item.SetExtcomunityVpnDistinguisher.ValueString())
			}
			if !item.SetExtcomunityVpnDistinguisherAdditive.IsNull() && !item.SetExtcomunityVpnDistinguisherAdditive.IsUnknown() {
				if item.SetExtcomunityVpnDistinguisherAdditive.ValueBool() {
					body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.Cisco-IOS-XE-bgp:bgp-route-map-set.extcommunity.vpn-distinguisher.asn-nn-additive", map[string]string{})
				}
			}
			if !item.SetLocalPreference.IsNull() && !item.SetLocalPreference.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.Cisco-IOS-XE-bgp:bgp-route-map-set.local-preference", strconv.FormatInt(item.SetLocalPreference.ValueInt64(), 10))
			}
			if !item.SetWeight.IsNull() && !item.SetWeight.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.Cisco-IOS-XE-bgp:bgp-route-map-set.weight", strconv.FormatInt(item.SetWeight.ValueInt64(), 10))
			}
			if len(item.SetAsPathReplaceAs) > 0 {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.Cisco-IOS-XE-bgp:bgp-route-map-set.as-path.replace.as-container", []interface{}{})
				for cindex, citem := range item.SetAsPathReplaceAs {
					if !citem.AsNumber.IsNull() && !citem.AsNumber.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-route-map:route-map-without-order-seq"+"."+strconv.Itoa(index)+"."+"set.Cisco-IOS-XE-bgp:bgp-route-map-set.as-path.replace.as-container"+"."+strconv.Itoa(cindex)+"."+"as-number", citem.AsNumber.ValueString())
					}
				}
			}
		}
	}
	return body
}

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

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

func (data *RouteMap) 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 + "name"); value.Exists() && !data.Name.IsNull() {
		data.Name = types.StringValue(value.String())
	} else {
		data.Name = types.StringNull()
	}
	for i := range data.Entries {
		keys := [...]string{"seq_no"}
		keyValues := [...]string{strconv.FormatInt(data.Entries[i].Seq.ValueInt64(), 10)}

		var r gjson.Result
		res.Get(prefix + "Cisco-IOS-XE-route-map:route-map-without-order-seq").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("seq_no"); value.Exists() && !data.Entries[i].Seq.IsNull() {
			data.Entries[i].Seq = types.Int64Value(value.Int())
		} else {
			data.Entries[i].Seq = types.Int64Null()
		}
		if value := r.Get("operation"); value.Exists() && !data.Entries[i].Operation.IsNull() {
			data.Entries[i].Operation = types.StringValue(value.String())
		} else {
			data.Entries[i].Operation = types.StringNull()
		}
		if value := r.Get("description"); value.Exists() && !data.Entries[i].Description.IsNull() {
			data.Entries[i].Description = types.StringValue(value.String())
		} else {
			data.Entries[i].Description = types.StringNull()
		}
		if value := r.Get("continue"); !data.Entries[i].Continue.IsNull() {
			if value.Exists() {
				data.Entries[i].Continue = types.BoolValue(true)
			} else {
				data.Entries[i].Continue = types.BoolValue(false)
			}
		} else {
			data.Entries[i].Continue = types.BoolNull()
		}
		if value := r.Get("continue.sequence-number"); value.Exists() && !data.Entries[i].ContinueSequenceNumber.IsNull() {
			data.Entries[i].ContinueSequenceNumber = types.Int64Value(value.Int())
		} else {
			data.Entries[i].ContinueSequenceNumber = types.Int64Null()
		}
		if value := r.Get("match.interface.interface"); value.Exists() && !data.Entries[i].MatchInterfaces.IsNull() {
			data.Entries[i].MatchInterfaces = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].MatchInterfaces = types.ListNull(types.StringType)
		}
		if value := r.Get("match.ip.address.access-list"); value.Exists() && !data.Entries[i].MatchIpAddressAccessLists.IsNull() {
			data.Entries[i].MatchIpAddressAccessLists = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].MatchIpAddressAccessLists = types.ListNull(types.StringType)
		}
		if value := r.Get("match.ip.address.prefix-list"); value.Exists() && !data.Entries[i].MatchIpAddressPrefixLists.IsNull() {
			data.Entries[i].MatchIpAddressPrefixLists = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].MatchIpAddressPrefixLists = types.ListNull(types.StringType)
		}
		if value := r.Get("match.ip.next-hop.access-list"); value.Exists() && !data.Entries[i].MatchIpNextHopAccessLists.IsNull() {
			data.Entries[i].MatchIpNextHopAccessLists = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].MatchIpNextHopAccessLists = types.ListNull(types.StringType)
		}
		if value := r.Get("match.ip.next-hop.prefix-list"); value.Exists() && !data.Entries[i].MatchIpNextHopPrefixLists.IsNull() {
			data.Entries[i].MatchIpNextHopPrefixLists = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].MatchIpNextHopPrefixLists = types.ListNull(types.StringType)
		}
		if value := r.Get("match.ipv6.address.access-list"); value.Exists() && !data.Entries[i].MatchIpv6AddressAccessLists.IsNull() {
			data.Entries[i].MatchIpv6AddressAccessLists = types.StringValue(value.String())
		} else {
			data.Entries[i].MatchIpv6AddressAccessLists = types.StringNull()
		}
		if value := r.Get("match.ipv6.address.prefix-list"); value.Exists() && !data.Entries[i].MatchIpv6AddressPrefixLists.IsNull() {
			data.Entries[i].MatchIpv6AddressPrefixLists = types.StringValue(value.String())
		} else {
			data.Entries[i].MatchIpv6AddressPrefixLists = types.StringNull()
		}
		if value := r.Get("match.ipv6.next-hop.access-list"); value.Exists() && !data.Entries[i].MatchIpv6NextHopAccessLists.IsNull() {
			data.Entries[i].MatchIpv6NextHopAccessLists = types.StringValue(value.String())
		} else {
			data.Entries[i].MatchIpv6NextHopAccessLists = types.StringNull()
		}
		if value := r.Get("match.ipv6.next-hop.prefix-list"); value.Exists() && !data.Entries[i].MatchIpv6NextHopPrefixLists.IsNull() {
			data.Entries[i].MatchIpv6NextHopPrefixLists = types.StringValue(value.String())
		} else {
			data.Entries[i].MatchIpv6NextHopPrefixLists = types.StringNull()
		}
		if value := r.Get("match.route-type.external"); !data.Entries[i].MatchRouteTypeExternal.IsNull() {
			if value.Exists() {
				data.Entries[i].MatchRouteTypeExternal = types.BoolValue(true)
			} else {
				data.Entries[i].MatchRouteTypeExternal = types.BoolValue(false)
			}
		} else {
			data.Entries[i].MatchRouteTypeExternal = types.BoolNull()
		}
		if value := r.Get("match.route-type.external.type-1"); !data.Entries[i].MatchRouteTypeExternalType1.IsNull() {
			if value.Exists() {
				data.Entries[i].MatchRouteTypeExternalType1 = types.BoolValue(true)
			} else {
				data.Entries[i].MatchRouteTypeExternalType1 = types.BoolValue(false)
			}
		} else {
			data.Entries[i].MatchRouteTypeExternalType1 = types.BoolNull()
		}
		if value := r.Get("match.route-type.external.type-2"); !data.Entries[i].MatchRouteTypeExternalType2.IsNull() {
			if value.Exists() {
				data.Entries[i].MatchRouteTypeExternalType2 = types.BoolValue(true)
			} else {
				data.Entries[i].MatchRouteTypeExternalType2 = types.BoolValue(false)
			}
		} else {
			data.Entries[i].MatchRouteTypeExternalType2 = types.BoolNull()
		}
		if value := r.Get("match.route-type.internal"); !data.Entries[i].MatchRouteTypeInternal.IsNull() {
			if value.Exists() {
				data.Entries[i].MatchRouteTypeInternal = types.BoolValue(true)
			} else {
				data.Entries[i].MatchRouteTypeInternal = types.BoolValue(false)
			}
		} else {
			data.Entries[i].MatchRouteTypeInternal = types.BoolNull()
		}
		if value := r.Get("match.route-type.level-1"); !data.Entries[i].MatchRouteTypeLevel1.IsNull() {
			if value.Exists() {
				data.Entries[i].MatchRouteTypeLevel1 = types.BoolValue(true)
			} else {
				data.Entries[i].MatchRouteTypeLevel1 = types.BoolValue(false)
			}
		} else {
			data.Entries[i].MatchRouteTypeLevel1 = types.BoolNull()
		}
		if value := r.Get("match.route-type.level-2"); !data.Entries[i].MatchRouteTypeLevel2.IsNull() {
			if value.Exists() {
				data.Entries[i].MatchRouteTypeLevel2 = types.BoolValue(true)
			} else {
				data.Entries[i].MatchRouteTypeLevel2 = types.BoolValue(false)
			}
		} else {
			data.Entries[i].MatchRouteTypeLevel2 = types.BoolNull()
		}
		if value := r.Get("match.route-type.local"); !data.Entries[i].MatchRouteTypeLocalLegacy.IsNull() {
			if value.Exists() {
				data.Entries[i].MatchRouteTypeLocalLegacy = types.BoolValue(true)
			} else {
				data.Entries[i].MatchRouteTypeLocalLegacy = types.BoolValue(false)
			}
		} else {
			data.Entries[i].MatchRouteTypeLocalLegacy = types.BoolNull()
		}
		if value := r.Get("match.Cisco-IOS-XE-bgp:bgp-route-map-match.route-type.local"); !data.Entries[i].MatchRouteTypeLocal.IsNull() {
			if value.Exists() {
				data.Entries[i].MatchRouteTypeLocal = types.BoolValue(true)
			} else {
				data.Entries[i].MatchRouteTypeLocal = types.BoolValue(false)
			}
		} else {
			data.Entries[i].MatchRouteTypeLocal = types.BoolNull()
		}
		if value := r.Get("match.source-protocol.bgp"); value.Exists() && !data.Entries[i].MatchSourceProtocolBgp.IsNull() {
			data.Entries[i].MatchSourceProtocolBgp = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].MatchSourceProtocolBgp = types.ListNull(types.StringType)
		}
		if value := r.Get("match.source-protocol.connected"); !data.Entries[i].MatchSourceProtocolConnected.IsNull() {
			if value.Exists() {
				data.Entries[i].MatchSourceProtocolConnected = types.BoolValue(true)
			} else {
				data.Entries[i].MatchSourceProtocolConnected = types.BoolValue(false)
			}
		} else {
			data.Entries[i].MatchSourceProtocolConnected = types.BoolNull()
		}
		if value := r.Get("match.source-protocol.eigrp"); value.Exists() && !data.Entries[i].MatchSourceProtocolEigrp.IsNull() {
			data.Entries[i].MatchSourceProtocolEigrp = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].MatchSourceProtocolEigrp = types.ListNull(types.StringType)
		}
		if value := r.Get("match.source-protocol.isis"); !data.Entries[i].MatchSourceProtocolIsis.IsNull() {
			if value.Exists() {
				data.Entries[i].MatchSourceProtocolIsis = types.BoolValue(true)
			} else {
				data.Entries[i].MatchSourceProtocolIsis = types.BoolValue(false)
			}
		} else {
			data.Entries[i].MatchSourceProtocolIsis = types.BoolNull()
		}
		if value := r.Get("match.source-protocol.lisp"); !data.Entries[i].MatchSourceProtocolLisp.IsNull() {
			if value.Exists() {
				data.Entries[i].MatchSourceProtocolLisp = types.BoolValue(true)
			} else {
				data.Entries[i].MatchSourceProtocolLisp = types.BoolValue(false)
			}
		} else {
			data.Entries[i].MatchSourceProtocolLisp = types.BoolNull()
		}
		if value := r.Get("match.source-protocol.ospf"); value.Exists() && !data.Entries[i].MatchSourceProtocolOspf.IsNull() {
			data.Entries[i].MatchSourceProtocolOspf = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].MatchSourceProtocolOspf = types.ListNull(types.StringType)
		}
		if value := r.Get("match.source-protocol.ospfv3"); value.Exists() && !data.Entries[i].MatchSourceProtocolOspfv3.IsNull() {
			data.Entries[i].MatchSourceProtocolOspfv3 = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].MatchSourceProtocolOspfv3 = types.ListNull(types.StringType)
		}
		if value := r.Get("match.source-protocol.rip"); !data.Entries[i].MatchSourceProtocolRip.IsNull() {
			if value.Exists() {
				data.Entries[i].MatchSourceProtocolRip = types.BoolValue(true)
			} else {
				data.Entries[i].MatchSourceProtocolRip = types.BoolValue(false)
			}
		} else {
			data.Entries[i].MatchSourceProtocolRip = types.BoolNull()
		}
		if value := r.Get("match.source-protocol.static"); !data.Entries[i].MatchSourceProtocolStatic.IsNull() {
			if value.Exists() {
				data.Entries[i].MatchSourceProtocolStatic = types.BoolValue(true)
			} else {
				data.Entries[i].MatchSourceProtocolStatic = types.BoolValue(false)
			}
		} else {
			data.Entries[i].MatchSourceProtocolStatic = types.BoolNull()
		}
		if value := r.Get("match.tag.tag_value"); value.Exists() && !data.Entries[i].MatchTags.IsNull() {
			data.Entries[i].MatchTags = helpers.GetInt64List(value.Array())
		} else {
			data.Entries[i].MatchTags = types.ListNull(types.Int64Type)
		}
		if value := r.Get("match.track"); value.Exists() && !data.Entries[i].MatchTrack.IsNull() {
			data.Entries[i].MatchTrack = types.Int64Value(value.Int())
		} else {
			data.Entries[i].MatchTrack = types.Int64Null()
		}
		if value := r.Get("match.as-path.access-list"); value.Exists() && !data.Entries[i].MatchAsPathsLegacy.IsNull() {
			data.Entries[i].MatchAsPathsLegacy = helpers.GetInt64List(value.Array())
		} else {
			data.Entries[i].MatchAsPathsLegacy = types.ListNull(types.Int64Type)
		}
		if value := r.Get("match.community.name"); value.Exists() && !data.Entries[i].MatchCommunityListsLegacy.IsNull() {
			data.Entries[i].MatchCommunityListsLegacy = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].MatchCommunityListsLegacy = types.ListNull(types.StringType)
		}
		if value := r.Get("match.extcommunity.name"); value.Exists() && !data.Entries[i].MatchExtcommunityListsLegacy.IsNull() {
			data.Entries[i].MatchExtcommunityListsLegacy = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].MatchExtcommunityListsLegacy = types.ListNull(types.StringType)
		}
		if value := r.Get("match.local-preference.values"); value.Exists() && !data.Entries[i].MatchLocalPreferencesLegacy.IsNull() {
			data.Entries[i].MatchLocalPreferencesLegacy = helpers.GetInt64List(value.Array())
		} else {
			data.Entries[i].MatchLocalPreferencesLegacy = types.ListNull(types.Int64Type)
		}
		if value := r.Get("match.Cisco-IOS-XE-bgp:bgp-route-map-match.as-path.access-list"); value.Exists() && !data.Entries[i].MatchAsPaths.IsNull() {
			data.Entries[i].MatchAsPaths = helpers.GetInt64List(value.Array())
		} else {
			data.Entries[i].MatchAsPaths = types.ListNull(types.Int64Type)
		}
		if value := r.Get("match.Cisco-IOS-XE-bgp:bgp-route-map-match.bgp-community.community-list"); value.Exists() && !data.Entries[i].MatchCommunityLists.IsNull() {
			data.Entries[i].MatchCommunityLists = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].MatchCommunityLists = types.ListNull(types.StringType)
		}
		if value := r.Get("match.Cisco-IOS-XE-bgp:bgp-route-map-match.bgp-community.exact-match"); !data.Entries[i].MatchCommunityListExactMatch.IsNull() {
			if value.Exists() {
				data.Entries[i].MatchCommunityListExactMatch = types.BoolValue(true)
			} else {
				data.Entries[i].MatchCommunityListExactMatch = types.BoolValue(false)
			}
		} else {
			data.Entries[i].MatchCommunityListExactMatch = types.BoolNull()
		}
		if value := r.Get("match.Cisco-IOS-XE-bgp:bgp-route-map-match.extcommunity.extcommunity-list"); value.Exists() && !data.Entries[i].MatchExtcommunityLists.IsNull() {
			data.Entries[i].MatchExtcommunityLists = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].MatchExtcommunityLists = types.ListNull(types.StringType)
		}
		if value := r.Get("match.Cisco-IOS-XE-bgp:bgp-route-map-match.local-preference.values"); value.Exists() && !data.Entries[i].MatchLocalPreferences.IsNull() {
			data.Entries[i].MatchLocalPreferences = helpers.GetInt64List(value.Array())
		} else {
			data.Entries[i].MatchLocalPreferences = types.ListNull(types.Int64Type)
		}
		if value := r.Get("set.default.interface-list"); value.Exists() && !data.Entries[i].SetDefaultInterfaces.IsNull() {
			data.Entries[i].SetDefaultInterfaces = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].SetDefaultInterfaces = types.ListNull(types.StringType)
		}
		if value := r.Get("set.global"); !data.Entries[i].SetGlobal.IsNull() {
			if value.Exists() {
				data.Entries[i].SetGlobal = types.BoolValue(true)
			} else {
				data.Entries[i].SetGlobal = types.BoolValue(false)
			}
		} else {
			data.Entries[i].SetGlobal = types.BoolNull()
		}
		if value := r.Get("set.interface-list"); value.Exists() && !data.Entries[i].SetInterfaces.IsNull() {
			data.Entries[i].SetInterfaces = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].SetInterfaces = types.ListNull(types.StringType)
		}
		if value := r.Get("set.ip.address.prefix-list"); value.Exists() && !data.Entries[i].SetIpAddress.IsNull() {
			data.Entries[i].SetIpAddress = types.StringValue(value.String())
		} else {
			data.Entries[i].SetIpAddress = types.StringNull()
		}
		if value := r.Get("set.ip.default.global.next-hop.address"); value.Exists() && !data.Entries[i].SetIpDefaultGlobalNextHopAddress.IsNull() {
			data.Entries[i].SetIpDefaultGlobalNextHopAddress = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].SetIpDefaultGlobalNextHopAddress = types.ListNull(types.StringType)
		}
		if value := r.Get("set.ip.default.next-hop.address"); value.Exists() && !data.Entries[i].SetIpDefaultNextHopAddress.IsNull() {
			data.Entries[i].SetIpDefaultNextHopAddress = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].SetIpDefaultNextHopAddress = types.ListNull(types.StringType)
		}
		if value := r.Get("set.ip.global.next-hop.address"); value.Exists() && !data.Entries[i].SetIpGlobalNextHopAddress.IsNull() {
			data.Entries[i].SetIpGlobalNextHopAddress = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].SetIpGlobalNextHopAddress = types.ListNull(types.StringType)
		}
		if value := r.Get("set.ip.next-hop.address"); value.Exists() && !data.Entries[i].SetIpNextHopAddress.IsNull() {
			data.Entries[i].SetIpNextHopAddress = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].SetIpNextHopAddress = types.ListNull(types.StringType)
		}
		if value := r.Get("set.ip.next-hop.self"); !data.Entries[i].SetIpNextHopSelf.IsNull() {
			if value.Exists() {
				data.Entries[i].SetIpNextHopSelf = types.BoolValue(true)
			} else {
				data.Entries[i].SetIpNextHopSelf = types.BoolValue(false)
			}
		} else {
			data.Entries[i].SetIpNextHopSelf = types.BoolNull()
		}
		if value := r.Get("set.ip.qos-group.qos-id"); value.Exists() && !data.Entries[i].SetIpQosGroup.IsNull() {
			data.Entries[i].SetIpQosGroup = types.Int64Value(value.Int())
		} else {
			data.Entries[i].SetIpQosGroup = types.Int64Null()
		}
		if value := r.Get("set.ipv6.address.prefix-list"); value.Exists() && !data.Entries[i].SetIpv6Address.IsNull() {
			data.Entries[i].SetIpv6Address = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].SetIpv6Address = types.ListNull(types.StringType)
		}
		if value := r.Get("set.ipv6.default.global.next-hop"); value.Exists() && !data.Entries[i].SetIpv6DefaultGlobalNextHop.IsNull() {
			data.Entries[i].SetIpv6DefaultGlobalNextHop = types.StringValue(value.String())
		} else {
			data.Entries[i].SetIpv6DefaultGlobalNextHop = types.StringNull()
		}
		if value := r.Get("set.ipv6.default.next-hop.ipv6"); value.Exists() && !data.Entries[i].SetIpv6DefaultNextHop.IsNull() {
			data.Entries[i].SetIpv6DefaultNextHop = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].SetIpv6DefaultNextHop = types.ListNull(types.StringType)
		}
		if value := r.Get("set.ipv6.next-hop.ipv6"); value.Exists() && !data.Entries[i].SetIpv6NextHop.IsNull() {
			data.Entries[i].SetIpv6NextHop = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].SetIpv6NextHop = types.ListNull(types.StringType)
		}
		if value := r.Get("set.level.level-1"); !data.Entries[i].SetLevel1.IsNull() {
			if value.Exists() {
				data.Entries[i].SetLevel1 = types.BoolValue(true)
			} else {
				data.Entries[i].SetLevel1 = types.BoolValue(false)
			}
		} else {
			data.Entries[i].SetLevel1 = types.BoolNull()
		}
		if value := r.Get("set.level.level-1-2"); !data.Entries[i].SetLevel12.IsNull() {
			if value.Exists() {
				data.Entries[i].SetLevel12 = types.BoolValue(true)
			} else {
				data.Entries[i].SetLevel12 = types.BoolValue(false)
			}
		} else {
			data.Entries[i].SetLevel12 = types.BoolNull()
		}
		if value := r.Get("set.level.level-2"); !data.Entries[i].SetLevel2.IsNull() {
			if value.Exists() {
				data.Entries[i].SetLevel2 = types.BoolValue(true)
			} else {
				data.Entries[i].SetLevel2 = types.BoolValue(false)
			}
		} else {
			data.Entries[i].SetLevel2 = types.BoolNull()
		}
		if value := r.Get("set.metric.metric-change"); value.Exists() && !data.Entries[i].SetMetricChange.IsNull() {
			data.Entries[i].SetMetricChange = types.StringValue(value.String())
		} else {
			data.Entries[i].SetMetricChange = types.StringNull()
		}
		if value := r.Get("set.metric.values.value"); value.Exists() && !data.Entries[i].SetMetricValue.IsNull() {
			data.Entries[i].SetMetricValue = types.Int64Value(value.Int())
		} else {
			data.Entries[i].SetMetricValue = types.Int64Null()
		}
		if value := r.Get("set.metric.values.delay"); value.Exists() && !data.Entries[i].SetMetricDelay.IsNull() {
			data.Entries[i].SetMetricDelay = types.StringValue(value.String())
		} else {
			data.Entries[i].SetMetricDelay = types.StringNull()
		}
		if value := r.Get("set.metric.values.reliability"); value.Exists() && !data.Entries[i].SetMetricReliability.IsNull() {
			data.Entries[i].SetMetricReliability = types.Int64Value(value.Int())
		} else {
			data.Entries[i].SetMetricReliability = types.Int64Null()
		}
		if value := r.Get("set.metric.values.loading"); value.Exists() && !data.Entries[i].SetMetricLoading.IsNull() {
			data.Entries[i].SetMetricLoading = types.Int64Value(value.Int())
		} else {
			data.Entries[i].SetMetricLoading = types.Int64Null()
		}
		if value := r.Get("set.metric.values.MTU"); value.Exists() && !data.Entries[i].SetMetricMtu.IsNull() {
			data.Entries[i].SetMetricMtu = types.Int64Value(value.Int())
		} else {
			data.Entries[i].SetMetricMtu = types.Int64Null()
		}
		if value := r.Get("set.metric-type"); value.Exists() && !data.Entries[i].SetMetricType.IsNull() {
			data.Entries[i].SetMetricType = types.StringValue(value.String())
		} else {
			data.Entries[i].SetMetricType = types.StringNull()
		}
		if value := r.Get("set.tag.tag-val"); value.Exists() && !data.Entries[i].SetTag.IsNull() {
			data.Entries[i].SetTag = types.Int64Value(value.Int())
		} else {
			data.Entries[i].SetTag = types.Int64Null()
		}
		if value := r.Get("set.vrf"); value.Exists() && !data.Entries[i].SetVrf.IsNull() {
			data.Entries[i].SetVrf = types.StringValue(value.String())
		} else {
			data.Entries[i].SetVrf = types.StringNull()
		}
		if value := r.Get("set.as-path.prepend.as-container.as-number"); value.Exists() && !data.Entries[i].SetAsPathPrependAsLegacy.IsNull() {
			data.Entries[i].SetAsPathPrependAsLegacy = types.StringValue(value.String())
		} else {
			data.Entries[i].SetAsPathPrependAsLegacy = types.StringNull()
		}
		if value := r.Get("set.as-path.prepend.last-as-cont.last-as"); value.Exists() && !data.Entries[i].SetAsPathPrependLastAsLegacy.IsNull() {
			data.Entries[i].SetAsPathPrependLastAsLegacy = types.Int64Value(value.Int())
		} else {
			data.Entries[i].SetAsPathPrependLastAsLegacy = types.Int64Null()
		}
		if value := r.Get("set.as-path.tag"); !data.Entries[i].SetAsPathTagLegacy.IsNull() {
			if value.Exists() {
				data.Entries[i].SetAsPathTagLegacy = types.BoolValue(true)
			} else {
				data.Entries[i].SetAsPathTagLegacy = types.BoolValue(false)
			}
		} else {
			data.Entries[i].SetAsPathTagLegacy = types.BoolNull()
		}
		if value := r.Get("set.community.none"); !data.Entries[i].SetCommunityNoneLegacy.IsNull() {
			if value.Exists() {
				data.Entries[i].SetCommunityNoneLegacy = types.BoolValue(true)
			} else {
				data.Entries[i].SetCommunityNoneLegacy = types.BoolValue(false)
			}
		} else {
			data.Entries[i].SetCommunityNoneLegacy = types.BoolNull()
		}
		if value := r.Get("set.community.community-well-known.community-list"); value.Exists() && !data.Entries[i].SetCommunitiesLegacy.IsNull() {
			data.Entries[i].SetCommunitiesLegacy = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].SetCommunitiesLegacy = types.ListNull(types.StringType)
		}
		if value := r.Get("set.community.community-well-known.additive"); !data.Entries[i].SetCommunitiesAdditiveLegacy.IsNull() {
			if value.Exists() {
				data.Entries[i].SetCommunitiesAdditiveLegacy = types.BoolValue(true)
			} else {
				data.Entries[i].SetCommunitiesAdditiveLegacy = types.BoolValue(false)
			}
		} else {
			data.Entries[i].SetCommunitiesAdditiveLegacy = types.BoolNull()
		}
		if value := r.Get("set.comm-list.delete"); !data.Entries[i].SetCommunityListDeleteLegacy.IsNull() {
			if value.Exists() {
				data.Entries[i].SetCommunityListDeleteLegacy = types.BoolValue(true)
			} else {
				data.Entries[i].SetCommunityListDeleteLegacy = types.BoolValue(false)
			}
		} else {
			data.Entries[i].SetCommunityListDeleteLegacy = types.BoolNull()
		}
		if value := r.Get("set.comm-list.comm-list-standard"); value.Exists() && !data.Entries[i].SetCommunityListStandardLegacy.IsNull() {
			data.Entries[i].SetCommunityListStandardLegacy = types.Int64Value(value.Int())
		} else {
			data.Entries[i].SetCommunityListStandardLegacy = types.Int64Null()
		}
		if value := r.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.comm-list.comm-list-expanded"); value.Exists() && !data.Entries[i].SetCommunityListExpandedLegacy.IsNull() {
			data.Entries[i].SetCommunityListExpandedLegacy = types.Int64Value(value.Int())
		} else {
			data.Entries[i].SetCommunityListExpandedLegacy = types.Int64Null()
		}
		if value := r.Get("set.comm-list.comm-list-name"); value.Exists() && !data.Entries[i].SetCommunityListNameLegacy.IsNull() {
			data.Entries[i].SetCommunityListNameLegacy = types.StringValue(value.String())
		} else {
			data.Entries[i].SetCommunityListNameLegacy = types.StringNull()
		}
		if value := r.Get("set.extcommunity.rt.asn-nn"); value.Exists() && !data.Entries[i].SetExtcomunityRtLegacy.IsNull() {
			data.Entries[i].SetExtcomunityRtLegacy = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].SetExtcomunityRtLegacy = types.ListNull(types.StringType)
		}
		if value := r.Get("set.extcommunity.soo.asn-nn"); value.Exists() && !data.Entries[i].SetExtcomunitySooLegacy.IsNull() {
			data.Entries[i].SetExtcomunitySooLegacy = types.StringValue(value.String())
		} else {
			data.Entries[i].SetExtcomunitySooLegacy = types.StringNull()
		}
		if value := r.Get("set.extcommunity.vpn-distinguisher.asn-nn"); value.Exists() && !data.Entries[i].SetExtcomunityVpnDistinguisherLegacy.IsNull() {
			data.Entries[i].SetExtcomunityVpnDistinguisherLegacy = types.StringValue(value.String())
		} else {
			data.Entries[i].SetExtcomunityVpnDistinguisherLegacy = types.StringNull()
		}
		if value := r.Get("set.local-preference"); value.Exists() && !data.Entries[i].SetLocalPreferenceLegacy.IsNull() {
			data.Entries[i].SetLocalPreferenceLegacy = types.Int64Value(value.Int())
		} else {
			data.Entries[i].SetLocalPreferenceLegacy = types.Int64Null()
		}
		if value := r.Get("set.weight"); value.Exists() && !data.Entries[i].SetWeightLegacy.IsNull() {
			data.Entries[i].SetWeightLegacy = types.Int64Value(value.Int())
		} else {
			data.Entries[i].SetWeightLegacy = types.Int64Null()
		}
		if value := r.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.as-path.prepend.as-container.as-number"); value.Exists() && !data.Entries[i].SetAsPathPrependAs.IsNull() {
			data.Entries[i].SetAsPathPrependAs = types.StringValue(value.String())
		} else {
			data.Entries[i].SetAsPathPrependAs = types.StringNull()
		}
		if value := r.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.as-path.prepend.last-as-cont.last-as"); value.Exists() && !data.Entries[i].SetAsPathPrependLastAs.IsNull() {
			data.Entries[i].SetAsPathPrependLastAs = types.Int64Value(value.Int())
		} else {
			data.Entries[i].SetAsPathPrependLastAs = types.Int64Null()
		}
		if value := r.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.as-path.tag"); !data.Entries[i].SetAsPathTag.IsNull() {
			if value.Exists() {
				data.Entries[i].SetAsPathTag = types.BoolValue(true)
			} else {
				data.Entries[i].SetAsPathTag = types.BoolValue(false)
			}
		} else {
			data.Entries[i].SetAsPathTag = types.BoolNull()
		}
		if value := r.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.as-path.replace.any"); !data.Entries[i].SetAsPathReplaceAny.IsNull() {
			if value.Exists() {
				data.Entries[i].SetAsPathReplaceAny = types.BoolValue(true)
			} else {
				data.Entries[i].SetAsPathReplaceAny = types.BoolValue(false)
			}
		} else {
			data.Entries[i].SetAsPathReplaceAny = types.BoolNull()
		}
		for ci := range data.Entries[i].SetAsPathReplaceAs {
			keys := [...]string{"as-number"}
			keyValues := [...]string{data.Entries[i].SetAsPathReplaceAs[ci].AsNumber.ValueString()}

			var cr gjson.Result
			r.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.as-path.replace.as-container").ForEach(
				func(_, v gjson.Result) bool {
					found := false
					for ik := range keys {
						if v.Get(keys[ik]).String() == keyValues[ik] {
							found = true
							continue
						}
						found = false
						break
					}
					if found {
						cr = v
						return false
					}
					return true
				},
			)
			if value := cr.Get("as-number"); value.Exists() && !data.Entries[i].SetAsPathReplaceAs[ci].AsNumber.IsNull() {
				data.Entries[i].SetAsPathReplaceAs[ci].AsNumber = types.StringValue(value.String())
			} else {
				data.Entries[i].SetAsPathReplaceAs[ci].AsNumber = types.StringNull()
			}
		}
		if value := r.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.bgp-community.none"); !data.Entries[i].SetCommunityNone.IsNull() {
			if value.Exists() {
				data.Entries[i].SetCommunityNone = types.BoolValue(true)
			} else {
				data.Entries[i].SetCommunityNone = types.BoolValue(false)
			}
		} else {
			data.Entries[i].SetCommunityNone = types.BoolNull()
		}
		if value := r.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.bgp-community.community-well-known.community-list"); value.Exists() && !data.Entries[i].SetCommunities.IsNull() {
			data.Entries[i].SetCommunities = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].SetCommunities = types.ListNull(types.StringType)
		}
		if value := r.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.bgp-community.community-well-known.additive"); !data.Entries[i].SetCommunitiesAdditive.IsNull() {
			if value.Exists() {
				data.Entries[i].SetCommunitiesAdditive = types.BoolValue(true)
			} else {
				data.Entries[i].SetCommunitiesAdditive = types.BoolValue(false)
			}
		} else {
			data.Entries[i].SetCommunitiesAdditive = types.BoolNull()
		}
		if value := r.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.comm-list.delete"); !data.Entries[i].SetCommunityListDelete.IsNull() {
			if value.Exists() {
				data.Entries[i].SetCommunityListDelete = types.BoolValue(true)
			} else {
				data.Entries[i].SetCommunityListDelete = types.BoolValue(false)
			}
		} else {
			data.Entries[i].SetCommunityListDelete = types.BoolNull()
		}
		if value := r.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.comm-list.comm-list-standard"); value.Exists() && !data.Entries[i].SetCommunityListStandard.IsNull() {
			data.Entries[i].SetCommunityListStandard = types.Int64Value(value.Int())
		} else {
			data.Entries[i].SetCommunityListStandard = types.Int64Null()
		}
		if value := r.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.comm-list.comm-list-expanded"); value.Exists() && !data.Entries[i].SetCommunityListExpanded.IsNull() {
			data.Entries[i].SetCommunityListExpanded = types.Int64Value(value.Int())
		} else {
			data.Entries[i].SetCommunityListExpanded = types.Int64Null()
		}
		if value := r.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.comm-list.comm-list-name"); value.Exists() && !data.Entries[i].SetCommunityListName.IsNull() {
			data.Entries[i].SetCommunityListName = types.StringValue(value.String())
		} else {
			data.Entries[i].SetCommunityListName = types.StringNull()
		}
		if value := r.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.extcommunity.rt.asn-nn"); value.Exists() && !data.Entries[i].SetExtcomunityRt.IsNull() {
			data.Entries[i].SetExtcomunityRt = helpers.GetStringList(value.Array())
		} else {
			data.Entries[i].SetExtcomunityRt = types.ListNull(types.StringType)
		}
		if value := r.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.extcommunity.soo.asn-nn"); value.Exists() && !data.Entries[i].SetExtcomunitySoo.IsNull() {
			data.Entries[i].SetExtcomunitySoo = types.StringValue(value.String())
		} else {
			data.Entries[i].SetExtcomunitySoo = types.StringNull()
		}
		if value := r.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.extcommunity.vpn-distinguisher.asn-nn"); value.Exists() && !data.Entries[i].SetExtcomunityVpnDistinguisher.IsNull() {
			data.Entries[i].SetExtcomunityVpnDistinguisher = types.StringValue(value.String())
		} else {
			data.Entries[i].SetExtcomunityVpnDistinguisher = types.StringNull()
		}
		if value := r.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.extcommunity.vpn-distinguisher.asn-nn-additive"); !data.Entries[i].SetExtcomunityVpnDistinguisherAdditive.IsNull() {
			if value.Exists() {
				data.Entries[i].SetExtcomunityVpnDistinguisherAdditive = types.BoolValue(true)
			} else {
				data.Entries[i].SetExtcomunityVpnDistinguisherAdditive = types.BoolValue(false)
			}
		} else {
			data.Entries[i].SetExtcomunityVpnDistinguisherAdditive = types.BoolNull()
		}
		if value := r.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.local-preference"); value.Exists() && !data.Entries[i].SetLocalPreference.IsNull() {
			data.Entries[i].SetLocalPreference = types.Int64Value(value.Int())
		} else {
			data.Entries[i].SetLocalPreference = types.Int64Null()
		}
		if value := r.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.weight"); value.Exists() && !data.Entries[i].SetWeight.IsNull() {
			data.Entries[i].SetWeight = types.Int64Value(value.Int())
		} else {
			data.Entries[i].SetWeight = types.Int64Null()
		}
	}
}

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

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

func (data *RouteMap) fromBody(ctx context.Context, res gjson.Result) {
	prefix := helpers.LastElement(data.getPath()) + "."
	if res.Get(helpers.LastElement(data.getPath())).IsArray() {
		prefix += "0."
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-route-map:route-map-without-order-seq"); value.Exists() {
		data.Entries = make([]RouteMapEntries, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := RouteMapEntries{}
			if cValue := v.Get("seq_no"); cValue.Exists() {
				item.Seq = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("operation"); cValue.Exists() {
				item.Operation = types.StringValue(cValue.String())
			}
			if cValue := v.Get("description"); cValue.Exists() {
				item.Description = types.StringValue(cValue.String())
			}
			if cValue := v.Get("continue"); cValue.Exists() {
				item.Continue = types.BoolValue(true)
			} else {
				item.Continue = types.BoolValue(false)
			}
			if cValue := v.Get("continue.sequence-number"); cValue.Exists() {
				item.ContinueSequenceNumber = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("match.interface.interface"); cValue.Exists() {
				item.MatchInterfaces = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchInterfaces = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.ip.address.access-list"); cValue.Exists() {
				item.MatchIpAddressAccessLists = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchIpAddressAccessLists = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.ip.address.prefix-list"); cValue.Exists() {
				item.MatchIpAddressPrefixLists = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchIpAddressPrefixLists = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.ip.next-hop.access-list"); cValue.Exists() {
				item.MatchIpNextHopAccessLists = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchIpNextHopAccessLists = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.ip.next-hop.prefix-list"); cValue.Exists() {
				item.MatchIpNextHopPrefixLists = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchIpNextHopPrefixLists = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.ipv6.address.access-list"); cValue.Exists() {
				item.MatchIpv6AddressAccessLists = types.StringValue(cValue.String())
			}
			if cValue := v.Get("match.ipv6.address.prefix-list"); cValue.Exists() {
				item.MatchIpv6AddressPrefixLists = types.StringValue(cValue.String())
			}
			if cValue := v.Get("match.ipv6.next-hop.access-list"); cValue.Exists() {
				item.MatchIpv6NextHopAccessLists = types.StringValue(cValue.String())
			}
			if cValue := v.Get("match.ipv6.next-hop.prefix-list"); cValue.Exists() {
				item.MatchIpv6NextHopPrefixLists = types.StringValue(cValue.String())
			}
			if cValue := v.Get("match.route-type.external"); cValue.Exists() {
				item.MatchRouteTypeExternal = types.BoolValue(true)
			} else {
				item.MatchRouteTypeExternal = types.BoolValue(false)
			}
			if cValue := v.Get("match.route-type.external.type-1"); cValue.Exists() {
				item.MatchRouteTypeExternalType1 = types.BoolValue(true)
			} else {
				item.MatchRouteTypeExternalType1 = types.BoolValue(false)
			}
			if cValue := v.Get("match.route-type.external.type-2"); cValue.Exists() {
				item.MatchRouteTypeExternalType2 = types.BoolValue(true)
			} else {
				item.MatchRouteTypeExternalType2 = types.BoolValue(false)
			}
			if cValue := v.Get("match.route-type.internal"); cValue.Exists() {
				item.MatchRouteTypeInternal = types.BoolValue(true)
			} else {
				item.MatchRouteTypeInternal = types.BoolValue(false)
			}
			if cValue := v.Get("match.route-type.level-1"); cValue.Exists() {
				item.MatchRouteTypeLevel1 = types.BoolValue(true)
			} else {
				item.MatchRouteTypeLevel1 = types.BoolValue(false)
			}
			if cValue := v.Get("match.route-type.level-2"); cValue.Exists() {
				item.MatchRouteTypeLevel2 = types.BoolValue(true)
			} else {
				item.MatchRouteTypeLevel2 = types.BoolValue(false)
			}
			if cValue := v.Get("match.route-type.local"); cValue.Exists() {
				item.MatchRouteTypeLocalLegacy = types.BoolValue(true)
			} else {
				item.MatchRouteTypeLocalLegacy = types.BoolValue(false)
			}
			if cValue := v.Get("match.Cisco-IOS-XE-bgp:bgp-route-map-match.route-type.local"); cValue.Exists() {
				item.MatchRouteTypeLocal = types.BoolValue(true)
			} else {
				item.MatchRouteTypeLocal = types.BoolValue(false)
			}
			if cValue := v.Get("match.source-protocol.bgp"); cValue.Exists() {
				item.MatchSourceProtocolBgp = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchSourceProtocolBgp = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.source-protocol.connected"); cValue.Exists() {
				item.MatchSourceProtocolConnected = types.BoolValue(true)
			} else {
				item.MatchSourceProtocolConnected = types.BoolValue(false)
			}
			if cValue := v.Get("match.source-protocol.eigrp"); cValue.Exists() {
				item.MatchSourceProtocolEigrp = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchSourceProtocolEigrp = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.source-protocol.isis"); cValue.Exists() {
				item.MatchSourceProtocolIsis = types.BoolValue(true)
			} else {
				item.MatchSourceProtocolIsis = types.BoolValue(false)
			}
			if cValue := v.Get("match.source-protocol.lisp"); cValue.Exists() {
				item.MatchSourceProtocolLisp = types.BoolValue(true)
			} else {
				item.MatchSourceProtocolLisp = types.BoolValue(false)
			}
			if cValue := v.Get("match.source-protocol.ospf"); cValue.Exists() {
				item.MatchSourceProtocolOspf = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchSourceProtocolOspf = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.source-protocol.ospfv3"); cValue.Exists() {
				item.MatchSourceProtocolOspfv3 = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchSourceProtocolOspfv3 = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.source-protocol.rip"); cValue.Exists() {
				item.MatchSourceProtocolRip = types.BoolValue(true)
			} else {
				item.MatchSourceProtocolRip = types.BoolValue(false)
			}
			if cValue := v.Get("match.source-protocol.static"); cValue.Exists() {
				item.MatchSourceProtocolStatic = types.BoolValue(true)
			} else {
				item.MatchSourceProtocolStatic = types.BoolValue(false)
			}
			if cValue := v.Get("match.tag.tag_value"); cValue.Exists() {
				item.MatchTags = helpers.GetInt64List(cValue.Array())
			} else {
				item.MatchTags = types.ListNull(types.Int64Type)
			}
			if cValue := v.Get("match.track"); cValue.Exists() {
				item.MatchTrack = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("match.as-path.access-list"); cValue.Exists() {
				item.MatchAsPathsLegacy = helpers.GetInt64List(cValue.Array())
			} else {
				item.MatchAsPathsLegacy = types.ListNull(types.Int64Type)
			}
			if cValue := v.Get("match.community.name"); cValue.Exists() {
				item.MatchCommunityListsLegacy = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchCommunityListsLegacy = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.extcommunity.name"); cValue.Exists() {
				item.MatchExtcommunityListsLegacy = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchExtcommunityListsLegacy = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.local-preference.values"); cValue.Exists() {
				item.MatchLocalPreferencesLegacy = helpers.GetInt64List(cValue.Array())
			} else {
				item.MatchLocalPreferencesLegacy = types.ListNull(types.Int64Type)
			}
			if cValue := v.Get("match.Cisco-IOS-XE-bgp:bgp-route-map-match.as-path.access-list"); cValue.Exists() {
				item.MatchAsPaths = helpers.GetInt64List(cValue.Array())
			} else {
				item.MatchAsPaths = types.ListNull(types.Int64Type)
			}
			if cValue := v.Get("match.Cisco-IOS-XE-bgp:bgp-route-map-match.bgp-community.community-list"); cValue.Exists() {
				item.MatchCommunityLists = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchCommunityLists = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.Cisco-IOS-XE-bgp:bgp-route-map-match.bgp-community.exact-match"); cValue.Exists() {
				item.MatchCommunityListExactMatch = types.BoolValue(true)
			} else {
				item.MatchCommunityListExactMatch = types.BoolValue(false)
			}
			if cValue := v.Get("match.Cisco-IOS-XE-bgp:bgp-route-map-match.extcommunity.extcommunity-list"); cValue.Exists() {
				item.MatchExtcommunityLists = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchExtcommunityLists = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.Cisco-IOS-XE-bgp:bgp-route-map-match.local-preference.values"); cValue.Exists() {
				item.MatchLocalPreferences = helpers.GetInt64List(cValue.Array())
			} else {
				item.MatchLocalPreferences = types.ListNull(types.Int64Type)
			}
			if cValue := v.Get("set.default.interface-list"); cValue.Exists() {
				item.SetDefaultInterfaces = helpers.GetStringList(cValue.Array())
			} else {
				item.SetDefaultInterfaces = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.global"); cValue.Exists() {
				item.SetGlobal = types.BoolValue(true)
			} else {
				item.SetGlobal = types.BoolValue(false)
			}
			if cValue := v.Get("set.interface-list"); cValue.Exists() {
				item.SetInterfaces = helpers.GetStringList(cValue.Array())
			} else {
				item.SetInterfaces = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.ip.address.prefix-list"); cValue.Exists() {
				item.SetIpAddress = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.ip.default.global.next-hop.address"); cValue.Exists() {
				item.SetIpDefaultGlobalNextHopAddress = helpers.GetStringList(cValue.Array())
			} else {
				item.SetIpDefaultGlobalNextHopAddress = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.ip.default.next-hop.address"); cValue.Exists() {
				item.SetIpDefaultNextHopAddress = helpers.GetStringList(cValue.Array())
			} else {
				item.SetIpDefaultNextHopAddress = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.ip.global.next-hop.address"); cValue.Exists() {
				item.SetIpGlobalNextHopAddress = helpers.GetStringList(cValue.Array())
			} else {
				item.SetIpGlobalNextHopAddress = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.ip.next-hop.address"); cValue.Exists() {
				item.SetIpNextHopAddress = helpers.GetStringList(cValue.Array())
			} else {
				item.SetIpNextHopAddress = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.ip.next-hop.self"); cValue.Exists() {
				item.SetIpNextHopSelf = types.BoolValue(true)
			} else {
				item.SetIpNextHopSelf = types.BoolValue(false)
			}
			if cValue := v.Get("set.ip.qos-group.qos-id"); cValue.Exists() {
				item.SetIpQosGroup = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.ipv6.address.prefix-list"); cValue.Exists() {
				item.SetIpv6Address = helpers.GetStringList(cValue.Array())
			} else {
				item.SetIpv6Address = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.ipv6.default.global.next-hop"); cValue.Exists() {
				item.SetIpv6DefaultGlobalNextHop = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.ipv6.default.next-hop.ipv6"); cValue.Exists() {
				item.SetIpv6DefaultNextHop = helpers.GetStringList(cValue.Array())
			} else {
				item.SetIpv6DefaultNextHop = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.ipv6.next-hop.ipv6"); cValue.Exists() {
				item.SetIpv6NextHop = helpers.GetStringList(cValue.Array())
			} else {
				item.SetIpv6NextHop = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.level.level-1"); cValue.Exists() {
				item.SetLevel1 = types.BoolValue(true)
			} else {
				item.SetLevel1 = types.BoolValue(false)
			}
			if cValue := v.Get("set.level.level-1-2"); cValue.Exists() {
				item.SetLevel12 = types.BoolValue(true)
			} else {
				item.SetLevel12 = types.BoolValue(false)
			}
			if cValue := v.Get("set.level.level-2"); cValue.Exists() {
				item.SetLevel2 = types.BoolValue(true)
			} else {
				item.SetLevel2 = types.BoolValue(false)
			}
			if cValue := v.Get("set.metric.metric-change"); cValue.Exists() {
				item.SetMetricChange = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.metric.values.value"); cValue.Exists() {
				item.SetMetricValue = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.metric.values.delay"); cValue.Exists() {
				item.SetMetricDelay = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.metric.values.reliability"); cValue.Exists() {
				item.SetMetricReliability = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.metric.values.loading"); cValue.Exists() {
				item.SetMetricLoading = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.metric.values.MTU"); cValue.Exists() {
				item.SetMetricMtu = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.metric-type"); cValue.Exists() {
				item.SetMetricType = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.tag.tag-val"); cValue.Exists() {
				item.SetTag = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.vrf"); cValue.Exists() {
				item.SetVrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.as-path.prepend.as-container.as-number"); cValue.Exists() {
				item.SetAsPathPrependAsLegacy = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.as-path.prepend.last-as-cont.last-as"); cValue.Exists() {
				item.SetAsPathPrependLastAsLegacy = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.as-path.tag"); cValue.Exists() {
				item.SetAsPathTagLegacy = types.BoolValue(true)
			} else {
				item.SetAsPathTagLegacy = types.BoolValue(false)
			}
			if cValue := v.Get("set.community.none"); cValue.Exists() {
				item.SetCommunityNoneLegacy = types.BoolValue(true)
			} else {
				item.SetCommunityNoneLegacy = types.BoolValue(false)
			}
			if cValue := v.Get("set.community.community-well-known.community-list"); cValue.Exists() {
				item.SetCommunitiesLegacy = helpers.GetStringList(cValue.Array())
			} else {
				item.SetCommunitiesLegacy = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.community.community-well-known.additive"); cValue.Exists() {
				item.SetCommunitiesAdditiveLegacy = types.BoolValue(true)
			} else {
				item.SetCommunitiesAdditiveLegacy = types.BoolValue(false)
			}
			if cValue := v.Get("set.comm-list.delete"); cValue.Exists() {
				item.SetCommunityListDeleteLegacy = types.BoolValue(true)
			} else {
				item.SetCommunityListDeleteLegacy = types.BoolValue(false)
			}
			if cValue := v.Get("set.comm-list.comm-list-standard"); cValue.Exists() {
				item.SetCommunityListStandardLegacy = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.comm-list.comm-list-expanded"); cValue.Exists() {
				item.SetCommunityListExpandedLegacy = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.comm-list.comm-list-name"); cValue.Exists() {
				item.SetCommunityListNameLegacy = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.extcommunity.rt.asn-nn"); cValue.Exists() {
				item.SetExtcomunityRtLegacy = helpers.GetStringList(cValue.Array())
			} else {
				item.SetExtcomunityRtLegacy = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.extcommunity.soo.asn-nn"); cValue.Exists() {
				item.SetExtcomunitySooLegacy = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.extcommunity.vpn-distinguisher.asn-nn"); cValue.Exists() {
				item.SetExtcomunityVpnDistinguisherLegacy = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.local-preference"); cValue.Exists() {
				item.SetLocalPreferenceLegacy = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.weight"); cValue.Exists() {
				item.SetWeightLegacy = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.as-path.prepend.as-container.as-number"); cValue.Exists() {
				item.SetAsPathPrependAs = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.as-path.prepend.last-as-cont.last-as"); cValue.Exists() {
				item.SetAsPathPrependLastAs = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.as-path.tag"); cValue.Exists() {
				item.SetAsPathTag = types.BoolValue(true)
			} else {
				item.SetAsPathTag = types.BoolValue(false)
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.as-path.replace.any"); cValue.Exists() {
				item.SetAsPathReplaceAny = types.BoolValue(true)
			} else {
				item.SetAsPathReplaceAny = types.BoolValue(false)
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.as-path.replace.as-container"); cValue.Exists() {
				item.SetAsPathReplaceAs = make([]RouteMapEntriesSetAsPathReplaceAs, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := RouteMapEntriesSetAsPathReplaceAs{}
					if ccValue := cv.Get("as-number"); ccValue.Exists() {
						cItem.AsNumber = types.StringValue(ccValue.String())
					}
					item.SetAsPathReplaceAs = append(item.SetAsPathReplaceAs, cItem)
					return true
				})
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.bgp-community.none"); cValue.Exists() {
				item.SetCommunityNone = types.BoolValue(true)
			} else {
				item.SetCommunityNone = types.BoolValue(false)
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.bgp-community.community-well-known.community-list"); cValue.Exists() {
				item.SetCommunities = helpers.GetStringList(cValue.Array())
			} else {
				item.SetCommunities = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.bgp-community.community-well-known.additive"); cValue.Exists() {
				item.SetCommunitiesAdditive = types.BoolValue(true)
			} else {
				item.SetCommunitiesAdditive = types.BoolValue(false)
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.comm-list.delete"); cValue.Exists() {
				item.SetCommunityListDelete = types.BoolValue(true)
			} else {
				item.SetCommunityListDelete = types.BoolValue(false)
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.comm-list.comm-list-standard"); cValue.Exists() {
				item.SetCommunityListStandard = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.comm-list.comm-list-expanded"); cValue.Exists() {
				item.SetCommunityListExpanded = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.comm-list.comm-list-name"); cValue.Exists() {
				item.SetCommunityListName = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.extcommunity.rt.asn-nn"); cValue.Exists() {
				item.SetExtcomunityRt = helpers.GetStringList(cValue.Array())
			} else {
				item.SetExtcomunityRt = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.extcommunity.soo.asn-nn"); cValue.Exists() {
				item.SetExtcomunitySoo = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.extcommunity.vpn-distinguisher.asn-nn"); cValue.Exists() {
				item.SetExtcomunityVpnDistinguisher = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.extcommunity.vpn-distinguisher.asn-nn-additive"); cValue.Exists() {
				item.SetExtcomunityVpnDistinguisherAdditive = types.BoolValue(true)
			} else {
				item.SetExtcomunityVpnDistinguisherAdditive = types.BoolValue(false)
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.local-preference"); cValue.Exists() {
				item.SetLocalPreference = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.weight"); cValue.Exists() {
				item.SetWeight = types.Int64Value(cValue.Int())
			}
			data.Entries = append(data.Entries, item)
			return true
		})
	}
}

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

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

func (data *RouteMapData) fromBody(ctx context.Context, res gjson.Result) {
	prefix := helpers.LastElement(data.getPath()) + "."
	if res.Get(helpers.LastElement(data.getPath())).IsArray() {
		prefix += "0."
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-route-map:route-map-without-order-seq"); value.Exists() {
		data.Entries = make([]RouteMapEntries, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := RouteMapEntries{}
			if cValue := v.Get("seq_no"); cValue.Exists() {
				item.Seq = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("operation"); cValue.Exists() {
				item.Operation = types.StringValue(cValue.String())
			}
			if cValue := v.Get("description"); cValue.Exists() {
				item.Description = types.StringValue(cValue.String())
			}
			if cValue := v.Get("continue"); cValue.Exists() {
				item.Continue = types.BoolValue(true)
			} else {
				item.Continue = types.BoolValue(false)
			}
			if cValue := v.Get("continue.sequence-number"); cValue.Exists() {
				item.ContinueSequenceNumber = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("match.interface.interface"); cValue.Exists() {
				item.MatchInterfaces = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchInterfaces = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.ip.address.access-list"); cValue.Exists() {
				item.MatchIpAddressAccessLists = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchIpAddressAccessLists = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.ip.address.prefix-list"); cValue.Exists() {
				item.MatchIpAddressPrefixLists = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchIpAddressPrefixLists = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.ip.next-hop.access-list"); cValue.Exists() {
				item.MatchIpNextHopAccessLists = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchIpNextHopAccessLists = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.ip.next-hop.prefix-list"); cValue.Exists() {
				item.MatchIpNextHopPrefixLists = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchIpNextHopPrefixLists = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.ipv6.address.access-list"); cValue.Exists() {
				item.MatchIpv6AddressAccessLists = types.StringValue(cValue.String())
			}
			if cValue := v.Get("match.ipv6.address.prefix-list"); cValue.Exists() {
				item.MatchIpv6AddressPrefixLists = types.StringValue(cValue.String())
			}
			if cValue := v.Get("match.ipv6.next-hop.access-list"); cValue.Exists() {
				item.MatchIpv6NextHopAccessLists = types.StringValue(cValue.String())
			}
			if cValue := v.Get("match.ipv6.next-hop.prefix-list"); cValue.Exists() {
				item.MatchIpv6NextHopPrefixLists = types.StringValue(cValue.String())
			}
			if cValue := v.Get("match.route-type.external"); cValue.Exists() {
				item.MatchRouteTypeExternal = types.BoolValue(true)
			} else {
				item.MatchRouteTypeExternal = types.BoolValue(false)
			}
			if cValue := v.Get("match.route-type.external.type-1"); cValue.Exists() {
				item.MatchRouteTypeExternalType1 = types.BoolValue(true)
			} else {
				item.MatchRouteTypeExternalType1 = types.BoolValue(false)
			}
			if cValue := v.Get("match.route-type.external.type-2"); cValue.Exists() {
				item.MatchRouteTypeExternalType2 = types.BoolValue(true)
			} else {
				item.MatchRouteTypeExternalType2 = types.BoolValue(false)
			}
			if cValue := v.Get("match.route-type.internal"); cValue.Exists() {
				item.MatchRouteTypeInternal = types.BoolValue(true)
			} else {
				item.MatchRouteTypeInternal = types.BoolValue(false)
			}
			if cValue := v.Get("match.route-type.level-1"); cValue.Exists() {
				item.MatchRouteTypeLevel1 = types.BoolValue(true)
			} else {
				item.MatchRouteTypeLevel1 = types.BoolValue(false)
			}
			if cValue := v.Get("match.route-type.level-2"); cValue.Exists() {
				item.MatchRouteTypeLevel2 = types.BoolValue(true)
			} else {
				item.MatchRouteTypeLevel2 = types.BoolValue(false)
			}
			if cValue := v.Get("match.route-type.local"); cValue.Exists() {
				item.MatchRouteTypeLocalLegacy = types.BoolValue(true)
			} else {
				item.MatchRouteTypeLocalLegacy = types.BoolValue(false)
			}
			if cValue := v.Get("match.Cisco-IOS-XE-bgp:bgp-route-map-match.route-type.local"); cValue.Exists() {
				item.MatchRouteTypeLocal = types.BoolValue(true)
			} else {
				item.MatchRouteTypeLocal = types.BoolValue(false)
			}
			if cValue := v.Get("match.source-protocol.bgp"); cValue.Exists() {
				item.MatchSourceProtocolBgp = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchSourceProtocolBgp = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.source-protocol.connected"); cValue.Exists() {
				item.MatchSourceProtocolConnected = types.BoolValue(true)
			} else {
				item.MatchSourceProtocolConnected = types.BoolValue(false)
			}
			if cValue := v.Get("match.source-protocol.eigrp"); cValue.Exists() {
				item.MatchSourceProtocolEigrp = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchSourceProtocolEigrp = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.source-protocol.isis"); cValue.Exists() {
				item.MatchSourceProtocolIsis = types.BoolValue(true)
			} else {
				item.MatchSourceProtocolIsis = types.BoolValue(false)
			}
			if cValue := v.Get("match.source-protocol.lisp"); cValue.Exists() {
				item.MatchSourceProtocolLisp = types.BoolValue(true)
			} else {
				item.MatchSourceProtocolLisp = types.BoolValue(false)
			}
			if cValue := v.Get("match.source-protocol.ospf"); cValue.Exists() {
				item.MatchSourceProtocolOspf = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchSourceProtocolOspf = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.source-protocol.ospfv3"); cValue.Exists() {
				item.MatchSourceProtocolOspfv3 = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchSourceProtocolOspfv3 = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.source-protocol.rip"); cValue.Exists() {
				item.MatchSourceProtocolRip = types.BoolValue(true)
			} else {
				item.MatchSourceProtocolRip = types.BoolValue(false)
			}
			if cValue := v.Get("match.source-protocol.static"); cValue.Exists() {
				item.MatchSourceProtocolStatic = types.BoolValue(true)
			} else {
				item.MatchSourceProtocolStatic = types.BoolValue(false)
			}
			if cValue := v.Get("match.tag.tag_value"); cValue.Exists() {
				item.MatchTags = helpers.GetInt64List(cValue.Array())
			} else {
				item.MatchTags = types.ListNull(types.Int64Type)
			}
			if cValue := v.Get("match.track"); cValue.Exists() {
				item.MatchTrack = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("match.as-path.access-list"); cValue.Exists() {
				item.MatchAsPathsLegacy = helpers.GetInt64List(cValue.Array())
			} else {
				item.MatchAsPathsLegacy = types.ListNull(types.Int64Type)
			}
			if cValue := v.Get("match.community.name"); cValue.Exists() {
				item.MatchCommunityListsLegacy = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchCommunityListsLegacy = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.extcommunity.name"); cValue.Exists() {
				item.MatchExtcommunityListsLegacy = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchExtcommunityListsLegacy = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.local-preference.values"); cValue.Exists() {
				item.MatchLocalPreferencesLegacy = helpers.GetInt64List(cValue.Array())
			} else {
				item.MatchLocalPreferencesLegacy = types.ListNull(types.Int64Type)
			}
			if cValue := v.Get("match.Cisco-IOS-XE-bgp:bgp-route-map-match.as-path.access-list"); cValue.Exists() {
				item.MatchAsPaths = helpers.GetInt64List(cValue.Array())
			} else {
				item.MatchAsPaths = types.ListNull(types.Int64Type)
			}
			if cValue := v.Get("match.Cisco-IOS-XE-bgp:bgp-route-map-match.bgp-community.community-list"); cValue.Exists() {
				item.MatchCommunityLists = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchCommunityLists = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.Cisco-IOS-XE-bgp:bgp-route-map-match.bgp-community.exact-match"); cValue.Exists() {
				item.MatchCommunityListExactMatch = types.BoolValue(true)
			} else {
				item.MatchCommunityListExactMatch = types.BoolValue(false)
			}
			if cValue := v.Get("match.Cisco-IOS-XE-bgp:bgp-route-map-match.extcommunity.extcommunity-list"); cValue.Exists() {
				item.MatchExtcommunityLists = helpers.GetStringList(cValue.Array())
			} else {
				item.MatchExtcommunityLists = types.ListNull(types.StringType)
			}
			if cValue := v.Get("match.Cisco-IOS-XE-bgp:bgp-route-map-match.local-preference.values"); cValue.Exists() {
				item.MatchLocalPreferences = helpers.GetInt64List(cValue.Array())
			} else {
				item.MatchLocalPreferences = types.ListNull(types.Int64Type)
			}
			if cValue := v.Get("set.default.interface-list"); cValue.Exists() {
				item.SetDefaultInterfaces = helpers.GetStringList(cValue.Array())
			} else {
				item.SetDefaultInterfaces = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.global"); cValue.Exists() {
				item.SetGlobal = types.BoolValue(true)
			} else {
				item.SetGlobal = types.BoolValue(false)
			}
			if cValue := v.Get("set.interface-list"); cValue.Exists() {
				item.SetInterfaces = helpers.GetStringList(cValue.Array())
			} else {
				item.SetInterfaces = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.ip.address.prefix-list"); cValue.Exists() {
				item.SetIpAddress = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.ip.default.global.next-hop.address"); cValue.Exists() {
				item.SetIpDefaultGlobalNextHopAddress = helpers.GetStringList(cValue.Array())
			} else {
				item.SetIpDefaultGlobalNextHopAddress = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.ip.default.next-hop.address"); cValue.Exists() {
				item.SetIpDefaultNextHopAddress = helpers.GetStringList(cValue.Array())
			} else {
				item.SetIpDefaultNextHopAddress = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.ip.global.next-hop.address"); cValue.Exists() {
				item.SetIpGlobalNextHopAddress = helpers.GetStringList(cValue.Array())
			} else {
				item.SetIpGlobalNextHopAddress = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.ip.next-hop.address"); cValue.Exists() {
				item.SetIpNextHopAddress = helpers.GetStringList(cValue.Array())
			} else {
				item.SetIpNextHopAddress = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.ip.next-hop.self"); cValue.Exists() {
				item.SetIpNextHopSelf = types.BoolValue(true)
			} else {
				item.SetIpNextHopSelf = types.BoolValue(false)
			}
			if cValue := v.Get("set.ip.qos-group.qos-id"); cValue.Exists() {
				item.SetIpQosGroup = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.ipv6.address.prefix-list"); cValue.Exists() {
				item.SetIpv6Address = helpers.GetStringList(cValue.Array())
			} else {
				item.SetIpv6Address = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.ipv6.default.global.next-hop"); cValue.Exists() {
				item.SetIpv6DefaultGlobalNextHop = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.ipv6.default.next-hop.ipv6"); cValue.Exists() {
				item.SetIpv6DefaultNextHop = helpers.GetStringList(cValue.Array())
			} else {
				item.SetIpv6DefaultNextHop = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.ipv6.next-hop.ipv6"); cValue.Exists() {
				item.SetIpv6NextHop = helpers.GetStringList(cValue.Array())
			} else {
				item.SetIpv6NextHop = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.level.level-1"); cValue.Exists() {
				item.SetLevel1 = types.BoolValue(true)
			} else {
				item.SetLevel1 = types.BoolValue(false)
			}
			if cValue := v.Get("set.level.level-1-2"); cValue.Exists() {
				item.SetLevel12 = types.BoolValue(true)
			} else {
				item.SetLevel12 = types.BoolValue(false)
			}
			if cValue := v.Get("set.level.level-2"); cValue.Exists() {
				item.SetLevel2 = types.BoolValue(true)
			} else {
				item.SetLevel2 = types.BoolValue(false)
			}
			if cValue := v.Get("set.metric.metric-change"); cValue.Exists() {
				item.SetMetricChange = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.metric.values.value"); cValue.Exists() {
				item.SetMetricValue = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.metric.values.delay"); cValue.Exists() {
				item.SetMetricDelay = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.metric.values.reliability"); cValue.Exists() {
				item.SetMetricReliability = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.metric.values.loading"); cValue.Exists() {
				item.SetMetricLoading = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.metric.values.MTU"); cValue.Exists() {
				item.SetMetricMtu = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.metric-type"); cValue.Exists() {
				item.SetMetricType = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.tag.tag-val"); cValue.Exists() {
				item.SetTag = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.vrf"); cValue.Exists() {
				item.SetVrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.as-path.prepend.as-container.as-number"); cValue.Exists() {
				item.SetAsPathPrependAsLegacy = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.as-path.prepend.last-as-cont.last-as"); cValue.Exists() {
				item.SetAsPathPrependLastAsLegacy = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.as-path.tag"); cValue.Exists() {
				item.SetAsPathTagLegacy = types.BoolValue(true)
			} else {
				item.SetAsPathTagLegacy = types.BoolValue(false)
			}
			if cValue := v.Get("set.community.none"); cValue.Exists() {
				item.SetCommunityNoneLegacy = types.BoolValue(true)
			} else {
				item.SetCommunityNoneLegacy = types.BoolValue(false)
			}
			if cValue := v.Get("set.community.community-well-known.community-list"); cValue.Exists() {
				item.SetCommunitiesLegacy = helpers.GetStringList(cValue.Array())
			} else {
				item.SetCommunitiesLegacy = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.community.community-well-known.additive"); cValue.Exists() {
				item.SetCommunitiesAdditiveLegacy = types.BoolValue(true)
			} else {
				item.SetCommunitiesAdditiveLegacy = types.BoolValue(false)
			}
			if cValue := v.Get("set.comm-list.delete"); cValue.Exists() {
				item.SetCommunityListDeleteLegacy = types.BoolValue(true)
			} else {
				item.SetCommunityListDeleteLegacy = types.BoolValue(false)
			}
			if cValue := v.Get("set.comm-list.comm-list-standard"); cValue.Exists() {
				item.SetCommunityListStandardLegacy = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.comm-list.comm-list-expanded"); cValue.Exists() {
				item.SetCommunityListExpandedLegacy = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.comm-list.comm-list-name"); cValue.Exists() {
				item.SetCommunityListNameLegacy = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.extcommunity.rt.asn-nn"); cValue.Exists() {
				item.SetExtcomunityRtLegacy = helpers.GetStringList(cValue.Array())
			} else {
				item.SetExtcomunityRtLegacy = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.extcommunity.soo.asn-nn"); cValue.Exists() {
				item.SetExtcomunitySooLegacy = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.extcommunity.vpn-distinguisher.asn-nn"); cValue.Exists() {
				item.SetExtcomunityVpnDistinguisherLegacy = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.local-preference"); cValue.Exists() {
				item.SetLocalPreferenceLegacy = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.weight"); cValue.Exists() {
				item.SetWeightLegacy = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.as-path.prepend.as-container.as-number"); cValue.Exists() {
				item.SetAsPathPrependAs = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.as-path.prepend.last-as-cont.last-as"); cValue.Exists() {
				item.SetAsPathPrependLastAs = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.as-path.tag"); cValue.Exists() {
				item.SetAsPathTag = types.BoolValue(true)
			} else {
				item.SetAsPathTag = types.BoolValue(false)
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.as-path.replace.any"); cValue.Exists() {
				item.SetAsPathReplaceAny = types.BoolValue(true)
			} else {
				item.SetAsPathReplaceAny = types.BoolValue(false)
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.as-path.replace.as-container"); cValue.Exists() {
				item.SetAsPathReplaceAs = make([]RouteMapEntriesSetAsPathReplaceAs, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := RouteMapEntriesSetAsPathReplaceAs{}
					if ccValue := cv.Get("as-number"); ccValue.Exists() {
						cItem.AsNumber = types.StringValue(ccValue.String())
					}
					item.SetAsPathReplaceAs = append(item.SetAsPathReplaceAs, cItem)
					return true
				})
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.bgp-community.none"); cValue.Exists() {
				item.SetCommunityNone = types.BoolValue(true)
			} else {
				item.SetCommunityNone = types.BoolValue(false)
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.bgp-community.community-well-known.community-list"); cValue.Exists() {
				item.SetCommunities = helpers.GetStringList(cValue.Array())
			} else {
				item.SetCommunities = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.bgp-community.community-well-known.additive"); cValue.Exists() {
				item.SetCommunitiesAdditive = types.BoolValue(true)
			} else {
				item.SetCommunitiesAdditive = types.BoolValue(false)
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.comm-list.delete"); cValue.Exists() {
				item.SetCommunityListDelete = types.BoolValue(true)
			} else {
				item.SetCommunityListDelete = types.BoolValue(false)
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.comm-list.comm-list-standard"); cValue.Exists() {
				item.SetCommunityListStandard = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.comm-list.comm-list-expanded"); cValue.Exists() {
				item.SetCommunityListExpanded = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.comm-list.comm-list-name"); cValue.Exists() {
				item.SetCommunityListName = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.extcommunity.rt.asn-nn"); cValue.Exists() {
				item.SetExtcomunityRt = helpers.GetStringList(cValue.Array())
			} else {
				item.SetExtcomunityRt = types.ListNull(types.StringType)
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.extcommunity.soo.asn-nn"); cValue.Exists() {
				item.SetExtcomunitySoo = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.extcommunity.vpn-distinguisher.asn-nn"); cValue.Exists() {
				item.SetExtcomunityVpnDistinguisher = types.StringValue(cValue.String())
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.extcommunity.vpn-distinguisher.asn-nn-additive"); cValue.Exists() {
				item.SetExtcomunityVpnDistinguisherAdditive = types.BoolValue(true)
			} else {
				item.SetExtcomunityVpnDistinguisherAdditive = types.BoolValue(false)
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.local-preference"); cValue.Exists() {
				item.SetLocalPreference = types.Int64Value(cValue.Int())
			}
			if cValue := v.Get("set.Cisco-IOS-XE-bgp:bgp-route-map-set.weight"); cValue.Exists() {
				item.SetWeight = types.Int64Value(cValue.Int())
			}
			data.Entries = append(data.Entries, item)
			return true
		})
	}
}

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

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

func (data *RouteMap) getDeletedItems(ctx context.Context, state RouteMap) []string {
	deletedItems := make([]string, 0)
	for i := range state.Entries {
		stateKeyValues := [...]string{strconv.FormatInt(state.Entries[i].Seq.ValueInt64(), 10)}

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

		found := false
		for j := range data.Entries {
			found = true
			if state.Entries[i].Seq.ValueInt64() != data.Entries[j].Seq.ValueInt64() {
				found = false
			}
			if found {
				if !state.Entries[i].SetWeight.IsNull() && data.Entries[j].SetWeight.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/weight", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetLocalPreference.IsNull() && data.Entries[j].SetLocalPreference.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/local-preference", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetExtcomunityVpnDistinguisherAdditive.IsNull() && data.Entries[j].SetExtcomunityVpnDistinguisherAdditive.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/extcommunity/vpn-distinguisher/asn-nn-additive", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetExtcomunityVpnDistinguisher.IsNull() && data.Entries[j].SetExtcomunityVpnDistinguisher.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/extcommunity/vpn-distinguisher/asn-nn", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetExtcomunitySoo.IsNull() && data.Entries[j].SetExtcomunitySoo.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/extcommunity/soo/asn-nn", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetExtcomunityRt.IsNull() {
					if data.Entries[j].SetExtcomunityRt.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/extcommunity/rt/asn-nn", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].SetExtcomunityRt.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].SetExtcomunityRt.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/extcommunity/rt/asn-nn=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].SetCommunityListName.IsNull() && data.Entries[j].SetCommunityListName.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/comm-list/comm-list-name", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetCommunityListExpanded.IsNull() && data.Entries[j].SetCommunityListExpanded.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/comm-list/comm-list-expanded", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetCommunityListStandard.IsNull() && data.Entries[j].SetCommunityListStandard.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/comm-list/comm-list-standard", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetCommunityListDelete.IsNull() && data.Entries[j].SetCommunityListDelete.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/comm-list/delete", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetCommunitiesAdditive.IsNull() && data.Entries[j].SetCommunitiesAdditive.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/bgp-community/community-well-known/additive", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetCommunities.IsNull() {
					if data.Entries[j].SetCommunities.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/bgp-community/community-well-known/community-list", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].SetCommunities.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].SetCommunities.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/bgp-community/community-well-known/community-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].SetCommunityNone.IsNull() && data.Entries[j].SetCommunityNone.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/bgp-community/none", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				for ci := range state.Entries[i].SetAsPathReplaceAs {
					cstateKeyValues := [...]string{state.Entries[i].SetAsPathReplaceAs[ci].AsNumber.ValueString()}

					cemptyKeys := true
					if !reflect.ValueOf(state.Entries[i].SetAsPathReplaceAs[ci].AsNumber.ValueString()).IsZero() {
						cemptyKeys = false
					}
					if cemptyKeys {
						continue
					}

					found := false
					for cj := range data.Entries[j].SetAsPathReplaceAs {
						found = true
						if state.Entries[i].SetAsPathReplaceAs[ci].AsNumber.ValueString() != data.Entries[j].SetAsPathReplaceAs[cj].AsNumber.ValueString() {
							found = false
						}
						if found {
							break
						}
					}
					if !found {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/as-path/replace/as-container=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
					}
				}
				if !state.Entries[i].SetAsPathReplaceAny.IsNull() && data.Entries[j].SetAsPathReplaceAny.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/as-path/replace/any", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetAsPathTag.IsNull() && data.Entries[j].SetAsPathTag.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/as-path/tag", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetAsPathPrependLastAs.IsNull() && data.Entries[j].SetAsPathPrependLastAs.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/as-path/prepend/last-as-cont/last-as", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetAsPathPrependAs.IsNull() && data.Entries[j].SetAsPathPrependAs.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/as-path/prepend/as-container/as-number", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetWeightLegacy.IsNull() && data.Entries[j].SetWeightLegacy.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/weight", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetLocalPreferenceLegacy.IsNull() && data.Entries[j].SetLocalPreferenceLegacy.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/local-preference", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetExtcomunityVpnDistinguisherLegacy.IsNull() && data.Entries[j].SetExtcomunityVpnDistinguisherLegacy.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/extcommunity/vpn-distinguisher/asn-nn", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetExtcomunitySooLegacy.IsNull() && data.Entries[j].SetExtcomunitySooLegacy.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/extcommunity/soo/asn-nn", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetExtcomunityRtLegacy.IsNull() {
					if data.Entries[j].SetExtcomunityRtLegacy.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/extcommunity/rt/asn-nn", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].SetExtcomunityRtLegacy.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].SetExtcomunityRtLegacy.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/extcommunity/rt/asn-nn=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].SetCommunityListNameLegacy.IsNull() && data.Entries[j].SetCommunityListNameLegacy.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/comm-list/comm-list-name", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetCommunityListExpandedLegacy.IsNull() && data.Entries[j].SetCommunityListExpandedLegacy.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/comm-list/comm-list-expanded", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetCommunityListStandardLegacy.IsNull() && data.Entries[j].SetCommunityListStandardLegacy.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/comm-list/comm-list-standard", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetCommunityListDeleteLegacy.IsNull() && data.Entries[j].SetCommunityListDeleteLegacy.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/comm-list/delete", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetCommunitiesAdditiveLegacy.IsNull() && data.Entries[j].SetCommunitiesAdditiveLegacy.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/community/community-well-known/additive", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetCommunitiesLegacy.IsNull() {
					if data.Entries[j].SetCommunitiesLegacy.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/community/community-well-known/community-list", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].SetCommunitiesLegacy.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].SetCommunitiesLegacy.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/community/community-well-known/community-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].SetCommunityNoneLegacy.IsNull() && data.Entries[j].SetCommunityNoneLegacy.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/community/none", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetAsPathTagLegacy.IsNull() && data.Entries[j].SetAsPathTagLegacy.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/as-path/tag", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetAsPathPrependLastAsLegacy.IsNull() && data.Entries[j].SetAsPathPrependLastAsLegacy.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/as-path/prepend/last-as-cont/last-as", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetAsPathPrependAsLegacy.IsNull() && data.Entries[j].SetAsPathPrependAsLegacy.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/as-path/prepend/as-container/as-number", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetVrf.IsNull() && data.Entries[j].SetVrf.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/vrf", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetTag.IsNull() && data.Entries[j].SetTag.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/tag/tag-val", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetMetricType.IsNull() && data.Entries[j].SetMetricType.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/metric-type", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetMetricMtu.IsNull() && data.Entries[j].SetMetricMtu.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/metric/values/MTU", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetMetricLoading.IsNull() && data.Entries[j].SetMetricLoading.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/metric/values/loading", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetMetricReliability.IsNull() && data.Entries[j].SetMetricReliability.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/metric/values/reliability", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetMetricDelay.IsNull() && data.Entries[j].SetMetricDelay.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/metric/values/delay", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetMetricValue.IsNull() && data.Entries[j].SetMetricValue.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/metric/values/value", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetMetricChange.IsNull() && data.Entries[j].SetMetricChange.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/metric/metric-change", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetLevel2.IsNull() && data.Entries[j].SetLevel2.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/level/level-2", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetLevel12.IsNull() && data.Entries[j].SetLevel12.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/level/level-1-2", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetLevel1.IsNull() && data.Entries[j].SetLevel1.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/level/level-1", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetIpv6NextHop.IsNull() {
					if data.Entries[j].SetIpv6NextHop.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/ipv6/next-hop/ipv6", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].SetIpv6NextHop.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].SetIpv6NextHop.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/ipv6/next-hop/ipv6=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].SetIpv6DefaultNextHop.IsNull() {
					if data.Entries[j].SetIpv6DefaultNextHop.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/ipv6/default/next-hop/ipv6", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].SetIpv6DefaultNextHop.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].SetIpv6DefaultNextHop.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/ipv6/default/next-hop/ipv6=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].SetIpv6DefaultGlobalNextHop.IsNull() && data.Entries[j].SetIpv6DefaultGlobalNextHop.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/ipv6/default/global/next-hop", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetIpv6Address.IsNull() {
					if data.Entries[j].SetIpv6Address.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/ipv6/address/prefix-list", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].SetIpv6Address.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].SetIpv6Address.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/ipv6/address/prefix-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].SetIpQosGroup.IsNull() && data.Entries[j].SetIpQosGroup.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/ip/qos-group/qos-id", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetIpNextHopSelf.IsNull() && data.Entries[j].SetIpNextHopSelf.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/ip/next-hop/self", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetIpNextHopAddress.IsNull() {
					if data.Entries[j].SetIpNextHopAddress.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/ip/next-hop/address", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].SetIpNextHopAddress.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].SetIpNextHopAddress.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/ip/next-hop/address=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].SetIpGlobalNextHopAddress.IsNull() {
					if data.Entries[j].SetIpGlobalNextHopAddress.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/ip/global/next-hop/address", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].SetIpGlobalNextHopAddress.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].SetIpGlobalNextHopAddress.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/ip/global/next-hop/address=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].SetIpDefaultNextHopAddress.IsNull() {
					if data.Entries[j].SetIpDefaultNextHopAddress.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/ip/default/next-hop/address", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].SetIpDefaultNextHopAddress.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].SetIpDefaultNextHopAddress.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/ip/default/next-hop/address=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].SetIpDefaultGlobalNextHopAddress.IsNull() {
					if data.Entries[j].SetIpDefaultGlobalNextHopAddress.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/ip/default/global/next-hop/address", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].SetIpDefaultGlobalNextHopAddress.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].SetIpDefaultGlobalNextHopAddress.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/ip/default/global/next-hop/address=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].SetIpAddress.IsNull() && data.Entries[j].SetIpAddress.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/ip/address/prefix-list", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetInterfaces.IsNull() {
					if data.Entries[j].SetInterfaces.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/interface-list", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].SetInterfaces.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].SetInterfaces.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/interface-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].SetGlobal.IsNull() && data.Entries[j].SetGlobal.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/global", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].SetDefaultInterfaces.IsNull() {
					if data.Entries[j].SetDefaultInterfaces.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/default/interface-list", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].SetDefaultInterfaces.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].SetDefaultInterfaces.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/default/interface-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].MatchLocalPreferences.IsNull() {
					if data.Entries[j].MatchLocalPreferences.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/Cisco-IOS-XE-bgp:bgp-route-map-match/local-preference/values", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []int
						data.Entries[i].MatchLocalPreferences.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].MatchLocalPreferences.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/Cisco-IOS-XE-bgp:bgp-route-map-match/local-preference/values=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].MatchExtcommunityLists.IsNull() {
					if data.Entries[j].MatchExtcommunityLists.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/Cisco-IOS-XE-bgp:bgp-route-map-match/extcommunity/extcommunity-list", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].MatchExtcommunityLists.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].MatchExtcommunityLists.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/Cisco-IOS-XE-bgp:bgp-route-map-match/extcommunity/extcommunity-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].MatchCommunityListExactMatch.IsNull() && data.Entries[j].MatchCommunityListExactMatch.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/Cisco-IOS-XE-bgp:bgp-route-map-match/bgp-community/exact-match", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].MatchCommunityLists.IsNull() {
					if data.Entries[j].MatchCommunityLists.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/Cisco-IOS-XE-bgp:bgp-route-map-match/bgp-community/community-list", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].MatchCommunityLists.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].MatchCommunityLists.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/Cisco-IOS-XE-bgp:bgp-route-map-match/bgp-community/community-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].MatchAsPaths.IsNull() {
					if data.Entries[j].MatchAsPaths.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/Cisco-IOS-XE-bgp:bgp-route-map-match/as-path/access-list", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []int
						data.Entries[i].MatchAsPaths.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].MatchAsPaths.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/Cisco-IOS-XE-bgp:bgp-route-map-match/as-path/access-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].MatchLocalPreferencesLegacy.IsNull() {
					if data.Entries[j].MatchLocalPreferencesLegacy.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/local-preference/values", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []int
						data.Entries[i].MatchLocalPreferencesLegacy.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].MatchLocalPreferencesLegacy.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/local-preference/values=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].MatchExtcommunityListsLegacy.IsNull() {
					if data.Entries[j].MatchExtcommunityListsLegacy.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/extcommunity/name", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].MatchExtcommunityListsLegacy.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].MatchExtcommunityListsLegacy.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/extcommunity/name=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].MatchCommunityListsLegacy.IsNull() {
					if data.Entries[j].MatchCommunityListsLegacy.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/community/name", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].MatchCommunityListsLegacy.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].MatchCommunityListsLegacy.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/community/name=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].MatchAsPathsLegacy.IsNull() {
					if data.Entries[j].MatchAsPathsLegacy.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/as-path/access-list", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []int
						data.Entries[i].MatchAsPathsLegacy.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].MatchAsPathsLegacy.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/as-path/access-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].MatchTrack.IsNull() && data.Entries[j].MatchTrack.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/track", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].MatchTags.IsNull() {
					if data.Entries[j].MatchTags.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/tag/tag_value", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []int
						data.Entries[i].MatchTags.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].MatchTags.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/tag/tag_value=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].MatchSourceProtocolStatic.IsNull() && data.Entries[j].MatchSourceProtocolStatic.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/source-protocol/static", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].MatchSourceProtocolRip.IsNull() && data.Entries[j].MatchSourceProtocolRip.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/source-protocol/rip", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].MatchSourceProtocolOspfv3.IsNull() {
					if data.Entries[j].MatchSourceProtocolOspfv3.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/source-protocol/ospfv3", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].MatchSourceProtocolOspfv3.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].MatchSourceProtocolOspfv3.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/source-protocol/ospfv3=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].MatchSourceProtocolOspf.IsNull() {
					if data.Entries[j].MatchSourceProtocolOspf.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/source-protocol/ospf", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].MatchSourceProtocolOspf.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].MatchSourceProtocolOspf.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/source-protocol/ospf=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].MatchSourceProtocolLisp.IsNull() && data.Entries[j].MatchSourceProtocolLisp.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/source-protocol/lisp", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].MatchSourceProtocolIsis.IsNull() && data.Entries[j].MatchSourceProtocolIsis.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/source-protocol/isis", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].MatchSourceProtocolEigrp.IsNull() {
					if data.Entries[j].MatchSourceProtocolEigrp.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/source-protocol/eigrp", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].MatchSourceProtocolEigrp.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].MatchSourceProtocolEigrp.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/source-protocol/eigrp=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].MatchSourceProtocolConnected.IsNull() && data.Entries[j].MatchSourceProtocolConnected.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/source-protocol/connected", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].MatchSourceProtocolBgp.IsNull() {
					if data.Entries[j].MatchSourceProtocolBgp.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/source-protocol/bgp", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].MatchSourceProtocolBgp.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].MatchSourceProtocolBgp.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/source-protocol/bgp=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].MatchRouteTypeLocal.IsNull() && data.Entries[j].MatchRouteTypeLocal.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/Cisco-IOS-XE-bgp:bgp-route-map-match/route-type/local", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].MatchRouteTypeLocalLegacy.IsNull() && data.Entries[j].MatchRouteTypeLocalLegacy.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/route-type/local", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].MatchRouteTypeLevel2.IsNull() && data.Entries[j].MatchRouteTypeLevel2.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/route-type/level-2", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].MatchRouteTypeLevel1.IsNull() && data.Entries[j].MatchRouteTypeLevel1.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/route-type/level-1", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].MatchRouteTypeInternal.IsNull() && data.Entries[j].MatchRouteTypeInternal.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/route-type/internal", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].MatchRouteTypeExternalType2.IsNull() && data.Entries[j].MatchRouteTypeExternalType2.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/route-type/external/type-2", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].MatchRouteTypeExternalType1.IsNull() && data.Entries[j].MatchRouteTypeExternalType1.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/route-type/external/type-1", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].MatchRouteTypeExternal.IsNull() && data.Entries[j].MatchRouteTypeExternal.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/route-type/external", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].MatchIpv6NextHopPrefixLists.IsNull() && data.Entries[j].MatchIpv6NextHopPrefixLists.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/ipv6/next-hop/prefix-list", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].MatchIpv6NextHopAccessLists.IsNull() && data.Entries[j].MatchIpv6NextHopAccessLists.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/ipv6/next-hop/access-list", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].MatchIpv6AddressPrefixLists.IsNull() && data.Entries[j].MatchIpv6AddressPrefixLists.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/ipv6/address/prefix-list", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].MatchIpv6AddressAccessLists.IsNull() && data.Entries[j].MatchIpv6AddressAccessLists.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/ipv6/address/access-list", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].MatchIpNextHopPrefixLists.IsNull() {
					if data.Entries[j].MatchIpNextHopPrefixLists.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/ip/next-hop/prefix-list", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].MatchIpNextHopPrefixLists.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].MatchIpNextHopPrefixLists.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/ip/next-hop/prefix-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].MatchIpNextHopAccessLists.IsNull() {
					if data.Entries[j].MatchIpNextHopAccessLists.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/ip/next-hop/access-list", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].MatchIpNextHopAccessLists.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].MatchIpNextHopAccessLists.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/ip/next-hop/access-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].MatchIpAddressPrefixLists.IsNull() {
					if data.Entries[j].MatchIpAddressPrefixLists.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/ip/address/prefix-list", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].MatchIpAddressPrefixLists.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].MatchIpAddressPrefixLists.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/ip/address/prefix-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].MatchIpAddressAccessLists.IsNull() {
					if data.Entries[j].MatchIpAddressAccessLists.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/ip/address/access-list", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].MatchIpAddressAccessLists.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].MatchIpAddressAccessLists.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/ip/address/access-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].MatchInterfaces.IsNull() {
					if data.Entries[j].MatchInterfaces.IsNull() {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/interface/interface", state.getPath(), strings.Join(stateKeyValues[:], ",")))
					} else {
						var dataValues, stateValues []string
						data.Entries[i].MatchInterfaces.ElementsAs(ctx, &dataValues, false)
						state.Entries[j].MatchInterfaces.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/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/interface/interface=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), v))
							}
						}
					}
				}
				if !state.Entries[i].ContinueSequenceNumber.IsNull() && data.Entries[j].ContinueSequenceNumber.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/continue/sequence-number", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].Continue.IsNull() && data.Entries[j].Continue.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/continue", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].Description.IsNull() && data.Entries[j].Description.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/description", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				if !state.Entries[i].Operation.IsNull() && data.Entries[j].Operation.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/operation", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}

	return deletedItems
}

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

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

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

	for i := range data.Entries {
		keyValues := [...]string{strconv.FormatInt(data.Entries[i].Seq.ValueInt64(), 10)}
		if !data.Entries[i].SetExtcomunityVpnDistinguisherAdditive.IsNull() && !data.Entries[i].SetExtcomunityVpnDistinguisherAdditive.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/extcommunity/vpn-distinguisher/asn-nn-additive", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].SetCommunityListDelete.IsNull() && !data.Entries[i].SetCommunityListDelete.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/comm-list/delete", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].SetCommunitiesAdditive.IsNull() && !data.Entries[i].SetCommunitiesAdditive.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/bgp-community/community-well-known/additive", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].SetCommunityNone.IsNull() && !data.Entries[i].SetCommunityNone.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/bgp-community/none", data.getPath(), strings.Join(keyValues[:], ",")))
		}

		if !data.Entries[i].SetAsPathReplaceAny.IsNull() && !data.Entries[i].SetAsPathReplaceAny.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/as-path/replace/any", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].SetAsPathTag.IsNull() && !data.Entries[i].SetAsPathTag.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/Cisco-IOS-XE-bgp:bgp-route-map-set/as-path/tag", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].SetCommunityListDeleteLegacy.IsNull() && !data.Entries[i].SetCommunityListDeleteLegacy.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/comm-list/delete", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].SetCommunitiesAdditiveLegacy.IsNull() && !data.Entries[i].SetCommunitiesAdditiveLegacy.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/community/community-well-known/additive", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].SetCommunityNoneLegacy.IsNull() && !data.Entries[i].SetCommunityNoneLegacy.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/community/none", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].SetAsPathTagLegacy.IsNull() && !data.Entries[i].SetAsPathTagLegacy.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/as-path/tag", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].SetLevel2.IsNull() && !data.Entries[i].SetLevel2.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/level/level-2", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].SetLevel12.IsNull() && !data.Entries[i].SetLevel12.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/level/level-1-2", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].SetLevel1.IsNull() && !data.Entries[i].SetLevel1.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/level/level-1", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].SetIpNextHopSelf.IsNull() && !data.Entries[i].SetIpNextHopSelf.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/ip/next-hop/self", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].SetGlobal.IsNull() && !data.Entries[i].SetGlobal.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/set/global", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].MatchCommunityListExactMatch.IsNull() && !data.Entries[i].MatchCommunityListExactMatch.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/Cisco-IOS-XE-bgp:bgp-route-map-match/bgp-community/exact-match", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].MatchSourceProtocolStatic.IsNull() && !data.Entries[i].MatchSourceProtocolStatic.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/source-protocol/static", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].MatchSourceProtocolRip.IsNull() && !data.Entries[i].MatchSourceProtocolRip.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/source-protocol/rip", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].MatchSourceProtocolLisp.IsNull() && !data.Entries[i].MatchSourceProtocolLisp.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/source-protocol/lisp", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].MatchSourceProtocolIsis.IsNull() && !data.Entries[i].MatchSourceProtocolIsis.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/source-protocol/isis", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].MatchSourceProtocolConnected.IsNull() && !data.Entries[i].MatchSourceProtocolConnected.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/source-protocol/connected", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].MatchRouteTypeLocal.IsNull() && !data.Entries[i].MatchRouteTypeLocal.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/Cisco-IOS-XE-bgp:bgp-route-map-match/route-type/local", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].MatchRouteTypeLocalLegacy.IsNull() && !data.Entries[i].MatchRouteTypeLocalLegacy.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/route-type/local", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].MatchRouteTypeLevel2.IsNull() && !data.Entries[i].MatchRouteTypeLevel2.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/route-type/level-2", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].MatchRouteTypeLevel1.IsNull() && !data.Entries[i].MatchRouteTypeLevel1.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/route-type/level-1", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].MatchRouteTypeInternal.IsNull() && !data.Entries[i].MatchRouteTypeInternal.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/route-type/internal", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].MatchRouteTypeExternalType2.IsNull() && !data.Entries[i].MatchRouteTypeExternalType2.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/route-type/external/type-2", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].MatchRouteTypeExternalType1.IsNull() && !data.Entries[i].MatchRouteTypeExternalType1.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/route-type/external/type-1", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].MatchRouteTypeExternal.IsNull() && !data.Entries[i].MatchRouteTypeExternal.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/match/route-type/external", data.getPath(), strings.Join(keyValues[:], ",")))
		}
		if !data.Entries[i].Continue.IsNull() && !data.Entries[i].Continue.ValueBool() {
			emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v/continue", data.getPath(), strings.Join(keyValues[:], ",")))
		}
	}

	return emptyLeafsDelete
}

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

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

func (data *RouteMap) getDeletePaths(ctx context.Context) []string {
	var deletePaths []string
	for i := range data.Entries {
		keyValues := [...]string{strconv.FormatInt(data.Entries[i].Seq.ValueInt64(), 10)}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-route-map:route-map-without-order-seq=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}

	return deletePaths
}

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