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

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

package provider

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

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

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

// Section below is generated&owned by "gen/generator.go". //template:begin types
type Logging struct {
	Device                types.String                   `tfsdk:"device"`
	Id                    types.String                   `tfsdk:"id"`
	MonitorSeverity       types.String                   `tfsdk:"monitor_severity"`
	BufferedSize          types.Int64                    `tfsdk:"buffered_size"`
	BufferedSeverity      types.String                   `tfsdk:"buffered_severity"`
	ConsoleSeverity       types.String                   `tfsdk:"console_severity"`
	Facility              types.String                   `tfsdk:"facility"`
	HistorySize           types.Int64                    `tfsdk:"history_size"`
	HistorySeverity       types.String                   `tfsdk:"history_severity"`
	Trap                  types.Bool                     `tfsdk:"trap"`
	TrapSeverity          types.String                   `tfsdk:"trap_severity"`
	OriginIdType          types.String                   `tfsdk:"origin_id_type"`
	OriginIdName          types.String                   `tfsdk:"origin_id_name"`
	FileName              types.String                   `tfsdk:"file_name"`
	FileMaxSize           types.Int64                    `tfsdk:"file_max_size"`
	FileMinSize           types.Int64                    `tfsdk:"file_min_size"`
	FileSeverity          types.String                   `tfsdk:"file_severity"`
	SourceInterface       types.String                   `tfsdk:"source_interface"`
	Console               types.Bool                     `tfsdk:"console"`
	SourceInterfacesVrf   []LoggingSourceInterfacesVrf   `tfsdk:"source_interfaces_vrf"`
	Ipv4Hosts             []LoggingIpv4Hosts             `tfsdk:"ipv4_hosts"`
	Ipv4HostsTransport    []LoggingIpv4HostsTransport    `tfsdk:"ipv4_hosts_transport"`
	Ipv4VrfHosts          []LoggingIpv4VrfHosts          `tfsdk:"ipv4_vrf_hosts"`
	Ipv4VrfHostsTransport []LoggingIpv4VrfHostsTransport `tfsdk:"ipv4_vrf_hosts_transport"`
	Ipv6Hosts             []LoggingIpv6Hosts             `tfsdk:"ipv6_hosts"`
	Ipv6HostsTransport    []LoggingIpv6HostsTransport    `tfsdk:"ipv6_hosts_transport"`
	Ipv6VrfHosts          []LoggingIpv6VrfHosts          `tfsdk:"ipv6_vrf_hosts"`
	Ipv6VrfHostsTransport []LoggingIpv6VrfHostsTransport `tfsdk:"ipv6_vrf_hosts_transport"`
}

type LoggingData struct {
	Device                types.String                   `tfsdk:"device"`
	Id                    types.String                   `tfsdk:"id"`
	MonitorSeverity       types.String                   `tfsdk:"monitor_severity"`
	BufferedSize          types.Int64                    `tfsdk:"buffered_size"`
	BufferedSeverity      types.String                   `tfsdk:"buffered_severity"`
	ConsoleSeverity       types.String                   `tfsdk:"console_severity"`
	Facility              types.String                   `tfsdk:"facility"`
	HistorySize           types.Int64                    `tfsdk:"history_size"`
	HistorySeverity       types.String                   `tfsdk:"history_severity"`
	Trap                  types.Bool                     `tfsdk:"trap"`
	TrapSeverity          types.String                   `tfsdk:"trap_severity"`
	OriginIdType          types.String                   `tfsdk:"origin_id_type"`
	OriginIdName          types.String                   `tfsdk:"origin_id_name"`
	FileName              types.String                   `tfsdk:"file_name"`
	FileMaxSize           types.Int64                    `tfsdk:"file_max_size"`
	FileMinSize           types.Int64                    `tfsdk:"file_min_size"`
	FileSeverity          types.String                   `tfsdk:"file_severity"`
	SourceInterface       types.String                   `tfsdk:"source_interface"`
	Console               types.Bool                     `tfsdk:"console"`
	SourceInterfacesVrf   []LoggingSourceInterfacesVrf   `tfsdk:"source_interfaces_vrf"`
	Ipv4Hosts             []LoggingIpv4Hosts             `tfsdk:"ipv4_hosts"`
	Ipv4HostsTransport    []LoggingIpv4HostsTransport    `tfsdk:"ipv4_hosts_transport"`
	Ipv4VrfHosts          []LoggingIpv4VrfHosts          `tfsdk:"ipv4_vrf_hosts"`
	Ipv4VrfHostsTransport []LoggingIpv4VrfHostsTransport `tfsdk:"ipv4_vrf_hosts_transport"`
	Ipv6Hosts             []LoggingIpv6Hosts             `tfsdk:"ipv6_hosts"`
	Ipv6HostsTransport    []LoggingIpv6HostsTransport    `tfsdk:"ipv6_hosts_transport"`
	Ipv6VrfHosts          []LoggingIpv6VrfHosts          `tfsdk:"ipv6_vrf_hosts"`
	Ipv6VrfHostsTransport []LoggingIpv6VrfHostsTransport `tfsdk:"ipv6_vrf_hosts_transport"`
}
type LoggingSourceInterfacesVrf struct {
	Vrf           types.String `tfsdk:"vrf"`
	InterfaceName types.String `tfsdk:"interface_name"`
}
type LoggingIpv4Hosts struct {
	Ipv4Host types.String `tfsdk:"ipv4_host"`
}
type LoggingIpv4HostsTransport struct {
	Ipv4Host          types.String                                 `tfsdk:"ipv4_host"`
	TransportUdpPorts []LoggingIpv4HostsTransportTransportUdpPorts `tfsdk:"transport_udp_ports"`
	TransportTcpPorts []LoggingIpv4HostsTransportTransportTcpPorts `tfsdk:"transport_tcp_ports"`
	TransportTlsPorts []LoggingIpv4HostsTransportTransportTlsPorts `tfsdk:"transport_tls_ports"`
}
type LoggingIpv4VrfHosts struct {
	Ipv4Host types.String `tfsdk:"ipv4_host"`
	Vrf      types.String `tfsdk:"vrf"`
}
type LoggingIpv4VrfHostsTransport struct {
	Ipv4Host          types.String                                    `tfsdk:"ipv4_host"`
	Vrf               types.String                                    `tfsdk:"vrf"`
	TransportUdpPorts []LoggingIpv4VrfHostsTransportTransportUdpPorts `tfsdk:"transport_udp_ports"`
	TransportTcpPorts []LoggingIpv4VrfHostsTransportTransportTcpPorts `tfsdk:"transport_tcp_ports"`
	TransportTlsPorts []LoggingIpv4VrfHostsTransportTransportTlsPorts `tfsdk:"transport_tls_ports"`
}
type LoggingIpv6Hosts struct {
	Ipv6Host types.String `tfsdk:"ipv6_host"`
}
type LoggingIpv6HostsTransport struct {
	Ipv6Host          types.String                                 `tfsdk:"ipv6_host"`
	TransportUdpPorts []LoggingIpv6HostsTransportTransportUdpPorts `tfsdk:"transport_udp_ports"`
	TransportTcpPorts []LoggingIpv6HostsTransportTransportTcpPorts `tfsdk:"transport_tcp_ports"`
	TransportTlsPorts []LoggingIpv6HostsTransportTransportTlsPorts `tfsdk:"transport_tls_ports"`
}
type LoggingIpv6VrfHosts struct {
	Ipv6Host types.String `tfsdk:"ipv6_host"`
	Vrf      types.String `tfsdk:"vrf"`
}
type LoggingIpv6VrfHostsTransport struct {
	Ipv6Host          types.String                                    `tfsdk:"ipv6_host"`
	Vrf               types.String                                    `tfsdk:"vrf"`
	TransportUdpPorts []LoggingIpv6VrfHostsTransportTransportUdpPorts `tfsdk:"transport_udp_ports"`
	TransportTcpPorts []LoggingIpv6VrfHostsTransportTransportTcpPorts `tfsdk:"transport_tcp_ports"`
	TransportTlsPorts []LoggingIpv6VrfHostsTransportTransportTlsPorts `tfsdk:"transport_tls_ports"`
}
type LoggingIpv4HostsTransportTransportUdpPorts struct {
	PortNumber types.Int64 `tfsdk:"port_number"`
}
type LoggingIpv4HostsTransportTransportTcpPorts struct {
	PortNumber types.Int64 `tfsdk:"port_number"`
}
type LoggingIpv4HostsTransportTransportTlsPorts struct {
	PortNumber types.Int64  `tfsdk:"port_number"`
	Profile    types.String `tfsdk:"profile"`
}
type LoggingIpv4VrfHostsTransportTransportUdpPorts struct {
	PortNumber types.Int64 `tfsdk:"port_number"`
}
type LoggingIpv4VrfHostsTransportTransportTcpPorts struct {
	PortNumber types.Int64 `tfsdk:"port_number"`
}
type LoggingIpv4VrfHostsTransportTransportTlsPorts struct {
	PortNumber types.Int64  `tfsdk:"port_number"`
	Profile    types.String `tfsdk:"profile"`
}
type LoggingIpv6HostsTransportTransportUdpPorts struct {
	PortNumber types.Int64 `tfsdk:"port_number"`
}
type LoggingIpv6HostsTransportTransportTcpPorts struct {
	PortNumber types.Int64 `tfsdk:"port_number"`
}
type LoggingIpv6HostsTransportTransportTlsPorts struct {
	PortNumber types.Int64  `tfsdk:"port_number"`
	Profile    types.String `tfsdk:"profile"`
}
type LoggingIpv6VrfHostsTransportTransportUdpPorts struct {
	PortNumber types.Int64 `tfsdk:"port_number"`
}
type LoggingIpv6VrfHostsTransportTransportTcpPorts struct {
	PortNumber types.Int64 `tfsdk:"port_number"`
}
type LoggingIpv6VrfHostsTransportTransportTlsPorts struct {
	PortNumber types.Int64  `tfsdk:"port_number"`
	Profile    types.String `tfsdk:"profile"`
}

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

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

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

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

// if last path element has a key -> remove it
func (data Logging) 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 Logging) toBody(ctx context.Context) string {
	body := `{"` + helpers.LastElement(data.getPath()) + `":{}}`
	if !data.MonitorSeverity.IsNull() && !data.MonitorSeverity.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"monitor-config.common-config.monitor.severity", data.MonitorSeverity.ValueString())
	}
	if !data.BufferedSize.IsNull() && !data.BufferedSize.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"buffered.size-value", strconv.FormatInt(data.BufferedSize.ValueInt64(), 10))
	}
	if !data.BufferedSeverity.IsNull() && !data.BufferedSeverity.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"buffered.severity-level", data.BufferedSeverity.ValueString())
	}
	if !data.ConsoleSeverity.IsNull() && !data.ConsoleSeverity.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"console-config.common-config.console.severity", data.ConsoleSeverity.ValueString())
	}
	if !data.Facility.IsNull() && !data.Facility.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"facility", data.Facility.ValueString())
	}
	if !data.HistorySize.IsNull() && !data.HistorySize.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"history.size", strconv.FormatInt(data.HistorySize.ValueInt64(), 10))
	}
	if !data.HistorySeverity.IsNull() && !data.HistorySeverity.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"history.severity-level", data.HistorySeverity.ValueString())
	}
	if !data.Trap.IsNull() && !data.Trap.IsUnknown() {
		if data.Trap.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"trap", map[string]string{})
		}
	}
	if !data.TrapSeverity.IsNull() && !data.TrapSeverity.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"trap.severity", data.TrapSeverity.ValueString())
	}
	if !data.OriginIdType.IsNull() && !data.OriginIdType.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"origin-id.type-value", data.OriginIdType.ValueString())
	}
	if !data.OriginIdName.IsNull() && !data.OriginIdName.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"origin-id.string", data.OriginIdName.ValueString())
	}
	if !data.FileName.IsNull() && !data.FileName.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"file.name", data.FileName.ValueString())
	}
	if !data.FileMaxSize.IsNull() && !data.FileMaxSize.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"file.max-size", strconv.FormatInt(data.FileMaxSize.ValueInt64(), 10))
	}
	if !data.FileMinSize.IsNull() && !data.FileMinSize.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"file.min-size", strconv.FormatInt(data.FileMinSize.ValueInt64(), 10))
	}
	if !data.FileSeverity.IsNull() && !data.FileSeverity.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"file.severity", data.FileSeverity.ValueString())
	}
	if !data.SourceInterface.IsNull() && !data.SourceInterface.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"source-interface-conf.interface-name-non-vrf", data.SourceInterface.ValueString())
	}
	if !data.Console.IsNull() && !data.Console.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"console-config.console", data.Console.ValueBool())
	}
	if len(data.SourceInterfacesVrf) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"source-interface-conf.source-interface-vrf", []interface{}{})
		for index, item := range data.SourceInterfacesVrf {
			if !item.Vrf.IsNull() && !item.Vrf.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"source-interface-conf.source-interface-vrf"+"."+strconv.Itoa(index)+"."+"vrf", item.Vrf.ValueString())
			}
			if !item.InterfaceName.IsNull() && !item.InterfaceName.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"source-interface-conf.source-interface-vrf"+"."+strconv.Itoa(index)+"."+"interface-name", item.InterfaceName.ValueString())
			}
		}
	}
	if len(data.Ipv4Hosts) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-list", []interface{}{})
		for index, item := range data.Ipv4Hosts {
			if !item.Ipv4Host.IsNull() && !item.Ipv4Host.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-list"+"."+strconv.Itoa(index)+"."+"ipv4-host", item.Ipv4Host.ValueString())
			}
		}
	}
	if len(data.Ipv4HostsTransport) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-transport-list", []interface{}{})
		for index, item := range data.Ipv4HostsTransport {
			if !item.Ipv4Host.IsNull() && !item.Ipv4Host.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-transport-list"+"."+strconv.Itoa(index)+"."+"ipv4-host", item.Ipv4Host.ValueString())
			}
			if len(item.TransportUdpPorts) > 0 {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-transport-list"+"."+strconv.Itoa(index)+"."+"transport.udp.port-config", []interface{}{})
				for cindex, citem := range item.TransportUdpPorts {
					if !citem.PortNumber.IsNull() && !citem.PortNumber.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-transport-list"+"."+strconv.Itoa(index)+"."+"transport.udp.port-config"+"."+strconv.Itoa(cindex)+"."+"port-number", strconv.FormatInt(citem.PortNumber.ValueInt64(), 10))
					}
				}
			}
			if len(item.TransportTcpPorts) > 0 {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-transport-list"+"."+strconv.Itoa(index)+"."+"transport.tcp.port-config", []interface{}{})
				for cindex, citem := range item.TransportTcpPorts {
					if !citem.PortNumber.IsNull() && !citem.PortNumber.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-transport-list"+"."+strconv.Itoa(index)+"."+"transport.tcp.port-config"+"."+strconv.Itoa(cindex)+"."+"port-number", strconv.FormatInt(citem.PortNumber.ValueInt64(), 10))
					}
				}
			}
			if len(item.TransportTlsPorts) > 0 {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-transport-list"+"."+strconv.Itoa(index)+"."+"transport.tls.port", []interface{}{})
				for cindex, citem := range item.TransportTlsPorts {
					if !citem.PortNumber.IsNull() && !citem.PortNumber.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-transport-list"+"."+strconv.Itoa(index)+"."+"transport.tls.port"+"."+strconv.Itoa(cindex)+"."+"port-number", strconv.FormatInt(citem.PortNumber.ValueInt64(), 10))
					}
					if !citem.Profile.IsNull() && !citem.Profile.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-transport-list"+"."+strconv.Itoa(index)+"."+"transport.tls.port"+"."+strconv.Itoa(cindex)+"."+"profile", citem.Profile.ValueString())
					}
				}
			}
		}
	}
	if len(data.Ipv4VrfHosts) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-vrf-list", []interface{}{})
		for index, item := range data.Ipv4VrfHosts {
			if !item.Ipv4Host.IsNull() && !item.Ipv4Host.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-vrf-list"+"."+strconv.Itoa(index)+"."+"ipv4-host", item.Ipv4Host.ValueString())
			}
			if !item.Vrf.IsNull() && !item.Vrf.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-vrf-list"+"."+strconv.Itoa(index)+"."+"vrf", item.Vrf.ValueString())
			}
		}
	}
	if len(data.Ipv4VrfHostsTransport) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-vrf-transport-list", []interface{}{})
		for index, item := range data.Ipv4VrfHostsTransport {
			if !item.Ipv4Host.IsNull() && !item.Ipv4Host.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-vrf-transport-list"+"."+strconv.Itoa(index)+"."+"ipv4-host", item.Ipv4Host.ValueString())
			}
			if !item.Vrf.IsNull() && !item.Vrf.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-vrf-transport-list"+"."+strconv.Itoa(index)+"."+"vrf", item.Vrf.ValueString())
			}
			if len(item.TransportUdpPorts) > 0 {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-vrf-transport-list"+"."+strconv.Itoa(index)+"."+"transport.udp.port-config", []interface{}{})
				for cindex, citem := range item.TransportUdpPorts {
					if !citem.PortNumber.IsNull() && !citem.PortNumber.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-vrf-transport-list"+"."+strconv.Itoa(index)+"."+"transport.udp.port-config"+"."+strconv.Itoa(cindex)+"."+"port-number", strconv.FormatInt(citem.PortNumber.ValueInt64(), 10))
					}
				}
			}
			if len(item.TransportTcpPorts) > 0 {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-vrf-transport-list"+"."+strconv.Itoa(index)+"."+"transport.tcp.port-config", []interface{}{})
				for cindex, citem := range item.TransportTcpPorts {
					if !citem.PortNumber.IsNull() && !citem.PortNumber.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-vrf-transport-list"+"."+strconv.Itoa(index)+"."+"transport.tcp.port-config"+"."+strconv.Itoa(cindex)+"."+"port-number", strconv.FormatInt(citem.PortNumber.ValueInt64(), 10))
					}
				}
			}
			if len(item.TransportTlsPorts) > 0 {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-vrf-transport-list"+"."+strconv.Itoa(index)+"."+"transport.tls.port", []interface{}{})
				for cindex, citem := range item.TransportTlsPorts {
					if !citem.PortNumber.IsNull() && !citem.PortNumber.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-vrf-transport-list"+"."+strconv.Itoa(index)+"."+"transport.tls.port"+"."+strconv.Itoa(cindex)+"."+"port-number", strconv.FormatInt(citem.PortNumber.ValueInt64(), 10))
					}
					if !citem.Profile.IsNull() && !citem.Profile.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv4-host-vrf-transport-list"+"."+strconv.Itoa(index)+"."+"transport.tls.port"+"."+strconv.Itoa(cindex)+"."+"profile", citem.Profile.ValueString())
					}
				}
			}
		}
	}
	if len(data.Ipv6Hosts) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-list", []interface{}{})
		for index, item := range data.Ipv6Hosts {
			if !item.Ipv6Host.IsNull() && !item.Ipv6Host.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-list"+"."+strconv.Itoa(index)+"."+"ipv6-host", item.Ipv6Host.ValueString())
			}
		}
	}
	if len(data.Ipv6HostsTransport) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-transport-list", []interface{}{})
		for index, item := range data.Ipv6HostsTransport {
			if !item.Ipv6Host.IsNull() && !item.Ipv6Host.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-transport-list"+"."+strconv.Itoa(index)+"."+"ipv6-host", item.Ipv6Host.ValueString())
			}
			if len(item.TransportUdpPorts) > 0 {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-transport-list"+"."+strconv.Itoa(index)+"."+"transport.udp.port-config", []interface{}{})
				for cindex, citem := range item.TransportUdpPorts {
					if !citem.PortNumber.IsNull() && !citem.PortNumber.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-transport-list"+"."+strconv.Itoa(index)+"."+"transport.udp.port-config"+"."+strconv.Itoa(cindex)+"."+"port-number", strconv.FormatInt(citem.PortNumber.ValueInt64(), 10))
					}
				}
			}
			if len(item.TransportTcpPorts) > 0 {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-transport-list"+"."+strconv.Itoa(index)+"."+"transport.tcp.port-config", []interface{}{})
				for cindex, citem := range item.TransportTcpPorts {
					if !citem.PortNumber.IsNull() && !citem.PortNumber.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-transport-list"+"."+strconv.Itoa(index)+"."+"transport.tcp.port-config"+"."+strconv.Itoa(cindex)+"."+"port-number", strconv.FormatInt(citem.PortNumber.ValueInt64(), 10))
					}
				}
			}
			if len(item.TransportTlsPorts) > 0 {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-transport-list"+"."+strconv.Itoa(index)+"."+"transport.tls.port", []interface{}{})
				for cindex, citem := range item.TransportTlsPorts {
					if !citem.PortNumber.IsNull() && !citem.PortNumber.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-transport-list"+"."+strconv.Itoa(index)+"."+"transport.tls.port"+"."+strconv.Itoa(cindex)+"."+"port-number", strconv.FormatInt(citem.PortNumber.ValueInt64(), 10))
					}
					if !citem.Profile.IsNull() && !citem.Profile.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-transport-list"+"."+strconv.Itoa(index)+"."+"transport.tls.port"+"."+strconv.Itoa(cindex)+"."+"profile", citem.Profile.ValueString())
					}
				}
			}
		}
	}
	if len(data.Ipv6VrfHosts) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-vrf-list", []interface{}{})
		for index, item := range data.Ipv6VrfHosts {
			if !item.Ipv6Host.IsNull() && !item.Ipv6Host.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-vrf-list"+"."+strconv.Itoa(index)+"."+"ipv6-host", item.Ipv6Host.ValueString())
			}
			if !item.Vrf.IsNull() && !item.Vrf.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-vrf-list"+"."+strconv.Itoa(index)+"."+"vrf", item.Vrf.ValueString())
			}
		}
	}
	if len(data.Ipv6VrfHostsTransport) > 0 {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-vrf-transport-list", []interface{}{})
		for index, item := range data.Ipv6VrfHostsTransport {
			if !item.Ipv6Host.IsNull() && !item.Ipv6Host.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-vrf-transport-list"+"."+strconv.Itoa(index)+"."+"ipv6-host", item.Ipv6Host.ValueString())
			}
			if !item.Vrf.IsNull() && !item.Vrf.IsUnknown() {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-vrf-transport-list"+"."+strconv.Itoa(index)+"."+"vrf", item.Vrf.ValueString())
			}
			if len(item.TransportUdpPorts) > 0 {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-vrf-transport-list"+"."+strconv.Itoa(index)+"."+"transport.udp.port-config", []interface{}{})
				for cindex, citem := range item.TransportUdpPorts {
					if !citem.PortNumber.IsNull() && !citem.PortNumber.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-vrf-transport-list"+"."+strconv.Itoa(index)+"."+"transport.udp.port-config"+"."+strconv.Itoa(cindex)+"."+"port-number", strconv.FormatInt(citem.PortNumber.ValueInt64(), 10))
					}
				}
			}
			if len(item.TransportTcpPorts) > 0 {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-vrf-transport-list"+"."+strconv.Itoa(index)+"."+"transport.tcp.port-config", []interface{}{})
				for cindex, citem := range item.TransportTcpPorts {
					if !citem.PortNumber.IsNull() && !citem.PortNumber.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-vrf-transport-list"+"."+strconv.Itoa(index)+"."+"transport.tcp.port-config"+"."+strconv.Itoa(cindex)+"."+"port-number", strconv.FormatInt(citem.PortNumber.ValueInt64(), 10))
					}
				}
			}
			if len(item.TransportTlsPorts) > 0 {
				body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-vrf-transport-list"+"."+strconv.Itoa(index)+"."+"transport.tls.port", []interface{}{})
				for cindex, citem := range item.TransportTlsPorts {
					if !citem.PortNumber.IsNull() && !citem.PortNumber.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-vrf-transport-list"+"."+strconv.Itoa(index)+"."+"transport.tls.port"+"."+strconv.Itoa(cindex)+"."+"port-number", strconv.FormatInt(citem.PortNumber.ValueInt64(), 10))
					}
					if !citem.Profile.IsNull() && !citem.Profile.IsUnknown() {
						body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"host.ipv6.ipv6-host-vrf-transport-list"+"."+strconv.Itoa(index)+"."+"transport.tls.port"+"."+strconv.Itoa(cindex)+"."+"profile", citem.Profile.ValueString())
					}
				}
			}
		}
	}
	return body
}

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

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

func (data *Logging) 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 + "monitor-config.common-config.monitor.severity"); value.Exists() && !data.MonitorSeverity.IsNull() {
		data.MonitorSeverity = types.StringValue(value.String())
	} else {
		data.MonitorSeverity = types.StringNull()
	}
	if value := res.Get(prefix + "buffered.size-value"); value.Exists() && !data.BufferedSize.IsNull() {
		data.BufferedSize = types.Int64Value(value.Int())
	} else {
		data.BufferedSize = types.Int64Null()
	}
	if value := res.Get(prefix + "buffered.severity-level"); value.Exists() && !data.BufferedSeverity.IsNull() {
		data.BufferedSeverity = types.StringValue(value.String())
	} else {
		data.BufferedSeverity = types.StringNull()
	}
	if value := res.Get(prefix + "console-config.common-config.console.severity"); value.Exists() && !data.ConsoleSeverity.IsNull() {
		data.ConsoleSeverity = types.StringValue(value.String())
	} else {
		data.ConsoleSeverity = types.StringNull()
	}
	if value := res.Get(prefix + "facility"); value.Exists() && !data.Facility.IsNull() {
		data.Facility = types.StringValue(value.String())
	} else {
		data.Facility = types.StringNull()
	}
	if value := res.Get(prefix + "history.size"); value.Exists() && !data.HistorySize.IsNull() {
		data.HistorySize = types.Int64Value(value.Int())
	} else {
		data.HistorySize = types.Int64Null()
	}
	if value := res.Get(prefix + "history.severity-level"); value.Exists() && !data.HistorySeverity.IsNull() {
		data.HistorySeverity = types.StringValue(value.String())
	} else {
		data.HistorySeverity = types.StringNull()
	}
	if value := res.Get(prefix + "trap"); !data.Trap.IsNull() {
		if value.Exists() {
			data.Trap = types.BoolValue(true)
		} else {
			data.Trap = types.BoolValue(false)
		}
	} else {
		data.Trap = types.BoolNull()
	}
	if value := res.Get(prefix + "trap.severity"); value.Exists() && !data.TrapSeverity.IsNull() {
		data.TrapSeverity = types.StringValue(value.String())
	} else {
		data.TrapSeverity = types.StringNull()
	}
	if value := res.Get(prefix + "origin-id.type-value"); value.Exists() && !data.OriginIdType.IsNull() {
		data.OriginIdType = types.StringValue(value.String())
	} else {
		data.OriginIdType = types.StringNull()
	}
	if value := res.Get(prefix + "origin-id.string"); value.Exists() && !data.OriginIdName.IsNull() {
		data.OriginIdName = types.StringValue(value.String())
	} else {
		data.OriginIdName = types.StringNull()
	}
	if value := res.Get(prefix + "file.name"); value.Exists() && !data.FileName.IsNull() {
		data.FileName = types.StringValue(value.String())
	} else {
		data.FileName = types.StringNull()
	}
	if value := res.Get(prefix + "file.max-size"); value.Exists() && !data.FileMaxSize.IsNull() {
		data.FileMaxSize = types.Int64Value(value.Int())
	} else {
		data.FileMaxSize = types.Int64Null()
	}
	if value := res.Get(prefix + "file.min-size"); value.Exists() && !data.FileMinSize.IsNull() {
		data.FileMinSize = types.Int64Value(value.Int())
	} else {
		data.FileMinSize = types.Int64Null()
	}
	if value := res.Get(prefix + "file.severity"); value.Exists() && !data.FileSeverity.IsNull() {
		data.FileSeverity = types.StringValue(value.String())
	} else {
		data.FileSeverity = types.StringNull()
	}
	if value := res.Get(prefix + "source-interface-conf.interface-name-non-vrf"); value.Exists() && !data.SourceInterface.IsNull() {
		data.SourceInterface = types.StringValue(value.String())
	} else {
		data.SourceInterface = types.StringNull()
	}
	if value := res.Get(prefix + "console-config.console"); !data.Console.IsNull() {
		if value.Exists() {
			data.Console = types.BoolValue(value.Bool())
		}
	} else {
		data.Console = types.BoolNull()
	}
	for i := range data.SourceInterfacesVrf {
		keys := [...]string{"vrf"}
		keyValues := [...]string{data.SourceInterfacesVrf[i].Vrf.ValueString()}

		var r gjson.Result
		res.Get(prefix + "source-interface-conf.source-interface-vrf").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("vrf"); value.Exists() && !data.SourceInterfacesVrf[i].Vrf.IsNull() {
			data.SourceInterfacesVrf[i].Vrf = types.StringValue(value.String())
		} else {
			data.SourceInterfacesVrf[i].Vrf = types.StringNull()
		}
		if value := r.Get("interface-name"); value.Exists() && !data.SourceInterfacesVrf[i].InterfaceName.IsNull() {
			data.SourceInterfacesVrf[i].InterfaceName = types.StringValue(value.String())
		} else {
			data.SourceInterfacesVrf[i].InterfaceName = types.StringNull()
		}
	}
	for i := range data.Ipv4Hosts {
		keys := [...]string{"ipv4-host"}
		keyValues := [...]string{data.Ipv4Hosts[i].Ipv4Host.ValueString()}

		var r gjson.Result
		res.Get(prefix + "host.ipv4-host-list").ForEach(
			func(_, v gjson.Result) bool {
				found := false
				for ik := range keys {
					if v.Get(keys[ik]).String() == keyValues[ik] {
						found = true
						continue
					}
					found = false
					break
				}
				if found {
					r = v
					return false
				}
				return true
			},
		)
		if value := r.Get("ipv4-host"); value.Exists() && !data.Ipv4Hosts[i].Ipv4Host.IsNull() {
			data.Ipv4Hosts[i].Ipv4Host = types.StringValue(value.String())
		} else {
			data.Ipv4Hosts[i].Ipv4Host = types.StringNull()
		}
	}
	for i := range data.Ipv4HostsTransport {
		keys := [...]string{"ipv4-host"}
		keyValues := [...]string{data.Ipv4HostsTransport[i].Ipv4Host.ValueString()}

		var r gjson.Result
		res.Get(prefix + "host.ipv4-host-transport-list").ForEach(
			func(_, v gjson.Result) bool {
				found := false
				for ik := range keys {
					if v.Get(keys[ik]).String() == keyValues[ik] {
						found = true
						continue
					}
					found = false
					break
				}
				if found {
					r = v
					return false
				}
				return true
			},
		)
		if value := r.Get("ipv4-host"); value.Exists() && !data.Ipv4HostsTransport[i].Ipv4Host.IsNull() {
			data.Ipv4HostsTransport[i].Ipv4Host = types.StringValue(value.String())
		} else {
			data.Ipv4HostsTransport[i].Ipv4Host = types.StringNull()
		}
		for ci := range data.Ipv4HostsTransport[i].TransportUdpPorts {
			keys := [...]string{"port-number"}
			keyValues := [...]string{strconv.FormatInt(data.Ipv4HostsTransport[i].TransportUdpPorts[ci].PortNumber.ValueInt64(), 10)}

			var cr gjson.Result
			r.Get("transport.udp.port-config").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("port-number"); value.Exists() && !data.Ipv4HostsTransport[i].TransportUdpPorts[ci].PortNumber.IsNull() {
				data.Ipv4HostsTransport[i].TransportUdpPorts[ci].PortNumber = types.Int64Value(value.Int())
			} else {
				data.Ipv4HostsTransport[i].TransportUdpPorts[ci].PortNumber = types.Int64Null()
			}
		}
		for ci := range data.Ipv4HostsTransport[i].TransportTcpPorts {
			keys := [...]string{"port-number"}
			keyValues := [...]string{strconv.FormatInt(data.Ipv4HostsTransport[i].TransportTcpPorts[ci].PortNumber.ValueInt64(), 10)}

			var cr gjson.Result
			r.Get("transport.tcp.port-config").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("port-number"); value.Exists() && !data.Ipv4HostsTransport[i].TransportTcpPorts[ci].PortNumber.IsNull() {
				data.Ipv4HostsTransport[i].TransportTcpPorts[ci].PortNumber = types.Int64Value(value.Int())
			} else {
				data.Ipv4HostsTransport[i].TransportTcpPorts[ci].PortNumber = types.Int64Null()
			}
		}
		for ci := range data.Ipv4HostsTransport[i].TransportTlsPorts {
			keys := [...]string{"port-number"}
			keyValues := [...]string{strconv.FormatInt(data.Ipv4HostsTransport[i].TransportTlsPorts[ci].PortNumber.ValueInt64(), 10)}

			var cr gjson.Result
			r.Get("transport.tls.port").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("port-number"); value.Exists() && !data.Ipv4HostsTransport[i].TransportTlsPorts[ci].PortNumber.IsNull() {
				data.Ipv4HostsTransport[i].TransportTlsPorts[ci].PortNumber = types.Int64Value(value.Int())
			} else {
				data.Ipv4HostsTransport[i].TransportTlsPorts[ci].PortNumber = types.Int64Null()
			}
			if value := cr.Get("profile"); value.Exists() && !data.Ipv4HostsTransport[i].TransportTlsPorts[ci].Profile.IsNull() {
				data.Ipv4HostsTransport[i].TransportTlsPorts[ci].Profile = types.StringValue(value.String())
			} else {
				data.Ipv4HostsTransport[i].TransportTlsPorts[ci].Profile = types.StringNull()
			}
		}
	}
	for i := range data.Ipv4VrfHosts {
		keys := [...]string{"ipv4-host", "vrf"}
		keyValues := [...]string{data.Ipv4VrfHosts[i].Ipv4Host.ValueString(), data.Ipv4VrfHosts[i].Vrf.ValueString()}

		var r gjson.Result
		res.Get(prefix + "host.ipv4-host-vrf-list").ForEach(
			func(_, v gjson.Result) bool {
				found := false
				for ik := range keys {
					if v.Get(keys[ik]).String() == keyValues[ik] {
						found = true
						continue
					}
					found = false
					break
				}
				if found {
					r = v
					return false
				}
				return true
			},
		)
		if value := r.Get("ipv4-host"); value.Exists() && !data.Ipv4VrfHosts[i].Ipv4Host.IsNull() {
			data.Ipv4VrfHosts[i].Ipv4Host = types.StringValue(value.String())
		} else {
			data.Ipv4VrfHosts[i].Ipv4Host = types.StringNull()
		}
		if value := r.Get("vrf"); value.Exists() && !data.Ipv4VrfHosts[i].Vrf.IsNull() {
			data.Ipv4VrfHosts[i].Vrf = types.StringValue(value.String())
		} else {
			data.Ipv4VrfHosts[i].Vrf = types.StringNull()
		}
	}
	for i := range data.Ipv4VrfHostsTransport {
		keys := [...]string{"ipv4-host", "vrf"}
		keyValues := [...]string{data.Ipv4VrfHostsTransport[i].Ipv4Host.ValueString(), data.Ipv4VrfHostsTransport[i].Vrf.ValueString()}

		var r gjson.Result
		res.Get(prefix + "host.ipv4-host-vrf-transport-list").ForEach(
			func(_, v gjson.Result) bool {
				found := false
				for ik := range keys {
					if v.Get(keys[ik]).String() == keyValues[ik] {
						found = true
						continue
					}
					found = false
					break
				}
				if found {
					r = v
					return false
				}
				return true
			},
		)
		if value := r.Get("ipv4-host"); value.Exists() && !data.Ipv4VrfHostsTransport[i].Ipv4Host.IsNull() {
			data.Ipv4VrfHostsTransport[i].Ipv4Host = types.StringValue(value.String())
		} else {
			data.Ipv4VrfHostsTransport[i].Ipv4Host = types.StringNull()
		}
		if value := r.Get("vrf"); value.Exists() && !data.Ipv4VrfHostsTransport[i].Vrf.IsNull() {
			data.Ipv4VrfHostsTransport[i].Vrf = types.StringValue(value.String())
		} else {
			data.Ipv4VrfHostsTransport[i].Vrf = types.StringNull()
		}
		for ci := range data.Ipv4VrfHostsTransport[i].TransportUdpPorts {
			keys := [...]string{"port-number"}
			keyValues := [...]string{strconv.FormatInt(data.Ipv4VrfHostsTransport[i].TransportUdpPorts[ci].PortNumber.ValueInt64(), 10)}

			var cr gjson.Result
			r.Get("transport.udp.port-config").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("port-number"); value.Exists() && !data.Ipv4VrfHostsTransport[i].TransportUdpPorts[ci].PortNumber.IsNull() {
				data.Ipv4VrfHostsTransport[i].TransportUdpPorts[ci].PortNumber = types.Int64Value(value.Int())
			} else {
				data.Ipv4VrfHostsTransport[i].TransportUdpPorts[ci].PortNumber = types.Int64Null()
			}
		}
		for ci := range data.Ipv4VrfHostsTransport[i].TransportTcpPorts {
			keys := [...]string{"port-number"}
			keyValues := [...]string{strconv.FormatInt(data.Ipv4VrfHostsTransport[i].TransportTcpPorts[ci].PortNumber.ValueInt64(), 10)}

			var cr gjson.Result
			r.Get("transport.tcp.port-config").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("port-number"); value.Exists() && !data.Ipv4VrfHostsTransport[i].TransportTcpPorts[ci].PortNumber.IsNull() {
				data.Ipv4VrfHostsTransport[i].TransportTcpPorts[ci].PortNumber = types.Int64Value(value.Int())
			} else {
				data.Ipv4VrfHostsTransport[i].TransportTcpPorts[ci].PortNumber = types.Int64Null()
			}
		}
		for ci := range data.Ipv4VrfHostsTransport[i].TransportTlsPorts {
			keys := [...]string{"port-number"}
			keyValues := [...]string{strconv.FormatInt(data.Ipv4VrfHostsTransport[i].TransportTlsPorts[ci].PortNumber.ValueInt64(), 10)}

			var cr gjson.Result
			r.Get("transport.tls.port").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("port-number"); value.Exists() && !data.Ipv4VrfHostsTransport[i].TransportTlsPorts[ci].PortNumber.IsNull() {
				data.Ipv4VrfHostsTransport[i].TransportTlsPorts[ci].PortNumber = types.Int64Value(value.Int())
			} else {
				data.Ipv4VrfHostsTransport[i].TransportTlsPorts[ci].PortNumber = types.Int64Null()
			}
			if value := cr.Get("profile"); value.Exists() && !data.Ipv4VrfHostsTransport[i].TransportTlsPorts[ci].Profile.IsNull() {
				data.Ipv4VrfHostsTransport[i].TransportTlsPorts[ci].Profile = types.StringValue(value.String())
			} else {
				data.Ipv4VrfHostsTransport[i].TransportTlsPorts[ci].Profile = types.StringNull()
			}
		}
	}
	for i := range data.Ipv6Hosts {
		keys := [...]string{"ipv6-host"}
		keyValues := [...]string{data.Ipv6Hosts[i].Ipv6Host.ValueString()}

		var r gjson.Result
		res.Get(prefix + "host.ipv6.ipv6-host-list").ForEach(
			func(_, v gjson.Result) bool {
				found := false
				for ik := range keys {
					if v.Get(keys[ik]).String() == keyValues[ik] {
						found = true
						continue
					}
					found = false
					break
				}
				if found {
					r = v
					return false
				}
				return true
			},
		)
		if value := r.Get("ipv6-host"); value.Exists() && !data.Ipv6Hosts[i].Ipv6Host.IsNull() {
			data.Ipv6Hosts[i].Ipv6Host = types.StringValue(value.String())
		} else {
			data.Ipv6Hosts[i].Ipv6Host = types.StringNull()
		}
	}
	for i := range data.Ipv6HostsTransport {
		keys := [...]string{"ipv6-host"}
		keyValues := [...]string{data.Ipv6HostsTransport[i].Ipv6Host.ValueString()}

		var r gjson.Result
		res.Get(prefix + "host.ipv6.ipv6-host-transport-list").ForEach(
			func(_, v gjson.Result) bool {
				found := false
				for ik := range keys {
					if v.Get(keys[ik]).String() == keyValues[ik] {
						found = true
						continue
					}
					found = false
					break
				}
				if found {
					r = v
					return false
				}
				return true
			},
		)
		if value := r.Get("ipv6-host"); value.Exists() && !data.Ipv6HostsTransport[i].Ipv6Host.IsNull() {
			data.Ipv6HostsTransport[i].Ipv6Host = types.StringValue(value.String())
		} else {
			data.Ipv6HostsTransport[i].Ipv6Host = types.StringNull()
		}
		for ci := range data.Ipv6HostsTransport[i].TransportUdpPorts {
			keys := [...]string{"port-number"}
			keyValues := [...]string{strconv.FormatInt(data.Ipv6HostsTransport[i].TransportUdpPorts[ci].PortNumber.ValueInt64(), 10)}

			var cr gjson.Result
			r.Get("transport.udp.port-config").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("port-number"); value.Exists() && !data.Ipv6HostsTransport[i].TransportUdpPorts[ci].PortNumber.IsNull() {
				data.Ipv6HostsTransport[i].TransportUdpPorts[ci].PortNumber = types.Int64Value(value.Int())
			} else {
				data.Ipv6HostsTransport[i].TransportUdpPorts[ci].PortNumber = types.Int64Null()
			}
		}
		for ci := range data.Ipv6HostsTransport[i].TransportTcpPorts {
			keys := [...]string{"port-number"}
			keyValues := [...]string{strconv.FormatInt(data.Ipv6HostsTransport[i].TransportTcpPorts[ci].PortNumber.ValueInt64(), 10)}

			var cr gjson.Result
			r.Get("transport.tcp.port-config").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("port-number"); value.Exists() && !data.Ipv6HostsTransport[i].TransportTcpPorts[ci].PortNumber.IsNull() {
				data.Ipv6HostsTransport[i].TransportTcpPorts[ci].PortNumber = types.Int64Value(value.Int())
			} else {
				data.Ipv6HostsTransport[i].TransportTcpPorts[ci].PortNumber = types.Int64Null()
			}
		}
		for ci := range data.Ipv6HostsTransport[i].TransportTlsPorts {
			keys := [...]string{"port-number"}
			keyValues := [...]string{strconv.FormatInt(data.Ipv6HostsTransport[i].TransportTlsPorts[ci].PortNumber.ValueInt64(), 10)}

			var cr gjson.Result
			r.Get("transport.tls.port").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("port-number"); value.Exists() && !data.Ipv6HostsTransport[i].TransportTlsPorts[ci].PortNumber.IsNull() {
				data.Ipv6HostsTransport[i].TransportTlsPorts[ci].PortNumber = types.Int64Value(value.Int())
			} else {
				data.Ipv6HostsTransport[i].TransportTlsPorts[ci].PortNumber = types.Int64Null()
			}
			if value := cr.Get("profile"); value.Exists() && !data.Ipv6HostsTransport[i].TransportTlsPorts[ci].Profile.IsNull() {
				data.Ipv6HostsTransport[i].TransportTlsPorts[ci].Profile = types.StringValue(value.String())
			} else {
				data.Ipv6HostsTransport[i].TransportTlsPorts[ci].Profile = types.StringNull()
			}
		}
	}
	for i := range data.Ipv6VrfHosts {
		keys := [...]string{"ipv6-host", "vrf"}
		keyValues := [...]string{data.Ipv6VrfHosts[i].Ipv6Host.ValueString(), data.Ipv6VrfHosts[i].Vrf.ValueString()}

		var r gjson.Result
		res.Get(prefix + "host.ipv6.ipv6-host-vrf-list").ForEach(
			func(_, v gjson.Result) bool {
				found := false
				for ik := range keys {
					if v.Get(keys[ik]).String() == keyValues[ik] {
						found = true
						continue
					}
					found = false
					break
				}
				if found {
					r = v
					return false
				}
				return true
			},
		)
		if value := r.Get("ipv6-host"); value.Exists() && !data.Ipv6VrfHosts[i].Ipv6Host.IsNull() {
			data.Ipv6VrfHosts[i].Ipv6Host = types.StringValue(value.String())
		} else {
			data.Ipv6VrfHosts[i].Ipv6Host = types.StringNull()
		}
		if value := r.Get("vrf"); value.Exists() && !data.Ipv6VrfHosts[i].Vrf.IsNull() {
			data.Ipv6VrfHosts[i].Vrf = types.StringValue(value.String())
		} else {
			data.Ipv6VrfHosts[i].Vrf = types.StringNull()
		}
	}
	for i := range data.Ipv6VrfHostsTransport {
		keys := [...]string{"ipv6-host", "vrf"}
		keyValues := [...]string{data.Ipv6VrfHostsTransport[i].Ipv6Host.ValueString(), data.Ipv6VrfHostsTransport[i].Vrf.ValueString()}

		var r gjson.Result
		res.Get(prefix + "host.ipv6.ipv6-host-vrf-transport-list").ForEach(
			func(_, v gjson.Result) bool {
				found := false
				for ik := range keys {
					if v.Get(keys[ik]).String() == keyValues[ik] {
						found = true
						continue
					}
					found = false
					break
				}
				if found {
					r = v
					return false
				}
				return true
			},
		)
		if value := r.Get("ipv6-host"); value.Exists() && !data.Ipv6VrfHostsTransport[i].Ipv6Host.IsNull() {
			data.Ipv6VrfHostsTransport[i].Ipv6Host = types.StringValue(value.String())
		} else {
			data.Ipv6VrfHostsTransport[i].Ipv6Host = types.StringNull()
		}
		if value := r.Get("vrf"); value.Exists() && !data.Ipv6VrfHostsTransport[i].Vrf.IsNull() {
			data.Ipv6VrfHostsTransport[i].Vrf = types.StringValue(value.String())
		} else {
			data.Ipv6VrfHostsTransport[i].Vrf = types.StringNull()
		}
		for ci := range data.Ipv6VrfHostsTransport[i].TransportUdpPorts {
			keys := [...]string{"port-number"}
			keyValues := [...]string{strconv.FormatInt(data.Ipv6VrfHostsTransport[i].TransportUdpPorts[ci].PortNumber.ValueInt64(), 10)}

			var cr gjson.Result
			r.Get("transport.udp.port-config").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("port-number"); value.Exists() && !data.Ipv6VrfHostsTransport[i].TransportUdpPorts[ci].PortNumber.IsNull() {
				data.Ipv6VrfHostsTransport[i].TransportUdpPorts[ci].PortNumber = types.Int64Value(value.Int())
			} else {
				data.Ipv6VrfHostsTransport[i].TransportUdpPorts[ci].PortNumber = types.Int64Null()
			}
		}
		for ci := range data.Ipv6VrfHostsTransport[i].TransportTcpPorts {
			keys := [...]string{"port-number"}
			keyValues := [...]string{strconv.FormatInt(data.Ipv6VrfHostsTransport[i].TransportTcpPorts[ci].PortNumber.ValueInt64(), 10)}

			var cr gjson.Result
			r.Get("transport.tcp.port-config").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("port-number"); value.Exists() && !data.Ipv6VrfHostsTransport[i].TransportTcpPorts[ci].PortNumber.IsNull() {
				data.Ipv6VrfHostsTransport[i].TransportTcpPorts[ci].PortNumber = types.Int64Value(value.Int())
			} else {
				data.Ipv6VrfHostsTransport[i].TransportTcpPorts[ci].PortNumber = types.Int64Null()
			}
		}
		for ci := range data.Ipv6VrfHostsTransport[i].TransportTlsPorts {
			keys := [...]string{"port-number"}
			keyValues := [...]string{strconv.FormatInt(data.Ipv6VrfHostsTransport[i].TransportTlsPorts[ci].PortNumber.ValueInt64(), 10)}

			var cr gjson.Result
			r.Get("transport.tls.port").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("port-number"); value.Exists() && !data.Ipv6VrfHostsTransport[i].TransportTlsPorts[ci].PortNumber.IsNull() {
				data.Ipv6VrfHostsTransport[i].TransportTlsPorts[ci].PortNumber = types.Int64Value(value.Int())
			} else {
				data.Ipv6VrfHostsTransport[i].TransportTlsPorts[ci].PortNumber = types.Int64Null()
			}
			if value := cr.Get("profile"); value.Exists() && !data.Ipv6VrfHostsTransport[i].TransportTlsPorts[ci].Profile.IsNull() {
				data.Ipv6VrfHostsTransport[i].TransportTlsPorts[ci].Profile = types.StringValue(value.String())
			} else {
				data.Ipv6VrfHostsTransport[i].TransportTlsPorts[ci].Profile = types.StringNull()
			}
		}
	}
}

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

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

func (data *Logging) 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 + "monitor-config.common-config.monitor.severity"); value.Exists() {
		data.MonitorSeverity = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "buffered.size-value"); value.Exists() {
		data.BufferedSize = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "buffered.severity-level"); value.Exists() {
		data.BufferedSeverity = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "console-config.common-config.console.severity"); value.Exists() {
		data.ConsoleSeverity = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "facility"); value.Exists() {
		data.Facility = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "history.size"); value.Exists() {
		data.HistorySize = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "history.severity-level"); value.Exists() {
		data.HistorySeverity = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "trap"); value.Exists() {
		data.Trap = types.BoolValue(true)
	} else {
		data.Trap = types.BoolValue(false)
	}
	if value := res.Get(prefix + "trap.severity"); value.Exists() {
		data.TrapSeverity = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "origin-id.type-value"); value.Exists() {
		data.OriginIdType = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "origin-id.string"); value.Exists() {
		data.OriginIdName = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "file.name"); value.Exists() {
		data.FileName = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "file.max-size"); value.Exists() {
		data.FileMaxSize = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "file.min-size"); value.Exists() {
		data.FileMinSize = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "file.severity"); value.Exists() {
		data.FileSeverity = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "source-interface-conf.interface-name-non-vrf"); value.Exists() {
		data.SourceInterface = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "console-config.console"); value.Exists() {
		data.Console = types.BoolValue(value.Bool())
	} else {
		data.Console = types.BoolNull()
	}
	if value := res.Get(prefix + "source-interface-conf.source-interface-vrf"); value.Exists() {
		data.SourceInterfacesVrf = make([]LoggingSourceInterfacesVrf, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := LoggingSourceInterfacesVrf{}
			if cValue := v.Get("vrf"); cValue.Exists() {
				item.Vrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("interface-name"); cValue.Exists() {
				item.InterfaceName = types.StringValue(cValue.String())
			}
			data.SourceInterfacesVrf = append(data.SourceInterfacesVrf, item)
			return true
		})
	}
	if value := res.Get(prefix + "host.ipv4-host-list"); value.Exists() {
		data.Ipv4Hosts = make([]LoggingIpv4Hosts, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := LoggingIpv4Hosts{}
			if cValue := v.Get("ipv4-host"); cValue.Exists() {
				item.Ipv4Host = types.StringValue(cValue.String())
			}
			data.Ipv4Hosts = append(data.Ipv4Hosts, item)
			return true
		})
	}
	if value := res.Get(prefix + "host.ipv4-host-transport-list"); value.Exists() {
		data.Ipv4HostsTransport = make([]LoggingIpv4HostsTransport, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := LoggingIpv4HostsTransport{}
			if cValue := v.Get("ipv4-host"); cValue.Exists() {
				item.Ipv4Host = types.StringValue(cValue.String())
			}
			if cValue := v.Get("transport.udp.port-config"); cValue.Exists() {
				item.TransportUdpPorts = make([]LoggingIpv4HostsTransportTransportUdpPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv4HostsTransportTransportUdpPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					item.TransportUdpPorts = append(item.TransportUdpPorts, cItem)
					return true
				})
			}
			if cValue := v.Get("transport.tcp.port-config"); cValue.Exists() {
				item.TransportTcpPorts = make([]LoggingIpv4HostsTransportTransportTcpPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv4HostsTransportTransportTcpPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					item.TransportTcpPorts = append(item.TransportTcpPorts, cItem)
					return true
				})
			}
			if cValue := v.Get("transport.tls.port"); cValue.Exists() {
				item.TransportTlsPorts = make([]LoggingIpv4HostsTransportTransportTlsPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv4HostsTransportTransportTlsPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					if ccValue := cv.Get("profile"); ccValue.Exists() {
						cItem.Profile = types.StringValue(ccValue.String())
					}
					item.TransportTlsPorts = append(item.TransportTlsPorts, cItem)
					return true
				})
			}
			data.Ipv4HostsTransport = append(data.Ipv4HostsTransport, item)
			return true
		})
	}
	if value := res.Get(prefix + "host.ipv4-host-vrf-list"); value.Exists() {
		data.Ipv4VrfHosts = make([]LoggingIpv4VrfHosts, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := LoggingIpv4VrfHosts{}
			if cValue := v.Get("ipv4-host"); cValue.Exists() {
				item.Ipv4Host = types.StringValue(cValue.String())
			}
			if cValue := v.Get("vrf"); cValue.Exists() {
				item.Vrf = types.StringValue(cValue.String())
			}
			data.Ipv4VrfHosts = append(data.Ipv4VrfHosts, item)
			return true
		})
	}
	if value := res.Get(prefix + "host.ipv4-host-vrf-transport-list"); value.Exists() {
		data.Ipv4VrfHostsTransport = make([]LoggingIpv4VrfHostsTransport, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := LoggingIpv4VrfHostsTransport{}
			if cValue := v.Get("ipv4-host"); cValue.Exists() {
				item.Ipv4Host = types.StringValue(cValue.String())
			}
			if cValue := v.Get("vrf"); cValue.Exists() {
				item.Vrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("transport.udp.port-config"); cValue.Exists() {
				item.TransportUdpPorts = make([]LoggingIpv4VrfHostsTransportTransportUdpPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv4VrfHostsTransportTransportUdpPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					item.TransportUdpPorts = append(item.TransportUdpPorts, cItem)
					return true
				})
			}
			if cValue := v.Get("transport.tcp.port-config"); cValue.Exists() {
				item.TransportTcpPorts = make([]LoggingIpv4VrfHostsTransportTransportTcpPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv4VrfHostsTransportTransportTcpPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					item.TransportTcpPorts = append(item.TransportTcpPorts, cItem)
					return true
				})
			}
			if cValue := v.Get("transport.tls.port"); cValue.Exists() {
				item.TransportTlsPorts = make([]LoggingIpv4VrfHostsTransportTransportTlsPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv4VrfHostsTransportTransportTlsPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					if ccValue := cv.Get("profile"); ccValue.Exists() {
						cItem.Profile = types.StringValue(ccValue.String())
					}
					item.TransportTlsPorts = append(item.TransportTlsPorts, cItem)
					return true
				})
			}
			data.Ipv4VrfHostsTransport = append(data.Ipv4VrfHostsTransport, item)
			return true
		})
	}
	if value := res.Get(prefix + "host.ipv6.ipv6-host-list"); value.Exists() {
		data.Ipv6Hosts = make([]LoggingIpv6Hosts, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := LoggingIpv6Hosts{}
			if cValue := v.Get("ipv6-host"); cValue.Exists() {
				item.Ipv6Host = types.StringValue(cValue.String())
			}
			data.Ipv6Hosts = append(data.Ipv6Hosts, item)
			return true
		})
	}
	if value := res.Get(prefix + "host.ipv6.ipv6-host-transport-list"); value.Exists() {
		data.Ipv6HostsTransport = make([]LoggingIpv6HostsTransport, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := LoggingIpv6HostsTransport{}
			if cValue := v.Get("ipv6-host"); cValue.Exists() {
				item.Ipv6Host = types.StringValue(cValue.String())
			}
			if cValue := v.Get("transport.udp.port-config"); cValue.Exists() {
				item.TransportUdpPorts = make([]LoggingIpv6HostsTransportTransportUdpPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv6HostsTransportTransportUdpPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					item.TransportUdpPorts = append(item.TransportUdpPorts, cItem)
					return true
				})
			}
			if cValue := v.Get("transport.tcp.port-config"); cValue.Exists() {
				item.TransportTcpPorts = make([]LoggingIpv6HostsTransportTransportTcpPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv6HostsTransportTransportTcpPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					item.TransportTcpPorts = append(item.TransportTcpPorts, cItem)
					return true
				})
			}
			if cValue := v.Get("transport.tls.port"); cValue.Exists() {
				item.TransportTlsPorts = make([]LoggingIpv6HostsTransportTransportTlsPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv6HostsTransportTransportTlsPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					if ccValue := cv.Get("profile"); ccValue.Exists() {
						cItem.Profile = types.StringValue(ccValue.String())
					}
					item.TransportTlsPorts = append(item.TransportTlsPorts, cItem)
					return true
				})
			}
			data.Ipv6HostsTransport = append(data.Ipv6HostsTransport, item)
			return true
		})
	}
	if value := res.Get(prefix + "host.ipv6.ipv6-host-vrf-list"); value.Exists() {
		data.Ipv6VrfHosts = make([]LoggingIpv6VrfHosts, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := LoggingIpv6VrfHosts{}
			if cValue := v.Get("ipv6-host"); cValue.Exists() {
				item.Ipv6Host = types.StringValue(cValue.String())
			}
			if cValue := v.Get("vrf"); cValue.Exists() {
				item.Vrf = types.StringValue(cValue.String())
			}
			data.Ipv6VrfHosts = append(data.Ipv6VrfHosts, item)
			return true
		})
	}
	if value := res.Get(prefix + "host.ipv6.ipv6-host-vrf-transport-list"); value.Exists() {
		data.Ipv6VrfHostsTransport = make([]LoggingIpv6VrfHostsTransport, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := LoggingIpv6VrfHostsTransport{}
			if cValue := v.Get("ipv6-host"); cValue.Exists() {
				item.Ipv6Host = types.StringValue(cValue.String())
			}
			if cValue := v.Get("vrf"); cValue.Exists() {
				item.Vrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("transport.udp.port-config"); cValue.Exists() {
				item.TransportUdpPorts = make([]LoggingIpv6VrfHostsTransportTransportUdpPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv6VrfHostsTransportTransportUdpPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					item.TransportUdpPorts = append(item.TransportUdpPorts, cItem)
					return true
				})
			}
			if cValue := v.Get("transport.tcp.port-config"); cValue.Exists() {
				item.TransportTcpPorts = make([]LoggingIpv6VrfHostsTransportTransportTcpPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv6VrfHostsTransportTransportTcpPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					item.TransportTcpPorts = append(item.TransportTcpPorts, cItem)
					return true
				})
			}
			if cValue := v.Get("transport.tls.port"); cValue.Exists() {
				item.TransportTlsPorts = make([]LoggingIpv6VrfHostsTransportTransportTlsPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv6VrfHostsTransportTransportTlsPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					if ccValue := cv.Get("profile"); ccValue.Exists() {
						cItem.Profile = types.StringValue(ccValue.String())
					}
					item.TransportTlsPorts = append(item.TransportTlsPorts, cItem)
					return true
				})
			}
			data.Ipv6VrfHostsTransport = append(data.Ipv6VrfHostsTransport, item)
			return true
		})
	}
}

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

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

func (data *LoggingData) 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 + "monitor-config.common-config.monitor.severity"); value.Exists() {
		data.MonitorSeverity = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "buffered.size-value"); value.Exists() {
		data.BufferedSize = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "buffered.severity-level"); value.Exists() {
		data.BufferedSeverity = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "console-config.common-config.console.severity"); value.Exists() {
		data.ConsoleSeverity = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "facility"); value.Exists() {
		data.Facility = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "history.size"); value.Exists() {
		data.HistorySize = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "history.severity-level"); value.Exists() {
		data.HistorySeverity = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "trap"); value.Exists() {
		data.Trap = types.BoolValue(true)
	} else {
		data.Trap = types.BoolValue(false)
	}
	if value := res.Get(prefix + "trap.severity"); value.Exists() {
		data.TrapSeverity = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "origin-id.type-value"); value.Exists() {
		data.OriginIdType = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "origin-id.string"); value.Exists() {
		data.OriginIdName = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "file.name"); value.Exists() {
		data.FileName = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "file.max-size"); value.Exists() {
		data.FileMaxSize = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "file.min-size"); value.Exists() {
		data.FileMinSize = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "file.severity"); value.Exists() {
		data.FileSeverity = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "source-interface-conf.interface-name-non-vrf"); value.Exists() {
		data.SourceInterface = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "console-config.console"); value.Exists() {
		data.Console = types.BoolValue(value.Bool())
	} else {
		data.Console = types.BoolNull()
	}
	if value := res.Get(prefix + "source-interface-conf.source-interface-vrf"); value.Exists() {
		data.SourceInterfacesVrf = make([]LoggingSourceInterfacesVrf, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := LoggingSourceInterfacesVrf{}
			if cValue := v.Get("vrf"); cValue.Exists() {
				item.Vrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("interface-name"); cValue.Exists() {
				item.InterfaceName = types.StringValue(cValue.String())
			}
			data.SourceInterfacesVrf = append(data.SourceInterfacesVrf, item)
			return true
		})
	}
	if value := res.Get(prefix + "host.ipv4-host-list"); value.Exists() {
		data.Ipv4Hosts = make([]LoggingIpv4Hosts, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := LoggingIpv4Hosts{}
			if cValue := v.Get("ipv4-host"); cValue.Exists() {
				item.Ipv4Host = types.StringValue(cValue.String())
			}
			data.Ipv4Hosts = append(data.Ipv4Hosts, item)
			return true
		})
	}
	if value := res.Get(prefix + "host.ipv4-host-transport-list"); value.Exists() {
		data.Ipv4HostsTransport = make([]LoggingIpv4HostsTransport, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := LoggingIpv4HostsTransport{}
			if cValue := v.Get("ipv4-host"); cValue.Exists() {
				item.Ipv4Host = types.StringValue(cValue.String())
			}
			if cValue := v.Get("transport.udp.port-config"); cValue.Exists() {
				item.TransportUdpPorts = make([]LoggingIpv4HostsTransportTransportUdpPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv4HostsTransportTransportUdpPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					item.TransportUdpPorts = append(item.TransportUdpPorts, cItem)
					return true
				})
			}
			if cValue := v.Get("transport.tcp.port-config"); cValue.Exists() {
				item.TransportTcpPorts = make([]LoggingIpv4HostsTransportTransportTcpPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv4HostsTransportTransportTcpPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					item.TransportTcpPorts = append(item.TransportTcpPorts, cItem)
					return true
				})
			}
			if cValue := v.Get("transport.tls.port"); cValue.Exists() {
				item.TransportTlsPorts = make([]LoggingIpv4HostsTransportTransportTlsPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv4HostsTransportTransportTlsPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					if ccValue := cv.Get("profile"); ccValue.Exists() {
						cItem.Profile = types.StringValue(ccValue.String())
					}
					item.TransportTlsPorts = append(item.TransportTlsPorts, cItem)
					return true
				})
			}
			data.Ipv4HostsTransport = append(data.Ipv4HostsTransport, item)
			return true
		})
	}
	if value := res.Get(prefix + "host.ipv4-host-vrf-list"); value.Exists() {
		data.Ipv4VrfHosts = make([]LoggingIpv4VrfHosts, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := LoggingIpv4VrfHosts{}
			if cValue := v.Get("ipv4-host"); cValue.Exists() {
				item.Ipv4Host = types.StringValue(cValue.String())
			}
			if cValue := v.Get("vrf"); cValue.Exists() {
				item.Vrf = types.StringValue(cValue.String())
			}
			data.Ipv4VrfHosts = append(data.Ipv4VrfHosts, item)
			return true
		})
	}
	if value := res.Get(prefix + "host.ipv4-host-vrf-transport-list"); value.Exists() {
		data.Ipv4VrfHostsTransport = make([]LoggingIpv4VrfHostsTransport, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := LoggingIpv4VrfHostsTransport{}
			if cValue := v.Get("ipv4-host"); cValue.Exists() {
				item.Ipv4Host = types.StringValue(cValue.String())
			}
			if cValue := v.Get("vrf"); cValue.Exists() {
				item.Vrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("transport.udp.port-config"); cValue.Exists() {
				item.TransportUdpPorts = make([]LoggingIpv4VrfHostsTransportTransportUdpPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv4VrfHostsTransportTransportUdpPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					item.TransportUdpPorts = append(item.TransportUdpPorts, cItem)
					return true
				})
			}
			if cValue := v.Get("transport.tcp.port-config"); cValue.Exists() {
				item.TransportTcpPorts = make([]LoggingIpv4VrfHostsTransportTransportTcpPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv4VrfHostsTransportTransportTcpPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					item.TransportTcpPorts = append(item.TransportTcpPorts, cItem)
					return true
				})
			}
			if cValue := v.Get("transport.tls.port"); cValue.Exists() {
				item.TransportTlsPorts = make([]LoggingIpv4VrfHostsTransportTransportTlsPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv4VrfHostsTransportTransportTlsPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					if ccValue := cv.Get("profile"); ccValue.Exists() {
						cItem.Profile = types.StringValue(ccValue.String())
					}
					item.TransportTlsPorts = append(item.TransportTlsPorts, cItem)
					return true
				})
			}
			data.Ipv4VrfHostsTransport = append(data.Ipv4VrfHostsTransport, item)
			return true
		})
	}
	if value := res.Get(prefix + "host.ipv6.ipv6-host-list"); value.Exists() {
		data.Ipv6Hosts = make([]LoggingIpv6Hosts, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := LoggingIpv6Hosts{}
			if cValue := v.Get("ipv6-host"); cValue.Exists() {
				item.Ipv6Host = types.StringValue(cValue.String())
			}
			data.Ipv6Hosts = append(data.Ipv6Hosts, item)
			return true
		})
	}
	if value := res.Get(prefix + "host.ipv6.ipv6-host-transport-list"); value.Exists() {
		data.Ipv6HostsTransport = make([]LoggingIpv6HostsTransport, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := LoggingIpv6HostsTransport{}
			if cValue := v.Get("ipv6-host"); cValue.Exists() {
				item.Ipv6Host = types.StringValue(cValue.String())
			}
			if cValue := v.Get("transport.udp.port-config"); cValue.Exists() {
				item.TransportUdpPorts = make([]LoggingIpv6HostsTransportTransportUdpPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv6HostsTransportTransportUdpPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					item.TransportUdpPorts = append(item.TransportUdpPorts, cItem)
					return true
				})
			}
			if cValue := v.Get("transport.tcp.port-config"); cValue.Exists() {
				item.TransportTcpPorts = make([]LoggingIpv6HostsTransportTransportTcpPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv6HostsTransportTransportTcpPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					item.TransportTcpPorts = append(item.TransportTcpPorts, cItem)
					return true
				})
			}
			if cValue := v.Get("transport.tls.port"); cValue.Exists() {
				item.TransportTlsPorts = make([]LoggingIpv6HostsTransportTransportTlsPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv6HostsTransportTransportTlsPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					if ccValue := cv.Get("profile"); ccValue.Exists() {
						cItem.Profile = types.StringValue(ccValue.String())
					}
					item.TransportTlsPorts = append(item.TransportTlsPorts, cItem)
					return true
				})
			}
			data.Ipv6HostsTransport = append(data.Ipv6HostsTransport, item)
			return true
		})
	}
	if value := res.Get(prefix + "host.ipv6.ipv6-host-vrf-list"); value.Exists() {
		data.Ipv6VrfHosts = make([]LoggingIpv6VrfHosts, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := LoggingIpv6VrfHosts{}
			if cValue := v.Get("ipv6-host"); cValue.Exists() {
				item.Ipv6Host = types.StringValue(cValue.String())
			}
			if cValue := v.Get("vrf"); cValue.Exists() {
				item.Vrf = types.StringValue(cValue.String())
			}
			data.Ipv6VrfHosts = append(data.Ipv6VrfHosts, item)
			return true
		})
	}
	if value := res.Get(prefix + "host.ipv6.ipv6-host-vrf-transport-list"); value.Exists() {
		data.Ipv6VrfHostsTransport = make([]LoggingIpv6VrfHostsTransport, 0)
		value.ForEach(func(k, v gjson.Result) bool {
			item := LoggingIpv6VrfHostsTransport{}
			if cValue := v.Get("ipv6-host"); cValue.Exists() {
				item.Ipv6Host = types.StringValue(cValue.String())
			}
			if cValue := v.Get("vrf"); cValue.Exists() {
				item.Vrf = types.StringValue(cValue.String())
			}
			if cValue := v.Get("transport.udp.port-config"); cValue.Exists() {
				item.TransportUdpPorts = make([]LoggingIpv6VrfHostsTransportTransportUdpPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv6VrfHostsTransportTransportUdpPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					item.TransportUdpPorts = append(item.TransportUdpPorts, cItem)
					return true
				})
			}
			if cValue := v.Get("transport.tcp.port-config"); cValue.Exists() {
				item.TransportTcpPorts = make([]LoggingIpv6VrfHostsTransportTransportTcpPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv6VrfHostsTransportTransportTcpPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					item.TransportTcpPorts = append(item.TransportTcpPorts, cItem)
					return true
				})
			}
			if cValue := v.Get("transport.tls.port"); cValue.Exists() {
				item.TransportTlsPorts = make([]LoggingIpv6VrfHostsTransportTransportTlsPorts, 0)
				cValue.ForEach(func(ck, cv gjson.Result) bool {
					cItem := LoggingIpv6VrfHostsTransportTransportTlsPorts{}
					if ccValue := cv.Get("port-number"); ccValue.Exists() {
						cItem.PortNumber = types.Int64Value(ccValue.Int())
					}
					if ccValue := cv.Get("profile"); ccValue.Exists() {
						cItem.Profile = types.StringValue(ccValue.String())
					}
					item.TransportTlsPorts = append(item.TransportTlsPorts, cItem)
					return true
				})
			}
			data.Ipv6VrfHostsTransport = append(data.Ipv6VrfHostsTransport, item)
			return true
		})
	}
}

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

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

func (data *Logging) getDeletedItems(ctx context.Context, state Logging) []string {
	deletedItems := make([]string, 0)
	for i := range state.Ipv6VrfHostsTransport {
		stateKeyValues := [...]string{state.Ipv6VrfHostsTransport[i].Ipv6Host.ValueString(), state.Ipv6VrfHostsTransport[i].Vrf.ValueString()}

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

		found := false
		for j := range data.Ipv6VrfHostsTransport {
			found = true
			if state.Ipv6VrfHostsTransport[i].Ipv6Host.ValueString() != data.Ipv6VrfHostsTransport[j].Ipv6Host.ValueString() {
				found = false
			}
			if state.Ipv6VrfHostsTransport[i].Vrf.ValueString() != data.Ipv6VrfHostsTransport[j].Vrf.ValueString() {
				found = false
			}
			if found {
				for ci := range state.Ipv6VrfHostsTransport[i].TransportTlsPorts {
					cstateKeyValues := [...]string{strconv.FormatInt(state.Ipv6VrfHostsTransport[i].TransportTlsPorts[ci].PortNumber.ValueInt64(), 10)}

					cemptyKeys := true
					if !reflect.ValueOf(state.Ipv6VrfHostsTransport[i].TransportTlsPorts[ci].PortNumber.ValueInt64()).IsZero() {
						cemptyKeys = false
					}
					if cemptyKeys {
						continue
					}

					found := false
					for cj := range data.Ipv6VrfHostsTransport[j].TransportTlsPorts {
						found = true
						if state.Ipv6VrfHostsTransport[i].TransportTlsPorts[ci].PortNumber.ValueInt64() != data.Ipv6VrfHostsTransport[j].TransportTlsPorts[cj].PortNumber.ValueInt64() {
							found = false
						}
						if found {
							if !state.Ipv6VrfHostsTransport[i].TransportTlsPorts[ci].Profile.IsNull() && data.Ipv6VrfHostsTransport[j].TransportTlsPorts[cj].Profile.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv6/ipv6-host-vrf-transport-list=%v/transport/tls/port=%v/profile", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							break
						}
					}
					if !found {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv6/ipv6-host-vrf-transport-list=%v/transport/tls/port=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
					}
				}
				for ci := range state.Ipv6VrfHostsTransport[i].TransportTcpPorts {
					cstateKeyValues := [...]string{strconv.FormatInt(state.Ipv6VrfHostsTransport[i].TransportTcpPorts[ci].PortNumber.ValueInt64(), 10)}

					cemptyKeys := true
					if !reflect.ValueOf(state.Ipv6VrfHostsTransport[i].TransportTcpPorts[ci].PortNumber.ValueInt64()).IsZero() {
						cemptyKeys = false
					}
					if cemptyKeys {
						continue
					}

					found := false
					for cj := range data.Ipv6VrfHostsTransport[j].TransportTcpPorts {
						found = true
						if state.Ipv6VrfHostsTransport[i].TransportTcpPorts[ci].PortNumber.ValueInt64() != data.Ipv6VrfHostsTransport[j].TransportTcpPorts[cj].PortNumber.ValueInt64() {
							found = false
						}
						if found {
							break
						}
					}
					if !found {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv6/ipv6-host-vrf-transport-list=%v/transport/tcp/port-config=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
					}
				}
				for ci := range state.Ipv6VrfHostsTransport[i].TransportUdpPorts {
					cstateKeyValues := [...]string{strconv.FormatInt(state.Ipv6VrfHostsTransport[i].TransportUdpPorts[ci].PortNumber.ValueInt64(), 10)}

					cemptyKeys := true
					if !reflect.ValueOf(state.Ipv6VrfHostsTransport[i].TransportUdpPorts[ci].PortNumber.ValueInt64()).IsZero() {
						cemptyKeys = false
					}
					if cemptyKeys {
						continue
					}

					found := false
					for cj := range data.Ipv6VrfHostsTransport[j].TransportUdpPorts {
						found = true
						if state.Ipv6VrfHostsTransport[i].TransportUdpPorts[ci].PortNumber.ValueInt64() != data.Ipv6VrfHostsTransport[j].TransportUdpPorts[cj].PortNumber.ValueInt64() {
							found = false
						}
						if found {
							break
						}
					}
					if !found {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv6/ipv6-host-vrf-transport-list=%v/transport/udp/port-config=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
					}
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv6/ipv6-host-vrf-transport-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.Ipv6VrfHosts {
		stateKeyValues := [...]string{state.Ipv6VrfHosts[i].Ipv6Host.ValueString(), state.Ipv6VrfHosts[i].Vrf.ValueString()}

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

		found := false
		for j := range data.Ipv6VrfHosts {
			found = true
			if state.Ipv6VrfHosts[i].Ipv6Host.ValueString() != data.Ipv6VrfHosts[j].Ipv6Host.ValueString() {
				found = false
			}
			if state.Ipv6VrfHosts[i].Vrf.ValueString() != data.Ipv6VrfHosts[j].Vrf.ValueString() {
				found = false
			}
			if found {
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv6/ipv6-host-vrf-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.Ipv6HostsTransport {
		stateKeyValues := [...]string{state.Ipv6HostsTransport[i].Ipv6Host.ValueString()}

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

		found := false
		for j := range data.Ipv6HostsTransport {
			found = true
			if state.Ipv6HostsTransport[i].Ipv6Host.ValueString() != data.Ipv6HostsTransport[j].Ipv6Host.ValueString() {
				found = false
			}
			if found {
				for ci := range state.Ipv6HostsTransport[i].TransportTlsPorts {
					cstateKeyValues := [...]string{strconv.FormatInt(state.Ipv6HostsTransport[i].TransportTlsPorts[ci].PortNumber.ValueInt64(), 10)}

					cemptyKeys := true
					if !reflect.ValueOf(state.Ipv6HostsTransport[i].TransportTlsPorts[ci].PortNumber.ValueInt64()).IsZero() {
						cemptyKeys = false
					}
					if cemptyKeys {
						continue
					}

					found := false
					for cj := range data.Ipv6HostsTransport[j].TransportTlsPorts {
						found = true
						if state.Ipv6HostsTransport[i].TransportTlsPorts[ci].PortNumber.ValueInt64() != data.Ipv6HostsTransport[j].TransportTlsPorts[cj].PortNumber.ValueInt64() {
							found = false
						}
						if found {
							if !state.Ipv6HostsTransport[i].TransportTlsPorts[ci].Profile.IsNull() && data.Ipv6HostsTransport[j].TransportTlsPorts[cj].Profile.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv6/ipv6-host-transport-list=%v/transport/tls/port=%v/profile", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							break
						}
					}
					if !found {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv6/ipv6-host-transport-list=%v/transport/tls/port=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
					}
				}
				for ci := range state.Ipv6HostsTransport[i].TransportTcpPorts {
					cstateKeyValues := [...]string{strconv.FormatInt(state.Ipv6HostsTransport[i].TransportTcpPorts[ci].PortNumber.ValueInt64(), 10)}

					cemptyKeys := true
					if !reflect.ValueOf(state.Ipv6HostsTransport[i].TransportTcpPorts[ci].PortNumber.ValueInt64()).IsZero() {
						cemptyKeys = false
					}
					if cemptyKeys {
						continue
					}

					found := false
					for cj := range data.Ipv6HostsTransport[j].TransportTcpPorts {
						found = true
						if state.Ipv6HostsTransport[i].TransportTcpPorts[ci].PortNumber.ValueInt64() != data.Ipv6HostsTransport[j].TransportTcpPorts[cj].PortNumber.ValueInt64() {
							found = false
						}
						if found {
							break
						}
					}
					if !found {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv6/ipv6-host-transport-list=%v/transport/tcp/port-config=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
					}
				}
				for ci := range state.Ipv6HostsTransport[i].TransportUdpPorts {
					cstateKeyValues := [...]string{strconv.FormatInt(state.Ipv6HostsTransport[i].TransportUdpPorts[ci].PortNumber.ValueInt64(), 10)}

					cemptyKeys := true
					if !reflect.ValueOf(state.Ipv6HostsTransport[i].TransportUdpPorts[ci].PortNumber.ValueInt64()).IsZero() {
						cemptyKeys = false
					}
					if cemptyKeys {
						continue
					}

					found := false
					for cj := range data.Ipv6HostsTransport[j].TransportUdpPorts {
						found = true
						if state.Ipv6HostsTransport[i].TransportUdpPorts[ci].PortNumber.ValueInt64() != data.Ipv6HostsTransport[j].TransportUdpPorts[cj].PortNumber.ValueInt64() {
							found = false
						}
						if found {
							break
						}
					}
					if !found {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv6/ipv6-host-transport-list=%v/transport/udp/port-config=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
					}
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv6/ipv6-host-transport-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.Ipv6Hosts {
		stateKeyValues := [...]string{state.Ipv6Hosts[i].Ipv6Host.ValueString()}

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

		found := false
		for j := range data.Ipv6Hosts {
			found = true
			if state.Ipv6Hosts[i].Ipv6Host.ValueString() != data.Ipv6Hosts[j].Ipv6Host.ValueString() {
				found = false
			}
			if found {
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv6/ipv6-host-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.Ipv4VrfHostsTransport {
		stateKeyValues := [...]string{state.Ipv4VrfHostsTransport[i].Ipv4Host.ValueString(), state.Ipv4VrfHostsTransport[i].Vrf.ValueString()}

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

		found := false
		for j := range data.Ipv4VrfHostsTransport {
			found = true
			if state.Ipv4VrfHostsTransport[i].Ipv4Host.ValueString() != data.Ipv4VrfHostsTransport[j].Ipv4Host.ValueString() {
				found = false
			}
			if state.Ipv4VrfHostsTransport[i].Vrf.ValueString() != data.Ipv4VrfHostsTransport[j].Vrf.ValueString() {
				found = false
			}
			if found {
				for ci := range state.Ipv4VrfHostsTransport[i].TransportTlsPorts {
					cstateKeyValues := [...]string{strconv.FormatInt(state.Ipv4VrfHostsTransport[i].TransportTlsPorts[ci].PortNumber.ValueInt64(), 10)}

					cemptyKeys := true
					if !reflect.ValueOf(state.Ipv4VrfHostsTransport[i].TransportTlsPorts[ci].PortNumber.ValueInt64()).IsZero() {
						cemptyKeys = false
					}
					if cemptyKeys {
						continue
					}

					found := false
					for cj := range data.Ipv4VrfHostsTransport[j].TransportTlsPorts {
						found = true
						if state.Ipv4VrfHostsTransport[i].TransportTlsPorts[ci].PortNumber.ValueInt64() != data.Ipv4VrfHostsTransport[j].TransportTlsPorts[cj].PortNumber.ValueInt64() {
							found = false
						}
						if found {
							if !state.Ipv4VrfHostsTransport[i].TransportTlsPorts[ci].Profile.IsNull() && data.Ipv4VrfHostsTransport[j].TransportTlsPorts[cj].Profile.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv4-host-vrf-transport-list=%v/transport/tls/port=%v/profile", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							break
						}
					}
					if !found {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv4-host-vrf-transport-list=%v/transport/tls/port=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
					}
				}
				for ci := range state.Ipv4VrfHostsTransport[i].TransportTcpPorts {
					cstateKeyValues := [...]string{strconv.FormatInt(state.Ipv4VrfHostsTransport[i].TransportTcpPorts[ci].PortNumber.ValueInt64(), 10)}

					cemptyKeys := true
					if !reflect.ValueOf(state.Ipv4VrfHostsTransport[i].TransportTcpPorts[ci].PortNumber.ValueInt64()).IsZero() {
						cemptyKeys = false
					}
					if cemptyKeys {
						continue
					}

					found := false
					for cj := range data.Ipv4VrfHostsTransport[j].TransportTcpPorts {
						found = true
						if state.Ipv4VrfHostsTransport[i].TransportTcpPorts[ci].PortNumber.ValueInt64() != data.Ipv4VrfHostsTransport[j].TransportTcpPorts[cj].PortNumber.ValueInt64() {
							found = false
						}
						if found {
							break
						}
					}
					if !found {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv4-host-vrf-transport-list=%v/transport/tcp/port-config=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
					}
				}
				for ci := range state.Ipv4VrfHostsTransport[i].TransportUdpPorts {
					cstateKeyValues := [...]string{strconv.FormatInt(state.Ipv4VrfHostsTransport[i].TransportUdpPorts[ci].PortNumber.ValueInt64(), 10)}

					cemptyKeys := true
					if !reflect.ValueOf(state.Ipv4VrfHostsTransport[i].TransportUdpPorts[ci].PortNumber.ValueInt64()).IsZero() {
						cemptyKeys = false
					}
					if cemptyKeys {
						continue
					}

					found := false
					for cj := range data.Ipv4VrfHostsTransport[j].TransportUdpPorts {
						found = true
						if state.Ipv4VrfHostsTransport[i].TransportUdpPorts[ci].PortNumber.ValueInt64() != data.Ipv4VrfHostsTransport[j].TransportUdpPorts[cj].PortNumber.ValueInt64() {
							found = false
						}
						if found {
							break
						}
					}
					if !found {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv4-host-vrf-transport-list=%v/transport/udp/port-config=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
					}
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv4-host-vrf-transport-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.Ipv4VrfHosts {
		stateKeyValues := [...]string{state.Ipv4VrfHosts[i].Ipv4Host.ValueString(), state.Ipv4VrfHosts[i].Vrf.ValueString()}

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

		found := false
		for j := range data.Ipv4VrfHosts {
			found = true
			if state.Ipv4VrfHosts[i].Ipv4Host.ValueString() != data.Ipv4VrfHosts[j].Ipv4Host.ValueString() {
				found = false
			}
			if state.Ipv4VrfHosts[i].Vrf.ValueString() != data.Ipv4VrfHosts[j].Vrf.ValueString() {
				found = false
			}
			if found {
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv4-host-vrf-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.Ipv4HostsTransport {
		stateKeyValues := [...]string{state.Ipv4HostsTransport[i].Ipv4Host.ValueString()}

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

		found := false
		for j := range data.Ipv4HostsTransport {
			found = true
			if state.Ipv4HostsTransport[i].Ipv4Host.ValueString() != data.Ipv4HostsTransport[j].Ipv4Host.ValueString() {
				found = false
			}
			if found {
				for ci := range state.Ipv4HostsTransport[i].TransportTlsPorts {
					cstateKeyValues := [...]string{strconv.FormatInt(state.Ipv4HostsTransport[i].TransportTlsPorts[ci].PortNumber.ValueInt64(), 10)}

					cemptyKeys := true
					if !reflect.ValueOf(state.Ipv4HostsTransport[i].TransportTlsPorts[ci].PortNumber.ValueInt64()).IsZero() {
						cemptyKeys = false
					}
					if cemptyKeys {
						continue
					}

					found := false
					for cj := range data.Ipv4HostsTransport[j].TransportTlsPorts {
						found = true
						if state.Ipv4HostsTransport[i].TransportTlsPorts[ci].PortNumber.ValueInt64() != data.Ipv4HostsTransport[j].TransportTlsPorts[cj].PortNumber.ValueInt64() {
							found = false
						}
						if found {
							if !state.Ipv4HostsTransport[i].TransportTlsPorts[ci].Profile.IsNull() && data.Ipv4HostsTransport[j].TransportTlsPorts[cj].Profile.IsNull() {
								deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv4-host-transport-list=%v/transport/tls/port=%v/profile", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
							}
							break
						}
					}
					if !found {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv4-host-transport-list=%v/transport/tls/port=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
					}
				}
				for ci := range state.Ipv4HostsTransport[i].TransportTcpPorts {
					cstateKeyValues := [...]string{strconv.FormatInt(state.Ipv4HostsTransport[i].TransportTcpPorts[ci].PortNumber.ValueInt64(), 10)}

					cemptyKeys := true
					if !reflect.ValueOf(state.Ipv4HostsTransport[i].TransportTcpPorts[ci].PortNumber.ValueInt64()).IsZero() {
						cemptyKeys = false
					}
					if cemptyKeys {
						continue
					}

					found := false
					for cj := range data.Ipv4HostsTransport[j].TransportTcpPorts {
						found = true
						if state.Ipv4HostsTransport[i].TransportTcpPorts[ci].PortNumber.ValueInt64() != data.Ipv4HostsTransport[j].TransportTcpPorts[cj].PortNumber.ValueInt64() {
							found = false
						}
						if found {
							break
						}
					}
					if !found {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv4-host-transport-list=%v/transport/tcp/port-config=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
					}
				}
				for ci := range state.Ipv4HostsTransport[i].TransportUdpPorts {
					cstateKeyValues := [...]string{strconv.FormatInt(state.Ipv4HostsTransport[i].TransportUdpPorts[ci].PortNumber.ValueInt64(), 10)}

					cemptyKeys := true
					if !reflect.ValueOf(state.Ipv4HostsTransport[i].TransportUdpPorts[ci].PortNumber.ValueInt64()).IsZero() {
						cemptyKeys = false
					}
					if cemptyKeys {
						continue
					}

					found := false
					for cj := range data.Ipv4HostsTransport[j].TransportUdpPorts {
						found = true
						if state.Ipv4HostsTransport[i].TransportUdpPorts[ci].PortNumber.ValueInt64() != data.Ipv4HostsTransport[j].TransportUdpPorts[cj].PortNumber.ValueInt64() {
							found = false
						}
						if found {
							break
						}
					}
					if !found {
						deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv4-host-transport-list=%v/transport/udp/port-config=%v", state.getPath(), strings.Join(stateKeyValues[:], ","), strings.Join(cstateKeyValues[:], ",")))
					}
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv4-host-transport-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.Ipv4Hosts {
		stateKeyValues := [...]string{state.Ipv4Hosts[i].Ipv4Host.ValueString()}

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

		found := false
		for j := range data.Ipv4Hosts {
			found = true
			if state.Ipv4Hosts[i].Ipv4Host.ValueString() != data.Ipv4Hosts[j].Ipv4Host.ValueString() {
				found = false
			}
			if found {
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/host/ipv4-host-list=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	for i := range state.SourceInterfacesVrf {
		stateKeyValues := [...]string{state.SourceInterfacesVrf[i].Vrf.ValueString()}

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

		found := false
		for j := range data.SourceInterfacesVrf {
			found = true
			if state.SourceInterfacesVrf[i].Vrf.ValueString() != data.SourceInterfacesVrf[j].Vrf.ValueString() {
				found = false
			}
			if found {
				if !state.SourceInterfacesVrf[i].InterfaceName.IsNull() && data.SourceInterfacesVrf[j].InterfaceName.IsNull() {
					deletedItems = append(deletedItems, fmt.Sprintf("%v/source-interface-conf/source-interface-vrf=%v/interface-name", state.getPath(), strings.Join(stateKeyValues[:], ",")))
				}
				break
			}
		}
		if !found {
			deletedItems = append(deletedItems, fmt.Sprintf("%v/source-interface-conf/source-interface-vrf=%v", state.getPath(), strings.Join(stateKeyValues[:], ",")))
		}
	}
	if !state.Console.IsNull() && data.Console.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/console-config/console", state.getPath()))
	}
	if !state.SourceInterface.IsNull() && data.SourceInterface.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/source-interface-conf/interface-name-non-vrf", state.getPath()))
	}
	if !state.FileSeverity.IsNull() && data.FileSeverity.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/file/severity", state.getPath()))
	}
	if !state.FileMinSize.IsNull() && data.FileMinSize.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/file/min-size", state.getPath()))
	}
	if !state.FileMaxSize.IsNull() && data.FileMaxSize.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/file/max-size", state.getPath()))
	}
	if !state.FileName.IsNull() && data.FileName.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/file/name", state.getPath()))
	}
	if !state.OriginIdName.IsNull() && data.OriginIdName.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/origin-id/string", state.getPath()))
	}
	if !state.OriginIdType.IsNull() && data.OriginIdType.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/origin-id/type-value", state.getPath()))
	}
	if !state.TrapSeverity.IsNull() && data.TrapSeverity.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/trap/severity", state.getPath()))
	}
	if !state.Trap.IsNull() && data.Trap.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/trap", state.getPath()))
	}
	if !state.HistorySeverity.IsNull() && data.HistorySeverity.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/history/severity-level", state.getPath()))
	}
	if !state.HistorySize.IsNull() && data.HistorySize.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/history/size", state.getPath()))
	}
	if !state.Facility.IsNull() && data.Facility.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/facility", state.getPath()))
	}
	if !state.ConsoleSeverity.IsNull() && data.ConsoleSeverity.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/console-config/common-config/console/severity", state.getPath()))
	}
	if !state.BufferedSeverity.IsNull() && data.BufferedSeverity.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/buffered/severity-level", state.getPath()))
	}
	if !state.BufferedSize.IsNull() && data.BufferedSize.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/buffered/size-value", state.getPath()))
	}
	if !state.MonitorSeverity.IsNull() && data.MonitorSeverity.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/monitor-config/common-config/monitor/severity", state.getPath()))
	}

	return deletedItems
}

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

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

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

	if !data.Trap.IsNull() && !data.Trap.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/trap", data.getPath()))
	}

	return emptyLeafsDelete
}

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

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

func (data *Logging) getDeletePaths(ctx context.Context) []string {
	var deletePaths []string
	for i := range data.Ipv6VrfHostsTransport {
		keyValues := [...]string{data.Ipv6VrfHostsTransport[i].Ipv6Host.ValueString(), data.Ipv6VrfHostsTransport[i].Vrf.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/host/ipv6/ipv6-host-vrf-transport-list=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.Ipv6VrfHosts {
		keyValues := [...]string{data.Ipv6VrfHosts[i].Ipv6Host.ValueString(), data.Ipv6VrfHosts[i].Vrf.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/host/ipv6/ipv6-host-vrf-list=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.Ipv6HostsTransport {
		keyValues := [...]string{data.Ipv6HostsTransport[i].Ipv6Host.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/host/ipv6/ipv6-host-transport-list=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.Ipv6Hosts {
		keyValues := [...]string{data.Ipv6Hosts[i].Ipv6Host.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/host/ipv6/ipv6-host-list=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.Ipv4VrfHostsTransport {
		keyValues := [...]string{data.Ipv4VrfHostsTransport[i].Ipv4Host.ValueString(), data.Ipv4VrfHostsTransport[i].Vrf.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/host/ipv4-host-vrf-transport-list=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.Ipv4VrfHosts {
		keyValues := [...]string{data.Ipv4VrfHosts[i].Ipv4Host.ValueString(), data.Ipv4VrfHosts[i].Vrf.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/host/ipv4-host-vrf-list=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.Ipv4HostsTransport {
		keyValues := [...]string{data.Ipv4HostsTransport[i].Ipv4Host.ValueString()}

		deletePaths = append(deletePaths, fmt.Sprintf("%v/host/ipv4-host-transport-list=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	for i := range data.Ipv4Hosts {
		keyValues := [...]string{data.Ipv4Hosts[i].Ipv4Host.ValueString()}

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

		deletePaths = append(deletePaths, fmt.Sprintf("%v/source-interface-conf/source-interface-vrf=%v", data.getPath(), strings.Join(keyValues[:], ",")))
	}
	if !data.Console.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/console-config/console", data.getPath()))
	}
	if !data.SourceInterface.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/source-interface-conf/interface-name-non-vrf", data.getPath()))
	}
	if !data.FileSeverity.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/file/severity", data.getPath()))
	}
	if !data.FileMinSize.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/file/min-size", data.getPath()))
	}
	if !data.FileMaxSize.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/file/max-size", data.getPath()))
	}
	if !data.FileName.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/file/name", data.getPath()))
	}
	if !data.OriginIdName.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/origin-id/string", data.getPath()))
	}
	if !data.OriginIdType.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/origin-id/type-value", data.getPath()))
	}
	if !data.TrapSeverity.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/trap/severity", data.getPath()))
	}
	if !data.Trap.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/trap", data.getPath()))
	}
	if !data.HistorySeverity.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/history/severity-level", data.getPath()))
	}
	if !data.HistorySize.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/history/size", data.getPath()))
	}
	if !data.Facility.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/facility", data.getPath()))
	}
	if !data.ConsoleSeverity.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/console-config/common-config/console/severity", data.getPath()))
	}
	if !data.BufferedSeverity.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/buffered/severity-level", data.getPath()))
	}
	if !data.BufferedSize.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/buffered/size-value", data.getPath()))
	}
	if !data.MonitorSeverity.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/monitor-config/common-config/monitor/severity", data.getPath()))
	}

	return deletePaths
}

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