// 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"
	"regexp"
	"strconv"

	"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 VTP struct {
	Device                 types.String `tfsdk:"device"`
	Id                     types.String `tfsdk:"id"`
	DeleteMode             types.String `tfsdk:"delete_mode"`
	File                   types.String `tfsdk:"file"`
	Version                types.Int64  `tfsdk:"version"`
	Interface              types.String `tfsdk:"interface"`
	InterfaceOnly          types.Bool   `tfsdk:"interface_only"`
	Password               types.String `tfsdk:"password"`
	PasswordHidden         types.Bool   `tfsdk:"password_hidden"`
	PasswordSecret         types.Bool   `tfsdk:"password_secret"`
	Pruning                types.Bool   `tfsdk:"pruning"`
	Domain                 types.String `tfsdk:"domain"`
	ModeClient             types.Bool   `tfsdk:"mode_client"`
	ModeClientMst          types.Bool   `tfsdk:"mode_client_mst"`
	ModeClientUnknown      types.Bool   `tfsdk:"mode_client_unknown"`
	ModeClientVlan         types.Bool   `tfsdk:"mode_client_vlan"`
	ModeOff                types.Bool   `tfsdk:"mode_off"`
	ModeOffMst             types.Bool   `tfsdk:"mode_off_mst"`
	ModeOffUnknown         types.Bool   `tfsdk:"mode_off_unknown"`
	ModeOffVlan            types.Bool   `tfsdk:"mode_off_vlan"`
	ModeServer             types.Bool   `tfsdk:"mode_server"`
	ModeServerMst          types.Bool   `tfsdk:"mode_server_mst"`
	ModeServerUnknown      types.Bool   `tfsdk:"mode_server_unknown"`
	ModeServerVlan         types.Bool   `tfsdk:"mode_server_vlan"`
	ModeTransparent        types.Bool   `tfsdk:"mode_transparent"`
	ModeTransparentMst     types.Bool   `tfsdk:"mode_transparent_mst"`
	ModeTransparentUnknown types.Bool   `tfsdk:"mode_transparent_unknown"`
	ModeTransparentVlan    types.Bool   `tfsdk:"mode_transparent_vlan"`
}

type VTPData struct {
	Device                 types.String `tfsdk:"device"`
	Id                     types.String `tfsdk:"id"`
	File                   types.String `tfsdk:"file"`
	Version                types.Int64  `tfsdk:"version"`
	Interface              types.String `tfsdk:"interface"`
	InterfaceOnly          types.Bool   `tfsdk:"interface_only"`
	Password               types.String `tfsdk:"password"`
	PasswordHidden         types.Bool   `tfsdk:"password_hidden"`
	PasswordSecret         types.Bool   `tfsdk:"password_secret"`
	Pruning                types.Bool   `tfsdk:"pruning"`
	Domain                 types.String `tfsdk:"domain"`
	ModeClient             types.Bool   `tfsdk:"mode_client"`
	ModeClientMst          types.Bool   `tfsdk:"mode_client_mst"`
	ModeClientUnknown      types.Bool   `tfsdk:"mode_client_unknown"`
	ModeClientVlan         types.Bool   `tfsdk:"mode_client_vlan"`
	ModeOff                types.Bool   `tfsdk:"mode_off"`
	ModeOffMst             types.Bool   `tfsdk:"mode_off_mst"`
	ModeOffUnknown         types.Bool   `tfsdk:"mode_off_unknown"`
	ModeOffVlan            types.Bool   `tfsdk:"mode_off_vlan"`
	ModeServer             types.Bool   `tfsdk:"mode_server"`
	ModeServerMst          types.Bool   `tfsdk:"mode_server_mst"`
	ModeServerUnknown      types.Bool   `tfsdk:"mode_server_unknown"`
	ModeServerVlan         types.Bool   `tfsdk:"mode_server_vlan"`
	ModeTransparent        types.Bool   `tfsdk:"mode_transparent"`
	ModeTransparentMst     types.Bool   `tfsdk:"mode_transparent_mst"`
	ModeTransparentUnknown types.Bool   `tfsdk:"mode_transparent_unknown"`
	ModeTransparentVlan    types.Bool   `tfsdk:"mode_transparent_vlan"`
}

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

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

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

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

// if last path element has a key -> remove it
func (data VTP) 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 VTP) toBody(ctx context.Context) string {
	body := `{"` + helpers.LastElement(data.getPath()) + `":{}}`
	if !data.File.IsNull() && !data.File.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:file", data.File.ValueString())
	}
	if !data.Version.IsNull() && !data.Version.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:version", strconv.FormatInt(data.Version.ValueInt64(), 10))
	}
	if !data.Interface.IsNull() && !data.Interface.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:interface.interface-name", data.Interface.ValueString())
	}
	if !data.InterfaceOnly.IsNull() && !data.InterfaceOnly.IsUnknown() {
		if data.InterfaceOnly.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:interface.only", map[string]string{})
		}
	}
	if !data.Password.IsNull() && !data.Password.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:password.password", data.Password.ValueString())
	}
	if !data.PasswordHidden.IsNull() && !data.PasswordHidden.IsUnknown() {
		if data.PasswordHidden.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:password.hidden", map[string]string{})
		}
	}
	if !data.PasswordSecret.IsNull() && !data.PasswordSecret.IsUnknown() {
		if data.PasswordSecret.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:password.secret", map[string]string{})
		}
	}
	if !data.Pruning.IsNull() && !data.Pruning.IsUnknown() {
		if data.Pruning.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:pruning", map[string]string{})
		}
	}
	if !data.Domain.IsNull() && !data.Domain.IsUnknown() {
		body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:domain", data.Domain.ValueString())
	}
	if !data.ModeClient.IsNull() && !data.ModeClient.IsUnknown() {
		if data.ModeClient.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:mode.client", map[string]string{})
		}
	}
	if !data.ModeClientMst.IsNull() && !data.ModeClientMst.IsUnknown() {
		if data.ModeClientMst.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:mode.client.mst", map[string]string{})
		}
	}
	if !data.ModeClientUnknown.IsNull() && !data.ModeClientUnknown.IsUnknown() {
		if data.ModeClientUnknown.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:mode.client.unknown", map[string]string{})
		}
	}
	if !data.ModeClientVlan.IsNull() && !data.ModeClientVlan.IsUnknown() {
		if data.ModeClientVlan.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:mode.client.vlan", map[string]string{})
		}
	}
	if !data.ModeOff.IsNull() && !data.ModeOff.IsUnknown() {
		if data.ModeOff.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:mode.off", map[string]string{})
		}
	}
	if !data.ModeOffMst.IsNull() && !data.ModeOffMst.IsUnknown() {
		if data.ModeOffMst.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:mode.off.mst", map[string]string{})
		}
	}
	if !data.ModeOffUnknown.IsNull() && !data.ModeOffUnknown.IsUnknown() {
		if data.ModeOffUnknown.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:mode.off.unknown", map[string]string{})
		}
	}
	if !data.ModeOffVlan.IsNull() && !data.ModeOffVlan.IsUnknown() {
		if data.ModeOffVlan.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:mode.off.vlan", map[string]string{})
		}
	}
	if !data.ModeServer.IsNull() && !data.ModeServer.IsUnknown() {
		if data.ModeServer.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:mode.server", map[string]string{})
		}
	}
	if !data.ModeServerMst.IsNull() && !data.ModeServerMst.IsUnknown() {
		if data.ModeServerMst.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:mode.server.mst", map[string]string{})
		}
	}
	if !data.ModeServerUnknown.IsNull() && !data.ModeServerUnknown.IsUnknown() {
		if data.ModeServerUnknown.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:mode.server.unknown", map[string]string{})
		}
	}
	if !data.ModeServerVlan.IsNull() && !data.ModeServerVlan.IsUnknown() {
		if data.ModeServerVlan.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:mode.server.vlan", map[string]string{})
		}
	}
	if !data.ModeTransparent.IsNull() && !data.ModeTransparent.IsUnknown() {
		if data.ModeTransparent.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:mode.transparent", map[string]string{})
		}
	}
	if !data.ModeTransparentMst.IsNull() && !data.ModeTransparentMst.IsUnknown() {
		if data.ModeTransparentMst.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:mode.transparent.mst", map[string]string{})
		}
	}
	if !data.ModeTransparentUnknown.IsNull() && !data.ModeTransparentUnknown.IsUnknown() {
		if data.ModeTransparentUnknown.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:mode.transparent.unknown", map[string]string{})
		}
	}
	if !data.ModeTransparentVlan.IsNull() && !data.ModeTransparentVlan.IsUnknown() {
		if data.ModeTransparentVlan.ValueBool() {
			body, _ = sjson.Set(body, helpers.LastElement(data.getPath())+"."+"Cisco-IOS-XE-vtp:mode.transparent.vlan", map[string]string{})
		}
	}
	return body
}

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

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

func (data *VTP) 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 + "Cisco-IOS-XE-vtp:file"); value.Exists() && !data.File.IsNull() {
		data.File = types.StringValue(value.String())
	} else {
		data.File = types.StringNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:version"); value.Exists() && !data.Version.IsNull() {
		data.Version = types.Int64Value(value.Int())
	} else {
		data.Version = types.Int64Null()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:interface.interface-name"); value.Exists() && !data.Interface.IsNull() {
		data.Interface = types.StringValue(value.String())
	} else {
		data.Interface = types.StringNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:interface.only"); !data.InterfaceOnly.IsNull() {
		if value.Exists() {
			data.InterfaceOnly = types.BoolValue(true)
		} else {
			data.InterfaceOnly = types.BoolValue(false)
		}
	} else {
		data.InterfaceOnly = types.BoolNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:password.hidden"); !data.PasswordHidden.IsNull() {
		if value.Exists() {
			data.PasswordHidden = types.BoolValue(true)
		} else {
			data.PasswordHidden = types.BoolValue(false)
		}
	} else {
		data.PasswordHidden = types.BoolNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:pruning"); !data.Pruning.IsNull() {
		if value.Exists() {
			data.Pruning = types.BoolValue(true)
		} else {
			data.Pruning = types.BoolValue(false)
		}
	} else {
		data.Pruning = types.BoolNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:domain"); value.Exists() && !data.Domain.IsNull() {
		data.Domain = types.StringValue(value.String())
	} else {
		data.Domain = types.StringNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.client"); !data.ModeClient.IsNull() {
		if value.Exists() {
			data.ModeClient = types.BoolValue(true)
		} else {
			data.ModeClient = types.BoolValue(false)
		}
	} else {
		data.ModeClient = types.BoolNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.client.mst"); !data.ModeClientMst.IsNull() {
		if value.Exists() {
			data.ModeClientMst = types.BoolValue(true)
		} else {
			data.ModeClientMst = types.BoolValue(false)
		}
	} else {
		data.ModeClientMst = types.BoolNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.client.unknown"); !data.ModeClientUnknown.IsNull() {
		if value.Exists() {
			data.ModeClientUnknown = types.BoolValue(true)
		} else {
			data.ModeClientUnknown = types.BoolValue(false)
		}
	} else {
		data.ModeClientUnknown = types.BoolNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.client.vlan"); !data.ModeClientVlan.IsNull() {
		if value.Exists() {
			data.ModeClientVlan = types.BoolValue(true)
		} else {
			data.ModeClientVlan = types.BoolValue(false)
		}
	} else {
		data.ModeClientVlan = types.BoolNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.off"); !data.ModeOff.IsNull() {
		if value.Exists() {
			data.ModeOff = types.BoolValue(true)
		} else {
			data.ModeOff = types.BoolValue(false)
		}
	} else {
		data.ModeOff = types.BoolNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.off.mst"); !data.ModeOffMst.IsNull() {
		if value.Exists() {
			data.ModeOffMst = types.BoolValue(true)
		} else {
			data.ModeOffMst = types.BoolValue(false)
		}
	} else {
		data.ModeOffMst = types.BoolNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.off.unknown"); !data.ModeOffUnknown.IsNull() {
		if value.Exists() {
			data.ModeOffUnknown = types.BoolValue(true)
		} else {
			data.ModeOffUnknown = types.BoolValue(false)
		}
	} else {
		data.ModeOffUnknown = types.BoolNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.off.vlan"); !data.ModeOffVlan.IsNull() {
		if value.Exists() {
			data.ModeOffVlan = types.BoolValue(true)
		} else {
			data.ModeOffVlan = types.BoolValue(false)
		}
	} else {
		data.ModeOffVlan = types.BoolNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.server"); !data.ModeServer.IsNull() {
		if value.Exists() {
			data.ModeServer = types.BoolValue(true)
		} else {
			data.ModeServer = types.BoolValue(false)
		}
	} else {
		data.ModeServer = types.BoolNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.server.mst"); !data.ModeServerMst.IsNull() {
		if value.Exists() {
			data.ModeServerMst = types.BoolValue(true)
		} else {
			data.ModeServerMst = types.BoolValue(false)
		}
	} else {
		data.ModeServerMst = types.BoolNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.server.unknown"); !data.ModeServerUnknown.IsNull() {
		if value.Exists() {
			data.ModeServerUnknown = types.BoolValue(true)
		} else {
			data.ModeServerUnknown = types.BoolValue(false)
		}
	} else {
		data.ModeServerUnknown = types.BoolNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.server.vlan"); !data.ModeServerVlan.IsNull() {
		if value.Exists() {
			data.ModeServerVlan = types.BoolValue(true)
		} else {
			data.ModeServerVlan = types.BoolValue(false)
		}
	} else {
		data.ModeServerVlan = types.BoolNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.transparent"); !data.ModeTransparent.IsNull() {
		if value.Exists() {
			data.ModeTransparent = types.BoolValue(true)
		} else {
			data.ModeTransparent = types.BoolValue(false)
		}
	} else {
		data.ModeTransparent = types.BoolNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.transparent.mst"); !data.ModeTransparentMst.IsNull() {
		if value.Exists() {
			data.ModeTransparentMst = types.BoolValue(true)
		} else {
			data.ModeTransparentMst = types.BoolValue(false)
		}
	} else {
		data.ModeTransparentMst = types.BoolNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.transparent.unknown"); !data.ModeTransparentUnknown.IsNull() {
		if value.Exists() {
			data.ModeTransparentUnknown = types.BoolValue(true)
		} else {
			data.ModeTransparentUnknown = types.BoolValue(false)
		}
	} else {
		data.ModeTransparentUnknown = types.BoolNull()
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.transparent.vlan"); !data.ModeTransparentVlan.IsNull() {
		if value.Exists() {
			data.ModeTransparentVlan = types.BoolValue(true)
		} else {
			data.ModeTransparentVlan = types.BoolValue(false)
		}
	} else {
		data.ModeTransparentVlan = types.BoolNull()
	}
}

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

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

func (data *VTP) fromBody(ctx context.Context, res gjson.Result) {
	prefix := helpers.LastElement(data.getPath()) + "."
	if res.Get(helpers.LastElement(data.getPath())).IsArray() {
		prefix += "0."
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:file"); value.Exists() {
		data.File = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:version"); value.Exists() {
		data.Version = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:interface.interface-name"); value.Exists() {
		data.Interface = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:interface.only"); value.Exists() {
		data.InterfaceOnly = types.BoolValue(true)
	} else {
		data.InterfaceOnly = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:password.password"); value.Exists() {
		data.Password = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:password.hidden"); value.Exists() {
		data.PasswordHidden = types.BoolValue(true)
	} else {
		data.PasswordHidden = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:password.secret"); value.Exists() {
		data.PasswordSecret = types.BoolValue(true)
	} else {
		data.PasswordSecret = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:pruning"); value.Exists() {
		data.Pruning = types.BoolValue(true)
	} else {
		data.Pruning = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:domain"); value.Exists() {
		data.Domain = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.client"); value.Exists() {
		data.ModeClient = types.BoolValue(true)
	} else {
		data.ModeClient = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.client.mst"); value.Exists() {
		data.ModeClientMst = types.BoolValue(true)
	} else {
		data.ModeClientMst = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.client.unknown"); value.Exists() {
		data.ModeClientUnknown = types.BoolValue(true)
	} else {
		data.ModeClientUnknown = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.client.vlan"); value.Exists() {
		data.ModeClientVlan = types.BoolValue(true)
	} else {
		data.ModeClientVlan = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.off"); value.Exists() {
		data.ModeOff = types.BoolValue(true)
	} else {
		data.ModeOff = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.off.mst"); value.Exists() {
		data.ModeOffMst = types.BoolValue(true)
	} else {
		data.ModeOffMst = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.off.unknown"); value.Exists() {
		data.ModeOffUnknown = types.BoolValue(true)
	} else {
		data.ModeOffUnknown = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.off.vlan"); value.Exists() {
		data.ModeOffVlan = types.BoolValue(true)
	} else {
		data.ModeOffVlan = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.server"); value.Exists() {
		data.ModeServer = types.BoolValue(true)
	} else {
		data.ModeServer = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.server.mst"); value.Exists() {
		data.ModeServerMst = types.BoolValue(true)
	} else {
		data.ModeServerMst = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.server.unknown"); value.Exists() {
		data.ModeServerUnknown = types.BoolValue(true)
	} else {
		data.ModeServerUnknown = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.server.vlan"); value.Exists() {
		data.ModeServerVlan = types.BoolValue(true)
	} else {
		data.ModeServerVlan = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.transparent"); value.Exists() {
		data.ModeTransparent = types.BoolValue(true)
	} else {
		data.ModeTransparent = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.transparent.mst"); value.Exists() {
		data.ModeTransparentMst = types.BoolValue(true)
	} else {
		data.ModeTransparentMst = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.transparent.unknown"); value.Exists() {
		data.ModeTransparentUnknown = types.BoolValue(true)
	} else {
		data.ModeTransparentUnknown = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.transparent.vlan"); value.Exists() {
		data.ModeTransparentVlan = types.BoolValue(true)
	} else {
		data.ModeTransparentVlan = types.BoolValue(false)
	}
}

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

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

func (data *VTPData) fromBody(ctx context.Context, res gjson.Result) {
	prefix := helpers.LastElement(data.getPath()) + "."
	if res.Get(helpers.LastElement(data.getPath())).IsArray() {
		prefix += "0."
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:file"); value.Exists() {
		data.File = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:version"); value.Exists() {
		data.Version = types.Int64Value(value.Int())
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:interface.interface-name"); value.Exists() {
		data.Interface = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:interface.only"); value.Exists() {
		data.InterfaceOnly = types.BoolValue(true)
	} else {
		data.InterfaceOnly = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:password.password"); value.Exists() {
		data.Password = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:password.hidden"); value.Exists() {
		data.PasswordHidden = types.BoolValue(true)
	} else {
		data.PasswordHidden = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:password.secret"); value.Exists() {
		data.PasswordSecret = types.BoolValue(true)
	} else {
		data.PasswordSecret = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:pruning"); value.Exists() {
		data.Pruning = types.BoolValue(true)
	} else {
		data.Pruning = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:domain"); value.Exists() {
		data.Domain = types.StringValue(value.String())
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.client"); value.Exists() {
		data.ModeClient = types.BoolValue(true)
	} else {
		data.ModeClient = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.client.mst"); value.Exists() {
		data.ModeClientMst = types.BoolValue(true)
	} else {
		data.ModeClientMst = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.client.unknown"); value.Exists() {
		data.ModeClientUnknown = types.BoolValue(true)
	} else {
		data.ModeClientUnknown = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.client.vlan"); value.Exists() {
		data.ModeClientVlan = types.BoolValue(true)
	} else {
		data.ModeClientVlan = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.off"); value.Exists() {
		data.ModeOff = types.BoolValue(true)
	} else {
		data.ModeOff = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.off.mst"); value.Exists() {
		data.ModeOffMst = types.BoolValue(true)
	} else {
		data.ModeOffMst = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.off.unknown"); value.Exists() {
		data.ModeOffUnknown = types.BoolValue(true)
	} else {
		data.ModeOffUnknown = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.off.vlan"); value.Exists() {
		data.ModeOffVlan = types.BoolValue(true)
	} else {
		data.ModeOffVlan = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.server"); value.Exists() {
		data.ModeServer = types.BoolValue(true)
	} else {
		data.ModeServer = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.server.mst"); value.Exists() {
		data.ModeServerMst = types.BoolValue(true)
	} else {
		data.ModeServerMst = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.server.unknown"); value.Exists() {
		data.ModeServerUnknown = types.BoolValue(true)
	} else {
		data.ModeServerUnknown = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.server.vlan"); value.Exists() {
		data.ModeServerVlan = types.BoolValue(true)
	} else {
		data.ModeServerVlan = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.transparent"); value.Exists() {
		data.ModeTransparent = types.BoolValue(true)
	} else {
		data.ModeTransparent = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.transparent.mst"); value.Exists() {
		data.ModeTransparentMst = types.BoolValue(true)
	} else {
		data.ModeTransparentMst = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.transparent.unknown"); value.Exists() {
		data.ModeTransparentUnknown = types.BoolValue(true)
	} else {
		data.ModeTransparentUnknown = types.BoolValue(false)
	}
	if value := res.Get(prefix + "Cisco-IOS-XE-vtp:mode.transparent.vlan"); value.Exists() {
		data.ModeTransparentVlan = types.BoolValue(true)
	} else {
		data.ModeTransparentVlan = types.BoolValue(false)
	}
}

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

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

func (data *VTP) getDeletedItems(ctx context.Context, state VTP) []string {
	deletedItems := make([]string, 0)
	if !state.ModeTransparentVlan.IsNull() && data.ModeTransparentVlan.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/transparent/vlan", state.getPath()))
	}
	if !state.ModeTransparentUnknown.IsNull() && data.ModeTransparentUnknown.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/transparent/unknown", state.getPath()))
	}
	if !state.ModeTransparentMst.IsNull() && data.ModeTransparentMst.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/transparent/mst", state.getPath()))
	}
	if !state.ModeTransparent.IsNull() && data.ModeTransparent.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/transparent", state.getPath()))
	}
	if !state.ModeServerVlan.IsNull() && data.ModeServerVlan.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/server/vlan", state.getPath()))
	}
	if !state.ModeServerUnknown.IsNull() && data.ModeServerUnknown.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/server/unknown", state.getPath()))
	}
	if !state.ModeServerMst.IsNull() && data.ModeServerMst.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/server/mst", state.getPath()))
	}
	if !state.ModeServer.IsNull() && data.ModeServer.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/server", state.getPath()))
	}
	if !state.ModeOffVlan.IsNull() && data.ModeOffVlan.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/off/vlan", state.getPath()))
	}
	if !state.ModeOffUnknown.IsNull() && data.ModeOffUnknown.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/off/unknown", state.getPath()))
	}
	if !state.ModeOffMst.IsNull() && data.ModeOffMst.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/off/mst", state.getPath()))
	}
	if !state.ModeOff.IsNull() && data.ModeOff.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/off", state.getPath()))
	}
	if !state.ModeClientVlan.IsNull() && data.ModeClientVlan.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/client/vlan", state.getPath()))
	}
	if !state.ModeClientUnknown.IsNull() && data.ModeClientUnknown.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/client/unknown", state.getPath()))
	}
	if !state.ModeClientMst.IsNull() && data.ModeClientMst.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/client/mst", state.getPath()))
	}
	if !state.ModeClient.IsNull() && data.ModeClient.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/client", state.getPath()))
	}
	if !state.Pruning.IsNull() && data.Pruning.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:pruning", state.getPath()))
	}
	if !state.PasswordSecret.IsNull() && data.PasswordSecret.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:password/secret", state.getPath()))
	}
	if !state.PasswordHidden.IsNull() && data.PasswordHidden.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:password/hidden", state.getPath()))
	}
	if !state.Password.IsNull() && data.Password.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:password/password", state.getPath()))
	}
	if !state.InterfaceOnly.IsNull() && data.InterfaceOnly.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:interface/only", state.getPath()))
	}
	if !state.Interface.IsNull() && data.Interface.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:interface/interface-name", state.getPath()))
	}
	if !state.File.IsNull() && data.File.IsNull() {
		deletedItems = append(deletedItems, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:file", state.getPath()))
	}

	return deletedItems
}

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

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

func (data *VTP) getEmptyLeafsDelete(ctx context.Context) []string {
	emptyLeafsDelete := make([]string, 0)
	if !data.ModeTransparentVlan.IsNull() && !data.ModeTransparentVlan.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/transparent/vlan", data.getPath()))
	}
	if !data.ModeTransparentUnknown.IsNull() && !data.ModeTransparentUnknown.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/transparent/unknown", data.getPath()))
	}
	if !data.ModeTransparentMst.IsNull() && !data.ModeTransparentMst.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/transparent/mst", data.getPath()))
	}
	if !data.ModeTransparent.IsNull() && !data.ModeTransparent.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/transparent", data.getPath()))
	}
	if !data.ModeServerVlan.IsNull() && !data.ModeServerVlan.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/server/vlan", data.getPath()))
	}
	if !data.ModeServerUnknown.IsNull() && !data.ModeServerUnknown.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/server/unknown", data.getPath()))
	}
	if !data.ModeServerMst.IsNull() && !data.ModeServerMst.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/server/mst", data.getPath()))
	}
	if !data.ModeServer.IsNull() && !data.ModeServer.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/server", data.getPath()))
	}
	if !data.ModeOffVlan.IsNull() && !data.ModeOffVlan.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/off/vlan", data.getPath()))
	}
	if !data.ModeOffUnknown.IsNull() && !data.ModeOffUnknown.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/off/unknown", data.getPath()))
	}
	if !data.ModeOffMst.IsNull() && !data.ModeOffMst.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/off/mst", data.getPath()))
	}
	if !data.ModeOff.IsNull() && !data.ModeOff.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/off", data.getPath()))
	}
	if !data.ModeClientVlan.IsNull() && !data.ModeClientVlan.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/client/vlan", data.getPath()))
	}
	if !data.ModeClientUnknown.IsNull() && !data.ModeClientUnknown.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/client/unknown", data.getPath()))
	}
	if !data.ModeClientMst.IsNull() && !data.ModeClientMst.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/client/mst", data.getPath()))
	}
	if !data.ModeClient.IsNull() && !data.ModeClient.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/client", data.getPath()))
	}
	if !data.Pruning.IsNull() && !data.Pruning.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:pruning", data.getPath()))
	}
	if !data.PasswordSecret.IsNull() && !data.PasswordSecret.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:password/secret", data.getPath()))
	}
	if !data.PasswordHidden.IsNull() && !data.PasswordHidden.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:password/hidden", data.getPath()))
	}
	if !data.InterfaceOnly.IsNull() && !data.InterfaceOnly.ValueBool() {
		emptyLeafsDelete = append(emptyLeafsDelete, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:interface/only", data.getPath()))
	}

	return emptyLeafsDelete
}

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

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

func (data *VTP) getDeletePaths(ctx context.Context) []string {
	var deletePaths []string
	if !data.ModeTransparentVlan.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/transparent/vlan", data.getPath()))
	}
	if !data.ModeTransparentUnknown.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/transparent/unknown", data.getPath()))
	}
	if !data.ModeTransparentMst.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/transparent/mst", data.getPath()))
	}
	if !data.ModeTransparent.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/transparent", data.getPath()))
	}
	if !data.ModeServerVlan.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/server/vlan", data.getPath()))
	}
	if !data.ModeServerUnknown.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/server/unknown", data.getPath()))
	}
	if !data.ModeServerMst.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/server/mst", data.getPath()))
	}
	if !data.ModeServer.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/server", data.getPath()))
	}
	if !data.ModeOffVlan.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/off/vlan", data.getPath()))
	}
	if !data.ModeOffUnknown.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/off/unknown", data.getPath()))
	}
	if !data.ModeOffMst.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/off/mst", data.getPath()))
	}
	if !data.ModeOff.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/off", data.getPath()))
	}
	if !data.ModeClientVlan.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/client/vlan", data.getPath()))
	}
	if !data.ModeClientUnknown.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/client/unknown", data.getPath()))
	}
	if !data.ModeClientMst.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/client/mst", data.getPath()))
	}
	if !data.ModeClient.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:mode/client", data.getPath()))
	}
	if !data.Pruning.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:pruning", data.getPath()))
	}
	if !data.PasswordSecret.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:password/secret", data.getPath()))
	}
	if !data.PasswordHidden.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:password/hidden", data.getPath()))
	}
	if !data.Password.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:password/password", data.getPath()))
	}
	if !data.InterfaceOnly.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:interface/only", data.getPath()))
	}
	if !data.Interface.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:interface/interface-name", data.getPath()))
	}
	if !data.File.IsNull() {
		deletePaths = append(deletePaths, fmt.Sprintf("%v/Cisco-IOS-XE-vtp:file", data.getPath()))
	}

	return deletePaths
}

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