// Code generated by "gen/generator.go"; DO NOT EDIT.
// In order to regenerate this file execute `go generate` from the repository root.
// More details can be found in the [README](https://github.com/CiscoDevNet/terraform-provider-aci/blob/master/README.md).

package provider

import (
	"context"
	"encoding/json"
	"fmt"

	customTypes "github.com/CiscoDevNet/terraform-provider-aci/v2/internal/custom_types"
	"github.com/CiscoDevNet/terraform-provider-aci/v2/internal/validators"
	"github.com/ciscoecosystem/aci-go-client/v2/client"
	"github.com/ciscoecosystem/aci-go-client/v2/container"
	"github.com/hashicorp/terraform-plugin-framework-validators/setvalidator"
	"github.com/hashicorp/terraform-plugin-framework-validators/stringvalidator"
	"github.com/hashicorp/terraform-plugin-framework/attr"
	"github.com/hashicorp/terraform-plugin-framework/diag"
	"github.com/hashicorp/terraform-plugin-framework/path"
	"github.com/hashicorp/terraform-plugin-framework/resource"
	"github.com/hashicorp/terraform-plugin-framework/resource/schema"
	"github.com/hashicorp/terraform-plugin-framework/resource/schema/objectplanmodifier"
	"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
	"github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier"
	"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringdefault"
	"github.com/hashicorp/terraform-plugin-framework/resource/schema/stringplanmodifier"
	"github.com/hashicorp/terraform-plugin-framework/schema/validator"
	"github.com/hashicorp/terraform-plugin-framework/types"
	"github.com/hashicorp/terraform-plugin-framework/types/basetypes"
	"github.com/hashicorp/terraform-plugin-log/tflog"
)

// Ensure provider defined types fully satisfy framework interfaces.
var _ resource.Resource = &FvAEPgResource{}
var _ resource.ResourceWithImportState = &FvAEPgResource{}

func NewFvAEPgResource() resource.Resource {
	return &FvAEPgResource{}
}

// FvAEPgResource defines the resource implementation.
type FvAEPgResource struct {
	client *client.Client
}

// FvAEPgResourceModel describes the resource data model.
type FvAEPgResourceModel struct {
	Id                              types.String                      `tfsdk:"id"`
	ParentDn                        types.String                      `tfsdk:"parent_dn"`
	Annotation                      types.String                      `tfsdk:"annotation"`
	Descr                           types.String                      `tfsdk:"description"`
	ExceptionTag                    types.String                      `tfsdk:"contract_exception_tag"`
	FloodOnEncap                    types.String                      `tfsdk:"flood_in_encapsulation"`
	FwdCtrl                         types.String                      `tfsdk:"forwarding_control"`
	HasMcastSource                  types.String                      `tfsdk:"has_multicast_source"`
	IsAttrBasedEPg                  types.String                      `tfsdk:"useg_epg"`
	MatchT                          types.String                      `tfsdk:"match_criteria"`
	Name                            types.String                      `tfsdk:"name"`
	NameAlias                       types.String                      `tfsdk:"name_alias"`
	PcEnfPref                       types.String                      `tfsdk:"intra_epg_isolation"`
	PcTag                           types.String                      `tfsdk:"pc_tag"`
	PrefGrMemb                      types.String                      `tfsdk:"preferred_group_member"`
	Prio                            customTypes.FvAEPgPrioStringValue `tfsdk:"priority"`
	Scope                           types.String                      `tfsdk:"scope"`
	Shutdown                        types.String                      `tfsdk:"admin_state"`
	FvCrtrn                         types.Object                      `tfsdk:"epg_useg_block_statement"`
	FvRsAEPgMonPol                  types.Object                      `tfsdk:"relation_to_monitoring_policy"`
	FvRsBd                          types.Object                      `tfsdk:"relation_to_bridge_domain"`
	FvRsCons                        types.Set                         `tfsdk:"relation_to_consumed_contracts"`
	FvRsConsIf                      types.Set                         `tfsdk:"relation_to_imported_contracts"`
	FvRsCustQosPol                  types.Object                      `tfsdk:"relation_to_custom_qos_policy"`
	FvRsDomAtt                      types.Set                         `tfsdk:"relation_to_domains"`
	FvRsDppPol                      types.Object                      `tfsdk:"relation_to_data_plane_policing_policy"`
	FvRsFcPathAtt                   types.Set                         `tfsdk:"relation_to_fibre_channel_paths"`
	FvRsIntraEpg                    types.Set                         `tfsdk:"relation_to_intra_epg_contracts"`
	FvRsNodeAtt                     types.Set                         `tfsdk:"relation_to_static_leafs"`
	FvRsPathAtt                     types.Set                         `tfsdk:"relation_to_static_paths"`
	FvRsProtBy                      types.Set                         `tfsdk:"relation_to_taboo_contracts"`
	FvRsProv                        types.Set                         `tfsdk:"relation_to_provided_contracts"`
	FvRsSecInherited                types.Set                         `tfsdk:"relation_to_contract_masters"`
	FvRsTrustCtrl                   types.Object                      `tfsdk:"relation_to_trust_control_policy"`
	TagAnnotation                   types.Set                         `tfsdk:"annotations"`
	TagTag                          types.Set                         `tfsdk:"tags"`
	DeprecatedExceptionTag          types.String                      `tfsdk:"exception_tag"`
	DeprecatedFloodOnEncap          types.String                      `tfsdk:"flood_on_encap"`
	DeprecatedFwdCtrl               types.String                      `tfsdk:"fwd_ctrl"`
	DeprecatedHasMcastSource        types.String                      `tfsdk:"has_mcast_source"`
	DeprecatedIsAttrBasedEPg        types.String                      `tfsdk:"is_attr_based_epg"`
	DeprecatedMatchT                types.String                      `tfsdk:"match_t"`
	DeprecatedParentDn              types.String                      `tfsdk:"application_profile_dn"`
	DeprecatedPcEnfPref             types.String                      `tfsdk:"pc_enf_pref"`
	DeprecatedPrefGrMemb            types.String                      `tfsdk:"pref_gr_memb"`
	DeprecatedPrio                  types.String                      `tfsdk:"prio"`
	DeprecatedShutdown              types.String                      `tfsdk:"shutdown"`
	DeprecatedFvRsAEPgMonPol        types.String                      `tfsdk:"relation_fv_rs_aepg_mon_pol"`
	Ignored_relation_fv_rs_path_att types.Set                         `tfsdk:"relation_fv_rs_path_att"`
	Ignored_relation_fv_rs_prov_def types.Set                         `tfsdk:"relation_fv_rs_prov_def"`
	DeprecatedFvRsBd                types.String                      `tfsdk:"relation_fv_rs_bd"`
	DeprecatedFvRsCons              types.Set                         `tfsdk:"relation_fv_rs_cons"`
	DeprecatedFvRsSecInherited      types.Set                         `tfsdk:"relation_fv_rs_sec_inherited"`
	DeprecatedFvRsCustQosPol        types.String                      `tfsdk:"relation_fv_rs_cust_qos_pol"`
	DeprecatedFvRsDppPol            types.String                      `tfsdk:"relation_fv_rs_dpp_pol"`
	DeprecatedFvRsFcPathAtt         types.Set                         `tfsdk:"relation_fv_rs_fc_path_att"`
	DeprecatedFvRsConsIf            types.Set                         `tfsdk:"relation_fv_rs_cons_if"`
	DeprecatedFvRsIntraEpg          types.Set                         `tfsdk:"relation_fv_rs_intra_epg"`
	DeprecatedFvRsProv              types.Set                         `tfsdk:"relation_fv_rs_prov"`
	DeprecatedFvRsProtBy            types.Set                         `tfsdk:"relation_fv_rs_prot_by"`
	DeprecatedFvRsTrustCtrl         types.String                      `tfsdk:"relation_fv_rs_trust_ctrl"`
	DeprecatedFvRsNodeAtt           types.Set                         `tfsdk:"relation_fv_rs_node_att"`
}

func getEmptyFvAEPgResourceModel() *FvAEPgResourceModel {
	return &FvAEPgResourceModel{
		Id:             basetypes.NewStringNull(),
		ParentDn:       basetypes.NewStringNull(),
		Annotation:     basetypes.NewStringNull(),
		Descr:          basetypes.NewStringNull(),
		ExceptionTag:   basetypes.NewStringNull(),
		FloodOnEncap:   basetypes.NewStringNull(),
		FwdCtrl:        basetypes.NewStringNull(),
		HasMcastSource: basetypes.NewStringNull(),
		IsAttrBasedEPg: basetypes.NewStringNull(),
		MatchT:         basetypes.NewStringNull(),
		Name:           basetypes.NewStringNull(),
		NameAlias:      basetypes.NewStringNull(),
		PcEnfPref:      basetypes.NewStringNull(),
		PcTag:          basetypes.NewStringNull(),
		PrefGrMemb:     basetypes.NewStringNull(),
		Prio:           customTypes.NewFvAEPgPrioStringNull(),
		Scope:          basetypes.NewStringNull(),
		Shutdown:       basetypes.NewStringNull(),
		FvCrtrn: types.ObjectNull(map[string]attr.Type{
			"annotation":  types.StringType,
			"description": types.StringType,
			"match":       types.StringType,
			"name":        types.StringType,
			"name_alias":  types.StringType,
			"owner_key":   types.StringType,
			"owner_tag":   types.StringType,
			"precedence":  types.StringType,
			"scope":       types.StringType,
			"annotations": types.SetType{ElemType: TagAnnotationFvCrtrnFvAEPgType},
			"tags":        types.SetType{ElemType: TagTagFvCrtrnFvAEPgType},
		}),
		FvRsAEPgMonPol: types.ObjectNull(map[string]attr.Type{
			"annotation":             types.StringType,
			"monitoring_policy_name": types.StringType,
			"annotations":            types.SetType{ElemType: TagAnnotationFvRsAEPgMonPolFvAEPgType},
			"tags":                   types.SetType{ElemType: TagTagFvRsAEPgMonPolFvAEPgType},
		}),
		FvRsBd: types.ObjectNull(map[string]attr.Type{
			"annotation":         types.StringType,
			"bridge_domain_name": types.StringType,
			"annotations":        types.SetType{ElemType: TagAnnotationFvRsBdFvAEPgType},
			"tags":               types.SetType{ElemType: TagTagFvRsBdFvAEPgType},
		}),
		FvRsCons: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"annotation":    types.StringType,
				"priority":      types.StringType,
				"contract_name": types.StringType,
				"annotations":   types.SetType{ElemType: TagAnnotationFvRsConsFvAEPgType},
				"tags":          types.SetType{ElemType: TagTagFvRsConsFvAEPgType},
			},
		}),
		FvRsConsIf: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"annotation":             types.StringType,
				"priority":               types.StringType,
				"imported_contract_name": types.StringType,
				"annotations":            types.SetType{ElemType: TagAnnotationFvRsConsIfFvAEPgType},
				"tags":                   types.SetType{ElemType: TagTagFvRsConsIfFvAEPgType},
			},
		}),
		FvRsCustQosPol: types.ObjectNull(map[string]attr.Type{
			"annotation":             types.StringType,
			"custom_qos_policy_name": types.StringType,
			"annotations":            types.SetType{ElemType: TagAnnotationFvRsCustQosPolFvAEPgType},
			"tags":                   types.SetType{ElemType: TagTagFvRsCustQosPolFvAEPgType},
		}),
		FvRsDomAtt: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"annotation":                    types.StringType,
				"binding_type":                  types.StringType,
				"class_preference":              types.StringType,
				"custom_epg_name":               types.StringType,
				"delimiter":                     types.StringType,
				"encapsulation":                 types.StringType,
				"encapsulation_mode":            types.StringType,
				"epg_cos":                       types.StringType,
				"epg_cos_pref":                  types.StringType,
				"deployment_immediacy":          types.StringType,
				"ipam_dhcp_override":            types.StringType,
				"ipam_enabled":                  types.StringType,
				"ipam_gateway":                  types.StringType,
				"lag_policy_name":               types.StringType,
				"netflow_direction":             types.StringType,
				"enable_netflow":                types.StringType,
				"number_of_ports":               types.StringType,
				"port_allocation":               types.StringType,
				"primary_encapsulation":         types.StringType,
				"primary_encapsulation_inner":   types.StringType,
				"resolution_immediacy":          types.StringType,
				"secondary_encapsulation_inner": types.StringType,
				"switching_mode":                types.StringType,
				"target_dn":                     types.StringType,
				"untagged":                      types.StringType,
				"annotations":                   types.SetType{ElemType: TagAnnotationFvRsDomAttFvAEPgType},
				"tags":                          types.SetType{ElemType: TagTagFvRsDomAttFvAEPgType},
			},
		}),
		FvRsDppPol: types.ObjectNull(map[string]attr.Type{
			"annotation":                      types.StringType,
			"data_plane_policing_policy_name": types.StringType,
			"annotations":                     types.SetType{ElemType: TagAnnotationFvRsDppPolFvAEPgType},
			"tags":                            types.SetType{ElemType: TagTagFvRsDppPolFvAEPgType},
		}),
		FvRsFcPathAtt: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"annotation":  types.StringType,
				"description": types.StringType,
				"target_dn":   types.StringType,
				"vsan":        types.StringType,
				"vsan_mode":   types.StringType,
				"annotations": types.SetType{ElemType: TagAnnotationFvRsFcPathAttFvAEPgType},
				"tags":        types.SetType{ElemType: TagTagFvRsFcPathAttFvAEPgType},
			},
		}),
		FvRsIntraEpg: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"annotation":    types.StringType,
				"contract_name": types.StringType,
				"annotations":   types.SetType{ElemType: TagAnnotationFvRsIntraEpgFvAEPgType},
				"tags":          types.SetType{ElemType: TagTagFvRsIntraEpgFvAEPgType},
			},
		}),
		FvRsNodeAtt: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"annotation":           types.StringType,
				"description":          types.StringType,
				"encapsulation":        types.StringType,
				"deployment_immediacy": types.StringType,
				"mode":                 types.StringType,
				"target_dn":            types.StringType,
				"annotations":          types.SetType{ElemType: TagAnnotationFvRsNodeAttFvAEPgType},
				"tags":                 types.SetType{ElemType: TagTagFvRsNodeAttFvAEPgType},
			},
		}),
		FvRsPathAtt: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"annotation":            types.StringType,
				"description":           types.StringType,
				"encapsulation":         types.StringType,
				"deployment_immediacy":  types.StringType,
				"mode":                  types.StringType,
				"primary_encapsulation": types.StringType,
				"target_dn":             types.StringType,
				"annotations":           types.SetType{ElemType: TagAnnotationFvRsPathAttFvAEPgType},
				"tags":                  types.SetType{ElemType: TagTagFvRsPathAttFvAEPgType},
			},
		}),
		FvRsProtBy: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"annotation":          types.StringType,
				"taboo_contract_name": types.StringType,
				"annotations":         types.SetType{ElemType: TagAnnotationFvRsProtByFvAEPgType},
				"tags":                types.SetType{ElemType: TagTagFvRsProtByFvAEPgType},
			},
		}),
		FvRsProv: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"annotation":     types.StringType,
				"match_criteria": types.StringType,
				"priority":       types.StringType,
				"contract_name":  types.StringType,
				"annotations":    types.SetType{ElemType: TagAnnotationFvRsProvFvAEPgType},
				"tags":           types.SetType{ElemType: TagTagFvRsProvFvAEPgType},
			},
		}),
		FvRsSecInherited: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"annotation":  types.StringType,
				"target_dn":   types.StringType,
				"annotations": types.SetType{ElemType: TagAnnotationFvRsSecInheritedFvAEPgType},
				"tags":        types.SetType{ElemType: TagTagFvRsSecInheritedFvAEPgType},
			},
		}),
		FvRsTrustCtrl: types.ObjectNull(map[string]attr.Type{
			"annotation":                types.StringType,
			"trust_control_policy_name": types.StringType,
			"annotations":               types.SetType{ElemType: TagAnnotationFvRsTrustCtrlFvAEPgType},
			"tags":                      types.SetType{ElemType: TagTagFvRsTrustCtrlFvAEPgType},
		}),
		TagAnnotation: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
		TagTag: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
		DeprecatedExceptionTag:          types.String{},
		DeprecatedFloodOnEncap:          types.String{},
		DeprecatedFwdCtrl:               types.String{},
		DeprecatedHasMcastSource:        types.String{},
		DeprecatedIsAttrBasedEPg:        types.String{},
		DeprecatedMatchT:                types.String{},
		DeprecatedParentDn:              types.String{},
		DeprecatedPcEnfPref:             types.String{},
		DeprecatedPrefGrMemb:            types.String{},
		DeprecatedPrio:                  types.String{},
		DeprecatedShutdown:              types.String{},
		DeprecatedFvRsAEPgMonPol:        types.String{},
		Ignored_relation_fv_rs_path_att: types.SetNull(types.StringType),
		Ignored_relation_fv_rs_prov_def: types.SetNull(types.StringType),
		DeprecatedFvRsBd:                types.String{},
		DeprecatedFvRsCons:              types.SetNull(types.StringType),
		DeprecatedFvRsSecInherited:      types.SetNull(types.StringType),
		DeprecatedFvRsCustQosPol:        types.String{},
		DeprecatedFvRsDppPol:            types.String{},
		DeprecatedFvRsFcPathAtt:         types.SetNull(types.StringType),
		DeprecatedFvRsConsIf:            types.SetNull(types.StringType),
		DeprecatedFvRsIntraEpg:          types.SetNull(types.StringType),
		DeprecatedFvRsProv:              types.SetNull(types.StringType),
		DeprecatedFvRsProtBy:            types.SetNull(types.StringType),
		DeprecatedFvRsTrustCtrl:         types.String{},
		DeprecatedFvRsNodeAtt:           types.SetNull(deprecatedFvRsNodeAttType),
	}
}

// FvCrtrnFvAEPgResourceModel describes the resource data model for the children without relation ships.
type FvCrtrnFvAEPgResourceModel struct {
	Annotation    types.String `tfsdk:"annotation"`
	Descr         types.String `tfsdk:"description"`
	Match         types.String `tfsdk:"match"`
	Name          types.String `tfsdk:"name"`
	NameAlias     types.String `tfsdk:"name_alias"`
	OwnerKey      types.String `tfsdk:"owner_key"`
	OwnerTag      types.String `tfsdk:"owner_tag"`
	Prec          types.String `tfsdk:"precedence"`
	Scope         types.String `tfsdk:"scope"`
	TagAnnotation types.Set    `tfsdk:"annotations"`
	TagTag        types.Set    `tfsdk:"tags"`
}

func getEmptyFvCrtrnFvAEPgResourceModel() FvCrtrnFvAEPgResourceModel {
	return FvCrtrnFvAEPgResourceModel{
		Annotation: basetypes.NewStringNull(),
		Descr:      basetypes.NewStringNull(),
		Match:      basetypes.NewStringNull(),
		Name:       basetypes.NewStringNull(),
		NameAlias:  basetypes.NewStringNull(),
		OwnerKey:   basetypes.NewStringNull(),
		OwnerTag:   basetypes.NewStringNull(),
		Prec:       basetypes.NewStringNull(),
		Scope:      basetypes.NewStringNull(),
		TagAnnotation: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
		TagTag: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
	}
}

var FvCrtrnFvAEPgType = map[string]attr.Type{
	"annotation":  types.StringType,
	"description": types.StringType,
	"match":       types.StringType,
	"name":        types.StringType,
	"name_alias":  types.StringType,
	"owner_key":   types.StringType,
	"owner_tag":   types.StringType,
	"precedence":  types.StringType,
	"scope":       types.StringType,
	"annotations": types.SetType{ElemType: TagAnnotationFvCrtrnFvAEPgType},
	"tags":        types.SetType{ElemType: TagTagFvCrtrnFvAEPgType},
}

// TagAnnotationFvCrtrnFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagAnnotationFvCrtrnFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagAnnotationFvCrtrnFvAEPgResourceModel() TagAnnotationFvCrtrnFvAEPgResourceModel {
	return TagAnnotationFvCrtrnFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagAnnotationFvCrtrnFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// TagTagFvCrtrnFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagTagFvCrtrnFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagTagFvCrtrnFvAEPgResourceModel() TagTagFvCrtrnFvAEPgResourceModel {
	return TagTagFvCrtrnFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagTagFvCrtrnFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// FvRsAEPgMonPolFvAEPgResourceModel describes the resource data model for the children without relation ships.
type FvRsAEPgMonPolFvAEPgResourceModel struct {
	Annotation      types.String `tfsdk:"annotation"`
	TnMonEPGPolName types.String `tfsdk:"monitoring_policy_name"`
	TagAnnotation   types.Set    `tfsdk:"annotations"`
	TagTag          types.Set    `tfsdk:"tags"`
}

func getEmptyFvRsAEPgMonPolFvAEPgResourceModel() FvRsAEPgMonPolFvAEPgResourceModel {
	return FvRsAEPgMonPolFvAEPgResourceModel{
		Annotation:      basetypes.NewStringNull(),
		TnMonEPGPolName: basetypes.NewStringNull(),
		TagAnnotation: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
		TagTag: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
	}
}

var FvRsAEPgMonPolFvAEPgType = map[string]attr.Type{
	"annotation":             types.StringType,
	"monitoring_policy_name": types.StringType,
	"annotations":            types.SetType{ElemType: TagAnnotationFvRsAEPgMonPolFvAEPgType},
	"tags":                   types.SetType{ElemType: TagTagFvRsAEPgMonPolFvAEPgType},
}

// TagAnnotationFvRsAEPgMonPolFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagAnnotationFvRsAEPgMonPolFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagAnnotationFvRsAEPgMonPolFvAEPgResourceModel() TagAnnotationFvRsAEPgMonPolFvAEPgResourceModel {
	return TagAnnotationFvRsAEPgMonPolFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagAnnotationFvRsAEPgMonPolFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// TagTagFvRsAEPgMonPolFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagTagFvRsAEPgMonPolFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagTagFvRsAEPgMonPolFvAEPgResourceModel() TagTagFvRsAEPgMonPolFvAEPgResourceModel {
	return TagTagFvRsAEPgMonPolFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagTagFvRsAEPgMonPolFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// FvRsBdFvAEPgResourceModel describes the resource data model for the children without relation ships.
type FvRsBdFvAEPgResourceModel struct {
	Annotation    types.String `tfsdk:"annotation"`
	TnFvBDName    types.String `tfsdk:"bridge_domain_name"`
	TagAnnotation types.Set    `tfsdk:"annotations"`
	TagTag        types.Set    `tfsdk:"tags"`
}

func getEmptyFvRsBdFvAEPgResourceModel() FvRsBdFvAEPgResourceModel {
	return FvRsBdFvAEPgResourceModel{
		Annotation: basetypes.NewStringNull(),
		TnFvBDName: basetypes.NewStringNull(),
		TagAnnotation: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
		TagTag: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
	}
}

var FvRsBdFvAEPgType = map[string]attr.Type{
	"annotation":         types.StringType,
	"bridge_domain_name": types.StringType,
	"annotations":        types.SetType{ElemType: TagAnnotationFvRsBdFvAEPgType},
	"tags":               types.SetType{ElemType: TagTagFvRsBdFvAEPgType},
}

// TagAnnotationFvRsBdFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagAnnotationFvRsBdFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagAnnotationFvRsBdFvAEPgResourceModel() TagAnnotationFvRsBdFvAEPgResourceModel {
	return TagAnnotationFvRsBdFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagAnnotationFvRsBdFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// TagTagFvRsBdFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagTagFvRsBdFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagTagFvRsBdFvAEPgResourceModel() TagTagFvRsBdFvAEPgResourceModel {
	return TagTagFvRsBdFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagTagFvRsBdFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// FvRsConsFvAEPgResourceModel describes the resource data model for the children without relation ships.
type FvRsConsFvAEPgResourceModel struct {
	Annotation    types.String                        `tfsdk:"annotation"`
	Prio          customTypes.FvRsConsPrioStringValue `tfsdk:"priority"`
	TnVzBrCPName  types.String                        `tfsdk:"contract_name"`
	TagAnnotation types.Set                           `tfsdk:"annotations"`
	TagTag        types.Set                           `tfsdk:"tags"`
}

func getEmptyFvRsConsFvAEPgResourceModel() FvRsConsFvAEPgResourceModel {
	return FvRsConsFvAEPgResourceModel{
		Annotation:   basetypes.NewStringNull(),
		Prio:         customTypes.NewFvRsConsPrioStringNull(),
		TnVzBrCPName: basetypes.NewStringNull(),
		TagAnnotation: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
		TagTag: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
	}
}

var FvRsConsFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"annotation":    types.StringType,
		"priority":      types.StringType,
		"contract_name": types.StringType,
		"annotations":   types.SetType{ElemType: TagAnnotationFvRsConsFvAEPgType},
		"tags":          types.SetType{ElemType: TagTagFvRsConsFvAEPgType},
	},
}

func FvRsConsFvAEPgSetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate(ctx context.Context, planValue, stateValue types.Set) basetypes.SetValue {
	//  Function is needed to handle the case that an attribute is not yet supported in a version and gets set to null during read
	var planSetValues, stateSetValues []FvRsConsFvAEPgResourceModel
	stateValue.ElementsAs(ctx, &stateSetValues, false)
	planValue.ElementsAs(ctx, &planSetValues, false)

	// If the length of the state and plan values are different a change is already detected the loop can be skipped
	if len(stateSetValues) == len(planSetValues) {
		for index, stateValue := range stateSetValues {
			nullInStateFound := false
			if stateValue.Annotation.IsNull() {
				nullInStateFound = true
				planSetValues[index].Annotation = basetypes.NewStringNull()
			}
			if stateValue.Prio.IsNull() {
				nullInStateFound = true
				planSetValues[index].Prio = customTypes.NewFvRsConsPrioStringNull()
			}
			if stateValue.TnVzBrCPName.IsNull() {
				nullInStateFound = true
				planSetValues[index].TnVzBrCPName = basetypes.NewStringNull()
			}
			if !nullInStateFound {
				// when there are no null fields we can conclude the version supports all attributes in set
				break
			}
		}
	}
	planSet, _ := types.SetValueFrom(ctx, FvRsConsFvAEPgType, planSetValues)
	return planSet

}

// TagAnnotationFvRsConsFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagAnnotationFvRsConsFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagAnnotationFvRsConsFvAEPgResourceModel() TagAnnotationFvRsConsFvAEPgResourceModel {
	return TagAnnotationFvRsConsFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagAnnotationFvRsConsFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// TagTagFvRsConsFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagTagFvRsConsFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagTagFvRsConsFvAEPgResourceModel() TagTagFvRsConsFvAEPgResourceModel {
	return TagTagFvRsConsFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagTagFvRsConsFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// FvRsConsIfFvAEPgResourceModel describes the resource data model for the children without relation ships.
type FvRsConsIfFvAEPgResourceModel struct {
	Annotation    types.String                          `tfsdk:"annotation"`
	Prio          customTypes.FvRsConsIfPrioStringValue `tfsdk:"priority"`
	TnVzCPIfName  types.String                          `tfsdk:"imported_contract_name"`
	TagAnnotation types.Set                             `tfsdk:"annotations"`
	TagTag        types.Set                             `tfsdk:"tags"`
}

func getEmptyFvRsConsIfFvAEPgResourceModel() FvRsConsIfFvAEPgResourceModel {
	return FvRsConsIfFvAEPgResourceModel{
		Annotation:   basetypes.NewStringNull(),
		Prio:         customTypes.NewFvRsConsIfPrioStringNull(),
		TnVzCPIfName: basetypes.NewStringNull(),
		TagAnnotation: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
		TagTag: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
	}
}

var FvRsConsIfFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"annotation":             types.StringType,
		"priority":               types.StringType,
		"imported_contract_name": types.StringType,
		"annotations":            types.SetType{ElemType: TagAnnotationFvRsConsIfFvAEPgType},
		"tags":                   types.SetType{ElemType: TagTagFvRsConsIfFvAEPgType},
	},
}

func FvRsConsIfFvAEPgSetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate(ctx context.Context, planValue, stateValue types.Set) basetypes.SetValue {
	//  Function is needed to handle the case that an attribute is not yet supported in a version and gets set to null during read
	var planSetValues, stateSetValues []FvRsConsIfFvAEPgResourceModel
	stateValue.ElementsAs(ctx, &stateSetValues, false)
	planValue.ElementsAs(ctx, &planSetValues, false)

	// If the length of the state and plan values are different a change is already detected the loop can be skipped
	if len(stateSetValues) == len(planSetValues) {
		for index, stateValue := range stateSetValues {
			nullInStateFound := false
			if stateValue.Annotation.IsNull() {
				nullInStateFound = true
				planSetValues[index].Annotation = basetypes.NewStringNull()
			}
			if stateValue.Prio.IsNull() {
				nullInStateFound = true
				planSetValues[index].Prio = customTypes.NewFvRsConsIfPrioStringNull()
			}
			if stateValue.TnVzCPIfName.IsNull() {
				nullInStateFound = true
				planSetValues[index].TnVzCPIfName = basetypes.NewStringNull()
			}
			if !nullInStateFound {
				// when there are no null fields we can conclude the version supports all attributes in set
				break
			}
		}
	}
	planSet, _ := types.SetValueFrom(ctx, FvRsConsIfFvAEPgType, planSetValues)
	return planSet

}

// TagAnnotationFvRsConsIfFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagAnnotationFvRsConsIfFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagAnnotationFvRsConsIfFvAEPgResourceModel() TagAnnotationFvRsConsIfFvAEPgResourceModel {
	return TagAnnotationFvRsConsIfFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagAnnotationFvRsConsIfFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// TagTagFvRsConsIfFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagTagFvRsConsIfFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagTagFvRsConsIfFvAEPgResourceModel() TagTagFvRsConsIfFvAEPgResourceModel {
	return TagTagFvRsConsIfFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagTagFvRsConsIfFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// FvRsCustQosPolFvAEPgResourceModel describes the resource data model for the children without relation ships.
type FvRsCustQosPolFvAEPgResourceModel struct {
	Annotation         types.String `tfsdk:"annotation"`
	TnQosCustomPolName types.String `tfsdk:"custom_qos_policy_name"`
	TagAnnotation      types.Set    `tfsdk:"annotations"`
	TagTag             types.Set    `tfsdk:"tags"`
}

func getEmptyFvRsCustQosPolFvAEPgResourceModel() FvRsCustQosPolFvAEPgResourceModel {
	return FvRsCustQosPolFvAEPgResourceModel{
		Annotation:         basetypes.NewStringNull(),
		TnQosCustomPolName: basetypes.NewStringNull(),
		TagAnnotation: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
		TagTag: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
	}
}

var FvRsCustQosPolFvAEPgType = map[string]attr.Type{
	"annotation":             types.StringType,
	"custom_qos_policy_name": types.StringType,
	"annotations":            types.SetType{ElemType: TagAnnotationFvRsCustQosPolFvAEPgType},
	"tags":                   types.SetType{ElemType: TagTagFvRsCustQosPolFvAEPgType},
}

// TagAnnotationFvRsCustQosPolFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagAnnotationFvRsCustQosPolFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagAnnotationFvRsCustQosPolFvAEPgResourceModel() TagAnnotationFvRsCustQosPolFvAEPgResourceModel {
	return TagAnnotationFvRsCustQosPolFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagAnnotationFvRsCustQosPolFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// TagTagFvRsCustQosPolFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagTagFvRsCustQosPolFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagTagFvRsCustQosPolFvAEPgResourceModel() TagTagFvRsCustQosPolFvAEPgResourceModel {
	return TagTagFvRsCustQosPolFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagTagFvRsCustQosPolFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// FvRsDomAttFvAEPgResourceModel describes the resource data model for the children without relation ships.
type FvRsDomAttFvAEPgResourceModel struct {
	Annotation          types.String `tfsdk:"annotation"`
	BindingType         types.String `tfsdk:"binding_type"`
	ClassPref           types.String `tfsdk:"class_preference"`
	CustomEpgName       types.String `tfsdk:"custom_epg_name"`
	Delimiter           types.String `tfsdk:"delimiter"`
	Encap               types.String `tfsdk:"encapsulation"`
	EncapMode           types.String `tfsdk:"encapsulation_mode"`
	EpgCos              types.String `tfsdk:"epg_cos"`
	EpgCosPref          types.String `tfsdk:"epg_cos_pref"`
	InstrImedcy         types.String `tfsdk:"deployment_immediacy"`
	IpamDhcpOverride    types.String `tfsdk:"ipam_dhcp_override"`
	IpamEnabled         types.String `tfsdk:"ipam_enabled"`
	IpamGateway         types.String `tfsdk:"ipam_gateway"`
	LagPolicyName       types.String `tfsdk:"lag_policy_name"`
	NetflowDir          types.String `tfsdk:"netflow_direction"`
	NetflowPref         types.String `tfsdk:"enable_netflow"`
	NumPorts            types.String `tfsdk:"number_of_ports"`
	PortAllocation      types.String `tfsdk:"port_allocation"`
	PrimaryEncap        types.String `tfsdk:"primary_encapsulation"`
	PrimaryEncapInner   types.String `tfsdk:"primary_encapsulation_inner"`
	ResImedcy           types.String `tfsdk:"resolution_immediacy"`
	SecondaryEncapInner types.String `tfsdk:"secondary_encapsulation_inner"`
	SwitchingMode       types.String `tfsdk:"switching_mode"`
	TDn                 types.String `tfsdk:"target_dn"`
	Untagged            types.String `tfsdk:"untagged"`
	TagAnnotation       types.Set    `tfsdk:"annotations"`
	TagTag              types.Set    `tfsdk:"tags"`
}

func getEmptyFvRsDomAttFvAEPgResourceModel() FvRsDomAttFvAEPgResourceModel {
	return FvRsDomAttFvAEPgResourceModel{
		Annotation:          basetypes.NewStringNull(),
		BindingType:         basetypes.NewStringNull(),
		ClassPref:           basetypes.NewStringNull(),
		CustomEpgName:       basetypes.NewStringNull(),
		Delimiter:           basetypes.NewStringNull(),
		Encap:               basetypes.NewStringNull(),
		EncapMode:           basetypes.NewStringNull(),
		EpgCos:              basetypes.NewStringNull(),
		EpgCosPref:          basetypes.NewStringNull(),
		InstrImedcy:         basetypes.NewStringNull(),
		IpamDhcpOverride:    basetypes.NewStringNull(),
		IpamEnabled:         basetypes.NewStringNull(),
		IpamGateway:         basetypes.NewStringNull(),
		LagPolicyName:       basetypes.NewStringNull(),
		NetflowDir:          basetypes.NewStringNull(),
		NetflowPref:         basetypes.NewStringNull(),
		NumPorts:            basetypes.NewStringNull(),
		PortAllocation:      basetypes.NewStringNull(),
		PrimaryEncap:        basetypes.NewStringNull(),
		PrimaryEncapInner:   basetypes.NewStringNull(),
		ResImedcy:           basetypes.NewStringNull(),
		SecondaryEncapInner: basetypes.NewStringNull(),
		SwitchingMode:       basetypes.NewStringNull(),
		TDn:                 basetypes.NewStringNull(),
		Untagged:            basetypes.NewStringNull(),
		TagAnnotation: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
		TagTag: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
	}
}

var FvRsDomAttFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"annotation":                    types.StringType,
		"binding_type":                  types.StringType,
		"class_preference":              types.StringType,
		"custom_epg_name":               types.StringType,
		"delimiter":                     types.StringType,
		"encapsulation":                 types.StringType,
		"encapsulation_mode":            types.StringType,
		"epg_cos":                       types.StringType,
		"epg_cos_pref":                  types.StringType,
		"deployment_immediacy":          types.StringType,
		"ipam_dhcp_override":            types.StringType,
		"ipam_enabled":                  types.StringType,
		"ipam_gateway":                  types.StringType,
		"lag_policy_name":               types.StringType,
		"netflow_direction":             types.StringType,
		"enable_netflow":                types.StringType,
		"number_of_ports":               types.StringType,
		"port_allocation":               types.StringType,
		"primary_encapsulation":         types.StringType,
		"primary_encapsulation_inner":   types.StringType,
		"resolution_immediacy":          types.StringType,
		"secondary_encapsulation_inner": types.StringType,
		"switching_mode":                types.StringType,
		"target_dn":                     types.StringType,
		"untagged":                      types.StringType,
		"annotations":                   types.SetType{ElemType: TagAnnotationFvRsDomAttFvAEPgType},
		"tags":                          types.SetType{ElemType: TagTagFvRsDomAttFvAEPgType},
	},
}

func FvRsDomAttFvAEPgSetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate(ctx context.Context, planValue, stateValue types.Set) basetypes.SetValue {
	//  Function is needed to handle the case that an attribute is not yet supported in a version and gets set to null during read
	var planSetValues, stateSetValues []FvRsDomAttFvAEPgResourceModel
	stateValue.ElementsAs(ctx, &stateSetValues, false)
	planValue.ElementsAs(ctx, &planSetValues, false)

	// If the length of the state and plan values are different a change is already detected the loop can be skipped
	if len(stateSetValues) == len(planSetValues) {
		for index, stateValue := range stateSetValues {
			nullInStateFound := false
			if stateValue.Annotation.IsNull() {
				nullInStateFound = true
				planSetValues[index].Annotation = basetypes.NewStringNull()
			}
			if stateValue.BindingType.IsNull() {
				nullInStateFound = true
				planSetValues[index].BindingType = basetypes.NewStringNull()
			}
			if stateValue.ClassPref.IsNull() {
				nullInStateFound = true
				planSetValues[index].ClassPref = basetypes.NewStringNull()
			}
			if stateValue.CustomEpgName.IsNull() {
				nullInStateFound = true
				planSetValues[index].CustomEpgName = basetypes.NewStringNull()
			}
			if stateValue.Delimiter.IsNull() {
				nullInStateFound = true
				planSetValues[index].Delimiter = basetypes.NewStringNull()
			}
			if stateValue.Encap.IsNull() {
				nullInStateFound = true
				planSetValues[index].Encap = basetypes.NewStringNull()
			}
			if stateValue.EncapMode.IsNull() {
				nullInStateFound = true
				planSetValues[index].EncapMode = basetypes.NewStringNull()
			}
			if stateValue.EpgCos.IsNull() {
				nullInStateFound = true
				planSetValues[index].EpgCos = basetypes.NewStringNull()
			}
			if stateValue.EpgCosPref.IsNull() {
				nullInStateFound = true
				planSetValues[index].EpgCosPref = basetypes.NewStringNull()
			}
			if stateValue.InstrImedcy.IsNull() {
				nullInStateFound = true
				planSetValues[index].InstrImedcy = basetypes.NewStringNull()
			}
			if stateValue.IpamDhcpOverride.IsNull() {
				nullInStateFound = true
				planSetValues[index].IpamDhcpOverride = basetypes.NewStringNull()
			}
			if stateValue.IpamEnabled.IsNull() {
				nullInStateFound = true
				planSetValues[index].IpamEnabled = basetypes.NewStringNull()
			}
			if stateValue.IpamGateway.IsNull() {
				nullInStateFound = true
				planSetValues[index].IpamGateway = basetypes.NewStringNull()
			}
			if stateValue.LagPolicyName.IsNull() {
				nullInStateFound = true
				planSetValues[index].LagPolicyName = basetypes.NewStringNull()
			}
			if stateValue.NetflowDir.IsNull() {
				nullInStateFound = true
				planSetValues[index].NetflowDir = basetypes.NewStringNull()
			}
			if stateValue.NetflowPref.IsNull() {
				nullInStateFound = true
				planSetValues[index].NetflowPref = basetypes.NewStringNull()
			}
			if stateValue.NumPorts.IsNull() {
				nullInStateFound = true
				planSetValues[index].NumPorts = basetypes.NewStringNull()
			}
			if stateValue.PortAllocation.IsNull() {
				nullInStateFound = true
				planSetValues[index].PortAllocation = basetypes.NewStringNull()
			}
			if stateValue.PrimaryEncap.IsNull() {
				nullInStateFound = true
				planSetValues[index].PrimaryEncap = basetypes.NewStringNull()
			}
			if stateValue.PrimaryEncapInner.IsNull() {
				nullInStateFound = true
				planSetValues[index].PrimaryEncapInner = basetypes.NewStringNull()
			}
			if stateValue.ResImedcy.IsNull() {
				nullInStateFound = true
				planSetValues[index].ResImedcy = basetypes.NewStringNull()
			}
			if stateValue.SecondaryEncapInner.IsNull() {
				nullInStateFound = true
				planSetValues[index].SecondaryEncapInner = basetypes.NewStringNull()
			}
			if stateValue.SwitchingMode.IsNull() {
				nullInStateFound = true
				planSetValues[index].SwitchingMode = basetypes.NewStringNull()
			}
			if stateValue.TDn.IsNull() {
				nullInStateFound = true
				planSetValues[index].TDn = basetypes.NewStringNull()
			}
			if stateValue.Untagged.IsNull() {
				nullInStateFound = true
				planSetValues[index].Untagged = basetypes.NewStringNull()
			}
			if !nullInStateFound {
				// when there are no null fields we can conclude the version supports all attributes in set
				break
			}
		}
	}
	planSet, _ := types.SetValueFrom(ctx, FvRsDomAttFvAEPgType, planSetValues)
	return planSet

}

// TagAnnotationFvRsDomAttFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagAnnotationFvRsDomAttFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagAnnotationFvRsDomAttFvAEPgResourceModel() TagAnnotationFvRsDomAttFvAEPgResourceModel {
	return TagAnnotationFvRsDomAttFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagAnnotationFvRsDomAttFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// TagTagFvRsDomAttFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagTagFvRsDomAttFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagTagFvRsDomAttFvAEPgResourceModel() TagTagFvRsDomAttFvAEPgResourceModel {
	return TagTagFvRsDomAttFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagTagFvRsDomAttFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// FvRsDppPolFvAEPgResourceModel describes the resource data model for the children without relation ships.
type FvRsDppPolFvAEPgResourceModel struct {
	Annotation      types.String `tfsdk:"annotation"`
	TnQosDppPolName types.String `tfsdk:"data_plane_policing_policy_name"`
	TagAnnotation   types.Set    `tfsdk:"annotations"`
	TagTag          types.Set    `tfsdk:"tags"`
}

func getEmptyFvRsDppPolFvAEPgResourceModel() FvRsDppPolFvAEPgResourceModel {
	return FvRsDppPolFvAEPgResourceModel{
		Annotation:      basetypes.NewStringNull(),
		TnQosDppPolName: basetypes.NewStringNull(),
		TagAnnotation: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
		TagTag: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
	}
}

var FvRsDppPolFvAEPgType = map[string]attr.Type{
	"annotation":                      types.StringType,
	"data_plane_policing_policy_name": types.StringType,
	"annotations":                     types.SetType{ElemType: TagAnnotationFvRsDppPolFvAEPgType},
	"tags":                            types.SetType{ElemType: TagTagFvRsDppPolFvAEPgType},
}

// TagAnnotationFvRsDppPolFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagAnnotationFvRsDppPolFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagAnnotationFvRsDppPolFvAEPgResourceModel() TagAnnotationFvRsDppPolFvAEPgResourceModel {
	return TagAnnotationFvRsDppPolFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagAnnotationFvRsDppPolFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// TagTagFvRsDppPolFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagTagFvRsDppPolFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagTagFvRsDppPolFvAEPgResourceModel() TagTagFvRsDppPolFvAEPgResourceModel {
	return TagTagFvRsDppPolFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagTagFvRsDppPolFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// FvRsFcPathAttFvAEPgResourceModel describes the resource data model for the children without relation ships.
type FvRsFcPathAttFvAEPgResourceModel struct {
	Annotation    types.String `tfsdk:"annotation"`
	Descr         types.String `tfsdk:"description"`
	TDn           types.String `tfsdk:"target_dn"`
	Vsan          types.String `tfsdk:"vsan"`
	VsanMode      types.String `tfsdk:"vsan_mode"`
	TagAnnotation types.Set    `tfsdk:"annotations"`
	TagTag        types.Set    `tfsdk:"tags"`
}

func getEmptyFvRsFcPathAttFvAEPgResourceModel() FvRsFcPathAttFvAEPgResourceModel {
	return FvRsFcPathAttFvAEPgResourceModel{
		Annotation: basetypes.NewStringNull(),
		Descr:      basetypes.NewStringNull(),
		TDn:        basetypes.NewStringNull(),
		Vsan:       basetypes.NewStringNull(),
		VsanMode:   basetypes.NewStringNull(),
		TagAnnotation: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
		TagTag: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
	}
}

var FvRsFcPathAttFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"annotation":  types.StringType,
		"description": types.StringType,
		"target_dn":   types.StringType,
		"vsan":        types.StringType,
		"vsan_mode":   types.StringType,
		"annotations": types.SetType{ElemType: TagAnnotationFvRsFcPathAttFvAEPgType},
		"tags":        types.SetType{ElemType: TagTagFvRsFcPathAttFvAEPgType},
	},
}

func FvRsFcPathAttFvAEPgSetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate(ctx context.Context, planValue, stateValue types.Set) basetypes.SetValue {
	//  Function is needed to handle the case that an attribute is not yet supported in a version and gets set to null during read
	var planSetValues, stateSetValues []FvRsFcPathAttFvAEPgResourceModel
	stateValue.ElementsAs(ctx, &stateSetValues, false)
	planValue.ElementsAs(ctx, &planSetValues, false)

	// If the length of the state and plan values are different a change is already detected the loop can be skipped
	if len(stateSetValues) == len(planSetValues) {
		for index, stateValue := range stateSetValues {
			nullInStateFound := false
			if stateValue.Annotation.IsNull() {
				nullInStateFound = true
				planSetValues[index].Annotation = basetypes.NewStringNull()
			}
			if stateValue.Descr.IsNull() {
				nullInStateFound = true
				planSetValues[index].Descr = basetypes.NewStringNull()
			}
			if stateValue.TDn.IsNull() {
				nullInStateFound = true
				planSetValues[index].TDn = basetypes.NewStringNull()
			}
			if stateValue.Vsan.IsNull() {
				nullInStateFound = true
				planSetValues[index].Vsan = basetypes.NewStringNull()
			}
			if stateValue.VsanMode.IsNull() {
				nullInStateFound = true
				planSetValues[index].VsanMode = basetypes.NewStringNull()
			}
			if !nullInStateFound {
				// when there are no null fields we can conclude the version supports all attributes in set
				break
			}
		}
	}
	planSet, _ := types.SetValueFrom(ctx, FvRsFcPathAttFvAEPgType, planSetValues)
	return planSet

}

// TagAnnotationFvRsFcPathAttFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagAnnotationFvRsFcPathAttFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagAnnotationFvRsFcPathAttFvAEPgResourceModel() TagAnnotationFvRsFcPathAttFvAEPgResourceModel {
	return TagAnnotationFvRsFcPathAttFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagAnnotationFvRsFcPathAttFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// TagTagFvRsFcPathAttFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagTagFvRsFcPathAttFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagTagFvRsFcPathAttFvAEPgResourceModel() TagTagFvRsFcPathAttFvAEPgResourceModel {
	return TagTagFvRsFcPathAttFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagTagFvRsFcPathAttFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// FvRsIntraEpgFvAEPgResourceModel describes the resource data model for the children without relation ships.
type FvRsIntraEpgFvAEPgResourceModel struct {
	Annotation    types.String `tfsdk:"annotation"`
	TnVzBrCPName  types.String `tfsdk:"contract_name"`
	TagAnnotation types.Set    `tfsdk:"annotations"`
	TagTag        types.Set    `tfsdk:"tags"`
}

func getEmptyFvRsIntraEpgFvAEPgResourceModel() FvRsIntraEpgFvAEPgResourceModel {
	return FvRsIntraEpgFvAEPgResourceModel{
		Annotation:   basetypes.NewStringNull(),
		TnVzBrCPName: basetypes.NewStringNull(),
		TagAnnotation: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
		TagTag: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
	}
}

var FvRsIntraEpgFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"annotation":    types.StringType,
		"contract_name": types.StringType,
		"annotations":   types.SetType{ElemType: TagAnnotationFvRsIntraEpgFvAEPgType},
		"tags":          types.SetType{ElemType: TagTagFvRsIntraEpgFvAEPgType},
	},
}

func FvRsIntraEpgFvAEPgSetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate(ctx context.Context, planValue, stateValue types.Set) basetypes.SetValue {
	//  Function is needed to handle the case that an attribute is not yet supported in a version and gets set to null during read
	var planSetValues, stateSetValues []FvRsIntraEpgFvAEPgResourceModel
	stateValue.ElementsAs(ctx, &stateSetValues, false)
	planValue.ElementsAs(ctx, &planSetValues, false)

	// If the length of the state and plan values are different a change is already detected the loop can be skipped
	if len(stateSetValues) == len(planSetValues) {
		for index, stateValue := range stateSetValues {
			nullInStateFound := false
			if stateValue.Annotation.IsNull() {
				nullInStateFound = true
				planSetValues[index].Annotation = basetypes.NewStringNull()
			}
			if stateValue.TnVzBrCPName.IsNull() {
				nullInStateFound = true
				planSetValues[index].TnVzBrCPName = basetypes.NewStringNull()
			}
			if !nullInStateFound {
				// when there are no null fields we can conclude the version supports all attributes in set
				break
			}
		}
	}
	planSet, _ := types.SetValueFrom(ctx, FvRsIntraEpgFvAEPgType, planSetValues)
	return planSet

}

// TagAnnotationFvRsIntraEpgFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagAnnotationFvRsIntraEpgFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagAnnotationFvRsIntraEpgFvAEPgResourceModel() TagAnnotationFvRsIntraEpgFvAEPgResourceModel {
	return TagAnnotationFvRsIntraEpgFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagAnnotationFvRsIntraEpgFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// TagTagFvRsIntraEpgFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagTagFvRsIntraEpgFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagTagFvRsIntraEpgFvAEPgResourceModel() TagTagFvRsIntraEpgFvAEPgResourceModel {
	return TagTagFvRsIntraEpgFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagTagFvRsIntraEpgFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// FvRsNodeAttFvAEPgResourceModel describes the resource data model for the children without relation ships.
type FvRsNodeAttFvAEPgResourceModel struct {
	Annotation    types.String `tfsdk:"annotation"`
	Descr         types.String `tfsdk:"description"`
	Encap         types.String `tfsdk:"encapsulation"`
	InstrImedcy   types.String `tfsdk:"deployment_immediacy"`
	Mode          types.String `tfsdk:"mode"`
	TDn           types.String `tfsdk:"target_dn"`
	TagAnnotation types.Set    `tfsdk:"annotations"`
	TagTag        types.Set    `tfsdk:"tags"`
}

func getEmptyFvRsNodeAttFvAEPgResourceModel() FvRsNodeAttFvAEPgResourceModel {
	return FvRsNodeAttFvAEPgResourceModel{
		Annotation:  basetypes.NewStringNull(),
		Descr:       basetypes.NewStringNull(),
		Encap:       basetypes.NewStringNull(),
		InstrImedcy: basetypes.NewStringNull(),
		Mode:        basetypes.NewStringNull(),
		TDn:         basetypes.NewStringNull(),
		TagAnnotation: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
		TagTag: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
	}
}

var FvRsNodeAttFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"annotation":           types.StringType,
		"description":          types.StringType,
		"encapsulation":        types.StringType,
		"deployment_immediacy": types.StringType,
		"mode":                 types.StringType,
		"target_dn":            types.StringType,
		"annotations":          types.SetType{ElemType: TagAnnotationFvRsNodeAttFvAEPgType},
		"tags":                 types.SetType{ElemType: TagTagFvRsNodeAttFvAEPgType},
	},
}

func FvRsNodeAttFvAEPgSetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate(ctx context.Context, planValue, stateValue types.Set) basetypes.SetValue {
	//  Function is needed to handle the case that an attribute is not yet supported in a version and gets set to null during read
	var planSetValues, stateSetValues []FvRsNodeAttFvAEPgResourceModel
	stateValue.ElementsAs(ctx, &stateSetValues, false)
	planValue.ElementsAs(ctx, &planSetValues, false)

	// If the length of the state and plan values are different a change is already detected the loop can be skipped
	if len(stateSetValues) == len(planSetValues) {
		for index, stateValue := range stateSetValues {
			nullInStateFound := false
			if stateValue.Annotation.IsNull() {
				nullInStateFound = true
				planSetValues[index].Annotation = basetypes.NewStringNull()
			}
			if stateValue.Descr.IsNull() {
				nullInStateFound = true
				planSetValues[index].Descr = basetypes.NewStringNull()
			}
			if stateValue.Encap.IsNull() {
				nullInStateFound = true
				planSetValues[index].Encap = basetypes.NewStringNull()
			}
			if stateValue.InstrImedcy.IsNull() {
				nullInStateFound = true
				planSetValues[index].InstrImedcy = basetypes.NewStringNull()
			}
			if stateValue.Mode.IsNull() {
				nullInStateFound = true
				planSetValues[index].Mode = basetypes.NewStringNull()
			}
			if stateValue.TDn.IsNull() {
				nullInStateFound = true
				planSetValues[index].TDn = basetypes.NewStringNull()
			}
			if !nullInStateFound {
				// when there are no null fields we can conclude the version supports all attributes in set
				break
			}
		}
	}
	planSet, _ := types.SetValueFrom(ctx, FvRsNodeAttFvAEPgType, planSetValues)
	return planSet

}

// TagAnnotationFvRsNodeAttFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagAnnotationFvRsNodeAttFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagAnnotationFvRsNodeAttFvAEPgResourceModel() TagAnnotationFvRsNodeAttFvAEPgResourceModel {
	return TagAnnotationFvRsNodeAttFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagAnnotationFvRsNodeAttFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// TagTagFvRsNodeAttFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagTagFvRsNodeAttFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagTagFvRsNodeAttFvAEPgResourceModel() TagTagFvRsNodeAttFvAEPgResourceModel {
	return TagTagFvRsNodeAttFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagTagFvRsNodeAttFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// FvRsPathAttFvAEPgResourceModel describes the resource data model for the children without relation ships.
type FvRsPathAttFvAEPgResourceModel struct {
	Annotation    types.String `tfsdk:"annotation"`
	Descr         types.String `tfsdk:"description"`
	Encap         types.String `tfsdk:"encapsulation"`
	InstrImedcy   types.String `tfsdk:"deployment_immediacy"`
	Mode          types.String `tfsdk:"mode"`
	PrimaryEncap  types.String `tfsdk:"primary_encapsulation"`
	TDn           types.String `tfsdk:"target_dn"`
	TagAnnotation types.Set    `tfsdk:"annotations"`
	TagTag        types.Set    `tfsdk:"tags"`
}

func getEmptyFvRsPathAttFvAEPgResourceModel() FvRsPathAttFvAEPgResourceModel {
	return FvRsPathAttFvAEPgResourceModel{
		Annotation:   basetypes.NewStringNull(),
		Descr:        basetypes.NewStringNull(),
		Encap:        basetypes.NewStringNull(),
		InstrImedcy:  basetypes.NewStringNull(),
		Mode:         basetypes.NewStringNull(),
		PrimaryEncap: basetypes.NewStringNull(),
		TDn:          basetypes.NewStringNull(),
		TagAnnotation: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
		TagTag: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
	}
}

var FvRsPathAttFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"annotation":            types.StringType,
		"description":           types.StringType,
		"encapsulation":         types.StringType,
		"deployment_immediacy":  types.StringType,
		"mode":                  types.StringType,
		"primary_encapsulation": types.StringType,
		"target_dn":             types.StringType,
		"annotations":           types.SetType{ElemType: TagAnnotationFvRsPathAttFvAEPgType},
		"tags":                  types.SetType{ElemType: TagTagFvRsPathAttFvAEPgType},
	},
}

func FvRsPathAttFvAEPgSetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate(ctx context.Context, planValue, stateValue types.Set) basetypes.SetValue {
	//  Function is needed to handle the case that an attribute is not yet supported in a version and gets set to null during read
	var planSetValues, stateSetValues []FvRsPathAttFvAEPgResourceModel
	stateValue.ElementsAs(ctx, &stateSetValues, false)
	planValue.ElementsAs(ctx, &planSetValues, false)

	// If the length of the state and plan values are different a change is already detected the loop can be skipped
	if len(stateSetValues) == len(planSetValues) {
		for index, stateValue := range stateSetValues {
			nullInStateFound := false
			if stateValue.Annotation.IsNull() {
				nullInStateFound = true
				planSetValues[index].Annotation = basetypes.NewStringNull()
			}
			if stateValue.Descr.IsNull() {
				nullInStateFound = true
				planSetValues[index].Descr = basetypes.NewStringNull()
			}
			if stateValue.Encap.IsNull() {
				nullInStateFound = true
				planSetValues[index].Encap = basetypes.NewStringNull()
			}
			if stateValue.InstrImedcy.IsNull() {
				nullInStateFound = true
				planSetValues[index].InstrImedcy = basetypes.NewStringNull()
			}
			if stateValue.Mode.IsNull() {
				nullInStateFound = true
				planSetValues[index].Mode = basetypes.NewStringNull()
			}
			if stateValue.PrimaryEncap.IsNull() {
				nullInStateFound = true
				planSetValues[index].PrimaryEncap = basetypes.NewStringNull()
			}
			if stateValue.TDn.IsNull() {
				nullInStateFound = true
				planSetValues[index].TDn = basetypes.NewStringNull()
			}
			if !nullInStateFound {
				// when there are no null fields we can conclude the version supports all attributes in set
				break
			}
		}
	}
	planSet, _ := types.SetValueFrom(ctx, FvRsPathAttFvAEPgType, planSetValues)
	return planSet

}

// TagAnnotationFvRsPathAttFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagAnnotationFvRsPathAttFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagAnnotationFvRsPathAttFvAEPgResourceModel() TagAnnotationFvRsPathAttFvAEPgResourceModel {
	return TagAnnotationFvRsPathAttFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagAnnotationFvRsPathAttFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// TagTagFvRsPathAttFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagTagFvRsPathAttFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagTagFvRsPathAttFvAEPgResourceModel() TagTagFvRsPathAttFvAEPgResourceModel {
	return TagTagFvRsPathAttFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagTagFvRsPathAttFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// FvRsProtByFvAEPgResourceModel describes the resource data model for the children without relation ships.
type FvRsProtByFvAEPgResourceModel struct {
	Annotation    types.String `tfsdk:"annotation"`
	TnVzTabooName types.String `tfsdk:"taboo_contract_name"`
	TagAnnotation types.Set    `tfsdk:"annotations"`
	TagTag        types.Set    `tfsdk:"tags"`
}

func getEmptyFvRsProtByFvAEPgResourceModel() FvRsProtByFvAEPgResourceModel {
	return FvRsProtByFvAEPgResourceModel{
		Annotation:    basetypes.NewStringNull(),
		TnVzTabooName: basetypes.NewStringNull(),
		TagAnnotation: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
		TagTag: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
	}
}

var FvRsProtByFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"annotation":          types.StringType,
		"taboo_contract_name": types.StringType,
		"annotations":         types.SetType{ElemType: TagAnnotationFvRsProtByFvAEPgType},
		"tags":                types.SetType{ElemType: TagTagFvRsProtByFvAEPgType},
	},
}

func FvRsProtByFvAEPgSetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate(ctx context.Context, planValue, stateValue types.Set) basetypes.SetValue {
	//  Function is needed to handle the case that an attribute is not yet supported in a version and gets set to null during read
	var planSetValues, stateSetValues []FvRsProtByFvAEPgResourceModel
	stateValue.ElementsAs(ctx, &stateSetValues, false)
	planValue.ElementsAs(ctx, &planSetValues, false)

	// If the length of the state and plan values are different a change is already detected the loop can be skipped
	if len(stateSetValues) == len(planSetValues) {
		for index, stateValue := range stateSetValues {
			nullInStateFound := false
			if stateValue.Annotation.IsNull() {
				nullInStateFound = true
				planSetValues[index].Annotation = basetypes.NewStringNull()
			}
			if stateValue.TnVzTabooName.IsNull() {
				nullInStateFound = true
				planSetValues[index].TnVzTabooName = basetypes.NewStringNull()
			}
			if !nullInStateFound {
				// when there are no null fields we can conclude the version supports all attributes in set
				break
			}
		}
	}
	planSet, _ := types.SetValueFrom(ctx, FvRsProtByFvAEPgType, planSetValues)
	return planSet

}

// TagAnnotationFvRsProtByFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagAnnotationFvRsProtByFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagAnnotationFvRsProtByFvAEPgResourceModel() TagAnnotationFvRsProtByFvAEPgResourceModel {
	return TagAnnotationFvRsProtByFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagAnnotationFvRsProtByFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// TagTagFvRsProtByFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagTagFvRsProtByFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagTagFvRsProtByFvAEPgResourceModel() TagTagFvRsProtByFvAEPgResourceModel {
	return TagTagFvRsProtByFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagTagFvRsProtByFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// FvRsProvFvAEPgResourceModel describes the resource data model for the children without relation ships.
type FvRsProvFvAEPgResourceModel struct {
	Annotation    types.String                        `tfsdk:"annotation"`
	MatchT        types.String                        `tfsdk:"match_criteria"`
	Prio          customTypes.FvRsProvPrioStringValue `tfsdk:"priority"`
	TnVzBrCPName  types.String                        `tfsdk:"contract_name"`
	TagAnnotation types.Set                           `tfsdk:"annotations"`
	TagTag        types.Set                           `tfsdk:"tags"`
}

func getEmptyFvRsProvFvAEPgResourceModel() FvRsProvFvAEPgResourceModel {
	return FvRsProvFvAEPgResourceModel{
		Annotation:   basetypes.NewStringNull(),
		MatchT:       basetypes.NewStringNull(),
		Prio:         customTypes.NewFvRsProvPrioStringNull(),
		TnVzBrCPName: basetypes.NewStringNull(),
		TagAnnotation: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
		TagTag: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
	}
}

var FvRsProvFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"annotation":     types.StringType,
		"match_criteria": types.StringType,
		"priority":       types.StringType,
		"contract_name":  types.StringType,
		"annotations":    types.SetType{ElemType: TagAnnotationFvRsProvFvAEPgType},
		"tags":           types.SetType{ElemType: TagTagFvRsProvFvAEPgType},
	},
}

func FvRsProvFvAEPgSetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate(ctx context.Context, planValue, stateValue types.Set) basetypes.SetValue {
	//  Function is needed to handle the case that an attribute is not yet supported in a version and gets set to null during read
	var planSetValues, stateSetValues []FvRsProvFvAEPgResourceModel
	stateValue.ElementsAs(ctx, &stateSetValues, false)
	planValue.ElementsAs(ctx, &planSetValues, false)

	// If the length of the state and plan values are different a change is already detected the loop can be skipped
	if len(stateSetValues) == len(planSetValues) {
		for index, stateValue := range stateSetValues {
			nullInStateFound := false
			if stateValue.Annotation.IsNull() {
				nullInStateFound = true
				planSetValues[index].Annotation = basetypes.NewStringNull()
			}
			if stateValue.MatchT.IsNull() {
				nullInStateFound = true
				planSetValues[index].MatchT = basetypes.NewStringNull()
			}
			if stateValue.Prio.IsNull() {
				nullInStateFound = true
				planSetValues[index].Prio = customTypes.NewFvRsProvPrioStringNull()
			}
			if stateValue.TnVzBrCPName.IsNull() {
				nullInStateFound = true
				planSetValues[index].TnVzBrCPName = basetypes.NewStringNull()
			}
			if !nullInStateFound {
				// when there are no null fields we can conclude the version supports all attributes in set
				break
			}
		}
	}
	planSet, _ := types.SetValueFrom(ctx, FvRsProvFvAEPgType, planSetValues)
	return planSet

}

// TagAnnotationFvRsProvFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagAnnotationFvRsProvFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagAnnotationFvRsProvFvAEPgResourceModel() TagAnnotationFvRsProvFvAEPgResourceModel {
	return TagAnnotationFvRsProvFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagAnnotationFvRsProvFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// TagTagFvRsProvFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagTagFvRsProvFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagTagFvRsProvFvAEPgResourceModel() TagTagFvRsProvFvAEPgResourceModel {
	return TagTagFvRsProvFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagTagFvRsProvFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// FvRsSecInheritedFvAEPgResourceModel describes the resource data model for the children without relation ships.
type FvRsSecInheritedFvAEPgResourceModel struct {
	Annotation    types.String `tfsdk:"annotation"`
	TDn           types.String `tfsdk:"target_dn"`
	TagAnnotation types.Set    `tfsdk:"annotations"`
	TagTag        types.Set    `tfsdk:"tags"`
}

func getEmptyFvRsSecInheritedFvAEPgResourceModel() FvRsSecInheritedFvAEPgResourceModel {
	return FvRsSecInheritedFvAEPgResourceModel{
		Annotation: basetypes.NewStringNull(),
		TDn:        basetypes.NewStringNull(),
		TagAnnotation: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
		TagTag: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
	}
}

var FvRsSecInheritedFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"annotation":  types.StringType,
		"target_dn":   types.StringType,
		"annotations": types.SetType{ElemType: TagAnnotationFvRsSecInheritedFvAEPgType},
		"tags":        types.SetType{ElemType: TagTagFvRsSecInheritedFvAEPgType},
	},
}

func FvRsSecInheritedFvAEPgSetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate(ctx context.Context, planValue, stateValue types.Set) basetypes.SetValue {
	//  Function is needed to handle the case that an attribute is not yet supported in a version and gets set to null during read
	var planSetValues, stateSetValues []FvRsSecInheritedFvAEPgResourceModel
	stateValue.ElementsAs(ctx, &stateSetValues, false)
	planValue.ElementsAs(ctx, &planSetValues, false)

	// If the length of the state and plan values are different a change is already detected the loop can be skipped
	if len(stateSetValues) == len(planSetValues) {
		for index, stateValue := range stateSetValues {
			nullInStateFound := false
			if stateValue.Annotation.IsNull() {
				nullInStateFound = true
				planSetValues[index].Annotation = basetypes.NewStringNull()
			}
			if stateValue.TDn.IsNull() {
				nullInStateFound = true
				planSetValues[index].TDn = basetypes.NewStringNull()
			}
			if !nullInStateFound {
				// when there are no null fields we can conclude the version supports all attributes in set
				break
			}
		}
	}
	planSet, _ := types.SetValueFrom(ctx, FvRsSecInheritedFvAEPgType, planSetValues)
	return planSet

}

// TagAnnotationFvRsSecInheritedFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagAnnotationFvRsSecInheritedFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagAnnotationFvRsSecInheritedFvAEPgResourceModel() TagAnnotationFvRsSecInheritedFvAEPgResourceModel {
	return TagAnnotationFvRsSecInheritedFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagAnnotationFvRsSecInheritedFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// TagTagFvRsSecInheritedFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagTagFvRsSecInheritedFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagTagFvRsSecInheritedFvAEPgResourceModel() TagTagFvRsSecInheritedFvAEPgResourceModel {
	return TagTagFvRsSecInheritedFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagTagFvRsSecInheritedFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// FvRsTrustCtrlFvAEPgResourceModel describes the resource data model for the children without relation ships.
type FvRsTrustCtrlFvAEPgResourceModel struct {
	Annotation            types.String `tfsdk:"annotation"`
	TnFhsTrustCtrlPolName types.String `tfsdk:"trust_control_policy_name"`
	TagAnnotation         types.Set    `tfsdk:"annotations"`
	TagTag                types.Set    `tfsdk:"tags"`
}

func getEmptyFvRsTrustCtrlFvAEPgResourceModel() FvRsTrustCtrlFvAEPgResourceModel {
	return FvRsTrustCtrlFvAEPgResourceModel{
		Annotation:            basetypes.NewStringNull(),
		TnFhsTrustCtrlPolName: basetypes.NewStringNull(),
		TagAnnotation: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
		TagTag: types.SetNull(types.ObjectType{
			AttrTypes: map[string]attr.Type{
				"key":   types.StringType,
				"value": types.StringType,
			},
		}),
	}
}

var FvRsTrustCtrlFvAEPgType = map[string]attr.Type{
	"annotation":                types.StringType,
	"trust_control_policy_name": types.StringType,
	"annotations":               types.SetType{ElemType: TagAnnotationFvRsTrustCtrlFvAEPgType},
	"tags":                      types.SetType{ElemType: TagTagFvRsTrustCtrlFvAEPgType},
}

// TagAnnotationFvRsTrustCtrlFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagAnnotationFvRsTrustCtrlFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagAnnotationFvRsTrustCtrlFvAEPgResourceModel() TagAnnotationFvRsTrustCtrlFvAEPgResourceModel {
	return TagAnnotationFvRsTrustCtrlFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagAnnotationFvRsTrustCtrlFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// TagTagFvRsTrustCtrlFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagTagFvRsTrustCtrlFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagTagFvRsTrustCtrlFvAEPgResourceModel() TagTagFvRsTrustCtrlFvAEPgResourceModel {
	return TagTagFvRsTrustCtrlFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagTagFvRsTrustCtrlFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// TagAnnotationFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagAnnotationFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagAnnotationFvAEPgResourceModel() TagAnnotationFvAEPgResourceModel {
	return TagAnnotationFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagAnnotationFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

// TagTagFvAEPgResourceModel describes the resource data model for the children without relation ships.
type TagTagFvAEPgResourceModel struct {
	Key   types.String `tfsdk:"key"`
	Value types.String `tfsdk:"value"`
}

func getEmptyTagTagFvAEPgResourceModel() TagTagFvAEPgResourceModel {
	return TagTagFvAEPgResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

var TagTagFvAEPgType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"key":   types.StringType,
		"value": types.StringType,
	},
}

type FvAEPgIdentifier struct {
	Name types.String
}

var deprecatedFvRsNodeAttType = types.ObjectType{
	AttrTypes: map[string]attr.Type{
		"deployment_immediacy": basetypes.StringType{},
		"description":          basetypes.StringType{},
		"encap":                basetypes.StringType{},
		"mode":                 basetypes.StringType{},
		"node_dn":              basetypes.StringType{},
	},
}

type FvAEPgResourceModelV1 struct {
	Annotation                      types.String `tfsdk:"annotation"`
	Descr                           types.String `tfsdk:"description"`
	ExceptionTag                    types.String `tfsdk:"exception_tag"`
	FloodOnEncap                    types.String `tfsdk:"flood_on_encap"`
	FwdCtrl                         types.String `tfsdk:"fwd_ctrl"`
	HasMcastSource                  types.String `tfsdk:"has_mcast_source"`
	Id                              types.String `tfsdk:"id"`
	IsAttrBasedEPg                  types.String `tfsdk:"is_attr_based_epg"`
	MatchT                          types.String `tfsdk:"match_t"`
	Name                            types.String `tfsdk:"name"`
	NameAlias                       types.String `tfsdk:"name_alias"`
	ParentDn                        types.String `tfsdk:"application_profile_dn"`
	PcEnfPref                       types.String `tfsdk:"pc_enf_pref"`
	PrefGrMemb                      types.String `tfsdk:"pref_gr_memb"`
	Prio                            types.String `tfsdk:"prio"`
	Shutdown                        types.String `tfsdk:"shutdown"`
	FvRsAEPgMonPol                  types.String `tfsdk:"relation_fv_rs_aepg_mon_pol"`
	Ignored_relation_fv_rs_path_att types.Set    `tfsdk:"relation_fv_rs_path_att"`
	Ignored_relation_fv_rs_prov_def types.Set    `tfsdk:"relation_fv_rs_prov_def"`
	FvRsBd                          types.String `tfsdk:"relation_fv_rs_bd"`
	FvRsCons                        types.Set    `tfsdk:"relation_fv_rs_cons"`
	FvRsSecInherited                types.Set    `tfsdk:"relation_fv_rs_sec_inherited"`
	FvRsCustQosPol                  types.String `tfsdk:"relation_fv_rs_cust_qos_pol"`
	FvRsDppPol                      types.String `tfsdk:"relation_fv_rs_dpp_pol"`
	FvRsFcPathAtt                   types.Set    `tfsdk:"relation_fv_rs_fc_path_att"`
	FvRsConsIf                      types.Set    `tfsdk:"relation_fv_rs_cons_if"`
	FvRsIntraEpg                    types.Set    `tfsdk:"relation_fv_rs_intra_epg"`
	FvRsProv                        types.Set    `tfsdk:"relation_fv_rs_prov"`
	FvRsProtBy                      types.Set    `tfsdk:"relation_fv_rs_prot_by"`
	FvRsTrustCtrl                   types.String `tfsdk:"relation_fv_rs_trust_ctrl"`
	FvRsNodeAtt                     types.Set    `tfsdk:"relation_fv_rs_node_att"`
}

type FvRsNodeAttFvAEPgResourceModelV1 struct {
	InstrImedcy types.String `tfsdk:"deployment_immediacy"`
	Descr       types.String `tfsdk:"description"`
	Encap       types.String `tfsdk:"encap"`
	Mode        types.String `tfsdk:"mode"`
	TDn         types.String `tfsdk:"node_dn"`
}

func getEmptyFvRsNodeAttFvAEPgResourceModelV1() FvRsNodeAttFvAEPgResourceModelV1 {
	return FvRsNodeAttFvAEPgResourceModelV1{
		InstrImedcy: basetypes.NewStringNull(),
		Descr:       basetypes.NewStringNull(),
		Encap:       basetypes.NewStringNull(),
		Mode:        basetypes.NewStringNull(),
		TDn:         basetypes.NewStringNull(),
	}
}

func (r *FvAEPgResource) UpgradeState(ctx context.Context) map[int64]resource.StateUpgrader {
	return map[int64]resource.StateUpgrader{
		1: {
			PriorSchema: &schema.Schema{
				Attributes: map[string]schema.Attribute{
					"annotation": schema.StringAttribute{
						Required: false,
						Optional: true,
						Computed: true,
					},
					"description": schema.StringAttribute{
						Required: false,
						Optional: true,
						Computed: true,
					},
					"exception_tag": schema.StringAttribute{
						Required: false,
						Optional: true,
						Computed: true,
					},
					"flood_on_encap": schema.StringAttribute{
						Required: false,
						Optional: true,
						Computed: true,
					},
					"fwd_ctrl": schema.StringAttribute{
						Required: false,
						Optional: true,
						Computed: true,
					},
					"has_mcast_source": schema.StringAttribute{
						Required: false,
						Optional: true,
						Computed: true,
					},
					"id": schema.StringAttribute{
						Required: false,
						Optional: true,
						Computed: true,
					},
					"is_attr_based_epg": schema.StringAttribute{
						Required: false,
						Optional: true,
						Computed: true,
					},
					"match_t": schema.StringAttribute{
						Required: false,
						Optional: true,
						Computed: true,
					},
					"name": schema.StringAttribute{
						Required: true,
						Optional: false,
						Computed: false,
					},
					"name_alias": schema.StringAttribute{
						Required: false,
						Optional: true,
						Computed: true,
					},
					"application_profile_dn": schema.StringAttribute{
						Required: true,
						Optional: false,
						Computed: false,
					},
					"pc_enf_pref": schema.StringAttribute{
						Required: false,
						Optional: true,
						Computed: true,
					},
					"pref_gr_memb": schema.StringAttribute{
						Required: false,
						Optional: true,
						Computed: true,
					},
					"prio": schema.StringAttribute{
						Required: false,
						Optional: true,
						Computed: true,
					},
					"shutdown": schema.StringAttribute{
						Required: false,
						Optional: true,
						Computed: true,
					},
					"relation_fv_rs_aepg_mon_pol": schema.StringAttribute{
						Required: false,
						Optional: true,
						Computed: false,
					},
					"relation_fv_rs_path_att": schema.SetAttribute{
						Required:    false,
						Optional:    true,
						Computed:    false,
						ElementType: types.StringType,
					},
					"relation_fv_rs_prov_def": schema.SetAttribute{
						Required:    false,
						Optional:    true,
						Computed:    false,
						ElementType: types.StringType,
					},
					"relation_fv_rs_bd": schema.StringAttribute{
						Required: false,
						Optional: true,
						Computed: true,
					},
					"relation_fv_rs_cons": schema.SetAttribute{
						Required:    false,
						Optional:    true,
						Computed:    false,
						ElementType: types.StringType,
					},
					"relation_fv_rs_sec_inherited": schema.SetAttribute{
						Required:    false,
						Optional:    true,
						Computed:    false,
						ElementType: types.StringType,
					},
					"relation_fv_rs_cust_qos_pol": schema.StringAttribute{
						Required: false,
						Optional: true,
						Computed: true,
					},
					"relation_fv_rs_dpp_pol": schema.StringAttribute{
						Required: false,
						Optional: true,
						Computed: false,
					},
					"relation_fv_rs_fc_path_att": schema.SetAttribute{
						Required:    false,
						Optional:    true,
						Computed:    false,
						ElementType: types.StringType,
					},
					"relation_fv_rs_cons_if": schema.SetAttribute{
						Required:    false,
						Optional:    true,
						Computed:    false,
						ElementType: types.StringType,
					},
					"relation_fv_rs_intra_epg": schema.SetAttribute{
						Required:    false,
						Optional:    true,
						Computed:    false,
						ElementType: types.StringType,
					},
					"relation_fv_rs_prov": schema.SetAttribute{
						Required:    false,
						Optional:    true,
						Computed:    false,
						ElementType: types.StringType,
					},
					"relation_fv_rs_prot_by": schema.SetAttribute{
						Required:    false,
						Optional:    true,
						Computed:    false,
						ElementType: types.StringType,
					},
					"relation_fv_rs_trust_ctrl": schema.StringAttribute{
						Required: false,
						Optional: true,
						Computed: false,
					},
				},
				Blocks: map[string]schema.Block{
					"relation_fv_rs_node_att": schema.SetNestedBlock{
						NestedObject: schema.NestedBlockObject{
							Attributes: map[string]schema.Attribute{
								"deployment_immediacy": schema.StringAttribute{
									Required: false,
									Optional: true,
									Computed: false,
								},
								"description": schema.StringAttribute{
									Required: false,
									Optional: true,
									Computed: true,
								},
								"encap": schema.StringAttribute{
									Required: true,
									Optional: false,
									Computed: false,
								},
								"mode": schema.StringAttribute{
									Required: false,
									Optional: true,
									Computed: false,
								},
								"node_dn": schema.StringAttribute{
									Required: true,
									Optional: false,
									Computed: false,
								},
							},
						},
					},
				},
			},
			StateUpgrader: func(ctx context.Context, req resource.UpgradeStateRequest, resp *resource.UpgradeStateResponse) {
				var priorStateData FvAEPgResourceModelV1

				resp.Diagnostics.Append(req.State.Get(ctx, &priorStateData)...)

				if resp.Diagnostics.HasError() {
					return
				}

				upgradedStateData := FvAEPgResourceModel{
					Id:                              priorStateData.Id,
					ParentDn:                        priorStateData.ParentDn,
					Annotation:                      priorStateData.Annotation,
					Descr:                           priorStateData.Descr,
					ExceptionTag:                    priorStateData.ExceptionTag,
					FloodOnEncap:                    priorStateData.FloodOnEncap,
					FwdCtrl:                         priorStateData.FwdCtrl,
					HasMcastSource:                  priorStateData.HasMcastSource,
					IsAttrBasedEPg:                  priorStateData.IsAttrBasedEPg,
					MatchT:                          priorStateData.MatchT,
					Name:                            priorStateData.Name,
					NameAlias:                       priorStateData.NameAlias,
					PcEnfPref:                       priorStateData.PcEnfPref,
					PcTag:                           basetypes.NewStringNull(),
					PrefGrMemb:                      priorStateData.PrefGrMemb,
					Prio:                            customTypes.FvAEPgPrioStringValue{StringValue: priorStateData.Prio},
					Scope:                           basetypes.NewStringNull(),
					Shutdown:                        priorStateData.Shutdown,
					DeprecatedExceptionTag:          priorStateData.ExceptionTag,
					DeprecatedFloodOnEncap:          priorStateData.FloodOnEncap,
					DeprecatedFwdCtrl:               priorStateData.FwdCtrl,
					DeprecatedHasMcastSource:        priorStateData.HasMcastSource,
					DeprecatedIsAttrBasedEPg:        priorStateData.IsAttrBasedEPg,
					DeprecatedMatchT:                priorStateData.MatchT,
					DeprecatedParentDn:              priorStateData.ParentDn,
					DeprecatedPcEnfPref:             priorStateData.PcEnfPref,
					DeprecatedPrefGrMemb:            priorStateData.PrefGrMemb,
					DeprecatedPrio:                  priorStateData.Prio,
					DeprecatedShutdown:              priorStateData.Shutdown,
					DeprecatedFvRsAEPgMonPol:        priorStateData.FvRsAEPgMonPol,
					Ignored_relation_fv_rs_path_att: priorStateData.Ignored_relation_fv_rs_path_att,
					Ignored_relation_fv_rs_prov_def: priorStateData.Ignored_relation_fv_rs_prov_def,
					DeprecatedFvRsBd:                priorStateData.FvRsBd,
					DeprecatedFvRsCustQosPol:        priorStateData.FvRsCustQosPol,
					DeprecatedFvRsDppPol:            priorStateData.FvRsDppPol,
					DeprecatedFvRsTrustCtrl:         priorStateData.FvRsTrustCtrl,
				}

				upgradedStateData.FvCrtrn = types.ObjectNull(FvCrtrnFvAEPgType)

				FvRsAEPgMonPolObject := FvRsAEPgMonPolFvAEPgResourceModel{
					Annotation:      basetypes.NewStringNull(),
					TnMonEPGPolName: basetypes.NewStringValue(GetMOName(priorStateData.FvRsAEPgMonPol.ValueString())),
					TagAnnotation: basetypes.NewSetNull(types.ObjectType{
						AttrTypes: map[string]attr.Type{
							"key":   types.StringType,
							"value": types.StringType,
						},
					}),
					TagTag: basetypes.NewSetNull(types.ObjectType{
						AttrTypes: map[string]attr.Type{
							"key":   types.StringType,
							"value": types.StringType,
						},
					}),
				}
				fvRsAEPgMonPolObject, _ := types.ObjectValueFrom(ctx, FvRsAEPgMonPolFvAEPgType, FvRsAEPgMonPolObject)
				upgradedStateData.FvRsAEPgMonPol = fvRsAEPgMonPolObject

				FvRsBdObject := FvRsBdFvAEPgResourceModel{
					Annotation: basetypes.NewStringNull(),
					TnFvBDName: basetypes.NewStringValue(GetMOName(priorStateData.FvRsBd.ValueString())),
					TagAnnotation: basetypes.NewSetNull(types.ObjectType{
						AttrTypes: map[string]attr.Type{
							"key":   types.StringType,
							"value": types.StringType,
						},
					}),
					TagTag: basetypes.NewSetNull(types.ObjectType{
						AttrTypes: map[string]attr.Type{
							"key":   types.StringType,
							"value": types.StringType,
						},
					}),
				}
				fvRsBdObject, _ := types.ObjectValueFrom(ctx, FvRsBdFvAEPgType, FvRsBdObject)
				upgradedStateData.FvRsBd = fvRsBdObject

				FvRsConsList := make([]FvRsConsFvAEPgResourceModel, 0)
				var priorStateDataFvRsConsList []string
				priorStateData.FvRsCons.ElementsAs(ctx, &priorStateDataFvRsConsList, false)
				for _, priorStateDataFvRsCons := range priorStateDataFvRsConsList {
					FvRsCons := FvRsConsFvAEPgResourceModel{
						Annotation:   basetypes.NewStringNull(),
						TnVzBrCPName: basetypes.NewStringValue(GetMOName(priorStateDataFvRsCons)),
						TagAnnotation: basetypes.NewSetNull(types.ObjectType{
							AttrTypes: map[string]attr.Type{
								"key":   types.StringType,
								"value": types.StringType,
							},
						}),
						TagTag: basetypes.NewSetNull(types.ObjectType{
							AttrTypes: map[string]attr.Type{
								"key":   types.StringType,
								"value": types.StringType,
							},
						}),
					}
					FvRsConsList = append(FvRsConsList, FvRsCons)
				}
				FvRsConsSet, _ := types.SetValueFrom(ctx, FvRsConsFvAEPgType, FvRsConsList)
				upgradedStateData.FvRsCons = FvRsConsSet

				FvRsConsIfList := make([]FvRsConsIfFvAEPgResourceModel, 0)
				var priorStateDataFvRsConsIfList []string
				priorStateData.FvRsConsIf.ElementsAs(ctx, &priorStateDataFvRsConsIfList, false)
				for _, priorStateDataFvRsConsIf := range priorStateDataFvRsConsIfList {
					FvRsConsIf := FvRsConsIfFvAEPgResourceModel{
						Annotation:   basetypes.NewStringNull(),
						TnVzCPIfName: basetypes.NewStringValue(GetMOName(priorStateDataFvRsConsIf)),
						TagAnnotation: basetypes.NewSetNull(types.ObjectType{
							AttrTypes: map[string]attr.Type{
								"key":   types.StringType,
								"value": types.StringType,
							},
						}),
						TagTag: basetypes.NewSetNull(types.ObjectType{
							AttrTypes: map[string]attr.Type{
								"key":   types.StringType,
								"value": types.StringType,
							},
						}),
					}
					FvRsConsIfList = append(FvRsConsIfList, FvRsConsIf)
				}
				FvRsConsIfSet, _ := types.SetValueFrom(ctx, FvRsConsIfFvAEPgType, FvRsConsIfList)
				upgradedStateData.FvRsConsIf = FvRsConsIfSet

				FvRsCustQosPolObject := FvRsCustQosPolFvAEPgResourceModel{
					Annotation:         basetypes.NewStringNull(),
					TnQosCustomPolName: basetypes.NewStringValue(GetMOName(priorStateData.FvRsCustQosPol.ValueString())),
					TagAnnotation: basetypes.NewSetNull(types.ObjectType{
						AttrTypes: map[string]attr.Type{
							"key":   types.StringType,
							"value": types.StringType,
						},
					}),
					TagTag: basetypes.NewSetNull(types.ObjectType{
						AttrTypes: map[string]attr.Type{
							"key":   types.StringType,
							"value": types.StringType,
						},
					}),
				}
				fvRsCustQosPolObject, _ := types.ObjectValueFrom(ctx, FvRsCustQosPolFvAEPgType, FvRsCustQosPolObject)
				upgradedStateData.FvRsCustQosPol = fvRsCustQosPolObject

				upgradedStateData.FvRsDomAtt = types.SetNull(
					types.ObjectType{
						AttrTypes: map[string]attr.Type{
							"annotation":                    basetypes.StringType{},
							"binding_type":                  basetypes.StringType{},
							"class_preference":              basetypes.StringType{},
							"custom_epg_name":               basetypes.StringType{},
							"delimiter":                     basetypes.StringType{},
							"encapsulation":                 basetypes.StringType{},
							"encapsulation_mode":            basetypes.StringType{},
							"epg_cos":                       basetypes.StringType{},
							"epg_cos_pref":                  basetypes.StringType{},
							"deployment_immediacy":          basetypes.StringType{},
							"ipam_dhcp_override":            basetypes.StringType{},
							"ipam_enabled":                  basetypes.StringType{},
							"ipam_gateway":                  basetypes.StringType{},
							"lag_policy_name":               basetypes.StringType{},
							"netflow_direction":             basetypes.StringType{},
							"enable_netflow":                basetypes.StringType{},
							"number_of_ports":               basetypes.StringType{},
							"port_allocation":               basetypes.StringType{},
							"primary_encapsulation":         basetypes.StringType{},
							"primary_encapsulation_inner":   basetypes.StringType{},
							"resolution_immediacy":          basetypes.StringType{},
							"secondary_encapsulation_inner": basetypes.StringType{},
							"switching_mode":                basetypes.StringType{},
							"target_dn":                     basetypes.StringType{},
							"untagged":                      basetypes.StringType{},
							"annotations":                   basetypes.SetType{ElemType: TagAnnotationFvRsDomAttFvAEPgType},
							"tags":                          basetypes.SetType{ElemType: TagTagFvRsDomAttFvAEPgType},
						},
					},
				)

				FvRsDppPolObject := FvRsDppPolFvAEPgResourceModel{
					Annotation:      basetypes.NewStringNull(),
					TnQosDppPolName: basetypes.NewStringValue(GetMOName(priorStateData.FvRsDppPol.ValueString())),
					TagAnnotation: basetypes.NewSetNull(types.ObjectType{
						AttrTypes: map[string]attr.Type{
							"key":   types.StringType,
							"value": types.StringType,
						},
					}),
					TagTag: basetypes.NewSetNull(types.ObjectType{
						AttrTypes: map[string]attr.Type{
							"key":   types.StringType,
							"value": types.StringType,
						},
					}),
				}
				fvRsDppPolObject, _ := types.ObjectValueFrom(ctx, FvRsDppPolFvAEPgType, FvRsDppPolObject)
				upgradedStateData.FvRsDppPol = fvRsDppPolObject

				FvRsFcPathAttList := make([]FvRsFcPathAttFvAEPgResourceModel, 0)
				var priorStateDataFvRsFcPathAttList []string
				priorStateData.FvRsFcPathAtt.ElementsAs(ctx, &priorStateDataFvRsFcPathAttList, false)
				for _, priorStateDataFvRsFcPathAtt := range priorStateDataFvRsFcPathAttList {
					FvRsFcPathAtt := FvRsFcPathAttFvAEPgResourceModel{
						Annotation: basetypes.NewStringNull(),
						Descr:      basetypes.NewStringNull(),
						TDn:        basetypes.NewStringValue(priorStateDataFvRsFcPathAtt),
						Vsan:       basetypes.NewStringNull(),
						VsanMode:   basetypes.NewStringNull(),
						TagAnnotation: basetypes.NewSetNull(types.ObjectType{
							AttrTypes: map[string]attr.Type{
								"key":   types.StringType,
								"value": types.StringType,
							},
						}),
						TagTag: basetypes.NewSetNull(types.ObjectType{
							AttrTypes: map[string]attr.Type{
								"key":   types.StringType,
								"value": types.StringType,
							},
						}),
					}
					FvRsFcPathAttList = append(FvRsFcPathAttList, FvRsFcPathAtt)
				}
				FvRsFcPathAttSet, _ := types.SetValueFrom(ctx, FvRsFcPathAttFvAEPgType, FvRsFcPathAttList)
				upgradedStateData.FvRsFcPathAtt = FvRsFcPathAttSet

				FvRsIntraEpgList := make([]FvRsIntraEpgFvAEPgResourceModel, 0)
				var priorStateDataFvRsIntraEpgList []string
				priorStateData.FvRsIntraEpg.ElementsAs(ctx, &priorStateDataFvRsIntraEpgList, false)
				for _, priorStateDataFvRsIntraEpg := range priorStateDataFvRsIntraEpgList {
					FvRsIntraEpg := FvRsIntraEpgFvAEPgResourceModel{
						Annotation:   basetypes.NewStringNull(),
						TnVzBrCPName: basetypes.NewStringValue(GetMOName(priorStateDataFvRsIntraEpg)),
						TagAnnotation: basetypes.NewSetNull(types.ObjectType{
							AttrTypes: map[string]attr.Type{
								"key":   types.StringType,
								"value": types.StringType,
							},
						}),
						TagTag: basetypes.NewSetNull(types.ObjectType{
							AttrTypes: map[string]attr.Type{
								"key":   types.StringType,
								"value": types.StringType,
							},
						}),
					}
					FvRsIntraEpgList = append(FvRsIntraEpgList, FvRsIntraEpg)
				}
				FvRsIntraEpgSet, _ := types.SetValueFrom(ctx, FvRsIntraEpgFvAEPgType, FvRsIntraEpgList)
				upgradedStateData.FvRsIntraEpg = FvRsIntraEpgSet

				FvRsNodeAttList := make([]FvRsNodeAttFvAEPgResourceModel, 0)
				var priorStateDataFvRsNodeAttList []FvRsNodeAttFvAEPgResourceModelV1
				priorStateData.FvRsNodeAtt.ElementsAs(ctx, &priorStateDataFvRsNodeAttList, false)
				for _, priorStateDataFvRsNodeAtt := range priorStateDataFvRsNodeAttList {
					FvRsNodeAtt := FvRsNodeAttFvAEPgResourceModel{
						Annotation:  basetypes.NewStringNull(),
						Descr:       priorStateDataFvRsNodeAtt.Descr,
						Encap:       priorStateDataFvRsNodeAtt.Encap,
						InstrImedcy: priorStateDataFvRsNodeAtt.InstrImedcy,
						Mode:        priorStateDataFvRsNodeAtt.Mode,
						TDn:         priorStateDataFvRsNodeAtt.TDn,
						TagAnnotation: basetypes.NewSetNull(types.ObjectType{
							AttrTypes: map[string]attr.Type{
								"key":   types.StringType,
								"value": types.StringType,
							},
						}),
						TagTag: basetypes.NewSetNull(types.ObjectType{
							AttrTypes: map[string]attr.Type{
								"key":   types.StringType,
								"value": types.StringType,
							},
						}),
					}
					FvRsNodeAttList = append(FvRsNodeAttList, FvRsNodeAtt)
				}
				FvRsNodeAttSet, _ := types.SetValueFrom(ctx, FvRsNodeAttFvAEPgType, FvRsNodeAttList)
				upgradedStateData.FvRsNodeAtt = FvRsNodeAttSet

				upgradedStateData.FvRsPathAtt = types.SetNull(
					types.ObjectType{
						AttrTypes: map[string]attr.Type{
							"annotation":            basetypes.StringType{},
							"description":           basetypes.StringType{},
							"encapsulation":         basetypes.StringType{},
							"deployment_immediacy":  basetypes.StringType{},
							"mode":                  basetypes.StringType{},
							"primary_encapsulation": basetypes.StringType{},
							"target_dn":             basetypes.StringType{},
							"annotations":           basetypes.SetType{ElemType: TagAnnotationFvRsPathAttFvAEPgType},
							"tags":                  basetypes.SetType{ElemType: TagTagFvRsPathAttFvAEPgType},
						},
					},
				)

				FvRsProtByList := make([]FvRsProtByFvAEPgResourceModel, 0)
				var priorStateDataFvRsProtByList []string
				priorStateData.FvRsProtBy.ElementsAs(ctx, &priorStateDataFvRsProtByList, false)
				for _, priorStateDataFvRsProtBy := range priorStateDataFvRsProtByList {
					FvRsProtBy := FvRsProtByFvAEPgResourceModel{
						Annotation:    basetypes.NewStringNull(),
						TnVzTabooName: basetypes.NewStringValue(GetMOName(priorStateDataFvRsProtBy)),
						TagAnnotation: basetypes.NewSetNull(types.ObjectType{
							AttrTypes: map[string]attr.Type{
								"key":   types.StringType,
								"value": types.StringType,
							},
						}),
						TagTag: basetypes.NewSetNull(types.ObjectType{
							AttrTypes: map[string]attr.Type{
								"key":   types.StringType,
								"value": types.StringType,
							},
						}),
					}
					FvRsProtByList = append(FvRsProtByList, FvRsProtBy)
				}
				FvRsProtBySet, _ := types.SetValueFrom(ctx, FvRsProtByFvAEPgType, FvRsProtByList)
				upgradedStateData.FvRsProtBy = FvRsProtBySet

				FvRsProvList := make([]FvRsProvFvAEPgResourceModel, 0)
				var priorStateDataFvRsProvList []string
				priorStateData.FvRsProv.ElementsAs(ctx, &priorStateDataFvRsProvList, false)
				for _, priorStateDataFvRsProv := range priorStateDataFvRsProvList {
					FvRsProv := FvRsProvFvAEPgResourceModel{
						Annotation:   basetypes.NewStringNull(),
						TnVzBrCPName: basetypes.NewStringValue(GetMOName(priorStateDataFvRsProv)),
						TagAnnotation: basetypes.NewSetNull(types.ObjectType{
							AttrTypes: map[string]attr.Type{
								"key":   types.StringType,
								"value": types.StringType,
							},
						}),
						TagTag: basetypes.NewSetNull(types.ObjectType{
							AttrTypes: map[string]attr.Type{
								"key":   types.StringType,
								"value": types.StringType,
							},
						}),
					}
					FvRsProvList = append(FvRsProvList, FvRsProv)
				}
				FvRsProvSet, _ := types.SetValueFrom(ctx, FvRsProvFvAEPgType, FvRsProvList)
				upgradedStateData.FvRsProv = FvRsProvSet

				FvRsSecInheritedList := make([]FvRsSecInheritedFvAEPgResourceModel, 0)
				var priorStateDataFvRsSecInheritedList []string
				priorStateData.FvRsSecInherited.ElementsAs(ctx, &priorStateDataFvRsSecInheritedList, false)
				for _, priorStateDataFvRsSecInherited := range priorStateDataFvRsSecInheritedList {
					FvRsSecInherited := FvRsSecInheritedFvAEPgResourceModel{
						Annotation: basetypes.NewStringNull(),
						TDn:        basetypes.NewStringValue(priorStateDataFvRsSecInherited),
						TagAnnotation: basetypes.NewSetNull(types.ObjectType{
							AttrTypes: map[string]attr.Type{
								"key":   types.StringType,
								"value": types.StringType,
							},
						}),
						TagTag: basetypes.NewSetNull(types.ObjectType{
							AttrTypes: map[string]attr.Type{
								"key":   types.StringType,
								"value": types.StringType,
							},
						}),
					}
					FvRsSecInheritedList = append(FvRsSecInheritedList, FvRsSecInherited)
				}
				FvRsSecInheritedSet, _ := types.SetValueFrom(ctx, FvRsSecInheritedFvAEPgType, FvRsSecInheritedList)
				upgradedStateData.FvRsSecInherited = FvRsSecInheritedSet

				FvRsTrustCtrlObject := FvRsTrustCtrlFvAEPgResourceModel{
					Annotation:            basetypes.NewStringNull(),
					TnFhsTrustCtrlPolName: basetypes.NewStringValue(GetMOName(priorStateData.FvRsTrustCtrl.ValueString())),
					TagAnnotation: basetypes.NewSetNull(types.ObjectType{
						AttrTypes: map[string]attr.Type{
							"key":   types.StringType,
							"value": types.StringType,
						},
					}),
					TagTag: basetypes.NewSetNull(types.ObjectType{
						AttrTypes: map[string]attr.Type{
							"key":   types.StringType,
							"value": types.StringType,
						},
					}),
				}
				fvRsTrustCtrlObject, _ := types.ObjectValueFrom(ctx, FvRsTrustCtrlFvAEPgType, FvRsTrustCtrlObject)
				upgradedStateData.FvRsTrustCtrl = fvRsTrustCtrlObject

				upgradedStateData.TagAnnotation = types.SetNull(
					types.ObjectType{
						AttrTypes: map[string]attr.Type{
							"key":   basetypes.StringType{},
							"value": basetypes.StringType{},
						},
					},
				)

				upgradedStateData.TagTag = types.SetNull(
					types.ObjectType{
						AttrTypes: map[string]attr.Type{
							"key":   basetypes.StringType{},
							"value": basetypes.StringType{},
						},
					},
				)

				var deprecatedFvRsConsList []string
				priorStateData.FvRsCons.ElementsAs(ctx, &deprecatedFvRsConsList, false)
				DeprecatedFvRsConsSet, _ := types.SetValueFrom(ctx, types.StringType, deprecatedFvRsConsList)
				upgradedStateData.DeprecatedFvRsCons = DeprecatedFvRsConsSet

				var deprecatedFvRsSecInheritedList []string
				priorStateData.FvRsSecInherited.ElementsAs(ctx, &deprecatedFvRsSecInheritedList, false)
				DeprecatedFvRsSecInheritedSet, _ := types.SetValueFrom(ctx, types.StringType, deprecatedFvRsSecInheritedList)
				upgradedStateData.DeprecatedFvRsSecInherited = DeprecatedFvRsSecInheritedSet

				var deprecatedFvRsFcPathAttList []string
				priorStateData.FvRsFcPathAtt.ElementsAs(ctx, &deprecatedFvRsFcPathAttList, false)
				DeprecatedFvRsFcPathAttSet, _ := types.SetValueFrom(ctx, types.StringType, deprecatedFvRsFcPathAttList)
				upgradedStateData.DeprecatedFvRsFcPathAtt = DeprecatedFvRsFcPathAttSet

				var deprecatedFvRsConsIfList []string
				priorStateData.FvRsConsIf.ElementsAs(ctx, &deprecatedFvRsConsIfList, false)
				DeprecatedFvRsConsIfSet, _ := types.SetValueFrom(ctx, types.StringType, deprecatedFvRsConsIfList)
				upgradedStateData.DeprecatedFvRsConsIf = DeprecatedFvRsConsIfSet

				var deprecatedFvRsIntraEpgList []string
				priorStateData.FvRsIntraEpg.ElementsAs(ctx, &deprecatedFvRsIntraEpgList, false)
				DeprecatedFvRsIntraEpgSet, _ := types.SetValueFrom(ctx, types.StringType, deprecatedFvRsIntraEpgList)
				upgradedStateData.DeprecatedFvRsIntraEpg = DeprecatedFvRsIntraEpgSet

				var deprecatedFvRsProvList []string
				priorStateData.FvRsProv.ElementsAs(ctx, &deprecatedFvRsProvList, false)
				DeprecatedFvRsProvSet, _ := types.SetValueFrom(ctx, types.StringType, deprecatedFvRsProvList)
				upgradedStateData.DeprecatedFvRsProv = DeprecatedFvRsProvSet

				var deprecatedFvRsProtByList []string
				priorStateData.FvRsProtBy.ElementsAs(ctx, &deprecatedFvRsProtByList, false)
				DeprecatedFvRsProtBySet, _ := types.SetValueFrom(ctx, types.StringType, deprecatedFvRsProtByList)
				upgradedStateData.DeprecatedFvRsProtBy = DeprecatedFvRsProtBySet

				var FvRsNodeAttV1List []FvRsNodeAttFvAEPgResourceModelV1
				priorStateData.FvRsNodeAtt.ElementsAs(ctx, &FvRsNodeAttV1List, false)
				FvRsNodeAttV1Set, _ := types.SetValueFrom(ctx, deprecatedFvRsNodeAttType, FvRsNodeAttV1List)
				upgradedStateData.DeprecatedFvRsNodeAtt = FvRsNodeAttV1Set

				resp.Diagnostics.Append(resp.State.Set(ctx, upgradedStateData)...)
			},
		},
	}
}

func setFvAEPgLegacyAttributes(ctx context.Context, diags *diag.Diagnostics, data, staticData *FvAEPgResourceModel, classReadInfo []interface{}) {
	data.DeprecatedParentDn = data.ParentDn
	if !staticData.Ignored_relation_fv_rs_path_att.IsUnknown() && !staticData.Ignored_relation_fv_rs_path_att.IsNull() {
		data.Ignored_relation_fv_rs_path_att = staticData.Ignored_relation_fv_rs_path_att
	} else {
		Ignored_relation_fv_rs_path_attSet, _ := types.SetValueFrom(ctx, types.StringType, []string{})
		data.Ignored_relation_fv_rs_path_att = Ignored_relation_fv_rs_path_attSet
	}
	if !staticData.Ignored_relation_fv_rs_prov_def.IsUnknown() && !staticData.Ignored_relation_fv_rs_prov_def.IsNull() {
		data.Ignored_relation_fv_rs_prov_def = staticData.Ignored_relation_fv_rs_prov_def
	} else {
		Ignored_relation_fv_rs_prov_defSet, _ := types.SetValueFrom(ctx, types.StringType, []string{})
		data.Ignored_relation_fv_rs_prov_def = Ignored_relation_fv_rs_prov_defSet
	}
	attributes := classReadInfo[0].(map[string]interface{})["attributes"].(map[string]interface{})
	for attributeName, attributeValue := range attributes {
		if attributeName == "exceptionTag" {
			data.DeprecatedExceptionTag = basetypes.NewStringValue(attributeValue.(string))
		}
		if attributeName == "floodOnEncap" {
			data.DeprecatedFloodOnEncap = basetypes.NewStringValue(attributeValue.(string))
		}
		if attributeName == "fwdCtrl" && attributeValue.(string) == "" {
			data.DeprecatedFwdCtrl = basetypes.NewStringValue("none")
		} else if attributeName == "fwdCtrl" {
			data.DeprecatedFwdCtrl = basetypes.NewStringValue(attributeValue.(string))
		}
		if attributeName == "hasMcastSource" {
			data.DeprecatedHasMcastSource = basetypes.NewStringValue(attributeValue.(string))
		}
		if attributeName == "isAttrBasedEPg" {
			data.DeprecatedIsAttrBasedEPg = basetypes.NewStringValue(attributeValue.(string))
		}
		if attributeName == "matchT" {
			data.DeprecatedMatchT = basetypes.NewStringValue(attributeValue.(string))
		}
		if attributeName == "pcEnfPref" {
			data.DeprecatedPcEnfPref = basetypes.NewStringValue(attributeValue.(string))
		}
		if attributeName == "prefGrMemb" {
			data.DeprecatedPrefGrMemb = basetypes.NewStringValue(attributeValue.(string))
		}
		if attributeName == "prio" {
			data.DeprecatedPrio = basetypes.NewStringValue(attributeValue.(string))
		}
		if attributeName == "shutdown" {
			data.DeprecatedShutdown = basetypes.NewStringValue(attributeValue.(string))
		}
	}
	data.DeprecatedFvRsAEPgMonPol = basetypes.NewStringNull()
	data.DeprecatedFvRsBd = basetypes.NewStringNull()
	DeprecatedFvRsConsFvAEPgList := make([]string, 0)
	DeprecatedFvRsConsIfFvAEPgList := make([]string, 0)
	data.DeprecatedFvRsCustQosPol = basetypes.NewStringNull()
	data.DeprecatedFvRsDppPol = basetypes.NewStringNull()
	DeprecatedFvRsFcPathAttFvAEPgList := make([]string, 0)
	DeprecatedFvRsIntraEpgFvAEPgList := make([]string, 0)
	DeprecatedFvRsNodeAttFvAEPgList := make([]FvRsNodeAttFvAEPgResourceModelV1, 0)
	DeprecatedFvRsProtByFvAEPgList := make([]string, 0)
	DeprecatedFvRsProvFvAEPgList := make([]string, 0)
	DeprecatedFvRsSecInheritedFvAEPgList := make([]string, 0)
	data.DeprecatedFvRsTrustCtrl = basetypes.NewStringNull()

	_, ok := classReadInfo[0].(map[string]interface{})["children"]
	if ok {
		children := classReadInfo[0].(map[string]interface{})["children"].([]interface{})
		for _, child := range children {
			for childClassName, childClassDetails := range child.(map[string]interface{}) {
				childAttributes := childClassDetails.(map[string]interface{})["attributes"].(map[string]interface{})
				if childClassName == "fvRsAEPgMonPol" {
					for childAttributeName, childAttributeValue := range childAttributes {
						if childAttributeName == "tDn" {
							data.DeprecatedFvRsAEPgMonPol = basetypes.NewStringValue(childAttributeValue.(string))
						}
					}
				}
				if childClassName == "fvRsBd" {
					for childAttributeName, childAttributeValue := range childAttributes {
						if childAttributeName == "tDn" {
							data.DeprecatedFvRsBd = basetypes.NewStringValue(childAttributeValue.(string))
						}
					}
				}
				if childClassName == "fvRsCons" {
					for childAttributeName, childAttributeValue := range childAttributes {
						if childAttributeName == "tDn" && childAttributeValue != "" && !ContainsString(DeprecatedFvRsConsFvAEPgList, childAttributeValue.(string)) {
							DeprecatedFvRsConsFvAEPgList = append(DeprecatedFvRsConsFvAEPgList, childAttributeValue.(string))
						}
					}
				}
				if childClassName == "fvRsConsIf" {
					for childAttributeName, childAttributeValue := range childAttributes {
						if childAttributeName == "tDn" && childAttributeValue != "" && !ContainsString(DeprecatedFvRsConsIfFvAEPgList, childAttributeValue.(string)) {
							DeprecatedFvRsConsIfFvAEPgList = append(DeprecatedFvRsConsIfFvAEPgList, childAttributeValue.(string))
						}
					}
				}
				if childClassName == "fvRsCustQosPol" {
					for childAttributeName, childAttributeValue := range childAttributes {
						if childAttributeName == "tDn" {
							data.DeprecatedFvRsCustQosPol = basetypes.NewStringValue(childAttributeValue.(string))
						}
					}
				}
				if childClassName == "fvRsDppPol" {
					for childAttributeName, childAttributeValue := range childAttributes {
						if childAttributeName == "tDn" {
							data.DeprecatedFvRsDppPol = basetypes.NewStringValue(childAttributeValue.(string))
						}
					}
				}
				if childClassName == "fvRsFcPathAtt" {
					for childAttributeName, childAttributeValue := range childAttributes {
						if childAttributeName == "tDn" && childAttributeValue != "" && !ContainsString(DeprecatedFvRsFcPathAttFvAEPgList, childAttributeValue.(string)) {
							DeprecatedFvRsFcPathAttFvAEPgList = append(DeprecatedFvRsFcPathAttFvAEPgList, childAttributeValue.(string))
						}
					}
				}
				if childClassName == "fvRsIntraEpg" {
					for childAttributeName, childAttributeValue := range childAttributes {
						if childAttributeName == "tDn" && childAttributeValue != "" && !ContainsString(DeprecatedFvRsIntraEpgFvAEPgList, childAttributeValue.(string)) {
							DeprecatedFvRsIntraEpgFvAEPgList = append(DeprecatedFvRsIntraEpgFvAEPgList, childAttributeValue.(string))
						}
					}
				}
				if childClassName == "fvRsNodeAtt" {
					DeprecatedFvRsNodeAttFvAEPg := getEmptyFvRsNodeAttFvAEPgResourceModelV1()
					for childAttributeName, childAttributeValue := range childAttributes {
						if childAttributeName == "descr" {
							DeprecatedFvRsNodeAttFvAEPg.Descr = basetypes.NewStringValue(childAttributeValue.(string))
						}
						if childAttributeName == "encap" {
							DeprecatedFvRsNodeAttFvAEPg.Encap = basetypes.NewStringValue(childAttributeValue.(string))
						}
						if childAttributeName == "instrImedcy" {
							DeprecatedFvRsNodeAttFvAEPg.InstrImedcy = basetypes.NewStringValue(childAttributeValue.(string))
						}
						if childAttributeName == "mode" {
							DeprecatedFvRsNodeAttFvAEPg.Mode = basetypes.NewStringValue(childAttributeValue.(string))
						}
						if childAttributeName == "tDn" {
							DeprecatedFvRsNodeAttFvAEPg.TDn = basetypes.NewStringValue(childAttributeValue.(string))
						}
					}
					DeprecatedFvRsNodeAttFvAEPgList = append(DeprecatedFvRsNodeAttFvAEPgList, DeprecatedFvRsNodeAttFvAEPg)
				}
				if childClassName == "fvRsProtBy" {
					for childAttributeName, childAttributeValue := range childAttributes {
						if childAttributeName == "tDn" && childAttributeValue != "" && !ContainsString(DeprecatedFvRsProtByFvAEPgList, childAttributeValue.(string)) {
							DeprecatedFvRsProtByFvAEPgList = append(DeprecatedFvRsProtByFvAEPgList, childAttributeValue.(string))
						}
					}
				}
				if childClassName == "fvRsProv" {
					for childAttributeName, childAttributeValue := range childAttributes {
						if childAttributeName == "tDn" && childAttributeValue != "" && !ContainsString(DeprecatedFvRsProvFvAEPgList, childAttributeValue.(string)) {
							DeprecatedFvRsProvFvAEPgList = append(DeprecatedFvRsProvFvAEPgList, childAttributeValue.(string))
						}
					}
				}
				if childClassName == "fvRsSecInherited" {
					for childAttributeName, childAttributeValue := range childAttributes {
						if childAttributeName == "tDn" && childAttributeValue != "" && !ContainsString(DeprecatedFvRsSecInheritedFvAEPgList, childAttributeValue.(string)) {
							DeprecatedFvRsSecInheritedFvAEPgList = append(DeprecatedFvRsSecInheritedFvAEPgList, childAttributeValue.(string))
						}
					}
				}
				if childClassName == "fvRsTrustCtrl" {
					for childAttributeName, childAttributeValue := range childAttributes {
						if childAttributeName == "tDn" {
							data.DeprecatedFvRsTrustCtrl = basetypes.NewStringValue(childAttributeValue.(string))
						}
					}
				}
			}
		}
		fvRsConsSet, _ := types.SetValueFrom(ctx, data.DeprecatedFvRsCons.ElementType(ctx), DeprecatedFvRsConsFvAEPgList)
		data.DeprecatedFvRsCons = fvRsConsSet
		fvRsConsIfSet, _ := types.SetValueFrom(ctx, data.DeprecatedFvRsConsIf.ElementType(ctx), DeprecatedFvRsConsIfFvAEPgList)
		data.DeprecatedFvRsConsIf = fvRsConsIfSet
		fvRsFcPathAttSet, _ := types.SetValueFrom(ctx, data.DeprecatedFvRsFcPathAtt.ElementType(ctx), DeprecatedFvRsFcPathAttFvAEPgList)
		data.DeprecatedFvRsFcPathAtt = fvRsFcPathAttSet
		fvRsIntraEpgSet, _ := types.SetValueFrom(ctx, data.DeprecatedFvRsIntraEpg.ElementType(ctx), DeprecatedFvRsIntraEpgFvAEPgList)
		data.DeprecatedFvRsIntraEpg = fvRsIntraEpgSet
		fvRsNodeAttSet, _ := types.SetValueFrom(ctx, data.DeprecatedFvRsNodeAtt.ElementType(ctx), DeprecatedFvRsNodeAttFvAEPgList)
		data.DeprecatedFvRsNodeAtt = fvRsNodeAttSet
		fvRsProtBySet, _ := types.SetValueFrom(ctx, data.DeprecatedFvRsProtBy.ElementType(ctx), DeprecatedFvRsProtByFvAEPgList)
		data.DeprecatedFvRsProtBy = fvRsProtBySet
		fvRsProvSet, _ := types.SetValueFrom(ctx, data.DeprecatedFvRsProv.ElementType(ctx), DeprecatedFvRsProvFvAEPgList)
		data.DeprecatedFvRsProv = fvRsProvSet
		fvRsSecInheritedSet, _ := types.SetValueFrom(ctx, data.DeprecatedFvRsSecInherited.ElementType(ctx), DeprecatedFvRsSecInheritedFvAEPgList)
		data.DeprecatedFvRsSecInherited = fvRsSecInheritedSet
	}
}

func (r *FvAEPgResource) ModifyPlan(ctx context.Context, req resource.ModifyPlanRequest, resp *resource.ModifyPlanResponse) {
	if !req.Plan.Raw.IsNull() {
		var planData, stateData, configData *FvAEPgResourceModel
		resp.Diagnostics.Append(req.Plan.Get(ctx, &planData)...)
		resp.Diagnostics.Append(req.State.Get(ctx, &stateData)...)
		resp.Diagnostics.Append(req.Config.Get(ctx, &configData)...)

		if resp.Diagnostics.HasError() {
			return
		}

		if (planData.Id.IsUnknown() || planData.Id.IsNull()) && !planData.ParentDn.IsUnknown() && !planData.Name.IsUnknown() {
			setFvAEPgId(ctx, planData)
		}

		if stateData == nil && !globalAllowExistingOnCreate && !planData.Id.IsUnknown() && !planData.Id.IsNull() {
			CheckDn(ctx, &resp.Diagnostics, r.client, "fvAEPg", planData.Id.ValueString())
			if resp.Diagnostics.HasError() {
				return
			}
		}
		if !configData.FvCrtrn.IsNull() && stateData != nil {
			if IsEmptySingleNestedAttribute(configData.FvCrtrn.Attributes()) {
				FvCrtrnObject, _ := types.ObjectValueFrom(ctx, FvCrtrnFvAEPgType, getEmptyFvCrtrnFvAEPgResourceModel())
				planData.FvCrtrn = FvCrtrnObject
			}
		}
		if !configData.FvRsAEPgMonPol.IsNull() && stateData != nil {
			if IsEmptySingleNestedAttribute(configData.FvRsAEPgMonPol.Attributes()) {
				FvRsAEPgMonPolObject, _ := types.ObjectValueFrom(ctx, FvRsAEPgMonPolFvAEPgType, getEmptyFvRsAEPgMonPolFvAEPgResourceModel())
				planData.FvRsAEPgMonPol = FvRsAEPgMonPolObject
			}
		}
		if !configData.FvRsBd.IsNull() && stateData != nil {
			if IsEmptySingleNestedAttribute(configData.FvRsBd.Attributes()) {
				FvRsBdObject, _ := types.ObjectValueFrom(ctx, FvRsBdFvAEPgType, getEmptyFvRsBdFvAEPgResourceModel())
				planData.FvRsBd = FvRsBdObject
			}
		}
		if !configData.FvRsCustQosPol.IsNull() && stateData != nil {
			if IsEmptySingleNestedAttribute(configData.FvRsCustQosPol.Attributes()) {
				FvRsCustQosPolObject, _ := types.ObjectValueFrom(ctx, FvRsCustQosPolFvAEPgType, getEmptyFvRsCustQosPolFvAEPgResourceModel())
				planData.FvRsCustQosPol = FvRsCustQosPolObject
			}
		}
		if !configData.FvRsDppPol.IsNull() && stateData != nil {
			if IsEmptySingleNestedAttribute(configData.FvRsDppPol.Attributes()) {
				FvRsDppPolObject, _ := types.ObjectValueFrom(ctx, FvRsDppPolFvAEPgType, getEmptyFvRsDppPolFvAEPgResourceModel())
				planData.FvRsDppPol = FvRsDppPolObject
			}
		}
		if !configData.FvRsTrustCtrl.IsNull() && stateData != nil {
			if IsEmptySingleNestedAttribute(configData.FvRsTrustCtrl.Attributes()) {
				FvRsTrustCtrlObject, _ := types.ObjectValueFrom(ctx, FvRsTrustCtrlFvAEPgType, getEmptyFvRsTrustCtrlFvAEPgResourceModel())
				planData.FvRsTrustCtrl = FvRsTrustCtrlObject
			}
		}

		if !configData.DeprecatedExceptionTag.IsNull() {
			planData.ExceptionTag = configData.DeprecatedExceptionTag
		}

		if !configData.DeprecatedFloodOnEncap.IsNull() {
			planData.FloodOnEncap = configData.DeprecatedFloodOnEncap
		}

		if !configData.DeprecatedFwdCtrl.IsNull() {
			planData.FwdCtrl = configData.DeprecatedFwdCtrl
		}

		if !configData.DeprecatedHasMcastSource.IsNull() {
			planData.HasMcastSource = configData.DeprecatedHasMcastSource
		}

		if !configData.DeprecatedIsAttrBasedEPg.IsNull() {
			planData.IsAttrBasedEPg = configData.DeprecatedIsAttrBasedEPg
		}

		if !configData.DeprecatedMatchT.IsNull() {
			planData.MatchT = configData.DeprecatedMatchT
		}

		if !configData.DeprecatedParentDn.IsNull() {
			planData.ParentDn = configData.DeprecatedParentDn
		}

		if !configData.DeprecatedPcEnfPref.IsNull() {
			planData.PcEnfPref = configData.DeprecatedPcEnfPref
		}

		if !configData.DeprecatedPrefGrMemb.IsNull() {
			planData.PrefGrMemb = configData.DeprecatedPrefGrMemb
		}

		if !configData.DeprecatedPrio.IsNull() {
			planData.Prio = customTypes.FvAEPgPrioStringValue{StringValue: configData.DeprecatedPrio}
		}

		if !configData.DeprecatedShutdown.IsNull() {
			planData.Shutdown = configData.DeprecatedShutdown
		}

		if !configData.DeprecatedFvRsAEPgMonPol.IsNull() {
			var newAttributeValues FvRsAEPgMonPolFvAEPgResourceModel
			tagAnnotationFvRsAEPgMonPolFvAEPgValue, _ := types.SetValueFrom(ctx, TagAnnotationFvRsAEPgMonPolFvAEPgType, make([]TagAnnotationFvRsAEPgMonPolFvAEPgResourceModel, 0))
			tagTagFvRsAEPgMonPolFvAEPgValue, _ := types.SetValueFrom(ctx, TagTagFvRsAEPgMonPolFvAEPgType, make([]TagTagFvRsAEPgMonPolFvAEPgResourceModel, 0))
			annotationValue := planData.Annotation
			if stateData != nil && !IsEmptySingleNestedAttribute(stateData.FvRsAEPgMonPol.Attributes()) {
				stateData.FvRsAEPgMonPol.As(ctx, &newAttributeValues, basetypes.ObjectAsOptions{})
				annotationValue = newAttributeValues.Annotation
				tagAnnotationFvRsAEPgMonPolFvAEPgValue = newAttributeValues.TagAnnotation
				tagTagFvRsAEPgMonPolFvAEPgValue = newAttributeValues.TagTag
			}
			tnMonEPGPolNameValue := basetypes.NewStringUnknown()
			if !configData.DeprecatedFvRsAEPgMonPol.IsUnknown() {
				tnMonEPGPolNameValue = basetypes.NewStringValue(GetMOName(configData.DeprecatedFvRsAEPgMonPol.ValueString()))
			}
			FvRsAEPgMonPol := FvRsAEPgMonPolFvAEPgResourceModel{
				Annotation:      annotationValue,
				TnMonEPGPolName: tnMonEPGPolNameValue,
				TagAnnotation:   tagAnnotationFvRsAEPgMonPolFvAEPgValue,
				TagTag:          tagTagFvRsAEPgMonPolFvAEPgValue,
			}
			FvRsAEPgMonPolObject, _ := types.ObjectValueFrom(ctx, FvRsAEPgMonPolFvAEPgType, FvRsAEPgMonPol)
			planData.FvRsAEPgMonPol = FvRsAEPgMonPolObject
		}

		if !configData.DeprecatedFvRsBd.IsNull() {
			var newAttributeValues FvRsBdFvAEPgResourceModel
			tagAnnotationFvRsBdFvAEPgValue, _ := types.SetValueFrom(ctx, TagAnnotationFvRsBdFvAEPgType, make([]TagAnnotationFvRsBdFvAEPgResourceModel, 0))
			tagTagFvRsBdFvAEPgValue, _ := types.SetValueFrom(ctx, TagTagFvRsBdFvAEPgType, make([]TagTagFvRsBdFvAEPgResourceModel, 0))
			annotationValue := planData.Annotation
			if stateData != nil && !IsEmptySingleNestedAttribute(stateData.FvRsBd.Attributes()) {
				stateData.FvRsBd.As(ctx, &newAttributeValues, basetypes.ObjectAsOptions{})
				annotationValue = newAttributeValues.Annotation
				tagAnnotationFvRsBdFvAEPgValue = newAttributeValues.TagAnnotation
				tagTagFvRsBdFvAEPgValue = newAttributeValues.TagTag
			}
			tnFvBDNameValue := basetypes.NewStringUnknown()
			if !configData.DeprecatedFvRsBd.IsUnknown() {
				tnFvBDNameValue = basetypes.NewStringValue(GetMOName(configData.DeprecatedFvRsBd.ValueString()))
			}
			FvRsBd := FvRsBdFvAEPgResourceModel{
				Annotation:    annotationValue,
				TnFvBDName:    tnFvBDNameValue,
				TagAnnotation: tagAnnotationFvRsBdFvAEPgValue,
				TagTag:        tagTagFvRsBdFvAEPgValue,
			}
			FvRsBdObject, _ := types.ObjectValueFrom(ctx, FvRsBdFvAEPgType, FvRsBd)
			planData.FvRsBd = FvRsBdObject
		}

		if !configData.DeprecatedFvRsCons.IsNull() {
			FvRsConsList := make([]FvRsConsFvAEPgResourceModel, 0)
			var attributeValues []basetypes.StringValue
			var newAttributeValues []FvRsConsFvAEPgResourceModel
			planData.DeprecatedFvRsCons.ElementsAs(ctx, &attributeValues, false)
			if stateData != nil {
				stateData.FvRsCons.ElementsAs(ctx, &newAttributeValues, false)
			}
			for _, attributeValue := range attributeValues {
				FvRsConsValue := FvRsConsFvAEPgResourceModel{}
				foundAttributeValue := false
				for _, newAttributeValue := range newAttributeValues {
					if newAttributeValue.TnVzBrCPName.ValueString() == GetMOName(attributeValue.ValueString()) {
						FvRsConsValue = newAttributeValue
						foundAttributeValue = true
						break
					}
				}
				tnVzBrCPNameValue := basetypes.NewStringUnknown()
				if !attributeValue.IsUnknown() {
					tnVzBrCPNameValue = basetypes.NewStringValue(GetMOName(attributeValue.ValueString()))
				}
				FvRsCons := FvRsConsFvAEPgResourceModel{
					TnVzBrCPName: tnVzBrCPNameValue,
				}

				if foundAttributeValue {
					FvRsCons.Annotation = FvRsConsValue.Annotation
					FvRsCons.Prio = FvRsConsValue.Prio
				} else {
					FvRsCons.Annotation = planData.Annotation
					FvRsCons.Prio = customTypes.NewFvRsConsPrioStringUnknown()
				}
				tagAnnotationFvRsConsFvAEPgValue, _ := types.SetValueFrom(ctx, TagAnnotationFvRsConsFvAEPgType, make([]TagAnnotationFvRsConsFvAEPgResourceModel, 0))
				FvRsCons.TagAnnotation = tagAnnotationFvRsConsFvAEPgValue
				tagTagFvRsConsFvAEPgValue, _ := types.SetValueFrom(ctx, TagTagFvRsConsFvAEPgType, make([]TagTagFvRsConsFvAEPgResourceModel, 0))
				FvRsCons.TagTag = tagTagFvRsConsFvAEPgValue
				FvRsConsList = append(FvRsConsList, FvRsCons)
			}
			FvRsConsSet, _ := types.SetValueFrom(ctx, FvRsConsFvAEPgType, FvRsConsList)
			planData.FvRsCons = FvRsConsSet
		}

		if !configData.DeprecatedFvRsSecInherited.IsNull() {
			FvRsSecInheritedList := make([]FvRsSecInheritedFvAEPgResourceModel, 0)
			var attributeValues []basetypes.StringValue
			var newAttributeValues []FvRsSecInheritedFvAEPgResourceModel
			planData.DeprecatedFvRsSecInherited.ElementsAs(ctx, &attributeValues, false)
			if stateData != nil {
				stateData.FvRsSecInherited.ElementsAs(ctx, &newAttributeValues, false)
			}
			for _, attributeValue := range attributeValues {
				FvRsSecInheritedValue := FvRsSecInheritedFvAEPgResourceModel{}
				foundAttributeValue := false
				for _, newAttributeValue := range newAttributeValues {
					if newAttributeValue.TDn.ValueString() == attributeValue.ValueString() {
						FvRsSecInheritedValue = newAttributeValue
						foundAttributeValue = true
						break
					}
				}
				tDnValue := basetypes.NewStringUnknown()
				if !attributeValue.IsUnknown() {
					tDnValue = basetypes.NewStringValue(attributeValue.ValueString())
				}
				FvRsSecInherited := FvRsSecInheritedFvAEPgResourceModel{
					TDn: tDnValue,
				}

				if foundAttributeValue {
					FvRsSecInherited.Annotation = FvRsSecInheritedValue.Annotation
				} else {
					FvRsSecInherited.Annotation = planData.Annotation
				}
				tagAnnotationFvRsSecInheritedFvAEPgValue, _ := types.SetValueFrom(ctx, TagAnnotationFvRsSecInheritedFvAEPgType, make([]TagAnnotationFvRsSecInheritedFvAEPgResourceModel, 0))
				FvRsSecInherited.TagAnnotation = tagAnnotationFvRsSecInheritedFvAEPgValue
				tagTagFvRsSecInheritedFvAEPgValue, _ := types.SetValueFrom(ctx, TagTagFvRsSecInheritedFvAEPgType, make([]TagTagFvRsSecInheritedFvAEPgResourceModel, 0))
				FvRsSecInherited.TagTag = tagTagFvRsSecInheritedFvAEPgValue
				FvRsSecInheritedList = append(FvRsSecInheritedList, FvRsSecInherited)
			}
			FvRsSecInheritedSet, _ := types.SetValueFrom(ctx, FvRsSecInheritedFvAEPgType, FvRsSecInheritedList)
			planData.FvRsSecInherited = FvRsSecInheritedSet
		}

		if !configData.DeprecatedFvRsCustQosPol.IsNull() {
			var newAttributeValues FvRsCustQosPolFvAEPgResourceModel
			tagAnnotationFvRsCustQosPolFvAEPgValue, _ := types.SetValueFrom(ctx, TagAnnotationFvRsCustQosPolFvAEPgType, make([]TagAnnotationFvRsCustQosPolFvAEPgResourceModel, 0))
			tagTagFvRsCustQosPolFvAEPgValue, _ := types.SetValueFrom(ctx, TagTagFvRsCustQosPolFvAEPgType, make([]TagTagFvRsCustQosPolFvAEPgResourceModel, 0))
			annotationValue := planData.Annotation
			if stateData != nil && !IsEmptySingleNestedAttribute(stateData.FvRsCustQosPol.Attributes()) {
				stateData.FvRsCustQosPol.As(ctx, &newAttributeValues, basetypes.ObjectAsOptions{})
				annotationValue = newAttributeValues.Annotation
				tagAnnotationFvRsCustQosPolFvAEPgValue = newAttributeValues.TagAnnotation
				tagTagFvRsCustQosPolFvAEPgValue = newAttributeValues.TagTag
			}
			tnQosCustomPolNameValue := basetypes.NewStringUnknown()
			if !configData.DeprecatedFvRsCustQosPol.IsUnknown() {
				tnQosCustomPolNameValue = basetypes.NewStringValue(GetMOName(configData.DeprecatedFvRsCustQosPol.ValueString()))
			}
			FvRsCustQosPol := FvRsCustQosPolFvAEPgResourceModel{
				Annotation:         annotationValue,
				TnQosCustomPolName: tnQosCustomPolNameValue,
				TagAnnotation:      tagAnnotationFvRsCustQosPolFvAEPgValue,
				TagTag:             tagTagFvRsCustQosPolFvAEPgValue,
			}
			FvRsCustQosPolObject, _ := types.ObjectValueFrom(ctx, FvRsCustQosPolFvAEPgType, FvRsCustQosPol)
			planData.FvRsCustQosPol = FvRsCustQosPolObject
		}

		if !configData.DeprecatedFvRsDppPol.IsNull() {
			var newAttributeValues FvRsDppPolFvAEPgResourceModel
			tagAnnotationFvRsDppPolFvAEPgValue, _ := types.SetValueFrom(ctx, TagAnnotationFvRsDppPolFvAEPgType, make([]TagAnnotationFvRsDppPolFvAEPgResourceModel, 0))
			tagTagFvRsDppPolFvAEPgValue, _ := types.SetValueFrom(ctx, TagTagFvRsDppPolFvAEPgType, make([]TagTagFvRsDppPolFvAEPgResourceModel, 0))
			annotationValue := planData.Annotation
			if stateData != nil && !IsEmptySingleNestedAttribute(stateData.FvRsDppPol.Attributes()) {
				stateData.FvRsDppPol.As(ctx, &newAttributeValues, basetypes.ObjectAsOptions{})
				annotationValue = newAttributeValues.Annotation
				tagAnnotationFvRsDppPolFvAEPgValue = newAttributeValues.TagAnnotation
				tagTagFvRsDppPolFvAEPgValue = newAttributeValues.TagTag
			}
			tnQosDppPolNameValue := basetypes.NewStringUnknown()
			if !configData.DeprecatedFvRsDppPol.IsUnknown() {
				tnQosDppPolNameValue = basetypes.NewStringValue(GetMOName(configData.DeprecatedFvRsDppPol.ValueString()))
			}
			FvRsDppPol := FvRsDppPolFvAEPgResourceModel{
				Annotation:      annotationValue,
				TnQosDppPolName: tnQosDppPolNameValue,
				TagAnnotation:   tagAnnotationFvRsDppPolFvAEPgValue,
				TagTag:          tagTagFvRsDppPolFvAEPgValue,
			}
			FvRsDppPolObject, _ := types.ObjectValueFrom(ctx, FvRsDppPolFvAEPgType, FvRsDppPol)
			planData.FvRsDppPol = FvRsDppPolObject
		}

		if !configData.DeprecatedFvRsFcPathAtt.IsNull() {
			FvRsFcPathAttList := make([]FvRsFcPathAttFvAEPgResourceModel, 0)
			var attributeValues []basetypes.StringValue
			var newAttributeValues []FvRsFcPathAttFvAEPgResourceModel
			planData.DeprecatedFvRsFcPathAtt.ElementsAs(ctx, &attributeValues, false)
			if stateData != nil {
				stateData.FvRsFcPathAtt.ElementsAs(ctx, &newAttributeValues, false)
			}
			for _, attributeValue := range attributeValues {
				FvRsFcPathAttValue := FvRsFcPathAttFvAEPgResourceModel{}
				foundAttributeValue := false
				for _, newAttributeValue := range newAttributeValues {
					if newAttributeValue.TDn.ValueString() == attributeValue.ValueString() {
						FvRsFcPathAttValue = newAttributeValue
						foundAttributeValue = true
						break
					}
				}
				tDnValue := basetypes.NewStringUnknown()
				if !attributeValue.IsUnknown() {
					tDnValue = basetypes.NewStringValue(attributeValue.ValueString())
				}
				FvRsFcPathAtt := FvRsFcPathAttFvAEPgResourceModel{
					TDn: tDnValue,
				}

				if foundAttributeValue {
					FvRsFcPathAtt.Annotation = FvRsFcPathAttValue.Annotation
					FvRsFcPathAtt.Descr = FvRsFcPathAttValue.Descr
					FvRsFcPathAtt.Vsan = FvRsFcPathAttValue.Vsan
					FvRsFcPathAtt.VsanMode = FvRsFcPathAttValue.VsanMode
				} else {
					FvRsFcPathAtt.Annotation = planData.Annotation
					FvRsFcPathAtt.Descr = basetypes.NewStringUnknown()
					FvRsFcPathAtt.Vsan = basetypes.NewStringUnknown()
					FvRsFcPathAtt.VsanMode = basetypes.NewStringUnknown()
				}
				tagAnnotationFvRsFcPathAttFvAEPgValue, _ := types.SetValueFrom(ctx, TagAnnotationFvRsFcPathAttFvAEPgType, make([]TagAnnotationFvRsFcPathAttFvAEPgResourceModel, 0))
				FvRsFcPathAtt.TagAnnotation = tagAnnotationFvRsFcPathAttFvAEPgValue
				tagTagFvRsFcPathAttFvAEPgValue, _ := types.SetValueFrom(ctx, TagTagFvRsFcPathAttFvAEPgType, make([]TagTagFvRsFcPathAttFvAEPgResourceModel, 0))
				FvRsFcPathAtt.TagTag = tagTagFvRsFcPathAttFvAEPgValue
				FvRsFcPathAttList = append(FvRsFcPathAttList, FvRsFcPathAtt)
			}
			FvRsFcPathAttSet, _ := types.SetValueFrom(ctx, FvRsFcPathAttFvAEPgType, FvRsFcPathAttList)
			planData.FvRsFcPathAtt = FvRsFcPathAttSet
		}

		if !configData.DeprecatedFvRsConsIf.IsNull() {
			FvRsConsIfList := make([]FvRsConsIfFvAEPgResourceModel, 0)
			var attributeValues []basetypes.StringValue
			var newAttributeValues []FvRsConsIfFvAEPgResourceModel
			planData.DeprecatedFvRsConsIf.ElementsAs(ctx, &attributeValues, false)
			if stateData != nil {
				stateData.FvRsConsIf.ElementsAs(ctx, &newAttributeValues, false)
			}
			for _, attributeValue := range attributeValues {
				FvRsConsIfValue := FvRsConsIfFvAEPgResourceModel{}
				foundAttributeValue := false
				for _, newAttributeValue := range newAttributeValues {
					if newAttributeValue.TnVzCPIfName.ValueString() == GetMOName(attributeValue.ValueString()) {
						FvRsConsIfValue = newAttributeValue
						foundAttributeValue = true
						break
					}
				}
				tnVzCPIfNameValue := basetypes.NewStringUnknown()
				if !attributeValue.IsUnknown() {
					tnVzCPIfNameValue = basetypes.NewStringValue(GetMOName(attributeValue.ValueString()))
				}
				FvRsConsIf := FvRsConsIfFvAEPgResourceModel{
					TnVzCPIfName: tnVzCPIfNameValue,
				}

				if foundAttributeValue {
					FvRsConsIf.Annotation = FvRsConsIfValue.Annotation
					FvRsConsIf.Prio = FvRsConsIfValue.Prio
				} else {
					FvRsConsIf.Annotation = planData.Annotation
					FvRsConsIf.Prio = customTypes.NewFvRsConsIfPrioStringUnknown()
				}
				tagAnnotationFvRsConsIfFvAEPgValue, _ := types.SetValueFrom(ctx, TagAnnotationFvRsConsIfFvAEPgType, make([]TagAnnotationFvRsConsIfFvAEPgResourceModel, 0))
				FvRsConsIf.TagAnnotation = tagAnnotationFvRsConsIfFvAEPgValue
				tagTagFvRsConsIfFvAEPgValue, _ := types.SetValueFrom(ctx, TagTagFvRsConsIfFvAEPgType, make([]TagTagFvRsConsIfFvAEPgResourceModel, 0))
				FvRsConsIf.TagTag = tagTagFvRsConsIfFvAEPgValue
				FvRsConsIfList = append(FvRsConsIfList, FvRsConsIf)
			}
			FvRsConsIfSet, _ := types.SetValueFrom(ctx, FvRsConsIfFvAEPgType, FvRsConsIfList)
			planData.FvRsConsIf = FvRsConsIfSet
		}

		if !configData.DeprecatedFvRsIntraEpg.IsNull() {
			FvRsIntraEpgList := make([]FvRsIntraEpgFvAEPgResourceModel, 0)
			var attributeValues []basetypes.StringValue
			var newAttributeValues []FvRsIntraEpgFvAEPgResourceModel
			planData.DeprecatedFvRsIntraEpg.ElementsAs(ctx, &attributeValues, false)
			if stateData != nil {
				stateData.FvRsIntraEpg.ElementsAs(ctx, &newAttributeValues, false)
			}
			for _, attributeValue := range attributeValues {
				FvRsIntraEpgValue := FvRsIntraEpgFvAEPgResourceModel{}
				foundAttributeValue := false
				for _, newAttributeValue := range newAttributeValues {
					if newAttributeValue.TnVzBrCPName.ValueString() == GetMOName(attributeValue.ValueString()) {
						FvRsIntraEpgValue = newAttributeValue
						foundAttributeValue = true
						break
					}
				}
				tnVzBrCPNameValue := basetypes.NewStringUnknown()
				if !attributeValue.IsUnknown() {
					tnVzBrCPNameValue = basetypes.NewStringValue(GetMOName(attributeValue.ValueString()))
				}
				FvRsIntraEpg := FvRsIntraEpgFvAEPgResourceModel{
					TnVzBrCPName: tnVzBrCPNameValue,
				}

				if foundAttributeValue {
					FvRsIntraEpg.Annotation = FvRsIntraEpgValue.Annotation
				} else {
					FvRsIntraEpg.Annotation = planData.Annotation
				}
				tagAnnotationFvRsIntraEpgFvAEPgValue, _ := types.SetValueFrom(ctx, TagAnnotationFvRsIntraEpgFvAEPgType, make([]TagAnnotationFvRsIntraEpgFvAEPgResourceModel, 0))
				FvRsIntraEpg.TagAnnotation = tagAnnotationFvRsIntraEpgFvAEPgValue
				tagTagFvRsIntraEpgFvAEPgValue, _ := types.SetValueFrom(ctx, TagTagFvRsIntraEpgFvAEPgType, make([]TagTagFvRsIntraEpgFvAEPgResourceModel, 0))
				FvRsIntraEpg.TagTag = tagTagFvRsIntraEpgFvAEPgValue
				FvRsIntraEpgList = append(FvRsIntraEpgList, FvRsIntraEpg)
			}
			FvRsIntraEpgSet, _ := types.SetValueFrom(ctx, FvRsIntraEpgFvAEPgType, FvRsIntraEpgList)
			planData.FvRsIntraEpg = FvRsIntraEpgSet
		}

		if !configData.DeprecatedFvRsProv.IsNull() {
			FvRsProvList := make([]FvRsProvFvAEPgResourceModel, 0)
			var attributeValues []basetypes.StringValue
			var newAttributeValues []FvRsProvFvAEPgResourceModel
			planData.DeprecatedFvRsProv.ElementsAs(ctx, &attributeValues, false)
			if stateData != nil {
				stateData.FvRsProv.ElementsAs(ctx, &newAttributeValues, false)
			}
			for _, attributeValue := range attributeValues {
				FvRsProvValue := FvRsProvFvAEPgResourceModel{}
				foundAttributeValue := false
				for _, newAttributeValue := range newAttributeValues {
					if newAttributeValue.TnVzBrCPName.ValueString() == GetMOName(attributeValue.ValueString()) {
						FvRsProvValue = newAttributeValue
						foundAttributeValue = true
						break
					}
				}
				tnVzBrCPNameValue := basetypes.NewStringUnknown()
				if !attributeValue.IsUnknown() {
					tnVzBrCPNameValue = basetypes.NewStringValue(GetMOName(attributeValue.ValueString()))
				}
				FvRsProv := FvRsProvFvAEPgResourceModel{
					TnVzBrCPName: tnVzBrCPNameValue,
				}

				if foundAttributeValue {
					FvRsProv.Annotation = FvRsProvValue.Annotation
					FvRsProv.MatchT = FvRsProvValue.MatchT
					FvRsProv.Prio = FvRsProvValue.Prio
				} else {
					FvRsProv.Annotation = planData.Annotation
					FvRsProv.MatchT = basetypes.NewStringUnknown()
					FvRsProv.Prio = customTypes.NewFvRsProvPrioStringUnknown()
				}
				tagAnnotationFvRsProvFvAEPgValue, _ := types.SetValueFrom(ctx, TagAnnotationFvRsProvFvAEPgType, make([]TagAnnotationFvRsProvFvAEPgResourceModel, 0))
				FvRsProv.TagAnnotation = tagAnnotationFvRsProvFvAEPgValue
				tagTagFvRsProvFvAEPgValue, _ := types.SetValueFrom(ctx, TagTagFvRsProvFvAEPgType, make([]TagTagFvRsProvFvAEPgResourceModel, 0))
				FvRsProv.TagTag = tagTagFvRsProvFvAEPgValue
				FvRsProvList = append(FvRsProvList, FvRsProv)
			}
			FvRsProvSet, _ := types.SetValueFrom(ctx, FvRsProvFvAEPgType, FvRsProvList)
			planData.FvRsProv = FvRsProvSet
		}

		if !configData.DeprecatedFvRsProtBy.IsNull() {
			FvRsProtByList := make([]FvRsProtByFvAEPgResourceModel, 0)
			var attributeValues []basetypes.StringValue
			var newAttributeValues []FvRsProtByFvAEPgResourceModel
			planData.DeprecatedFvRsProtBy.ElementsAs(ctx, &attributeValues, false)
			if stateData != nil {
				stateData.FvRsProtBy.ElementsAs(ctx, &newAttributeValues, false)
			}
			for _, attributeValue := range attributeValues {
				FvRsProtByValue := FvRsProtByFvAEPgResourceModel{}
				foundAttributeValue := false
				for _, newAttributeValue := range newAttributeValues {
					if newAttributeValue.TnVzTabooName.ValueString() == GetMOName(attributeValue.ValueString()) {
						FvRsProtByValue = newAttributeValue
						foundAttributeValue = true
						break
					}
				}
				tnVzTabooNameValue := basetypes.NewStringUnknown()
				if !attributeValue.IsUnknown() {
					tnVzTabooNameValue = basetypes.NewStringValue(GetMOName(attributeValue.ValueString()))
				}
				FvRsProtBy := FvRsProtByFvAEPgResourceModel{
					TnVzTabooName: tnVzTabooNameValue,
				}

				if foundAttributeValue {
					FvRsProtBy.Annotation = FvRsProtByValue.Annotation
				} else {
					FvRsProtBy.Annotation = planData.Annotation
				}
				tagAnnotationFvRsProtByFvAEPgValue, _ := types.SetValueFrom(ctx, TagAnnotationFvRsProtByFvAEPgType, make([]TagAnnotationFvRsProtByFvAEPgResourceModel, 0))
				FvRsProtBy.TagAnnotation = tagAnnotationFvRsProtByFvAEPgValue
				tagTagFvRsProtByFvAEPgValue, _ := types.SetValueFrom(ctx, TagTagFvRsProtByFvAEPgType, make([]TagTagFvRsProtByFvAEPgResourceModel, 0))
				FvRsProtBy.TagTag = tagTagFvRsProtByFvAEPgValue
				FvRsProtByList = append(FvRsProtByList, FvRsProtBy)
			}
			FvRsProtBySet, _ := types.SetValueFrom(ctx, FvRsProtByFvAEPgType, FvRsProtByList)
			planData.FvRsProtBy = FvRsProtBySet
		}

		if !configData.DeprecatedFvRsTrustCtrl.IsNull() {
			var newAttributeValues FvRsTrustCtrlFvAEPgResourceModel
			tagAnnotationFvRsTrustCtrlFvAEPgValue, _ := types.SetValueFrom(ctx, TagAnnotationFvRsTrustCtrlFvAEPgType, make([]TagAnnotationFvRsTrustCtrlFvAEPgResourceModel, 0))
			tagTagFvRsTrustCtrlFvAEPgValue, _ := types.SetValueFrom(ctx, TagTagFvRsTrustCtrlFvAEPgType, make([]TagTagFvRsTrustCtrlFvAEPgResourceModel, 0))
			annotationValue := planData.Annotation
			if stateData != nil && !IsEmptySingleNestedAttribute(stateData.FvRsTrustCtrl.Attributes()) {
				stateData.FvRsTrustCtrl.As(ctx, &newAttributeValues, basetypes.ObjectAsOptions{})
				annotationValue = newAttributeValues.Annotation
				tagAnnotationFvRsTrustCtrlFvAEPgValue = newAttributeValues.TagAnnotation
				tagTagFvRsTrustCtrlFvAEPgValue = newAttributeValues.TagTag
			}
			tnFhsTrustCtrlPolNameValue := basetypes.NewStringUnknown()
			if !configData.DeprecatedFvRsTrustCtrl.IsUnknown() {
				tnFhsTrustCtrlPolNameValue = basetypes.NewStringValue(GetMOName(configData.DeprecatedFvRsTrustCtrl.ValueString()))
			}
			FvRsTrustCtrl := FvRsTrustCtrlFvAEPgResourceModel{
				Annotation:            annotationValue,
				TnFhsTrustCtrlPolName: tnFhsTrustCtrlPolNameValue,
				TagAnnotation:         tagAnnotationFvRsTrustCtrlFvAEPgValue,
				TagTag:                tagTagFvRsTrustCtrlFvAEPgValue,
			}
			FvRsTrustCtrlObject, _ := types.ObjectValueFrom(ctx, FvRsTrustCtrlFvAEPgType, FvRsTrustCtrl)
			planData.FvRsTrustCtrl = FvRsTrustCtrlObject
		}

		if !configData.DeprecatedFvRsNodeAtt.IsNull() {
			FvRsNodeAttList := make([]FvRsNodeAttFvAEPgResourceModel, 0)
			var attributeValues []FvRsNodeAttFvAEPgResourceModelV1
			var newAttributeValues []FvRsNodeAttFvAEPgResourceModel
			if stateData != nil {
				stateData.FvRsNodeAtt.ElementsAs(ctx, &newAttributeValues, false)
			}
			planData.DeprecatedFvRsNodeAtt.ElementsAs(ctx, &attributeValues, false)
			for _, attributeValue := range attributeValues {
				plannedFvRsNodeAtt := FvRsNodeAttFvAEPgResourceModel{}
				foundAttributeValue := false
				for _, newAttributeValue := range newAttributeValues {
					if newAttributeValue.TDn.ValueString() == attributeValue.TDn.ValueString() {
						plannedFvRsNodeAtt = newAttributeValue
						foundAttributeValue = true
						break
					}
				}
				tDnValue := basetypes.NewStringUnknown()
				if !attributeValue.TDn.IsUnknown() {
					tDnValue = basetypes.NewStringValue(attributeValue.TDn.ValueString())
				}
				FvRsNodeAtt := FvRsNodeAttFvAEPgResourceModel{
					Annotation: planData.Annotation,
					Encap:      attributeValue.Encap,
					TDn:        tDnValue,
				}
				if !attributeValue.Descr.IsNull() {
					FvRsNodeAtt.Descr = attributeValue.Descr
				} else {
					FvRsNodeAtt.Descr = basetypes.NewStringUnknown()
				}
				if !attributeValue.InstrImedcy.IsNull() {
					FvRsNodeAtt.InstrImedcy = attributeValue.InstrImedcy
				} else {
					FvRsNodeAtt.InstrImedcy = basetypes.NewStringUnknown()
				}
				if !attributeValue.Mode.IsNull() {
					FvRsNodeAtt.Mode = attributeValue.Mode
				} else {
					FvRsNodeAtt.Mode = basetypes.NewStringUnknown()
				}
				if foundAttributeValue {
					FvRsNodeAtt.Annotation = plannedFvRsNodeAtt.Annotation
				}
				tagAnnotationFvRsNodeAttFvAEPgValue, _ := types.SetValueFrom(ctx, TagAnnotationFvRsNodeAttFvAEPgType, make([]TagAnnotationFvRsNodeAttFvAEPgResourceModel, 0))
				FvRsNodeAtt.TagAnnotation = tagAnnotationFvRsNodeAttFvAEPgValue
				tagTagFvRsNodeAttFvAEPgValue, _ := types.SetValueFrom(ctx, TagTagFvRsNodeAttFvAEPgType, make([]TagTagFvRsNodeAttFvAEPgResourceModel, 0))
				FvRsNodeAtt.TagTag = tagTagFvRsNodeAttFvAEPgValue
				FvRsNodeAttList = append(FvRsNodeAttList, FvRsNodeAtt)
			}
			FvRsNodeAttSet, _ := types.SetValueFrom(ctx, FvRsNodeAttFvAEPgType, FvRsNodeAttList)
			planData.FvRsNodeAtt = FvRsNodeAttSet
		} else if !configData.FvRsNodeAtt.IsNull() && stateData == nil {
			setUnknownDeprecatedFvRsNodeAttFvAEPgResourceModelToPlan(ctx, planData)
		}

		// Workaround to compare the state with plan to avoid plan changes with only known after apply
		if stateData != nil {
			avoidFvAEPgPlanChangeForKnownAfterApplyOnly(ctx, planData, stateData, configData)
		}

		resp.Diagnostics.Append(resp.Plan.Set(ctx, &planData)...)
	}
}
func setUnknownDeprecatedFvRsNodeAttFvAEPgResourceModelToPlan(ctx context.Context, planData *FvAEPgResourceModel) {
	var attributeValues []FvRsNodeAttFvAEPgResourceModel
	var legacyAttributeValues []FvRsNodeAttFvAEPgResourceModelV1
	planData.FvRsNodeAtt.ElementsAs(ctx, &attributeValues, false)
	for i := 0; i < len(attributeValues); i++ {
		legacyAttributeValues = append(legacyAttributeValues, FvRsNodeAttFvAEPgResourceModelV1{
			InstrImedcy: basetypes.NewStringUnknown(),
			Descr:       basetypes.NewStringUnknown(),
			Encap:       basetypes.NewStringUnknown(),
			Mode:        basetypes.NewStringUnknown(),
			TDn:         basetypes.NewStringUnknown(),
		})
	}
	DeprecatedFvRsNodeAttSet, _ := types.SetValueFrom(ctx, deprecatedFvRsNodeAttType, legacyAttributeValues)
	planData.DeprecatedFvRsNodeAtt = DeprecatedFvRsNodeAttSet
}

func avoidFvAEPgPlanChangeForKnownAfterApplyOnly(ctx context.Context, planData, stateData, configData *FvAEPgResourceModel) {
	// Set read-only and deprecated attributes in planData from stateData
	planData.PcTag = stateData.PcTag
	planData.Scope = stateData.Scope
	if configData.DeprecatedExceptionTag.IsNull() {
		planData.DeprecatedExceptionTag = stateData.DeprecatedExceptionTag
	}
	if configData.DeprecatedFloodOnEncap.IsNull() {
		planData.DeprecatedFloodOnEncap = stateData.DeprecatedFloodOnEncap
	}
	if configData.DeprecatedFwdCtrl.IsNull() {
		planData.DeprecatedFwdCtrl = stateData.DeprecatedFwdCtrl
	}
	if configData.DeprecatedHasMcastSource.IsNull() {
		planData.DeprecatedHasMcastSource = stateData.DeprecatedHasMcastSource
	}
	if configData.DeprecatedIsAttrBasedEPg.IsNull() {
		planData.DeprecatedIsAttrBasedEPg = stateData.DeprecatedIsAttrBasedEPg
	}
	if configData.DeprecatedMatchT.IsNull() {
		planData.DeprecatedMatchT = stateData.DeprecatedMatchT
	}
	if configData.DeprecatedParentDn.IsNull() {
		planData.DeprecatedParentDn = stateData.DeprecatedParentDn
	}
	if configData.DeprecatedPcEnfPref.IsNull() {
		planData.DeprecatedPcEnfPref = stateData.DeprecatedPcEnfPref
	}
	if configData.DeprecatedPrefGrMemb.IsNull() {
		planData.DeprecatedPrefGrMemb = stateData.DeprecatedPrefGrMemb
	}
	if configData.DeprecatedPrio.IsNull() {
		planData.DeprecatedPrio = stateData.DeprecatedPrio
	}
	if configData.DeprecatedShutdown.IsNull() {
		planData.DeprecatedShutdown = stateData.DeprecatedShutdown
	}
	if configData.DeprecatedFvRsAEPgMonPol.IsNull() {
		planData.DeprecatedFvRsAEPgMonPol = stateData.DeprecatedFvRsAEPgMonPol
	}
	if configData.DeprecatedFvRsBd.IsNull() {
		planData.DeprecatedFvRsBd = stateData.DeprecatedFvRsBd
	}
	if configData.DeprecatedFvRsCons.IsNull() {
		planData.DeprecatedFvRsCons = stateData.DeprecatedFvRsCons
	}
	if configData.DeprecatedFvRsSecInherited.IsNull() {
		planData.DeprecatedFvRsSecInherited = stateData.DeprecatedFvRsSecInherited
	}
	if configData.DeprecatedFvRsCustQosPol.IsNull() {
		planData.DeprecatedFvRsCustQosPol = stateData.DeprecatedFvRsCustQosPol
	}
	if configData.DeprecatedFvRsDppPol.IsNull() {
		planData.DeprecatedFvRsDppPol = stateData.DeprecatedFvRsDppPol
	}
	if configData.DeprecatedFvRsFcPathAtt.IsNull() {
		planData.DeprecatedFvRsFcPathAtt = stateData.DeprecatedFvRsFcPathAtt
	}
	if configData.DeprecatedFvRsConsIf.IsNull() {
		planData.DeprecatedFvRsConsIf = stateData.DeprecatedFvRsConsIf
	}
	if configData.DeprecatedFvRsIntraEpg.IsNull() {
		planData.DeprecatedFvRsIntraEpg = stateData.DeprecatedFvRsIntraEpg
	}
	if configData.DeprecatedFvRsProv.IsNull() {
		planData.DeprecatedFvRsProv = stateData.DeprecatedFvRsProv
	}
	if configData.DeprecatedFvRsProtBy.IsNull() {
		planData.DeprecatedFvRsProtBy = stateData.DeprecatedFvRsProtBy
	}
	if configData.DeprecatedFvRsTrustCtrl.IsNull() {
		planData.DeprecatedFvRsTrustCtrl = stateData.DeprecatedFvRsTrustCtrl
	}
	if configData.DeprecatedFvRsNodeAtt.IsNull() {
		planData.DeprecatedFvRsNodeAtt = stateData.DeprecatedFvRsNodeAtt
	}

	// Compare the string representation of the planData and stateData because structs cannot be compared directly
	if fmt.Sprintf("%s", planData) != fmt.Sprintf("%s", stateData) {
		planData.PcTag = basetypes.NewStringUnknown()
		planData.Scope = basetypes.NewStringUnknown()
		if configData.DeprecatedExceptionTag.IsNull() {
			planData.DeprecatedExceptionTag = basetypes.NewStringUnknown()
		}
		if configData.DeprecatedFloodOnEncap.IsNull() {
			planData.DeprecatedFloodOnEncap = basetypes.NewStringUnknown()
		}
		if configData.DeprecatedFwdCtrl.IsNull() {
			planData.DeprecatedFwdCtrl = basetypes.NewStringUnknown()
		}
		if configData.DeprecatedHasMcastSource.IsNull() {
			planData.DeprecatedHasMcastSource = basetypes.NewStringUnknown()
		}
		if configData.DeprecatedIsAttrBasedEPg.IsNull() {
			planData.DeprecatedIsAttrBasedEPg = basetypes.NewStringUnknown()
		}
		if configData.DeprecatedMatchT.IsNull() {
			planData.DeprecatedMatchT = basetypes.NewStringUnknown()
		}
		if configData.DeprecatedParentDn.IsNull() {
			planData.DeprecatedParentDn = basetypes.NewStringUnknown()
		}
		if configData.DeprecatedPcEnfPref.IsNull() {
			planData.DeprecatedPcEnfPref = basetypes.NewStringUnknown()
		}
		if configData.DeprecatedPrefGrMemb.IsNull() {
			planData.DeprecatedPrefGrMemb = basetypes.NewStringUnknown()
		}
		if configData.DeprecatedPrio.IsNull() {
			planData.DeprecatedPrio = basetypes.NewStringUnknown()
		}
		if configData.DeprecatedShutdown.IsNull() {
			planData.DeprecatedShutdown = basetypes.NewStringUnknown()
		}
		if configData.DeprecatedFvRsAEPgMonPol.IsNull() {
			planData.DeprecatedFvRsAEPgMonPol = basetypes.NewStringUnknown()
		}
		if configData.DeprecatedFvRsBd.IsNull() {
			planData.DeprecatedFvRsBd = basetypes.NewStringUnknown()
		}
		if configData.DeprecatedFvRsCons.IsNull() {
			planData.DeprecatedFvRsCons = basetypes.NewSetUnknown(basetypes.StringType{})
		}
		if configData.DeprecatedFvRsSecInherited.IsNull() {
			planData.DeprecatedFvRsSecInherited = basetypes.NewSetUnknown(basetypes.StringType{})
		}
		if configData.DeprecatedFvRsCustQosPol.IsNull() {
			planData.DeprecatedFvRsCustQosPol = basetypes.NewStringUnknown()
		}
		if configData.DeprecatedFvRsDppPol.IsNull() {
			planData.DeprecatedFvRsDppPol = basetypes.NewStringUnknown()
		}
		if configData.DeprecatedFvRsFcPathAtt.IsNull() {
			planData.DeprecatedFvRsFcPathAtt = basetypes.NewSetUnknown(basetypes.StringType{})
		}
		if configData.DeprecatedFvRsConsIf.IsNull() {
			planData.DeprecatedFvRsConsIf = basetypes.NewSetUnknown(basetypes.StringType{})
		}
		if configData.DeprecatedFvRsIntraEpg.IsNull() {
			planData.DeprecatedFvRsIntraEpg = basetypes.NewSetUnknown(basetypes.StringType{})
		}
		if configData.DeprecatedFvRsProv.IsNull() {
			planData.DeprecatedFvRsProv = basetypes.NewSetUnknown(basetypes.StringType{})
		}
		if configData.DeprecatedFvRsProtBy.IsNull() {
			planData.DeprecatedFvRsProtBy = basetypes.NewSetUnknown(basetypes.StringType{})
		}
		if configData.DeprecatedFvRsTrustCtrl.IsNull() {
			planData.DeprecatedFvRsTrustCtrl = basetypes.NewStringUnknown()
		}
		if configData.DeprecatedFvRsNodeAtt.IsNull() {
			setUnknownDeprecatedFvRsNodeAttFvAEPgResourceModelToPlan(ctx, planData)
		}
	}
}

func (r *FvAEPgResource) Metadata(ctx context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse) {
	tflog.Debug(ctx, "Start metadata of resource: aci_application_epg")
	resp.TypeName = req.ProviderTypeName + "_application_epg"
	tflog.Debug(ctx, "End metadata of resource: aci_application_epg")
}

func (r *FvAEPgResource) Schema(ctx context.Context, req resource.SchemaRequest, resp *resource.SchemaResponse) {
	tflog.Debug(ctx, "Start schema of resource: aci_application_epg")
	resp.Schema = schema.Schema{
		// This description is used by the documentation generator and the language server.
		MarkdownDescription: "The application_epg resource for the 'fvAEPg' class",
		Version:             2,

		Attributes: map[string]schema.Attribute{
			// Deprecated attributes
			"exception_tag": schema.StringAttribute{
				Optional:           true,
				Computed:           true,
				DeprecationMessage: "Attribute 'exception_tag' is deprecated, please refer to 'contract_exception_tag' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.String{
					stringvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("contract_exception_tag"),
					}...),
				},
			},
			"flood_on_encap": schema.StringAttribute{
				Optional:           true,
				Computed:           true,
				DeprecationMessage: "Attribute 'flood_on_encap' is deprecated, please refer to 'flood_in_encapsulation' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.String{
					stringvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("flood_in_encapsulation"),
					}...),
				},
			},
			"fwd_ctrl": schema.StringAttribute{
				Optional:           true,
				Computed:           true,
				DeprecationMessage: "Attribute 'fwd_ctrl' is deprecated, please refer to 'forwarding_control' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.String{
					stringvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("forwarding_control"),
					}...),
				},
			},
			"has_mcast_source": schema.StringAttribute{
				Optional:           true,
				Computed:           true,
				DeprecationMessage: "Attribute 'has_mcast_source' is deprecated, please refer to 'has_multicast_source' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.String{
					stringvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("has_multicast_source"),
					}...),
				},
			},
			"is_attr_based_epg": schema.StringAttribute{
				Optional:           true,
				Computed:           true,
				DeprecationMessage: "Attribute 'is_attr_based_epg' is deprecated, please refer to 'useg_epg' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.String{
					stringvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("useg_epg"),
					}...),
				},
			},
			"match_t": schema.StringAttribute{
				Optional:           true,
				Computed:           true,
				DeprecationMessage: "Attribute 'match_t' is deprecated, please refer to 'match_criteria' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.String{
					stringvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("match_criteria"),
					}...),
				},
			},
			"application_profile_dn": schema.StringAttribute{
				Optional:           true,
				Computed:           true,
				DeprecationMessage: "Attribute 'application_profile_dn' is deprecated, please refer to 'parent_dn' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.String{
					stringvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("parent_dn"),
					}...),
				},
			},
			"pc_enf_pref": schema.StringAttribute{
				Optional:           true,
				Computed:           true,
				DeprecationMessage: "Attribute 'pc_enf_pref' is deprecated, please refer to 'intra_epg_isolation' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.String{
					stringvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("intra_epg_isolation"),
					}...),
				},
			},
			"pref_gr_memb": schema.StringAttribute{
				Optional:           true,
				Computed:           true,
				DeprecationMessage: "Attribute 'pref_gr_memb' is deprecated, please refer to 'preferred_group_member' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.String{
					stringvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("preferred_group_member"),
					}...),
				},
			},
			"prio": schema.StringAttribute{
				Optional:           true,
				Computed:           true,
				DeprecationMessage: "Attribute 'prio' is deprecated, please refer to 'priority' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.String{
					stringvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("priority"),
					}...),
				},
			},
			"shutdown": schema.StringAttribute{
				Optional:           true,
				Computed:           true,
				DeprecationMessage: "Attribute 'shutdown' is deprecated, please refer to 'admin_state' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.String{
					stringvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("admin_state"),
					}...),
				},
			},
			"relation_fv_rs_aepg_mon_pol": schema.StringAttribute{
				Optional:           true,
				Computed:           true,
				DeprecationMessage: "Attribute 'relation_fv_rs_aepg_mon_pol' is deprecated, please refer to 'relation_to_monitoring_policy' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.String{
					stringvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("relation_to_monitoring_policy"),
					}...),
				},
			},
			"relation_fv_rs_path_att": schema.SetAttribute{
				Optional:           true,
				Computed:           true,
				ElementType:        types.StringType,
				DeprecationMessage: "Attribute `relation_fv_rs_path_att` is deprecated. The configuration was not functioning as intended because the Managed Object (MO) created by the pre-migrated resource was either configured incorrectly or exposed without any implemented functionality on the APIC. The MO for this attribute is no longer created on the APIC, but the existing MO will remain present until the resource is destroyed. This attribute will be removed in the next major version of the provider.",
				PlanModifiers: []planmodifier.Set{
					setplanmodifier.UseStateForUnknown(),
				},
			},
			"relation_fv_rs_prov_def": schema.SetAttribute{
				Optional:           true,
				Computed:           true,
				ElementType:        types.StringType,
				DeprecationMessage: "Attribute `relation_fv_rs_prov_def` is deprecated. The configuration was not functioning as intended because the Managed Object (MO) created by the pre-migrated resource was either configured incorrectly or exposed without any implemented functionality on the APIC. The MO for this attribute is no longer created on the APIC, but the existing MO will remain present until the resource is destroyed. This attribute will be removed in the next major version of the provider.",
				PlanModifiers: []planmodifier.Set{
					setplanmodifier.UseStateForUnknown(),
				},
			},
			"relation_fv_rs_bd": schema.StringAttribute{
				Optional:           true,
				Computed:           true,
				DeprecationMessage: "Attribute 'relation_fv_rs_bd' is deprecated, please refer to 'relation_to_bridge_domain' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.String{
					stringvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("relation_to_bridge_domain"),
					}...),
				},
			},
			"relation_fv_rs_cons": schema.SetAttribute{
				Optional:           true,
				Computed:           true,
				ElementType:        types.StringType,
				DeprecationMessage: "Attribute 'relation_fv_rs_cons' is deprecated, please refer to 'relation_to_consumed_contracts' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.Set{
					setvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("relation_to_consumed_contracts"),
					}...),
				},
			},
			"relation_fv_rs_sec_inherited": schema.SetAttribute{
				Optional:           true,
				Computed:           true,
				ElementType:        types.StringType,
				DeprecationMessage: "Attribute 'relation_fv_rs_sec_inherited' is deprecated, please refer to 'relation_to_contract_masters' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.Set{
					setvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("relation_to_contract_masters"),
					}...),
				},
			},
			"relation_fv_rs_cust_qos_pol": schema.StringAttribute{
				Optional:           true,
				Computed:           true,
				DeprecationMessage: "Attribute 'relation_fv_rs_cust_qos_pol' is deprecated, please refer to 'relation_to_custom_qos_policy' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.String{
					stringvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("relation_to_custom_qos_policy"),
					}...),
				},
			},
			"relation_fv_rs_dpp_pol": schema.StringAttribute{
				Optional:           true,
				Computed:           true,
				DeprecationMessage: "Attribute 'relation_fv_rs_dpp_pol' is deprecated, please refer to 'relation_to_data_plane_policing_policy' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.String{
					stringvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("relation_to_data_plane_policing_policy"),
					}...),
				},
			},
			"relation_fv_rs_fc_path_att": schema.SetAttribute{
				Optional:           true,
				Computed:           true,
				ElementType:        types.StringType,
				DeprecationMessage: "Attribute 'relation_fv_rs_fc_path_att' is deprecated, please refer to 'relation_to_fibre_channel_paths' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.Set{
					setvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("relation_to_fibre_channel_paths"),
					}...),
				},
			},
			"relation_fv_rs_cons_if": schema.SetAttribute{
				Optional:           true,
				Computed:           true,
				ElementType:        types.StringType,
				DeprecationMessage: "Attribute 'relation_fv_rs_cons_if' is deprecated, please refer to 'relation_to_imported_contracts' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.Set{
					setvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("relation_to_imported_contracts"),
					}...),
				},
			},
			"relation_fv_rs_intra_epg": schema.SetAttribute{
				Optional:           true,
				Computed:           true,
				ElementType:        types.StringType,
				DeprecationMessage: "Attribute 'relation_fv_rs_intra_epg' is deprecated, please refer to 'relation_to_intra_epg_contracts' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.Set{
					setvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("relation_to_intra_epg_contracts"),
					}...),
				},
			},
			"relation_fv_rs_prov": schema.SetAttribute{
				Optional:           true,
				Computed:           true,
				ElementType:        types.StringType,
				DeprecationMessage: "Attribute 'relation_fv_rs_prov' is deprecated, please refer to 'relation_to_provided_contracts' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.Set{
					setvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("relation_to_provided_contracts"),
					}...),
				},
			},
			"relation_fv_rs_prot_by": schema.SetAttribute{
				Optional:           true,
				Computed:           true,
				ElementType:        types.StringType,
				DeprecationMessage: "Attribute 'relation_fv_rs_prot_by' is deprecated, please refer to 'relation_to_taboo_contracts' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.Set{
					setvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("relation_to_taboo_contracts"),
					}...),
				},
			},
			"relation_fv_rs_trust_ctrl": schema.StringAttribute{
				Optional:           true,
				Computed:           true,
				DeprecationMessage: "Attribute 'relation_fv_rs_trust_ctrl' is deprecated, please refer to 'relation_to_trust_control_policy' instead. The attribute will be removed in the next major version of the provider.",
				Validators: []validator.String{
					stringvalidator.ConflictsWith(path.Expressions{
						path.MatchRoot("relation_to_trust_control_policy"),
					}...),
				},
			},
			// End of deprecated attributes
			"id": schema.StringAttribute{
				Computed:            true,
				MarkdownDescription: "The distinguished name (DN) of the Application EPG object.",
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
				},
			},
			"parent_dn": schema.StringAttribute{
				Optional:            true,
				Computed:            true,
				MarkdownDescription: "The distinguished name (DN) of the parent object.",
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
					stringplanmodifier.RequiresReplace(),
				},
				Validators: []validator.String{
					stringvalidator.AtLeastOneOf(path.Expressions{
						path.MatchRoot("application_profile_dn"),
					}...),
				},
			},
			"annotation": schema.StringAttribute{
				Optional: true,
				Computed: true,
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
					SetToStringNullWhenStateIsNullPlanIsUnknownDuringUpdate(),
				},
				Default:             stringdefault.StaticString(globalAnnotation),
				MarkdownDescription: `The annotation of the Application EPG object.`,
			},
			"description": schema.StringAttribute{
				Optional: true,
				Computed: true,
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
					SetToStringNullWhenStateIsNullPlanIsUnknownDuringUpdate(),
				},
				MarkdownDescription: `The description of the Application EPG object.`,
			},
			"contract_exception_tag": schema.StringAttribute{
				Optional: true,
				Computed: true,
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
					SetToStringNullWhenStateIsNullPlanIsUnknownDuringUpdate(),
				},
				Validators:          []validator.String{},
				MarkdownDescription: `The contract exception tag of the Application EPG object.`,
			},
			"flood_in_encapsulation": schema.StringAttribute{
				Optional: true,
				Computed: true,
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
					SetToStringNullWhenStateIsNullPlanIsUnknownDuringUpdate(),
				},
				Validators: []validator.String{
					stringvalidator.OneOf("disabled", "enabled"),
				},
				MarkdownDescription: `Flood L2 Multicast/Broadcast and Link Local Layer based on encapsulation.`,
			},
			"forwarding_control": schema.StringAttribute{
				Optional: true,
				Computed: true,
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
					SetToStringNullWhenStateIsNullPlanIsUnknownDuringUpdate(),
				},
				Validators: []validator.String{
					stringvalidator.OneOf("none", "proxy-arp"),
				},
				MarkdownDescription: `The forwarding control of the Application EPG object.`,
			},
			"has_multicast_source": schema.StringAttribute{
				Optional: true,
				Computed: true,
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
					SetToStringNullWhenStateIsNullPlanIsUnknownDuringUpdate(),
				},
				Validators: []validator.String{
					stringvalidator.OneOf("no", "yes"),
				},
				MarkdownDescription: `The Application EPG object has a multicast source.`,
			},
			"useg_epg": schema.StringAttribute{
				Optional: true,
				Computed: true,
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
					SetToStringNullWhenStateIsNullPlanIsUnknownDuringUpdate(),
				},
				Validators: []validator.String{
					stringvalidator.OneOf("no", "yes"),
				},
				MarkdownDescription: `The Application EPG object is microsegmented (uSeg).`,
			},
			"match_criteria": schema.StringAttribute{
				Optional: true,
				Computed: true,
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
					SetToStringNullWhenStateIsNullPlanIsUnknownDuringUpdate(),
				},
				Validators: []validator.String{
					stringvalidator.OneOf("All", "AtleastOne", "AtmostOne", "None"),
				},
				MarkdownDescription: `The provider label match criteria.`,
			},
			"name": schema.StringAttribute{
				Optional: true,
				Computed: true,
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
					SetToStringNullWhenStateIsNullPlanIsUnknownDuringUpdate(),
					stringplanmodifier.RequiresReplace(),
				},
				Validators: []validator.String{
					MakeStringRequired(),
				},
				MarkdownDescription: `The name of the Application EPG object.`,
			},
			"name_alias": schema.StringAttribute{
				Optional: true,
				Computed: true,
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
					SetToStringNullWhenStateIsNullPlanIsUnknownDuringUpdate(),
				},
				MarkdownDescription: `The name alias of the Application EPG object.`,
			},
			"intra_epg_isolation": schema.StringAttribute{
				Optional: true,
				Computed: true,
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
					SetToStringNullWhenStateIsNullPlanIsUnknownDuringUpdate(),
				},
				Validators: []validator.String{
					stringvalidator.OneOf("enforced", "unenforced"),
				},
				MarkdownDescription: `Parameter used to determine whether communication between endpoints within the EPG is blocked.`,
			},
			"pc_tag": schema.StringAttribute{
				Computed:            true,
				MarkdownDescription: `The classification tag used for policy enforcement and zoning.`,
			},
			"preferred_group_member": schema.StringAttribute{
				Optional: true,
				Computed: true,
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
					SetToStringNullWhenStateIsNullPlanIsUnknownDuringUpdate(),
				},
				Validators: []validator.String{
					stringvalidator.OneOf("exclude", "include"),
				},
				MarkdownDescription: `Parameter used to determine whether the EPG is part of the preferred group. Members of this group are allowed to communicate without contracts.`,
			},
			"priority": schema.StringAttribute{
				CustomType: customTypes.FvAEPgPrioStringType{},
				Optional:   true,
				Computed:   true,
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
					SetToStringNullWhenStateIsNullPlanIsUnknownDuringUpdate(),
				},
				Validators: []validator.String{
					stringvalidator.Any(
						stringvalidator.OneOf("level1", "level2", "level3", "level4", "level5", "level6", "unspecified"),
						validators.InBetweenFromString(0, 9),
					),
				},
				MarkdownDescription: `The Quality of Service (QoS) priority class ID. QoS refers to the capability of a network to provide better service to selected network traffic over various technologies. The primary goal of QoS is to provide priority including dedicated bandwidth, controlled jitter and latency (required by some real-time and interactive traffic), and improved loss characteristics. You can configure the bandwidth of each QoS level using QoS profiles.`,
			},
			"scope": schema.StringAttribute{
				Computed:            true,
				MarkdownDescription: `The scope ID (L3-VNI) of the Application EPG object.`,
			},
			"admin_state": schema.StringAttribute{
				Optional: true,
				Computed: true,
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
					SetToStringNullWhenStateIsNullPlanIsUnknownDuringUpdate(),
				},
				Validators: []validator.String{
					stringvalidator.OneOf("no", "yes"),
				},
				MarkdownDescription: `Withdraw AEPg Configuration from all Nodes in the Fabric.`,
			},
			"epg_useg_block_statement": schema.SingleNestedAttribute{
				MarkdownDescription: `A criterion.`,
				Optional:            true,
				Computed:            true,
				PlanModifiers: []planmodifier.Object{
					objectplanmodifier.UseStateForUnknown(),
				},
				Attributes: map[string]schema.Attribute{
					"annotation": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The annotation of the EPG uSeg Block Statement object.`,
					},
					"description": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The description of the EPG uSeg Block Statement object.`,
					},
					"match": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("all", "any"),
						},
						MarkdownDescription: `The Matching Rule Type of the EPG uSeg Block Statement object.`,
					},
					"name": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The name of the EPG uSeg Block Statement object.`,
					},
					"name_alias": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The name alias of the EPG uSeg Block Statement object.`,
					},
					"owner_key": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The key for enabling clients to own their data for entity correlation.`,
					},
					"owner_tag": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `A tag for enabling clients to add their own data. For example, to indicate who created this object.`,
					},
					"precedence": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The precedence of the EPG uSeg Block Statement object.`,
					},
					"scope": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("scope-bd", "scope-vrf"),
						},
						MarkdownDescription: `The scope of the EPG uSeg Block Statement object.`,
					},
					"annotations": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Optional:            true,
						Computed:            true,
						PlanModifiers: []planmodifier.Set{
							setplanmodifier.UseStateForUnknown(),
						},
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
					"tags": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Optional:            true,
						Computed:            true,
						PlanModifiers: []planmodifier.Set{
							setplanmodifier.UseStateForUnknown(),
						},
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
				},
			},
			"relation_to_monitoring_policy": schema.SingleNestedAttribute{
				MarkdownDescription: `A source relation to the monitoring policy model for the endpoint group semantic scope. This is an internal object.`,
				Optional:            true,
				Computed:            true,
				PlanModifiers: []planmodifier.Object{
					objectplanmodifier.UseStateForUnknown(),
				},
				Attributes: map[string]schema.Attribute{
					"annotation": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The annotation of the Relation From Application EPG To Monitoring Policy object.`,
					},
					"monitoring_policy_name": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The name of the monitoring policy.`,
					},
					"annotations": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Optional:            true,
						Computed:            true,
						PlanModifiers: []planmodifier.Set{
							setplanmodifier.UseStateForUnknown(),
						},
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
					"tags": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Optional:            true,
						Computed:            true,
						PlanModifiers: []planmodifier.Set{
							setplanmodifier.UseStateForUnknown(),
						},
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
				},
			},
			"relation_to_bridge_domain": schema.SingleNestedAttribute{
				MarkdownDescription: `A source relation to the bridge domain associated to this endpoint group. This is an internal object.`,
				Optional:            true,
				Computed:            true,
				PlanModifiers: []planmodifier.Object{
					objectplanmodifier.UseStateForUnknown(),
				},
				Attributes: map[string]schema.Attribute{
					"annotation": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The annotation of the Relation To Bridge Domain object.`,
					},
					"bridge_domain_name": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The name of the bridge domain associated with this EPG.`,
					},
					"annotations": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Optional:            true,
						Computed:            true,
						PlanModifiers: []planmodifier.Set{
							setplanmodifier.UseStateForUnknown(),
						},
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
					"tags": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Optional:            true,
						Computed:            true,
						PlanModifiers: []planmodifier.Set{
							setplanmodifier.UseStateForUnknown(),
						},
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
				},
			},
			"relation_to_consumed_contracts": schema.SetNestedAttribute{
				MarkdownDescription: `The Consumer contract profile information.`,
				Optional:            true,
				Computed:            true,
				PlanModifiers: []planmodifier.Set{
					setplanmodifier.UseStateForUnknown(),
					SetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate(FvRsConsFvAEPgSetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate),
				},
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"annotation": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The annotation of the Relation To Consumed Contract object.`,
						},
						"priority": schema.StringAttribute{
							CustomType: customTypes.FvRsConsPrioStringType{},
							Optional:   true,
							Computed:   true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.Any(
									stringvalidator.OneOf("level1", "level2", "level3", "level4", "level5", "level6", "unspecified"),
									validators.InBetweenFromString(0, 9),
								),
							},
							MarkdownDescription: `The Quality of Service (QoS) priority class ID. QoS refers to the capability of a network to provide better service to selected network traffic over various technologies. The primary goal of QoS is to provide priority including dedicated bandwidth, controlled jitter and latency (required by some real-time and interactive traffic), and improved loss characteristics. You can configure the bandwidth of each QoS level using QoS profiles.`,
						},
						"contract_name": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								MakeStringRequired(),
							},
							MarkdownDescription: `The consumer contract name.`,
						},
						"annotations": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Optional:            true,
							Computed:            true,
							PlanModifiers: []planmodifier.Set{
								setplanmodifier.UseStateForUnknown(),
							},
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
						"tags": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Optional:            true,
							Computed:            true,
							PlanModifiers: []planmodifier.Set{
								setplanmodifier.UseStateForUnknown(),
							},
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
					},
				},
			},
			"relation_to_imported_contracts": schema.SetNestedAttribute{
				MarkdownDescription: `A contract for which the EPG will be a consumer.`,
				Optional:            true,
				Computed:            true,
				PlanModifiers: []planmodifier.Set{
					setplanmodifier.UseStateForUnknown(),
					SetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate(FvRsConsIfFvAEPgSetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate),
				},
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"annotation": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The annotation of the Relation To Imported Contract object.`,
						},
						"priority": schema.StringAttribute{
							CustomType: customTypes.FvRsConsIfPrioStringType{},
							Optional:   true,
							Computed:   true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.Any(
									stringvalidator.OneOf("level1", "level2", "level3", "level4", "level5", "level6", "unspecified"),
									validators.InBetweenFromString(0, 9),
								),
							},
							MarkdownDescription: `The Quality of Service (QoS) priority class ID. QoS refers to the capability of a network to provide better service to selected network traffic over various technologies. The primary goal of QoS is to provide priority including dedicated bandwidth, controlled jitter and latency (required by some real-time and interactive traffic), and improved loss characteristics. You can configure the bandwidth of each QoS level using QoS profiles.`,
						},
						"imported_contract_name": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								MakeStringRequired(),
							},
							MarkdownDescription: `The contract interface name.`,
						},
						"annotations": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Optional:            true,
							Computed:            true,
							PlanModifiers: []planmodifier.Set{
								setplanmodifier.UseStateForUnknown(),
							},
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
						"tags": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Optional:            true,
							Computed:            true,
							PlanModifiers: []planmodifier.Set{
								setplanmodifier.UseStateForUnknown(),
							},
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
					},
				},
			},
			"relation_to_custom_qos_policy": schema.SingleNestedAttribute{
				MarkdownDescription: `A source relation to a custom QoS policy that enables different levels of service to be assigned to network traffic, including specifications for the Differentiated Services Code Point (DSCP) value(s) and the 802.1p Dot1p priority. This is an internal object.`,
				Optional:            true,
				Computed:            true,
				PlanModifiers: []planmodifier.Object{
					objectplanmodifier.UseStateForUnknown(),
				},
				Attributes: map[string]schema.Attribute{
					"annotation": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The annotation of the Relation To Custom QoS Policy object.`,
					},
					"custom_qos_policy_name": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The Custom QoS traffic policy name.`,
					},
					"annotations": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Optional:            true,
						Computed:            true,
						PlanModifiers: []planmodifier.Set{
							setplanmodifier.UseStateForUnknown(),
						},
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
					"tags": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Optional:            true,
						Computed:            true,
						PlanModifiers: []planmodifier.Set{
							setplanmodifier.UseStateForUnknown(),
						},
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
				},
			},
			"relation_to_domains": schema.SetNestedAttribute{
				MarkdownDescription: `An EPG can be linked to a domain profile via the Associated Domain Profiles. The domain profiles attached can be VMM, Physical, L2 External, or L3 External Domains.`,
				Optional:            true,
				Computed:            true,
				PlanModifiers: []planmodifier.Set{
					setplanmodifier.UseStateForUnknown(),
					SetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate(FvRsDomAttFvAEPgSetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate),
				},
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"annotation": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The annotation of the Relation To Domain object.`,
						},
						"binding_type": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.OneOf("dynamicBinding", "ephemeral", "none", "staticBinding"),
							},
							MarkdownDescription: `The binding type of the Relation To Domain object.`,
						},
						"class_preference": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.OneOf("encap", "useg"),
							},
							MarkdownDescription: `The class preference of the Relation To Domain object. Set 'useg' to allow microsegmentation.`,
						},
						"custom_epg_name": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The display name of the user configured port-group.`,
						},
						"delimiter": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The delimiter of the Relation To Domain object.`,
						},
						"encapsulation": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The encapsulation of the Relation To Domain object. The encapsulation refers to the EPG VLAN when class preference is set to 'encap, or to the Secondary VLAN when class preference is set to 'useg'.`,
						},
						"encapsulation_mode": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.OneOf("auto", "vlan", "vxlan"),
							},
							MarkdownDescription: `The encapsulation mode of the Relation To Domain object.`,
						},
						"epg_cos": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.OneOf("Cos0", "Cos1", "Cos2", "Cos3", "Cos4", "Cos5", "Cos6", "Cos7"),
							},
							MarkdownDescription: `The class of service (CoS) of the Relation To Domain object.`,
						},
						"epg_cos_pref": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.OneOf("disabled", "enabled"),
							},
							MarkdownDescription: `The class of service (CoS) preference of the Relation To Domain object.`,
						},
						"deployment_immediacy": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.OneOf("immediate", "lazy"),
							},
							MarkdownDescription: `The deployment immediacy of the Relation To Domain object. Specifies when the policy is pushed into the hardware policy content-addressable memory (CAM).`,
						},
						"ipam_dhcp_override": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The IP address management (IPAM) DHCP override of the Relation To Domain object. Only applicable for Nutanix domains.`,
						},
						"ipam_enabled": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.OneOf("no", "yes"),
							},
							MarkdownDescription: `The IP address management (IPAM) enabled status of the Relation To Domain object. Only applicable for Nutanix domains.`,
						},
						"ipam_gateway": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The IP address management (IPAM) gateway of the Relation To Domain object. Only applicable for Nutanix domains.`,
						},
						"lag_policy_name": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The link aggregation group (LAG) policy name of the Relation To Domain object.`,
						},
						"netflow_direction": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.OneOf("both", "egress", "ingress"),
							},
							MarkdownDescription: `The NetFlow monitoring direction of the Relation To Domain object.`,
						},
						"enable_netflow": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.OneOf("disabled", "enabled"),
							},
							MarkdownDescription: `The NetFlow enabled status for the Relation To Domain object.`,
						},
						"number_of_ports": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The number of ports of the Relation To Domain object.`,
						},
						"port_allocation": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.OneOf("elastic", "fixed", "none"),
							},
							MarkdownDescription: `Port allocation for ports.`,
						},
						"primary_encapsulation": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The primary encapsulation of the Relation To Domain object. This is used when the class preference is set to 'useg'.`,
						},
						"primary_encapsulation_inner": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The primary inner encapsulation of the Relation To Domain object. This is used for the portgroup at the VMWare Distributed Virtual Switch (DVS). This VLAN is internal to the DVS and is used for communication between the other VMs and the AVE VM at a host. Traffic is not forwarded to the fabric over the VLAN. Only applicable for Cisco ACI Virtual Edge (AVE) domains.`,
						},
						"resolution_immediacy": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.OneOf("immediate", "lazy", "pre-provision"),
							},
							MarkdownDescription: `The resolution immediacy of the Relation To Domain object. Specifies if policies are resolved immmediately or when needed.`,
						},
						"secondary_encapsulation_inner": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The secondary inner encapsulation of the Relation To Domain object. This is used for the portgroup at the VMWare Distributed Virtual Switch (DVS). This VLAN is internal to the DVS and is used for communication between the other VMs and the AVE VM at a host. Traffic is not forwarded to the fabric over the VLAN. Only applicable for Cisco ACI Virtual Edge (AVE) domains.`,
						},
						"switching_mode": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.OneOf("AVE", "native"),
							},
							MarkdownDescription: `The switching mode of the Relation To Domain object.`,
						},
						"target_dn": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								MakeStringRequired(),
							},
							MarkdownDescription: `The distinguished name of the target Domain object.`,
						},
						"untagged": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.OneOf("no", "yes"),
							},
							MarkdownDescription: `The untagged status of the Relation To Domain object.`,
						},
						"annotations": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Optional:            true,
							Computed:            true,
							PlanModifiers: []planmodifier.Set{
								setplanmodifier.UseStateForUnknown(),
							},
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
						"tags": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Optional:            true,
							Computed:            true,
							PlanModifiers: []planmodifier.Set{
								setplanmodifier.UseStateForUnknown(),
							},
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
					},
				},
			},
			"relation_to_data_plane_policing_policy": schema.SingleNestedAttribute{
				MarkdownDescription: `Relationship for Dpp QOS policy`,
				Optional:            true,
				Computed:            true,
				PlanModifiers: []planmodifier.Object{
					objectplanmodifier.UseStateForUnknown(),
				},
				Attributes: map[string]schema.Attribute{
					"annotation": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The annotation of the Relation To Data Plane Policing Policy object.`,
					},
					"data_plane_policing_policy_name": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `Name.`,
					},
					"annotations": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Optional:            true,
						Computed:            true,
						PlanModifiers: []planmodifier.Set{
							setplanmodifier.UseStateForUnknown(),
						},
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
					"tags": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Optional:            true,
						Computed:            true,
						PlanModifiers: []planmodifier.Set{
							setplanmodifier.UseStateForUnknown(),
						},
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
				},
			},
			"relation_to_fibre_channel_paths": schema.SetNestedAttribute{
				MarkdownDescription: `this object is used for creation of static association
                     with a Path for fcoe. Existence of this implies that the
                     corresponding set of policies will be resolved into the
                     node to which the relationship points.`,
				Optional: true,
				Computed: true,
				PlanModifiers: []planmodifier.Set{
					setplanmodifier.UseStateForUnknown(),
					SetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate(FvRsFcPathAttFvAEPgSetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate),
				},
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"annotation": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The annotation of the Relation To Fibre Channel Path object.`,
						},
						"description": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The description of the Relation To Fibre Channel Path object.`,
						},
						"target_dn": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								MakeStringRequired(),
							},
							MarkdownDescription: `The distinguished name of the target.`,
						},
						"vsan": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The virtual storage area network (VSAN) of the Relation To Fibre Channel Path object.`,
						},
						"vsan_mode": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.OneOf("native", "regular"),
							},
							MarkdownDescription: `The virtual storage area network (VSAN) mode of the Relation To Fibre Channel Path object.`,
						},
						"annotations": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Optional:            true,
							Computed:            true,
							PlanModifiers: []planmodifier.Set{
								setplanmodifier.UseStateForUnknown(),
							},
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
						"tags": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Optional:            true,
							Computed:            true,
							PlanModifiers: []planmodifier.Set{
								setplanmodifier.UseStateForUnknown(),
							},
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
					},
				},
			},
			"relation_to_intra_epg_contracts": schema.SetNestedAttribute{
				MarkdownDescription: `Intra EPg contract:
                      Represents that the EPg is moving from "allow all within epg" mode
                      to a "deny all within epg" mode.
                      The only type of traffic allowed between EPs in this EPg is the one
                      specified by contracts EPg associates to with this relation.`,
				Optional: true,
				Computed: true,
				PlanModifiers: []planmodifier.Set{
					setplanmodifier.UseStateForUnknown(),
					SetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate(FvRsIntraEpgFvAEPgSetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate),
				},
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"annotation": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The annotation of the Relation To Intra EPG Contract object.`,
						},
						"contract_name": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								MakeStringRequired(),
							},
							MarkdownDescription: `The contract name.`,
						},
						"annotations": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Optional:            true,
							Computed:            true,
							PlanModifiers: []planmodifier.Set{
								setplanmodifier.UseStateForUnknown(),
							},
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
						"tags": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Optional:            true,
							Computed:            true,
							PlanModifiers: []planmodifier.Set{
								setplanmodifier.UseStateForUnknown(),
							},
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
					},
				},
			},
			"relation_to_static_leafs": schema.SetNestedAttribute{
				MarkdownDescription: `The static association with an access group is a bundled or unbundled group of ports. The existence of this object implies that the corresponding set of policies will be resolved into the node to which the relationship points.`,
				Optional:            true,
				Computed:            true,
				PlanModifiers: []planmodifier.Set{
					setplanmodifier.UseStateForUnknown(),
					SetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate(FvRsNodeAttFvAEPgSetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate),
				},
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"annotation": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The annotation of the Relation To Static Leaf object.`,
						},
						"description": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The description of the Relation To Static Leaf object.`,
						},
						"encapsulation": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								MakeStringRequired(),
							},
							MarkdownDescription: `The VLAN encapsulation of the Relation To Static Leaf object.`,
						},
						"deployment_immediacy": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.OneOf("immediate", "lazy"),
							},
							MarkdownDescription: `The deployment immediacy of the Relation To Static Leaf object. Specifies when the policy is pushed into the hardware policy content-addressable memory (CAM).`,
						},
						"mode": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.OneOf("native", "regular", "untagged"),
							},
							MarkdownDescription: `The static association mode with the path of the Relation To Static Leaf object.`,
						},
						"target_dn": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								MakeStringRequired(),
							},
							MarkdownDescription: `The distinguished name of the target of this static binding.`,
						},
						"annotations": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Optional:            true,
							Computed:            true,
							PlanModifiers: []planmodifier.Set{
								setplanmodifier.UseStateForUnknown(),
							},
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
						"tags": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Optional:            true,
							Computed:            true,
							PlanModifiers: []planmodifier.Set{
								setplanmodifier.UseStateForUnknown(),
							},
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
					},
				},
			},
			"relation_to_static_paths": schema.SetNestedAttribute{
				MarkdownDescription: `A source relation to an abstraction of a path endpoint.`,
				Optional:            true,
				Computed:            true,
				PlanModifiers: []planmodifier.Set{
					setplanmodifier.UseStateForUnknown(),
					SetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate(FvRsPathAttFvAEPgSetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate),
				},
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"annotation": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The annotation of the Relation To Static Path object.`,
						},
						"description": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The description of the Relation To Static Path object.`,
						},
						"encapsulation": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								MakeStringRequired(),
							},
							MarkdownDescription: `The VLAN encapsulation of the Relation To Static Path object.`,
						},
						"deployment_immediacy": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.OneOf("immediate", "lazy"),
							},
							MarkdownDescription: `The deployment immediacy of the Relation To Static Path object. Specifies when the policy is pushed into the hardware policy content-addressable memory (CAM).`,
						},
						"mode": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.OneOf("native", "regular", "untagged"),
							},
							MarkdownDescription: `The static association mode of the Relation To Static Path object.`,
						},
						"primary_encapsulation": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The primary VLAN encapsulation of the Relation To Static Path object.`,
						},
						"target_dn": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								MakeStringRequired(),
							},
							MarkdownDescription: `null.`,
						},
						"annotations": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Optional:            true,
							Computed:            true,
							PlanModifiers: []planmodifier.Set{
								setplanmodifier.UseStateForUnknown(),
							},
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
						"tags": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Optional:            true,
							Computed:            true,
							PlanModifiers: []planmodifier.Set{
								setplanmodifier.UseStateForUnknown(),
							},
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
					},
				},
			},
			"relation_to_taboo_contracts": schema.SetNestedAttribute{
				MarkdownDescription: `The taboo contract for which the EPG will be a provider and consumer.`,
				Optional:            true,
				Computed:            true,
				PlanModifiers: []planmodifier.Set{
					setplanmodifier.UseStateForUnknown(),
					SetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate(FvRsProtByFvAEPgSetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate),
				},
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"annotation": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The annotation of the Relation To Taboo Contract object.`,
						},
						"taboo_contract_name": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								MakeStringRequired(),
							},
							MarkdownDescription: `A contract for denying specific classes of traffic. Taboo rules are applied in the hardware before applying the rules of regular contracts. Without a contract, the default forwarding policy is to not allow any communication between EPGs.`,
						},
						"annotations": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Optional:            true,
							Computed:            true,
							PlanModifiers: []planmodifier.Set{
								setplanmodifier.UseStateForUnknown(),
							},
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
						"tags": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Optional:            true,
							Computed:            true,
							PlanModifiers: []planmodifier.Set{
								setplanmodifier.UseStateForUnknown(),
							},
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
					},
				},
			},
			"relation_to_provided_contracts": schema.SetNestedAttribute{
				MarkdownDescription: `A contract for which the EPG will be a provider.`,
				Optional:            true,
				Computed:            true,
				PlanModifiers: []planmodifier.Set{
					setplanmodifier.UseStateForUnknown(),
					SetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate(FvRsProvFvAEPgSetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate),
				},
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"annotation": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The annotation of the Relation To Provided Contract object.`,
						},
						"match_criteria": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.OneOf("All", "AtleastOne", "AtmostOne", "None"),
							},
							MarkdownDescription: `The provider label match criteria.`,
						},
						"priority": schema.StringAttribute{
							CustomType: customTypes.FvRsProvPrioStringType{},
							Optional:   true,
							Computed:   true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								stringvalidator.Any(
									stringvalidator.OneOf("level1", "level2", "level3", "level4", "level5", "level6", "unspecified"),
									validators.InBetweenFromString(0, 9),
								),
							},
							MarkdownDescription: `The Quality of Service (QoS) priority class ID. QoS refers to the capability of a network to provide better service to selected network traffic over various technologies. The primary goal of QoS is to provide priority including dedicated bandwidth, controlled jitter and latency (required by some real-time and interactive traffic), and improved loss characteristics. You can configure the bandwidth of each QoS level using QoS profiles.`,
						},
						"contract_name": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								MakeStringRequired(),
							},
							MarkdownDescription: `The provider contract name.`,
						},
						"annotations": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Optional:            true,
							Computed:            true,
							PlanModifiers: []planmodifier.Set{
								setplanmodifier.UseStateForUnknown(),
							},
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
						"tags": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Optional:            true,
							Computed:            true,
							PlanModifiers: []planmodifier.Set{
								setplanmodifier.UseStateForUnknown(),
							},
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
					},
				},
			},
			"relation_to_contract_masters": schema.SetNestedAttribute{
				MarkdownDescription: `Represents that the EPg is inheriting security configuration from another EPg`,
				Optional:            true,
				Computed:            true,
				PlanModifiers: []planmodifier.Set{
					setplanmodifier.UseStateForUnknown(),
					SetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate(FvRsSecInheritedFvAEPgSetToSetNullWhenStateIsNullPlanIsUnknownDuringUpdate),
				},
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"annotation": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators:          []validator.String{},
							MarkdownDescription: `The annotation of the Relation To Contract Master object.`,
						},
						"target_dn": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								MakeStringRequired(),
							},
							MarkdownDescription: `The distinguished name of the target.`,
						},
						"annotations": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Optional:            true,
							Computed:            true,
							PlanModifiers: []planmodifier.Set{
								setplanmodifier.UseStateForUnknown(),
							},
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
						"tags": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Optional:            true,
							Computed:            true,
							PlanModifiers: []planmodifier.Set{
								setplanmodifier.UseStateForUnknown(),
							},
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Optional: true,
										Computed: true,
										PlanModifiers: []planmodifier.String{
											stringplanmodifier.UseStateForUnknown(),
										},
										Validators: []validator.String{
											MakeStringRequired(),
										},
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
					},
				},
			},
			"relation_to_trust_control_policy": schema.SingleNestedAttribute{
				MarkdownDescription: `Relationship for FHS trust control`,
				Optional:            true,
				Computed:            true,
				PlanModifiers: []planmodifier.Object{
					objectplanmodifier.UseStateForUnknown(),
				},
				Attributes: map[string]schema.Attribute{
					"annotation": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The annotation of the Relation To Trust Control Policy object.`,
					},
					"trust_control_policy_name": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `Name.`,
					},
					"annotations": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Optional:            true,
						Computed:            true,
						PlanModifiers: []planmodifier.Set{
							setplanmodifier.UseStateForUnknown(),
						},
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
					"tags": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Optional:            true,
						Computed:            true,
						PlanModifiers: []planmodifier.Set{
							setplanmodifier.UseStateForUnknown(),
						},
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Optional: true,
									Computed: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									Validators: []validator.String{
										MakeStringRequired(),
									},
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
				},
			},
			"annotations": schema.SetNestedAttribute{
				MarkdownDescription: ``,
				Optional:            true,
				Computed:            true,
				PlanModifiers: []planmodifier.Set{
					setplanmodifier.UseStateForUnknown(),
				},
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"key": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								MakeStringRequired(),
							},
							MarkdownDescription: `The key used to uniquely identify this configuration object.`,
						},
						"value": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								MakeStringRequired(),
							},
							MarkdownDescription: `The value of the property.`,
						},
					},
				},
			},
			"tags": schema.SetNestedAttribute{
				MarkdownDescription: ``,
				Optional:            true,
				Computed:            true,
				PlanModifiers: []planmodifier.Set{
					setplanmodifier.UseStateForUnknown(),
				},
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"key": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								MakeStringRequired(),
							},
							MarkdownDescription: `The key used to uniquely identify this configuration object.`,
						},
						"value": schema.StringAttribute{
							Optional: true,
							Computed: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							Validators: []validator.String{
								MakeStringRequired(),
							},
							MarkdownDescription: `The value of the property.`,
						},
					},
				},
			},
		},
		Blocks: map[string]schema.Block{
			"relation_fv_rs_node_att": schema.SetNestedBlock{
				NestedObject: schema.NestedBlockObject{
					Attributes: map[string]schema.Attribute{
						"deployment_immediacy": schema.StringAttribute{
							Optional:           true,
							Computed:           true,
							DeprecationMessage: "Attribute 'deployment_immediacy' will be deprecated soon, please use 'relation_to_static_leafs.deployment_immediacy' instead",
							Validators: []validator.String{
								stringvalidator.ConflictsWith(path.Expressions{
									path.MatchRoot("relation_to_static_leafs"),
								}...),
							},
						},
						"description": schema.StringAttribute{
							Optional:           true,
							Computed:           true,
							DeprecationMessage: "Attribute 'description' will be deprecated soon, please use 'relation_to_static_leafs.description' instead",
							Validators: []validator.String{
								stringvalidator.ConflictsWith(path.Expressions{
									path.MatchRoot("relation_to_static_leafs"),
								}...),
							},
						},
						"encap": schema.StringAttribute{
							Optional:           true,
							Computed:           true,
							DeprecationMessage: "Attribute 'encap' will be deprecated soon, please use 'relation_to_static_leafs.encapsulation' instead",
							Validators: []validator.String{
								stringvalidator.ConflictsWith(path.Expressions{
									path.MatchRoot("relation_to_static_leafs"),
								}...),
								MakeStringRequired(),
							},
						},
						"mode": schema.StringAttribute{
							Optional:           true,
							Computed:           true,
							DeprecationMessage: "Attribute 'mode' will be deprecated soon, please use 'relation_to_static_leafs.mode' instead",
							Validators: []validator.String{
								stringvalidator.ConflictsWith(path.Expressions{
									path.MatchRoot("relation_to_static_leafs"),
								}...),
							},
						},
						"node_dn": schema.StringAttribute{
							Optional:           true,
							Computed:           true,
							DeprecationMessage: "Attribute 'node_dn' will be deprecated soon, please use 'relation_to_static_leafs.target_dn' instead",
							Validators: []validator.String{
								stringvalidator.ConflictsWith(path.Expressions{
									path.MatchRoot("relation_to_static_leafs"),
								}...),
								MakeStringRequired(),
							},
						},
					},
				},
			},
		},
	}
	tflog.Debug(ctx, "End schema of resource: aci_application_epg")
}

func (r *FvAEPgResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) {
	tflog.Debug(ctx, "Start configure of resource: aci_application_epg")
	// Prevent panic if the provider has not been configured.
	if req.ProviderData == nil {
		return
	}

	client, ok := req.ProviderData.(*client.Client)

	if !ok {
		resp.Diagnostics.AddError(
			"Unexpected Resource Configure Type",
			fmt.Sprintf("Expected *client.Client, got: %T. Please report this issue to the provider developers.", req.ProviderData),
		)

		return
	}

	r.client = client
	tflog.Debug(ctx, "End configure of resource: aci_application_epg")
}

func (r *FvAEPgResource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse) {
	tflog.Debug(ctx, "Start create of resource: aci_application_epg")
	// On create retrieve information on current state prior to making any changes in order to determine child delete operations
	var stateData *FvAEPgResourceModel
	resp.Diagnostics.Append(req.Plan.Get(ctx, &stateData)...)
	if stateData.Id.IsUnknown() || stateData.Id.IsNull() {
		setFvAEPgId(ctx, stateData)
	}
	getAndSetFvAEPgAttributes(ctx, &resp.Diagnostics, r.client, stateData)
	if !globalAllowExistingOnCreate && !stateData.Id.IsNull() {
		resp.Diagnostics.AddError(
			"Object Already Exists",
			fmt.Sprintf("The fvAEPg object with DN '%s' already exists.", stateData.Id.ValueString()),
		)
		return
	}

	var data *FvAEPgResourceModel

	// Read Terraform plan data into the model
	resp.Diagnostics.Append(req.Plan.Get(ctx, &data)...)

	if resp.Diagnostics.HasError() {
		return
	}

	if data.Id.IsUnknown() || data.Id.IsNull() {
		setFvAEPgId(ctx, data)
	}

	tflog.Debug(ctx, fmt.Sprintf("Create of resource aci_application_epg with id '%s'", data.Id.ValueString()))

	var fvCrtrnPlan, fvCrtrnState FvCrtrnFvAEPgResourceModel
	data.FvCrtrn.As(ctx, &fvCrtrnPlan, basetypes.ObjectAsOptions{})
	stateData.FvCrtrn.As(ctx, &fvCrtrnState, basetypes.ObjectAsOptions{})
	var fvRsAEPgMonPolPlan, fvRsAEPgMonPolState FvRsAEPgMonPolFvAEPgResourceModel
	data.FvRsAEPgMonPol.As(ctx, &fvRsAEPgMonPolPlan, basetypes.ObjectAsOptions{})
	stateData.FvRsAEPgMonPol.As(ctx, &fvRsAEPgMonPolState, basetypes.ObjectAsOptions{})
	var fvRsBdPlan, fvRsBdState FvRsBdFvAEPgResourceModel
	data.FvRsBd.As(ctx, &fvRsBdPlan, basetypes.ObjectAsOptions{})
	stateData.FvRsBd.As(ctx, &fvRsBdState, basetypes.ObjectAsOptions{})
	var fvRsConsPlan, fvRsConsState []FvRsConsFvAEPgResourceModel
	data.FvRsCons.ElementsAs(ctx, &fvRsConsPlan, false)
	stateData.FvRsCons.ElementsAs(ctx, &fvRsConsState, false)
	var fvRsConsIfPlan, fvRsConsIfState []FvRsConsIfFvAEPgResourceModel
	data.FvRsConsIf.ElementsAs(ctx, &fvRsConsIfPlan, false)
	stateData.FvRsConsIf.ElementsAs(ctx, &fvRsConsIfState, false)
	var fvRsCustQosPolPlan, fvRsCustQosPolState FvRsCustQosPolFvAEPgResourceModel
	data.FvRsCustQosPol.As(ctx, &fvRsCustQosPolPlan, basetypes.ObjectAsOptions{})
	stateData.FvRsCustQosPol.As(ctx, &fvRsCustQosPolState, basetypes.ObjectAsOptions{})
	var fvRsDomAttPlan, fvRsDomAttState []FvRsDomAttFvAEPgResourceModel
	data.FvRsDomAtt.ElementsAs(ctx, &fvRsDomAttPlan, false)
	stateData.FvRsDomAtt.ElementsAs(ctx, &fvRsDomAttState, false)
	var fvRsDppPolPlan, fvRsDppPolState FvRsDppPolFvAEPgResourceModel
	data.FvRsDppPol.As(ctx, &fvRsDppPolPlan, basetypes.ObjectAsOptions{})
	stateData.FvRsDppPol.As(ctx, &fvRsDppPolState, basetypes.ObjectAsOptions{})
	var fvRsFcPathAttPlan, fvRsFcPathAttState []FvRsFcPathAttFvAEPgResourceModel
	data.FvRsFcPathAtt.ElementsAs(ctx, &fvRsFcPathAttPlan, false)
	stateData.FvRsFcPathAtt.ElementsAs(ctx, &fvRsFcPathAttState, false)
	var fvRsIntraEpgPlan, fvRsIntraEpgState []FvRsIntraEpgFvAEPgResourceModel
	data.FvRsIntraEpg.ElementsAs(ctx, &fvRsIntraEpgPlan, false)
	stateData.FvRsIntraEpg.ElementsAs(ctx, &fvRsIntraEpgState, false)
	var fvRsNodeAttPlan, fvRsNodeAttState []FvRsNodeAttFvAEPgResourceModel
	data.FvRsNodeAtt.ElementsAs(ctx, &fvRsNodeAttPlan, false)
	stateData.FvRsNodeAtt.ElementsAs(ctx, &fvRsNodeAttState, false)
	var fvRsPathAttPlan, fvRsPathAttState []FvRsPathAttFvAEPgResourceModel
	data.FvRsPathAtt.ElementsAs(ctx, &fvRsPathAttPlan, false)
	stateData.FvRsPathAtt.ElementsAs(ctx, &fvRsPathAttState, false)
	var fvRsProtByPlan, fvRsProtByState []FvRsProtByFvAEPgResourceModel
	data.FvRsProtBy.ElementsAs(ctx, &fvRsProtByPlan, false)
	stateData.FvRsProtBy.ElementsAs(ctx, &fvRsProtByState, false)
	var fvRsProvPlan, fvRsProvState []FvRsProvFvAEPgResourceModel
	data.FvRsProv.ElementsAs(ctx, &fvRsProvPlan, false)
	stateData.FvRsProv.ElementsAs(ctx, &fvRsProvState, false)
	var fvRsSecInheritedPlan, fvRsSecInheritedState []FvRsSecInheritedFvAEPgResourceModel
	data.FvRsSecInherited.ElementsAs(ctx, &fvRsSecInheritedPlan, false)
	stateData.FvRsSecInherited.ElementsAs(ctx, &fvRsSecInheritedState, false)
	var fvRsTrustCtrlPlan, fvRsTrustCtrlState FvRsTrustCtrlFvAEPgResourceModel
	data.FvRsTrustCtrl.As(ctx, &fvRsTrustCtrlPlan, basetypes.ObjectAsOptions{})
	stateData.FvRsTrustCtrl.As(ctx, &fvRsTrustCtrlState, basetypes.ObjectAsOptions{})
	var tagAnnotationPlan, tagAnnotationState []TagAnnotationFvAEPgResourceModel
	data.TagAnnotation.ElementsAs(ctx, &tagAnnotationPlan, false)
	stateData.TagAnnotation.ElementsAs(ctx, &tagAnnotationState, false)
	var tagTagPlan, tagTagState []TagTagFvAEPgResourceModel
	data.TagTag.ElementsAs(ctx, &tagTagPlan, false)
	stateData.TagTag.ElementsAs(ctx, &tagTagState, false)
	jsonPayload := getFvAEPgCreateJsonPayload(ctx, &resp.Diagnostics, true, data, fvCrtrnPlan, fvCrtrnState, fvRsAEPgMonPolPlan, fvRsAEPgMonPolState, fvRsBdPlan, fvRsBdState, fvRsConsPlan, fvRsConsState, fvRsConsIfPlan, fvRsConsIfState, fvRsCustQosPolPlan, fvRsCustQosPolState, fvRsDomAttPlan, fvRsDomAttState, fvRsDppPolPlan, fvRsDppPolState, fvRsFcPathAttPlan, fvRsFcPathAttState, fvRsIntraEpgPlan, fvRsIntraEpgState, fvRsNodeAttPlan, fvRsNodeAttState, fvRsPathAttPlan, fvRsPathAttState, fvRsProtByPlan, fvRsProtByState, fvRsProvPlan, fvRsProvState, fvRsSecInheritedPlan, fvRsSecInheritedState, fvRsTrustCtrlPlan, fvRsTrustCtrlState, tagAnnotationPlan, tagAnnotationState, tagTagPlan, tagTagState)

	if resp.Diagnostics.HasError() {
		return
	}

	DoRestRequest(ctx, &resp.Diagnostics, r.client, fmt.Sprintf("api/mo/%s.json", data.Id.ValueString()), "POST", jsonPayload)

	if resp.Diagnostics.HasError() {
		return
	}

	getAndSetFvAEPgAttributes(ctx, &resp.Diagnostics, r.client, data)

	// Save data into Terraform state
	resp.Diagnostics.Append(resp.State.Set(ctx, &data)...)
	tflog.Debug(ctx, fmt.Sprintf("End create of resource aci_application_epg with id '%s'", data.Id.ValueString()))
}

func (r *FvAEPgResource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse) {
	tflog.Debug(ctx, "Start read of resource: aci_application_epg")
	var data *FvAEPgResourceModel

	// Read Terraform prior state data into the model
	resp.Diagnostics.Append(req.State.Get(ctx, &data)...)

	if resp.Diagnostics.HasError() {
		return
	}

	tflog.Debug(ctx, fmt.Sprintf("Read of resource aci_application_epg with id '%s'", data.Id.ValueString()))

	getAndSetFvAEPgAttributes(ctx, &resp.Diagnostics, r.client, data)

	// Save updated data into Terraform state
	if data.Id.IsNull() {
		var emptyData *FvAEPgResourceModel
		resp.Diagnostics.Append(resp.State.Set(ctx, &emptyData)...)
	} else {
		resp.Diagnostics.Append(resp.State.Set(ctx, &data)...)
	}

	tflog.Debug(ctx, fmt.Sprintf("End read of resource aci_application_epg with id '%s'", data.Id.ValueString()))
}

func (r *FvAEPgResource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse) {
	tflog.Debug(ctx, "Start update of resource: aci_application_epg")
	var data *FvAEPgResourceModel
	var stateData *FvAEPgResourceModel

	// Read Terraform plan data into the model
	resp.Diagnostics.Append(req.Plan.Get(ctx, &data)...)
	resp.Diagnostics.Append(req.State.Get(ctx, &stateData)...)
	// Error out when child object fvRsBd is being deleted
	if IsEmptySingleNestedAttribute(data.FvRsBd.Attributes()) && !IsEmptySingleNestedAttribute(stateData.FvRsBd.Attributes()) {
		resp.Diagnostics.AddError(
			"FvRsBd object cannot be deleted",
			"deletion of child is only possible upon deletion of the parent",
		)
	}
	// Error out when child object fvRsCustQosPol is being deleted
	if IsEmptySingleNestedAttribute(data.FvRsCustQosPol.Attributes()) && !IsEmptySingleNestedAttribute(stateData.FvRsCustQosPol.Attributes()) {
		resp.Diagnostics.AddError(
			"FvRsCustQosPol object cannot be deleted",
			"deletion of child is only possible upon deletion of the parent",
		)
	}

	if resp.Diagnostics.HasError() {
		return
	}

	tflog.Debug(ctx, fmt.Sprintf("Update of resource aci_application_epg with id '%s'", data.Id.ValueString()))

	var fvCrtrnPlan, fvCrtrnState FvCrtrnFvAEPgResourceModel
	data.FvCrtrn.As(ctx, &fvCrtrnPlan, basetypes.ObjectAsOptions{})
	stateData.FvCrtrn.As(ctx, &fvCrtrnState, basetypes.ObjectAsOptions{})
	var fvRsAEPgMonPolPlan, fvRsAEPgMonPolState FvRsAEPgMonPolFvAEPgResourceModel
	data.FvRsAEPgMonPol.As(ctx, &fvRsAEPgMonPolPlan, basetypes.ObjectAsOptions{})
	stateData.FvRsAEPgMonPol.As(ctx, &fvRsAEPgMonPolState, basetypes.ObjectAsOptions{})
	var fvRsBdPlan, fvRsBdState FvRsBdFvAEPgResourceModel
	data.FvRsBd.As(ctx, &fvRsBdPlan, basetypes.ObjectAsOptions{})
	stateData.FvRsBd.As(ctx, &fvRsBdState, basetypes.ObjectAsOptions{})
	var fvRsConsPlan, fvRsConsState []FvRsConsFvAEPgResourceModel
	data.FvRsCons.ElementsAs(ctx, &fvRsConsPlan, false)
	stateData.FvRsCons.ElementsAs(ctx, &fvRsConsState, false)
	var fvRsConsIfPlan, fvRsConsIfState []FvRsConsIfFvAEPgResourceModel
	data.FvRsConsIf.ElementsAs(ctx, &fvRsConsIfPlan, false)
	stateData.FvRsConsIf.ElementsAs(ctx, &fvRsConsIfState, false)
	var fvRsCustQosPolPlan, fvRsCustQosPolState FvRsCustQosPolFvAEPgResourceModel
	data.FvRsCustQosPol.As(ctx, &fvRsCustQosPolPlan, basetypes.ObjectAsOptions{})
	stateData.FvRsCustQosPol.As(ctx, &fvRsCustQosPolState, basetypes.ObjectAsOptions{})
	var fvRsDomAttPlan, fvRsDomAttState []FvRsDomAttFvAEPgResourceModel
	data.FvRsDomAtt.ElementsAs(ctx, &fvRsDomAttPlan, false)
	stateData.FvRsDomAtt.ElementsAs(ctx, &fvRsDomAttState, false)
	var fvRsDppPolPlan, fvRsDppPolState FvRsDppPolFvAEPgResourceModel
	data.FvRsDppPol.As(ctx, &fvRsDppPolPlan, basetypes.ObjectAsOptions{})
	stateData.FvRsDppPol.As(ctx, &fvRsDppPolState, basetypes.ObjectAsOptions{})
	var fvRsFcPathAttPlan, fvRsFcPathAttState []FvRsFcPathAttFvAEPgResourceModel
	data.FvRsFcPathAtt.ElementsAs(ctx, &fvRsFcPathAttPlan, false)
	stateData.FvRsFcPathAtt.ElementsAs(ctx, &fvRsFcPathAttState, false)
	var fvRsIntraEpgPlan, fvRsIntraEpgState []FvRsIntraEpgFvAEPgResourceModel
	data.FvRsIntraEpg.ElementsAs(ctx, &fvRsIntraEpgPlan, false)
	stateData.FvRsIntraEpg.ElementsAs(ctx, &fvRsIntraEpgState, false)
	var fvRsNodeAttPlan, fvRsNodeAttState []FvRsNodeAttFvAEPgResourceModel
	data.FvRsNodeAtt.ElementsAs(ctx, &fvRsNodeAttPlan, false)
	stateData.FvRsNodeAtt.ElementsAs(ctx, &fvRsNodeAttState, false)
	var fvRsPathAttPlan, fvRsPathAttState []FvRsPathAttFvAEPgResourceModel
	data.FvRsPathAtt.ElementsAs(ctx, &fvRsPathAttPlan, false)
	stateData.FvRsPathAtt.ElementsAs(ctx, &fvRsPathAttState, false)
	var fvRsProtByPlan, fvRsProtByState []FvRsProtByFvAEPgResourceModel
	data.FvRsProtBy.ElementsAs(ctx, &fvRsProtByPlan, false)
	stateData.FvRsProtBy.ElementsAs(ctx, &fvRsProtByState, false)
	var fvRsProvPlan, fvRsProvState []FvRsProvFvAEPgResourceModel
	data.FvRsProv.ElementsAs(ctx, &fvRsProvPlan, false)
	stateData.FvRsProv.ElementsAs(ctx, &fvRsProvState, false)
	var fvRsSecInheritedPlan, fvRsSecInheritedState []FvRsSecInheritedFvAEPgResourceModel
	data.FvRsSecInherited.ElementsAs(ctx, &fvRsSecInheritedPlan, false)
	stateData.FvRsSecInherited.ElementsAs(ctx, &fvRsSecInheritedState, false)
	var fvRsTrustCtrlPlan, fvRsTrustCtrlState FvRsTrustCtrlFvAEPgResourceModel
	data.FvRsTrustCtrl.As(ctx, &fvRsTrustCtrlPlan, basetypes.ObjectAsOptions{})
	stateData.FvRsTrustCtrl.As(ctx, &fvRsTrustCtrlState, basetypes.ObjectAsOptions{})
	var tagAnnotationPlan, tagAnnotationState []TagAnnotationFvAEPgResourceModel
	data.TagAnnotation.ElementsAs(ctx, &tagAnnotationPlan, false)
	stateData.TagAnnotation.ElementsAs(ctx, &tagAnnotationState, false)
	var tagTagPlan, tagTagState []TagTagFvAEPgResourceModel
	data.TagTag.ElementsAs(ctx, &tagTagPlan, false)
	stateData.TagTag.ElementsAs(ctx, &tagTagState, false)
	jsonPayload := getFvAEPgCreateJsonPayload(ctx, &resp.Diagnostics, false, data, fvCrtrnPlan, fvCrtrnState, fvRsAEPgMonPolPlan, fvRsAEPgMonPolState, fvRsBdPlan, fvRsBdState, fvRsConsPlan, fvRsConsState, fvRsConsIfPlan, fvRsConsIfState, fvRsCustQosPolPlan, fvRsCustQosPolState, fvRsDomAttPlan, fvRsDomAttState, fvRsDppPolPlan, fvRsDppPolState, fvRsFcPathAttPlan, fvRsFcPathAttState, fvRsIntraEpgPlan, fvRsIntraEpgState, fvRsNodeAttPlan, fvRsNodeAttState, fvRsPathAttPlan, fvRsPathAttState, fvRsProtByPlan, fvRsProtByState, fvRsProvPlan, fvRsProvState, fvRsSecInheritedPlan, fvRsSecInheritedState, fvRsTrustCtrlPlan, fvRsTrustCtrlState, tagAnnotationPlan, tagAnnotationState, tagTagPlan, tagTagState)

	if resp.Diagnostics.HasError() {
		return
	}

	DoRestRequest(ctx, &resp.Diagnostics, r.client, fmt.Sprintf("api/mo/%s.json", data.Id.ValueString()), "POST", jsonPayload)

	if resp.Diagnostics.HasError() {
		return
	}

	getAndSetFvAEPgAttributes(ctx, &resp.Diagnostics, r.client, data)

	// Save updated data into Terraform state
	resp.Diagnostics.Append(resp.State.Set(ctx, &data)...)
	tflog.Debug(ctx, fmt.Sprintf("End update of resource aci_application_epg with id '%s'", data.Id.ValueString()))
}

func (r *FvAEPgResource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse) {
	tflog.Debug(ctx, "Start delete of resource: aci_application_epg")
	var data *FvAEPgResourceModel

	// Read Terraform prior state data into the model
	resp.Diagnostics.Append(req.State.Get(ctx, &data)...)

	if resp.Diagnostics.HasError() {
		return
	}

	tflog.Debug(ctx, fmt.Sprintf("Delete of resource aci_application_epg with id '%s'", data.Id.ValueString()))
	jsonPayload := GetDeleteJsonPayload(ctx, &resp.Diagnostics, "fvAEPg", data.Id.ValueString())
	if resp.Diagnostics.HasError() {
		return
	}
	DoRestRequest(ctx, &resp.Diagnostics, r.client, fmt.Sprintf("api/mo/%s.json", data.Id.ValueString()), "POST", jsonPayload)
	if resp.Diagnostics.HasError() {
		return
	}
	tflog.Debug(ctx, fmt.Sprintf("End delete of resource aci_application_epg with id '%s'", data.Id.ValueString()))
}

func (r *FvAEPgResource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse) {
	tflog.Debug(ctx, "Start import state of resource: aci_application_epg")
	resource.ImportStatePassthroughID(ctx, path.Root("id"), req, resp)

	var stateData *FvAEPgResourceModel
	resp.Diagnostics.Append(resp.State.Get(ctx, &stateData)...)
	tflog.Debug(ctx, fmt.Sprintf("Import state of resource aci_application_epg with id '%s'", stateData.Id.ValueString()))

	tflog.Debug(ctx, "End import of state resource: aci_application_epg")
}

func getAndSetFvAEPgAttributes(ctx context.Context, diags *diag.Diagnostics, client *client.Client, data *FvAEPgResourceModel) {
	requestData := DoRestRequest(ctx, diags, client, fmt.Sprintf("api/mo/%s.json?rsp-subtree=full&rsp-subtree-class=%s", data.Id.ValueString(), "fvAEPg,fvCrtrn,fvRsAEPgMonPol,fvRsBd,fvRsCons,fvRsConsIf,fvRsCustQosPol,fvRsDomAtt,fvRsDppPol,fvRsFcPathAtt,fvRsIntraEpg,fvRsNodeAtt,fvRsPathAtt,fvRsProtBy,fvRsProv,fvRsSecInherited,fvRsTrustCtrl,tagAnnotation,tagTag,tagAnnotation,tagTag,tagAnnotation,tagTag,tagAnnotation,tagTag,tagAnnotation,tagTag,tagAnnotation,tagTag,tagAnnotation,tagTag,tagAnnotation,tagTag,tagAnnotation,tagTag,tagAnnotation,tagTag,tagAnnotation,tagTag,tagAnnotation,tagTag,tagAnnotation,tagTag,tagAnnotation,tagTag,tagAnnotation,tagTag,tagAnnotation,tagTag,tagAnnotation,tagTag"), "GET", nil)

	readData := getEmptyFvAEPgResourceModel()

	if diags.HasError() {
		return
	}
	if requestData.Search("imdata").Search("fvAEPg").Data() != nil {
		classReadInfo := requestData.Search("imdata").Search("fvAEPg").Data().([]interface{})
		if len(classReadInfo) == 1 {
			attributes := classReadInfo[0].(map[string]interface{})["attributes"].(map[string]interface{})
			for attributeName, attributeValue := range attributes {
				if attributeName == "dn" {
					readData.Id = basetypes.NewStringValue(attributeValue.(string))
					setFvAEPgParentDn(ctx, attributeValue.(string), readData)
				}
				if attributeName == "annotation" {
					readData.Annotation = basetypes.NewStringValue(attributeValue.(string))
				}
				if attributeName == "descr" {
					readData.Descr = basetypes.NewStringValue(attributeValue.(string))
				}
				if attributeName == "exceptionTag" {
					readData.ExceptionTag = basetypes.NewStringValue(attributeValue.(string))
				}
				if attributeName == "floodOnEncap" {
					readData.FloodOnEncap = basetypes.NewStringValue(attributeValue.(string))
				}
				if attributeName == "fwdCtrl" && attributeValue.(string) == "" {
					readData.FwdCtrl = basetypes.NewStringValue("none")
				} else if attributeName == "fwdCtrl" {
					readData.FwdCtrl = basetypes.NewStringValue(attributeValue.(string))
				}
				if attributeName == "hasMcastSource" {
					readData.HasMcastSource = basetypes.NewStringValue(attributeValue.(string))
				}
				if attributeName == "isAttrBasedEPg" {
					readData.IsAttrBasedEPg = basetypes.NewStringValue(attributeValue.(string))
				}
				if attributeName == "matchT" {
					readData.MatchT = basetypes.NewStringValue(attributeValue.(string))
				}
				if attributeName == "name" {
					readData.Name = basetypes.NewStringValue(attributeValue.(string))
				}
				if attributeName == "nameAlias" {
					readData.NameAlias = basetypes.NewStringValue(attributeValue.(string))
				}
				if attributeName == "pcEnfPref" {
					readData.PcEnfPref = basetypes.NewStringValue(attributeValue.(string))
				}
				if attributeName == "pcTag" {
					readData.PcTag = basetypes.NewStringValue(attributeValue.(string))
				}
				if attributeName == "prefGrMemb" {
					readData.PrefGrMemb = basetypes.NewStringValue(attributeValue.(string))
				}
				if attributeName == "prio" {
					readData.Prio = customTypes.NewFvAEPgPrioStringValue(attributeValue.(string))
				}
				if attributeName == "scope" {
					readData.Scope = basetypes.NewStringValue(attributeValue.(string))
				}
				if attributeName == "shutdown" {
					readData.Shutdown = basetypes.NewStringValue(attributeValue.(string))
				}
			}
			FvCrtrnFvAEPgList := make([]FvCrtrnFvAEPgResourceModel, 0)
			FvRsAEPgMonPolFvAEPgList := make([]FvRsAEPgMonPolFvAEPgResourceModel, 0)
			FvRsBdFvAEPgList := make([]FvRsBdFvAEPgResourceModel, 0)
			FvRsConsFvAEPgList := make([]FvRsConsFvAEPgResourceModel, 0)
			FvRsConsIfFvAEPgList := make([]FvRsConsIfFvAEPgResourceModel, 0)
			FvRsCustQosPolFvAEPgList := make([]FvRsCustQosPolFvAEPgResourceModel, 0)
			FvRsDomAttFvAEPgList := make([]FvRsDomAttFvAEPgResourceModel, 0)
			FvRsDppPolFvAEPgList := make([]FvRsDppPolFvAEPgResourceModel, 0)
			FvRsFcPathAttFvAEPgList := make([]FvRsFcPathAttFvAEPgResourceModel, 0)
			FvRsIntraEpgFvAEPgList := make([]FvRsIntraEpgFvAEPgResourceModel, 0)
			FvRsNodeAttFvAEPgList := make([]FvRsNodeAttFvAEPgResourceModel, 0)
			FvRsPathAttFvAEPgList := make([]FvRsPathAttFvAEPgResourceModel, 0)
			FvRsProtByFvAEPgList := make([]FvRsProtByFvAEPgResourceModel, 0)
			FvRsProvFvAEPgList := make([]FvRsProvFvAEPgResourceModel, 0)
			FvRsSecInheritedFvAEPgList := make([]FvRsSecInheritedFvAEPgResourceModel, 0)
			FvRsTrustCtrlFvAEPgList := make([]FvRsTrustCtrlFvAEPgResourceModel, 0)
			TagAnnotationFvAEPgList := make([]TagAnnotationFvAEPgResourceModel, 0)
			TagTagFvAEPgList := make([]TagTagFvAEPgResourceModel, 0)
			_, ok := classReadInfo[0].(map[string]interface{})["children"]
			if ok {
				children := classReadInfo[0].(map[string]interface{})["children"].([]interface{})
				for _, child := range children {
					for childClassName, childClassDetails := range child.(map[string]interface{}) {
						childAttributes := childClassDetails.(map[string]interface{})["attributes"].(map[string]interface{})
						if childClassName == "fvCrtrn" {
							FvCrtrnFvAEPg := getEmptyFvCrtrnFvAEPgResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "annotation" {
									FvCrtrnFvAEPg.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "descr" {
									FvCrtrnFvAEPg.Descr = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "match" {
									FvCrtrnFvAEPg.Match = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "name" {
									FvCrtrnFvAEPg.Name = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "nameAlias" {
									FvCrtrnFvAEPg.NameAlias = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "ownerKey" {
									FvCrtrnFvAEPg.OwnerKey = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "ownerTag" {
									FvCrtrnFvAEPg.OwnerTag = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "prec" {
									FvCrtrnFvAEPg.Prec = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "scope" {
									FvCrtrnFvAEPg.Scope = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagAnnotationFvCrtrnFvAEPgList := make([]TagAnnotationFvCrtrnFvAEPgResourceModel, 0)
							TagTagFvCrtrnFvAEPgList := make([]TagTagFvCrtrnFvAEPgResourceModel, 0)
							childrenOfFvCrtrnFvAEPg, childrenOfFvCrtrnFvAEPgExist := childClassDetails.(map[string]interface{})["children"]
							if childrenOfFvCrtrnFvAEPgExist {
								for _, childFvCrtrnFvAEPg := range childrenOfFvCrtrnFvAEPg.([]interface{}) {
									for childClassNameFvCrtrnFvAEPg, childClassDetailsFvCrtrnFvAEPg := range childFvCrtrnFvAEPg.(map[string]interface{}) {
										if childClassNameFvCrtrnFvAEPg == "tagAnnotation" {
											TagAnnotationFvCrtrnFvAEPg := getEmptyTagAnnotationFvCrtrnFvAEPgResourceModel()
											tagAnnotationchildAttributeValue := childClassDetailsFvCrtrnFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
												if childAttributeName == "key" {
													TagAnnotationFvCrtrnFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagAnnotationFvCrtrnFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationFvCrtrnFvAEPgList = append(TagAnnotationFvCrtrnFvAEPgList, TagAnnotationFvCrtrnFvAEPg)
										}
										if childClassNameFvCrtrnFvAEPg == "tagTag" {
											TagTagFvCrtrnFvAEPg := getEmptyTagTagFvCrtrnFvAEPgResourceModel()
											tagTagchildAttributeValue := childClassDetailsFvCrtrnFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
												if childAttributeName == "key" {
													TagTagFvCrtrnFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagTagFvCrtrnFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagTagFvCrtrnFvAEPgList = append(TagTagFvCrtrnFvAEPgList, TagTagFvCrtrnFvAEPg)
										}
									}
								}
							}
							TagAnnotationFvCrtrnFvAEPgSet, _ := types.SetValueFrom(ctx, TagAnnotationFvCrtrnFvAEPgType, TagAnnotationFvCrtrnFvAEPgList)
							FvCrtrnFvAEPg.TagAnnotation = TagAnnotationFvCrtrnFvAEPgSet
							TagTagFvCrtrnFvAEPgSet, _ := types.SetValueFrom(ctx, TagTagFvCrtrnFvAEPgType, TagTagFvCrtrnFvAEPgList)
							FvCrtrnFvAEPg.TagTag = TagTagFvCrtrnFvAEPgSet
							FvCrtrnFvAEPgList = append(FvCrtrnFvAEPgList, FvCrtrnFvAEPg)
						}
						if childClassName == "fvRsAEPgMonPol" {
							FvRsAEPgMonPolFvAEPg := getEmptyFvRsAEPgMonPolFvAEPgResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "annotation" {
									FvRsAEPgMonPolFvAEPg.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "tnMonEPGPolName" {
									FvRsAEPgMonPolFvAEPg.TnMonEPGPolName = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagAnnotationFvRsAEPgMonPolFvAEPgList := make([]TagAnnotationFvRsAEPgMonPolFvAEPgResourceModel, 0)
							TagTagFvRsAEPgMonPolFvAEPgList := make([]TagTagFvRsAEPgMonPolFvAEPgResourceModel, 0)
							childrenOfFvRsAEPgMonPolFvAEPg, childrenOfFvRsAEPgMonPolFvAEPgExist := childClassDetails.(map[string]interface{})["children"]
							if childrenOfFvRsAEPgMonPolFvAEPgExist {
								for _, childFvRsAEPgMonPolFvAEPg := range childrenOfFvRsAEPgMonPolFvAEPg.([]interface{}) {
									for childClassNameFvRsAEPgMonPolFvAEPg, childClassDetailsFvRsAEPgMonPolFvAEPg := range childFvRsAEPgMonPolFvAEPg.(map[string]interface{}) {
										if childClassNameFvRsAEPgMonPolFvAEPg == "tagAnnotation" {
											TagAnnotationFvRsAEPgMonPolFvAEPg := getEmptyTagAnnotationFvRsAEPgMonPolFvAEPgResourceModel()
											tagAnnotationchildAttributeValue := childClassDetailsFvRsAEPgMonPolFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
												if childAttributeName == "key" {
													TagAnnotationFvRsAEPgMonPolFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagAnnotationFvRsAEPgMonPolFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationFvRsAEPgMonPolFvAEPgList = append(TagAnnotationFvRsAEPgMonPolFvAEPgList, TagAnnotationFvRsAEPgMonPolFvAEPg)
										}
										if childClassNameFvRsAEPgMonPolFvAEPg == "tagTag" {
											TagTagFvRsAEPgMonPolFvAEPg := getEmptyTagTagFvRsAEPgMonPolFvAEPgResourceModel()
											tagTagchildAttributeValue := childClassDetailsFvRsAEPgMonPolFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
												if childAttributeName == "key" {
													TagTagFvRsAEPgMonPolFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagTagFvRsAEPgMonPolFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagTagFvRsAEPgMonPolFvAEPgList = append(TagTagFvRsAEPgMonPolFvAEPgList, TagTagFvRsAEPgMonPolFvAEPg)
										}
									}
								}
							}
							TagAnnotationFvRsAEPgMonPolFvAEPgSet, _ := types.SetValueFrom(ctx, TagAnnotationFvRsAEPgMonPolFvAEPgType, TagAnnotationFvRsAEPgMonPolFvAEPgList)
							FvRsAEPgMonPolFvAEPg.TagAnnotation = TagAnnotationFvRsAEPgMonPolFvAEPgSet
							TagTagFvRsAEPgMonPolFvAEPgSet, _ := types.SetValueFrom(ctx, TagTagFvRsAEPgMonPolFvAEPgType, TagTagFvRsAEPgMonPolFvAEPgList)
							FvRsAEPgMonPolFvAEPg.TagTag = TagTagFvRsAEPgMonPolFvAEPgSet
							FvRsAEPgMonPolFvAEPgList = append(FvRsAEPgMonPolFvAEPgList, FvRsAEPgMonPolFvAEPg)
						}
						if childClassName == "fvRsBd" {
							FvRsBdFvAEPg := getEmptyFvRsBdFvAEPgResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "annotation" {
									FvRsBdFvAEPg.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "tnFvBDName" {
									FvRsBdFvAEPg.TnFvBDName = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagAnnotationFvRsBdFvAEPgList := make([]TagAnnotationFvRsBdFvAEPgResourceModel, 0)
							TagTagFvRsBdFvAEPgList := make([]TagTagFvRsBdFvAEPgResourceModel, 0)
							childrenOfFvRsBdFvAEPg, childrenOfFvRsBdFvAEPgExist := childClassDetails.(map[string]interface{})["children"]
							if childrenOfFvRsBdFvAEPgExist {
								for _, childFvRsBdFvAEPg := range childrenOfFvRsBdFvAEPg.([]interface{}) {
									for childClassNameFvRsBdFvAEPg, childClassDetailsFvRsBdFvAEPg := range childFvRsBdFvAEPg.(map[string]interface{}) {
										if childClassNameFvRsBdFvAEPg == "tagAnnotation" {
											TagAnnotationFvRsBdFvAEPg := getEmptyTagAnnotationFvRsBdFvAEPgResourceModel()
											tagAnnotationchildAttributeValue := childClassDetailsFvRsBdFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
												if childAttributeName == "key" {
													TagAnnotationFvRsBdFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagAnnotationFvRsBdFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationFvRsBdFvAEPgList = append(TagAnnotationFvRsBdFvAEPgList, TagAnnotationFvRsBdFvAEPg)
										}
										if childClassNameFvRsBdFvAEPg == "tagTag" {
											TagTagFvRsBdFvAEPg := getEmptyTagTagFvRsBdFvAEPgResourceModel()
											tagTagchildAttributeValue := childClassDetailsFvRsBdFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
												if childAttributeName == "key" {
													TagTagFvRsBdFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagTagFvRsBdFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagTagFvRsBdFvAEPgList = append(TagTagFvRsBdFvAEPgList, TagTagFvRsBdFvAEPg)
										}
									}
								}
							}
							TagAnnotationFvRsBdFvAEPgSet, _ := types.SetValueFrom(ctx, TagAnnotationFvRsBdFvAEPgType, TagAnnotationFvRsBdFvAEPgList)
							FvRsBdFvAEPg.TagAnnotation = TagAnnotationFvRsBdFvAEPgSet
							TagTagFvRsBdFvAEPgSet, _ := types.SetValueFrom(ctx, TagTagFvRsBdFvAEPgType, TagTagFvRsBdFvAEPgList)
							FvRsBdFvAEPg.TagTag = TagTagFvRsBdFvAEPgSet
							FvRsBdFvAEPgList = append(FvRsBdFvAEPgList, FvRsBdFvAEPg)
						}
						if childClassName == "fvRsCons" {
							FvRsConsFvAEPg := getEmptyFvRsConsFvAEPgResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "annotation" {
									FvRsConsFvAEPg.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "prio" {
									FvRsConsFvAEPg.Prio = customTypes.NewFvRsConsPrioStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "tnVzBrCPName" {
									FvRsConsFvAEPg.TnVzBrCPName = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagAnnotationFvRsConsFvAEPgList := make([]TagAnnotationFvRsConsFvAEPgResourceModel, 0)
							TagTagFvRsConsFvAEPgList := make([]TagTagFvRsConsFvAEPgResourceModel, 0)
							childrenOfFvRsConsFvAEPg, childrenOfFvRsConsFvAEPgExist := childClassDetails.(map[string]interface{})["children"]
							if childrenOfFvRsConsFvAEPgExist {
								for _, childFvRsConsFvAEPg := range childrenOfFvRsConsFvAEPg.([]interface{}) {
									for childClassNameFvRsConsFvAEPg, childClassDetailsFvRsConsFvAEPg := range childFvRsConsFvAEPg.(map[string]interface{}) {
										if childClassNameFvRsConsFvAEPg == "tagAnnotation" {
											TagAnnotationFvRsConsFvAEPg := getEmptyTagAnnotationFvRsConsFvAEPgResourceModel()
											tagAnnotationchildAttributeValue := childClassDetailsFvRsConsFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
												if childAttributeName == "key" {
													TagAnnotationFvRsConsFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagAnnotationFvRsConsFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationFvRsConsFvAEPgList = append(TagAnnotationFvRsConsFvAEPgList, TagAnnotationFvRsConsFvAEPg)
										}
										if childClassNameFvRsConsFvAEPg == "tagTag" {
											TagTagFvRsConsFvAEPg := getEmptyTagTagFvRsConsFvAEPgResourceModel()
											tagTagchildAttributeValue := childClassDetailsFvRsConsFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
												if childAttributeName == "key" {
													TagTagFvRsConsFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagTagFvRsConsFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagTagFvRsConsFvAEPgList = append(TagTagFvRsConsFvAEPgList, TagTagFvRsConsFvAEPg)
										}
									}
								}
							}
							TagAnnotationFvRsConsFvAEPgSet, _ := types.SetValueFrom(ctx, TagAnnotationFvRsConsFvAEPgType, TagAnnotationFvRsConsFvAEPgList)
							FvRsConsFvAEPg.TagAnnotation = TagAnnotationFvRsConsFvAEPgSet
							TagTagFvRsConsFvAEPgSet, _ := types.SetValueFrom(ctx, TagTagFvRsConsFvAEPgType, TagTagFvRsConsFvAEPgList)
							FvRsConsFvAEPg.TagTag = TagTagFvRsConsFvAEPgSet
							FvRsConsFvAEPgList = append(FvRsConsFvAEPgList, FvRsConsFvAEPg)
						}
						if childClassName == "fvRsConsIf" {
							FvRsConsIfFvAEPg := getEmptyFvRsConsIfFvAEPgResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "annotation" {
									FvRsConsIfFvAEPg.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "prio" {
									FvRsConsIfFvAEPg.Prio = customTypes.NewFvRsConsIfPrioStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "tnVzCPIfName" {
									FvRsConsIfFvAEPg.TnVzCPIfName = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagAnnotationFvRsConsIfFvAEPgList := make([]TagAnnotationFvRsConsIfFvAEPgResourceModel, 0)
							TagTagFvRsConsIfFvAEPgList := make([]TagTagFvRsConsIfFvAEPgResourceModel, 0)
							childrenOfFvRsConsIfFvAEPg, childrenOfFvRsConsIfFvAEPgExist := childClassDetails.(map[string]interface{})["children"]
							if childrenOfFvRsConsIfFvAEPgExist {
								for _, childFvRsConsIfFvAEPg := range childrenOfFvRsConsIfFvAEPg.([]interface{}) {
									for childClassNameFvRsConsIfFvAEPg, childClassDetailsFvRsConsIfFvAEPg := range childFvRsConsIfFvAEPg.(map[string]interface{}) {
										if childClassNameFvRsConsIfFvAEPg == "tagAnnotation" {
											TagAnnotationFvRsConsIfFvAEPg := getEmptyTagAnnotationFvRsConsIfFvAEPgResourceModel()
											tagAnnotationchildAttributeValue := childClassDetailsFvRsConsIfFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
												if childAttributeName == "key" {
													TagAnnotationFvRsConsIfFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagAnnotationFvRsConsIfFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationFvRsConsIfFvAEPgList = append(TagAnnotationFvRsConsIfFvAEPgList, TagAnnotationFvRsConsIfFvAEPg)
										}
										if childClassNameFvRsConsIfFvAEPg == "tagTag" {
											TagTagFvRsConsIfFvAEPg := getEmptyTagTagFvRsConsIfFvAEPgResourceModel()
											tagTagchildAttributeValue := childClassDetailsFvRsConsIfFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
												if childAttributeName == "key" {
													TagTagFvRsConsIfFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagTagFvRsConsIfFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagTagFvRsConsIfFvAEPgList = append(TagTagFvRsConsIfFvAEPgList, TagTagFvRsConsIfFvAEPg)
										}
									}
								}
							}
							TagAnnotationFvRsConsIfFvAEPgSet, _ := types.SetValueFrom(ctx, TagAnnotationFvRsConsIfFvAEPgType, TagAnnotationFvRsConsIfFvAEPgList)
							FvRsConsIfFvAEPg.TagAnnotation = TagAnnotationFvRsConsIfFvAEPgSet
							TagTagFvRsConsIfFvAEPgSet, _ := types.SetValueFrom(ctx, TagTagFvRsConsIfFvAEPgType, TagTagFvRsConsIfFvAEPgList)
							FvRsConsIfFvAEPg.TagTag = TagTagFvRsConsIfFvAEPgSet
							FvRsConsIfFvAEPgList = append(FvRsConsIfFvAEPgList, FvRsConsIfFvAEPg)
						}
						if childClassName == "fvRsCustQosPol" {
							FvRsCustQosPolFvAEPg := getEmptyFvRsCustQosPolFvAEPgResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "annotation" {
									FvRsCustQosPolFvAEPg.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "tnQosCustomPolName" {
									FvRsCustQosPolFvAEPg.TnQosCustomPolName = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagAnnotationFvRsCustQosPolFvAEPgList := make([]TagAnnotationFvRsCustQosPolFvAEPgResourceModel, 0)
							TagTagFvRsCustQosPolFvAEPgList := make([]TagTagFvRsCustQosPolFvAEPgResourceModel, 0)
							childrenOfFvRsCustQosPolFvAEPg, childrenOfFvRsCustQosPolFvAEPgExist := childClassDetails.(map[string]interface{})["children"]
							if childrenOfFvRsCustQosPolFvAEPgExist {
								for _, childFvRsCustQosPolFvAEPg := range childrenOfFvRsCustQosPolFvAEPg.([]interface{}) {
									for childClassNameFvRsCustQosPolFvAEPg, childClassDetailsFvRsCustQosPolFvAEPg := range childFvRsCustQosPolFvAEPg.(map[string]interface{}) {
										if childClassNameFvRsCustQosPolFvAEPg == "tagAnnotation" {
											TagAnnotationFvRsCustQosPolFvAEPg := getEmptyTagAnnotationFvRsCustQosPolFvAEPgResourceModel()
											tagAnnotationchildAttributeValue := childClassDetailsFvRsCustQosPolFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
												if childAttributeName == "key" {
													TagAnnotationFvRsCustQosPolFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagAnnotationFvRsCustQosPolFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationFvRsCustQosPolFvAEPgList = append(TagAnnotationFvRsCustQosPolFvAEPgList, TagAnnotationFvRsCustQosPolFvAEPg)
										}
										if childClassNameFvRsCustQosPolFvAEPg == "tagTag" {
											TagTagFvRsCustQosPolFvAEPg := getEmptyTagTagFvRsCustQosPolFvAEPgResourceModel()
											tagTagchildAttributeValue := childClassDetailsFvRsCustQosPolFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
												if childAttributeName == "key" {
													TagTagFvRsCustQosPolFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagTagFvRsCustQosPolFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagTagFvRsCustQosPolFvAEPgList = append(TagTagFvRsCustQosPolFvAEPgList, TagTagFvRsCustQosPolFvAEPg)
										}
									}
								}
							}
							TagAnnotationFvRsCustQosPolFvAEPgSet, _ := types.SetValueFrom(ctx, TagAnnotationFvRsCustQosPolFvAEPgType, TagAnnotationFvRsCustQosPolFvAEPgList)
							FvRsCustQosPolFvAEPg.TagAnnotation = TagAnnotationFvRsCustQosPolFvAEPgSet
							TagTagFvRsCustQosPolFvAEPgSet, _ := types.SetValueFrom(ctx, TagTagFvRsCustQosPolFvAEPgType, TagTagFvRsCustQosPolFvAEPgList)
							FvRsCustQosPolFvAEPg.TagTag = TagTagFvRsCustQosPolFvAEPgSet
							FvRsCustQosPolFvAEPgList = append(FvRsCustQosPolFvAEPgList, FvRsCustQosPolFvAEPg)
						}
						if childClassName == "fvRsDomAtt" {
							FvRsDomAttFvAEPg := getEmptyFvRsDomAttFvAEPgResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "annotation" {
									FvRsDomAttFvAEPg.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "bindingType" && childAttributeValue.(string) == "" {
									FvRsDomAttFvAEPg.BindingType = basetypes.NewStringValue("none")
								} else if childAttributeName == "bindingType" {
									FvRsDomAttFvAEPg.BindingType = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "classPref" {
									FvRsDomAttFvAEPg.ClassPref = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "customEpgName" {
									FvRsDomAttFvAEPg.CustomEpgName = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "delimiter" {
									FvRsDomAttFvAEPg.Delimiter = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "encap" {
									FvRsDomAttFvAEPg.Encap = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "encapMode" {
									FvRsDomAttFvAEPg.EncapMode = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "epgCos" {
									FvRsDomAttFvAEPg.EpgCos = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "epgCosPref" {
									FvRsDomAttFvAEPg.EpgCosPref = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "instrImedcy" {
									FvRsDomAttFvAEPg.InstrImedcy = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "ipamDhcpOverride" {
									FvRsDomAttFvAEPg.IpamDhcpOverride = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "ipamEnabled" {
									FvRsDomAttFvAEPg.IpamEnabled = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "ipamGateway" {
									FvRsDomAttFvAEPg.IpamGateway = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "lagPolicyName" {
									FvRsDomAttFvAEPg.LagPolicyName = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "netflowDir" {
									FvRsDomAttFvAEPg.NetflowDir = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "netflowPref" {
									FvRsDomAttFvAEPg.NetflowPref = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "numPorts" {
									FvRsDomAttFvAEPg.NumPorts = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "portAllocation" && childAttributeValue.(string) == "" {
									FvRsDomAttFvAEPg.PortAllocation = basetypes.NewStringValue("none")
								} else if childAttributeName == "portAllocation" {
									FvRsDomAttFvAEPg.PortAllocation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "primaryEncap" {
									FvRsDomAttFvAEPg.PrimaryEncap = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "primaryEncapInner" {
									FvRsDomAttFvAEPg.PrimaryEncapInner = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "resImedcy" {
									FvRsDomAttFvAEPg.ResImedcy = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "secondaryEncapInner" {
									FvRsDomAttFvAEPg.SecondaryEncapInner = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "switchingMode" {
									FvRsDomAttFvAEPg.SwitchingMode = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "tDn" {
									FvRsDomAttFvAEPg.TDn = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "untagged" {
									FvRsDomAttFvAEPg.Untagged = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagAnnotationFvRsDomAttFvAEPgList := make([]TagAnnotationFvRsDomAttFvAEPgResourceModel, 0)
							TagTagFvRsDomAttFvAEPgList := make([]TagTagFvRsDomAttFvAEPgResourceModel, 0)
							childrenOfFvRsDomAttFvAEPg, childrenOfFvRsDomAttFvAEPgExist := childClassDetails.(map[string]interface{})["children"]
							if childrenOfFvRsDomAttFvAEPgExist {
								for _, childFvRsDomAttFvAEPg := range childrenOfFvRsDomAttFvAEPg.([]interface{}) {
									for childClassNameFvRsDomAttFvAEPg, childClassDetailsFvRsDomAttFvAEPg := range childFvRsDomAttFvAEPg.(map[string]interface{}) {
										if childClassNameFvRsDomAttFvAEPg == "tagAnnotation" {
											TagAnnotationFvRsDomAttFvAEPg := getEmptyTagAnnotationFvRsDomAttFvAEPgResourceModel()
											tagAnnotationchildAttributeValue := childClassDetailsFvRsDomAttFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
												if childAttributeName == "key" {
													TagAnnotationFvRsDomAttFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagAnnotationFvRsDomAttFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationFvRsDomAttFvAEPgList = append(TagAnnotationFvRsDomAttFvAEPgList, TagAnnotationFvRsDomAttFvAEPg)
										}
										if childClassNameFvRsDomAttFvAEPg == "tagTag" {
											TagTagFvRsDomAttFvAEPg := getEmptyTagTagFvRsDomAttFvAEPgResourceModel()
											tagTagchildAttributeValue := childClassDetailsFvRsDomAttFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
												if childAttributeName == "key" {
													TagTagFvRsDomAttFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagTagFvRsDomAttFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagTagFvRsDomAttFvAEPgList = append(TagTagFvRsDomAttFvAEPgList, TagTagFvRsDomAttFvAEPg)
										}
									}
								}
							}
							TagAnnotationFvRsDomAttFvAEPgSet, _ := types.SetValueFrom(ctx, TagAnnotationFvRsDomAttFvAEPgType, TagAnnotationFvRsDomAttFvAEPgList)
							FvRsDomAttFvAEPg.TagAnnotation = TagAnnotationFvRsDomAttFvAEPgSet
							TagTagFvRsDomAttFvAEPgSet, _ := types.SetValueFrom(ctx, TagTagFvRsDomAttFvAEPgType, TagTagFvRsDomAttFvAEPgList)
							FvRsDomAttFvAEPg.TagTag = TagTagFvRsDomAttFvAEPgSet
							FvRsDomAttFvAEPgList = append(FvRsDomAttFvAEPgList, FvRsDomAttFvAEPg)
						}
						if childClassName == "fvRsDppPol" {
							FvRsDppPolFvAEPg := getEmptyFvRsDppPolFvAEPgResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "annotation" {
									FvRsDppPolFvAEPg.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "tnQosDppPolName" {
									FvRsDppPolFvAEPg.TnQosDppPolName = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagAnnotationFvRsDppPolFvAEPgList := make([]TagAnnotationFvRsDppPolFvAEPgResourceModel, 0)
							TagTagFvRsDppPolFvAEPgList := make([]TagTagFvRsDppPolFvAEPgResourceModel, 0)
							childrenOfFvRsDppPolFvAEPg, childrenOfFvRsDppPolFvAEPgExist := childClassDetails.(map[string]interface{})["children"]
							if childrenOfFvRsDppPolFvAEPgExist {
								for _, childFvRsDppPolFvAEPg := range childrenOfFvRsDppPolFvAEPg.([]interface{}) {
									for childClassNameFvRsDppPolFvAEPg, childClassDetailsFvRsDppPolFvAEPg := range childFvRsDppPolFvAEPg.(map[string]interface{}) {
										if childClassNameFvRsDppPolFvAEPg == "tagAnnotation" {
											TagAnnotationFvRsDppPolFvAEPg := getEmptyTagAnnotationFvRsDppPolFvAEPgResourceModel()
											tagAnnotationchildAttributeValue := childClassDetailsFvRsDppPolFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
												if childAttributeName == "key" {
													TagAnnotationFvRsDppPolFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagAnnotationFvRsDppPolFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationFvRsDppPolFvAEPgList = append(TagAnnotationFvRsDppPolFvAEPgList, TagAnnotationFvRsDppPolFvAEPg)
										}
										if childClassNameFvRsDppPolFvAEPg == "tagTag" {
											TagTagFvRsDppPolFvAEPg := getEmptyTagTagFvRsDppPolFvAEPgResourceModel()
											tagTagchildAttributeValue := childClassDetailsFvRsDppPolFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
												if childAttributeName == "key" {
													TagTagFvRsDppPolFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagTagFvRsDppPolFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagTagFvRsDppPolFvAEPgList = append(TagTagFvRsDppPolFvAEPgList, TagTagFvRsDppPolFvAEPg)
										}
									}
								}
							}
							TagAnnotationFvRsDppPolFvAEPgSet, _ := types.SetValueFrom(ctx, TagAnnotationFvRsDppPolFvAEPgType, TagAnnotationFvRsDppPolFvAEPgList)
							FvRsDppPolFvAEPg.TagAnnotation = TagAnnotationFvRsDppPolFvAEPgSet
							TagTagFvRsDppPolFvAEPgSet, _ := types.SetValueFrom(ctx, TagTagFvRsDppPolFvAEPgType, TagTagFvRsDppPolFvAEPgList)
							FvRsDppPolFvAEPg.TagTag = TagTagFvRsDppPolFvAEPgSet
							FvRsDppPolFvAEPgList = append(FvRsDppPolFvAEPgList, FvRsDppPolFvAEPg)
						}
						if childClassName == "fvRsFcPathAtt" {
							FvRsFcPathAttFvAEPg := getEmptyFvRsFcPathAttFvAEPgResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "annotation" {
									FvRsFcPathAttFvAEPg.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "descr" {
									FvRsFcPathAttFvAEPg.Descr = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "tDn" {
									FvRsFcPathAttFvAEPg.TDn = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "vsan" {
									FvRsFcPathAttFvAEPg.Vsan = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "vsanMode" {
									FvRsFcPathAttFvAEPg.VsanMode = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagAnnotationFvRsFcPathAttFvAEPgList := make([]TagAnnotationFvRsFcPathAttFvAEPgResourceModel, 0)
							TagTagFvRsFcPathAttFvAEPgList := make([]TagTagFvRsFcPathAttFvAEPgResourceModel, 0)
							childrenOfFvRsFcPathAttFvAEPg, childrenOfFvRsFcPathAttFvAEPgExist := childClassDetails.(map[string]interface{})["children"]
							if childrenOfFvRsFcPathAttFvAEPgExist {
								for _, childFvRsFcPathAttFvAEPg := range childrenOfFvRsFcPathAttFvAEPg.([]interface{}) {
									for childClassNameFvRsFcPathAttFvAEPg, childClassDetailsFvRsFcPathAttFvAEPg := range childFvRsFcPathAttFvAEPg.(map[string]interface{}) {
										if childClassNameFvRsFcPathAttFvAEPg == "tagAnnotation" {
											TagAnnotationFvRsFcPathAttFvAEPg := getEmptyTagAnnotationFvRsFcPathAttFvAEPgResourceModel()
											tagAnnotationchildAttributeValue := childClassDetailsFvRsFcPathAttFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
												if childAttributeName == "key" {
													TagAnnotationFvRsFcPathAttFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagAnnotationFvRsFcPathAttFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationFvRsFcPathAttFvAEPgList = append(TagAnnotationFvRsFcPathAttFvAEPgList, TagAnnotationFvRsFcPathAttFvAEPg)
										}
										if childClassNameFvRsFcPathAttFvAEPg == "tagTag" {
											TagTagFvRsFcPathAttFvAEPg := getEmptyTagTagFvRsFcPathAttFvAEPgResourceModel()
											tagTagchildAttributeValue := childClassDetailsFvRsFcPathAttFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
												if childAttributeName == "key" {
													TagTagFvRsFcPathAttFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagTagFvRsFcPathAttFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagTagFvRsFcPathAttFvAEPgList = append(TagTagFvRsFcPathAttFvAEPgList, TagTagFvRsFcPathAttFvAEPg)
										}
									}
								}
							}
							TagAnnotationFvRsFcPathAttFvAEPgSet, _ := types.SetValueFrom(ctx, TagAnnotationFvRsFcPathAttFvAEPgType, TagAnnotationFvRsFcPathAttFvAEPgList)
							FvRsFcPathAttFvAEPg.TagAnnotation = TagAnnotationFvRsFcPathAttFvAEPgSet
							TagTagFvRsFcPathAttFvAEPgSet, _ := types.SetValueFrom(ctx, TagTagFvRsFcPathAttFvAEPgType, TagTagFvRsFcPathAttFvAEPgList)
							FvRsFcPathAttFvAEPg.TagTag = TagTagFvRsFcPathAttFvAEPgSet
							FvRsFcPathAttFvAEPgList = append(FvRsFcPathAttFvAEPgList, FvRsFcPathAttFvAEPg)
						}
						if childClassName == "fvRsIntraEpg" {
							FvRsIntraEpgFvAEPg := getEmptyFvRsIntraEpgFvAEPgResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "annotation" {
									FvRsIntraEpgFvAEPg.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "tnVzBrCPName" {
									FvRsIntraEpgFvAEPg.TnVzBrCPName = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagAnnotationFvRsIntraEpgFvAEPgList := make([]TagAnnotationFvRsIntraEpgFvAEPgResourceModel, 0)
							TagTagFvRsIntraEpgFvAEPgList := make([]TagTagFvRsIntraEpgFvAEPgResourceModel, 0)
							childrenOfFvRsIntraEpgFvAEPg, childrenOfFvRsIntraEpgFvAEPgExist := childClassDetails.(map[string]interface{})["children"]
							if childrenOfFvRsIntraEpgFvAEPgExist {
								for _, childFvRsIntraEpgFvAEPg := range childrenOfFvRsIntraEpgFvAEPg.([]interface{}) {
									for childClassNameFvRsIntraEpgFvAEPg, childClassDetailsFvRsIntraEpgFvAEPg := range childFvRsIntraEpgFvAEPg.(map[string]interface{}) {
										if childClassNameFvRsIntraEpgFvAEPg == "tagAnnotation" {
											TagAnnotationFvRsIntraEpgFvAEPg := getEmptyTagAnnotationFvRsIntraEpgFvAEPgResourceModel()
											tagAnnotationchildAttributeValue := childClassDetailsFvRsIntraEpgFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
												if childAttributeName == "key" {
													TagAnnotationFvRsIntraEpgFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagAnnotationFvRsIntraEpgFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationFvRsIntraEpgFvAEPgList = append(TagAnnotationFvRsIntraEpgFvAEPgList, TagAnnotationFvRsIntraEpgFvAEPg)
										}
										if childClassNameFvRsIntraEpgFvAEPg == "tagTag" {
											TagTagFvRsIntraEpgFvAEPg := getEmptyTagTagFvRsIntraEpgFvAEPgResourceModel()
											tagTagchildAttributeValue := childClassDetailsFvRsIntraEpgFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
												if childAttributeName == "key" {
													TagTagFvRsIntraEpgFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagTagFvRsIntraEpgFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagTagFvRsIntraEpgFvAEPgList = append(TagTagFvRsIntraEpgFvAEPgList, TagTagFvRsIntraEpgFvAEPg)
										}
									}
								}
							}
							TagAnnotationFvRsIntraEpgFvAEPgSet, _ := types.SetValueFrom(ctx, TagAnnotationFvRsIntraEpgFvAEPgType, TagAnnotationFvRsIntraEpgFvAEPgList)
							FvRsIntraEpgFvAEPg.TagAnnotation = TagAnnotationFvRsIntraEpgFvAEPgSet
							TagTagFvRsIntraEpgFvAEPgSet, _ := types.SetValueFrom(ctx, TagTagFvRsIntraEpgFvAEPgType, TagTagFvRsIntraEpgFvAEPgList)
							FvRsIntraEpgFvAEPg.TagTag = TagTagFvRsIntraEpgFvAEPgSet
							FvRsIntraEpgFvAEPgList = append(FvRsIntraEpgFvAEPgList, FvRsIntraEpgFvAEPg)
						}
						if childClassName == "fvRsNodeAtt" {
							FvRsNodeAttFvAEPg := getEmptyFvRsNodeAttFvAEPgResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "annotation" {
									FvRsNodeAttFvAEPg.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "descr" {
									FvRsNodeAttFvAEPg.Descr = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "encap" {
									FvRsNodeAttFvAEPg.Encap = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "instrImedcy" {
									FvRsNodeAttFvAEPg.InstrImedcy = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "mode" {
									FvRsNodeAttFvAEPg.Mode = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "tDn" {
									FvRsNodeAttFvAEPg.TDn = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagAnnotationFvRsNodeAttFvAEPgList := make([]TagAnnotationFvRsNodeAttFvAEPgResourceModel, 0)
							TagTagFvRsNodeAttFvAEPgList := make([]TagTagFvRsNodeAttFvAEPgResourceModel, 0)
							childrenOfFvRsNodeAttFvAEPg, childrenOfFvRsNodeAttFvAEPgExist := childClassDetails.(map[string]interface{})["children"]
							if childrenOfFvRsNodeAttFvAEPgExist {
								for _, childFvRsNodeAttFvAEPg := range childrenOfFvRsNodeAttFvAEPg.([]interface{}) {
									for childClassNameFvRsNodeAttFvAEPg, childClassDetailsFvRsNodeAttFvAEPg := range childFvRsNodeAttFvAEPg.(map[string]interface{}) {
										if childClassNameFvRsNodeAttFvAEPg == "tagAnnotation" {
											TagAnnotationFvRsNodeAttFvAEPg := getEmptyTagAnnotationFvRsNodeAttFvAEPgResourceModel()
											tagAnnotationchildAttributeValue := childClassDetailsFvRsNodeAttFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
												if childAttributeName == "key" {
													TagAnnotationFvRsNodeAttFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagAnnotationFvRsNodeAttFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationFvRsNodeAttFvAEPgList = append(TagAnnotationFvRsNodeAttFvAEPgList, TagAnnotationFvRsNodeAttFvAEPg)
										}
										if childClassNameFvRsNodeAttFvAEPg == "tagTag" {
											TagTagFvRsNodeAttFvAEPg := getEmptyTagTagFvRsNodeAttFvAEPgResourceModel()
											tagTagchildAttributeValue := childClassDetailsFvRsNodeAttFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
												if childAttributeName == "key" {
													TagTagFvRsNodeAttFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagTagFvRsNodeAttFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagTagFvRsNodeAttFvAEPgList = append(TagTagFvRsNodeAttFvAEPgList, TagTagFvRsNodeAttFvAEPg)
										}
									}
								}
							}
							TagAnnotationFvRsNodeAttFvAEPgSet, _ := types.SetValueFrom(ctx, TagAnnotationFvRsNodeAttFvAEPgType, TagAnnotationFvRsNodeAttFvAEPgList)
							FvRsNodeAttFvAEPg.TagAnnotation = TagAnnotationFvRsNodeAttFvAEPgSet
							TagTagFvRsNodeAttFvAEPgSet, _ := types.SetValueFrom(ctx, TagTagFvRsNodeAttFvAEPgType, TagTagFvRsNodeAttFvAEPgList)
							FvRsNodeAttFvAEPg.TagTag = TagTagFvRsNodeAttFvAEPgSet
							FvRsNodeAttFvAEPgList = append(FvRsNodeAttFvAEPgList, FvRsNodeAttFvAEPg)
						}
						if childClassName == "fvRsPathAtt" {
							FvRsPathAttFvAEPg := getEmptyFvRsPathAttFvAEPgResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "annotation" {
									FvRsPathAttFvAEPg.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "descr" {
									FvRsPathAttFvAEPg.Descr = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "encap" {
									FvRsPathAttFvAEPg.Encap = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "instrImedcy" {
									FvRsPathAttFvAEPg.InstrImedcy = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "mode" {
									FvRsPathAttFvAEPg.Mode = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "primaryEncap" {
									FvRsPathAttFvAEPg.PrimaryEncap = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "tDn" {
									FvRsPathAttFvAEPg.TDn = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagAnnotationFvRsPathAttFvAEPgList := make([]TagAnnotationFvRsPathAttFvAEPgResourceModel, 0)
							TagTagFvRsPathAttFvAEPgList := make([]TagTagFvRsPathAttFvAEPgResourceModel, 0)
							childrenOfFvRsPathAttFvAEPg, childrenOfFvRsPathAttFvAEPgExist := childClassDetails.(map[string]interface{})["children"]
							if childrenOfFvRsPathAttFvAEPgExist {
								for _, childFvRsPathAttFvAEPg := range childrenOfFvRsPathAttFvAEPg.([]interface{}) {
									for childClassNameFvRsPathAttFvAEPg, childClassDetailsFvRsPathAttFvAEPg := range childFvRsPathAttFvAEPg.(map[string]interface{}) {
										if childClassNameFvRsPathAttFvAEPg == "tagAnnotation" {
											TagAnnotationFvRsPathAttFvAEPg := getEmptyTagAnnotationFvRsPathAttFvAEPgResourceModel()
											tagAnnotationchildAttributeValue := childClassDetailsFvRsPathAttFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
												if childAttributeName == "key" {
													TagAnnotationFvRsPathAttFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagAnnotationFvRsPathAttFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationFvRsPathAttFvAEPgList = append(TagAnnotationFvRsPathAttFvAEPgList, TagAnnotationFvRsPathAttFvAEPg)
										}
										if childClassNameFvRsPathAttFvAEPg == "tagTag" {
											TagTagFvRsPathAttFvAEPg := getEmptyTagTagFvRsPathAttFvAEPgResourceModel()
											tagTagchildAttributeValue := childClassDetailsFvRsPathAttFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
												if childAttributeName == "key" {
													TagTagFvRsPathAttFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagTagFvRsPathAttFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagTagFvRsPathAttFvAEPgList = append(TagTagFvRsPathAttFvAEPgList, TagTagFvRsPathAttFvAEPg)
										}
									}
								}
							}
							TagAnnotationFvRsPathAttFvAEPgSet, _ := types.SetValueFrom(ctx, TagAnnotationFvRsPathAttFvAEPgType, TagAnnotationFvRsPathAttFvAEPgList)
							FvRsPathAttFvAEPg.TagAnnotation = TagAnnotationFvRsPathAttFvAEPgSet
							TagTagFvRsPathAttFvAEPgSet, _ := types.SetValueFrom(ctx, TagTagFvRsPathAttFvAEPgType, TagTagFvRsPathAttFvAEPgList)
							FvRsPathAttFvAEPg.TagTag = TagTagFvRsPathAttFvAEPgSet
							FvRsPathAttFvAEPgList = append(FvRsPathAttFvAEPgList, FvRsPathAttFvAEPg)
						}
						if childClassName == "fvRsProtBy" {
							FvRsProtByFvAEPg := getEmptyFvRsProtByFvAEPgResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "annotation" {
									FvRsProtByFvAEPg.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "tnVzTabooName" {
									FvRsProtByFvAEPg.TnVzTabooName = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagAnnotationFvRsProtByFvAEPgList := make([]TagAnnotationFvRsProtByFvAEPgResourceModel, 0)
							TagTagFvRsProtByFvAEPgList := make([]TagTagFvRsProtByFvAEPgResourceModel, 0)
							childrenOfFvRsProtByFvAEPg, childrenOfFvRsProtByFvAEPgExist := childClassDetails.(map[string]interface{})["children"]
							if childrenOfFvRsProtByFvAEPgExist {
								for _, childFvRsProtByFvAEPg := range childrenOfFvRsProtByFvAEPg.([]interface{}) {
									for childClassNameFvRsProtByFvAEPg, childClassDetailsFvRsProtByFvAEPg := range childFvRsProtByFvAEPg.(map[string]interface{}) {
										if childClassNameFvRsProtByFvAEPg == "tagAnnotation" {
											TagAnnotationFvRsProtByFvAEPg := getEmptyTagAnnotationFvRsProtByFvAEPgResourceModel()
											tagAnnotationchildAttributeValue := childClassDetailsFvRsProtByFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
												if childAttributeName == "key" {
													TagAnnotationFvRsProtByFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagAnnotationFvRsProtByFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationFvRsProtByFvAEPgList = append(TagAnnotationFvRsProtByFvAEPgList, TagAnnotationFvRsProtByFvAEPg)
										}
										if childClassNameFvRsProtByFvAEPg == "tagTag" {
											TagTagFvRsProtByFvAEPg := getEmptyTagTagFvRsProtByFvAEPgResourceModel()
											tagTagchildAttributeValue := childClassDetailsFvRsProtByFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
												if childAttributeName == "key" {
													TagTagFvRsProtByFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagTagFvRsProtByFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagTagFvRsProtByFvAEPgList = append(TagTagFvRsProtByFvAEPgList, TagTagFvRsProtByFvAEPg)
										}
									}
								}
							}
							TagAnnotationFvRsProtByFvAEPgSet, _ := types.SetValueFrom(ctx, TagAnnotationFvRsProtByFvAEPgType, TagAnnotationFvRsProtByFvAEPgList)
							FvRsProtByFvAEPg.TagAnnotation = TagAnnotationFvRsProtByFvAEPgSet
							TagTagFvRsProtByFvAEPgSet, _ := types.SetValueFrom(ctx, TagTagFvRsProtByFvAEPgType, TagTagFvRsProtByFvAEPgList)
							FvRsProtByFvAEPg.TagTag = TagTagFvRsProtByFvAEPgSet
							FvRsProtByFvAEPgList = append(FvRsProtByFvAEPgList, FvRsProtByFvAEPg)
						}
						if childClassName == "fvRsProv" {
							FvRsProvFvAEPg := getEmptyFvRsProvFvAEPgResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "annotation" {
									FvRsProvFvAEPg.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "matchT" {
									FvRsProvFvAEPg.MatchT = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "prio" {
									FvRsProvFvAEPg.Prio = customTypes.NewFvRsProvPrioStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "tnVzBrCPName" {
									FvRsProvFvAEPg.TnVzBrCPName = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagAnnotationFvRsProvFvAEPgList := make([]TagAnnotationFvRsProvFvAEPgResourceModel, 0)
							TagTagFvRsProvFvAEPgList := make([]TagTagFvRsProvFvAEPgResourceModel, 0)
							childrenOfFvRsProvFvAEPg, childrenOfFvRsProvFvAEPgExist := childClassDetails.(map[string]interface{})["children"]
							if childrenOfFvRsProvFvAEPgExist {
								for _, childFvRsProvFvAEPg := range childrenOfFvRsProvFvAEPg.([]interface{}) {
									for childClassNameFvRsProvFvAEPg, childClassDetailsFvRsProvFvAEPg := range childFvRsProvFvAEPg.(map[string]interface{}) {
										if childClassNameFvRsProvFvAEPg == "tagAnnotation" {
											TagAnnotationFvRsProvFvAEPg := getEmptyTagAnnotationFvRsProvFvAEPgResourceModel()
											tagAnnotationchildAttributeValue := childClassDetailsFvRsProvFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
												if childAttributeName == "key" {
													TagAnnotationFvRsProvFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagAnnotationFvRsProvFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationFvRsProvFvAEPgList = append(TagAnnotationFvRsProvFvAEPgList, TagAnnotationFvRsProvFvAEPg)
										}
										if childClassNameFvRsProvFvAEPg == "tagTag" {
											TagTagFvRsProvFvAEPg := getEmptyTagTagFvRsProvFvAEPgResourceModel()
											tagTagchildAttributeValue := childClassDetailsFvRsProvFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
												if childAttributeName == "key" {
													TagTagFvRsProvFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagTagFvRsProvFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagTagFvRsProvFvAEPgList = append(TagTagFvRsProvFvAEPgList, TagTagFvRsProvFvAEPg)
										}
									}
								}
							}
							TagAnnotationFvRsProvFvAEPgSet, _ := types.SetValueFrom(ctx, TagAnnotationFvRsProvFvAEPgType, TagAnnotationFvRsProvFvAEPgList)
							FvRsProvFvAEPg.TagAnnotation = TagAnnotationFvRsProvFvAEPgSet
							TagTagFvRsProvFvAEPgSet, _ := types.SetValueFrom(ctx, TagTagFvRsProvFvAEPgType, TagTagFvRsProvFvAEPgList)
							FvRsProvFvAEPg.TagTag = TagTagFvRsProvFvAEPgSet
							FvRsProvFvAEPgList = append(FvRsProvFvAEPgList, FvRsProvFvAEPg)
						}
						if childClassName == "fvRsSecInherited" {
							FvRsSecInheritedFvAEPg := getEmptyFvRsSecInheritedFvAEPgResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "annotation" {
									FvRsSecInheritedFvAEPg.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "tDn" {
									FvRsSecInheritedFvAEPg.TDn = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagAnnotationFvRsSecInheritedFvAEPgList := make([]TagAnnotationFvRsSecInheritedFvAEPgResourceModel, 0)
							TagTagFvRsSecInheritedFvAEPgList := make([]TagTagFvRsSecInheritedFvAEPgResourceModel, 0)
							childrenOfFvRsSecInheritedFvAEPg, childrenOfFvRsSecInheritedFvAEPgExist := childClassDetails.(map[string]interface{})["children"]
							if childrenOfFvRsSecInheritedFvAEPgExist {
								for _, childFvRsSecInheritedFvAEPg := range childrenOfFvRsSecInheritedFvAEPg.([]interface{}) {
									for childClassNameFvRsSecInheritedFvAEPg, childClassDetailsFvRsSecInheritedFvAEPg := range childFvRsSecInheritedFvAEPg.(map[string]interface{}) {
										if childClassNameFvRsSecInheritedFvAEPg == "tagAnnotation" {
											TagAnnotationFvRsSecInheritedFvAEPg := getEmptyTagAnnotationFvRsSecInheritedFvAEPgResourceModel()
											tagAnnotationchildAttributeValue := childClassDetailsFvRsSecInheritedFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
												if childAttributeName == "key" {
													TagAnnotationFvRsSecInheritedFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagAnnotationFvRsSecInheritedFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationFvRsSecInheritedFvAEPgList = append(TagAnnotationFvRsSecInheritedFvAEPgList, TagAnnotationFvRsSecInheritedFvAEPg)
										}
										if childClassNameFvRsSecInheritedFvAEPg == "tagTag" {
											TagTagFvRsSecInheritedFvAEPg := getEmptyTagTagFvRsSecInheritedFvAEPgResourceModel()
											tagTagchildAttributeValue := childClassDetailsFvRsSecInheritedFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
												if childAttributeName == "key" {
													TagTagFvRsSecInheritedFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagTagFvRsSecInheritedFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagTagFvRsSecInheritedFvAEPgList = append(TagTagFvRsSecInheritedFvAEPgList, TagTagFvRsSecInheritedFvAEPg)
										}
									}
								}
							}
							TagAnnotationFvRsSecInheritedFvAEPgSet, _ := types.SetValueFrom(ctx, TagAnnotationFvRsSecInheritedFvAEPgType, TagAnnotationFvRsSecInheritedFvAEPgList)
							FvRsSecInheritedFvAEPg.TagAnnotation = TagAnnotationFvRsSecInheritedFvAEPgSet
							TagTagFvRsSecInheritedFvAEPgSet, _ := types.SetValueFrom(ctx, TagTagFvRsSecInheritedFvAEPgType, TagTagFvRsSecInheritedFvAEPgList)
							FvRsSecInheritedFvAEPg.TagTag = TagTagFvRsSecInheritedFvAEPgSet
							FvRsSecInheritedFvAEPgList = append(FvRsSecInheritedFvAEPgList, FvRsSecInheritedFvAEPg)
						}
						if childClassName == "fvRsTrustCtrl" {
							FvRsTrustCtrlFvAEPg := getEmptyFvRsTrustCtrlFvAEPgResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "annotation" {
									FvRsTrustCtrlFvAEPg.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "tnFhsTrustCtrlPolName" {
									FvRsTrustCtrlFvAEPg.TnFhsTrustCtrlPolName = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagAnnotationFvRsTrustCtrlFvAEPgList := make([]TagAnnotationFvRsTrustCtrlFvAEPgResourceModel, 0)
							TagTagFvRsTrustCtrlFvAEPgList := make([]TagTagFvRsTrustCtrlFvAEPgResourceModel, 0)
							childrenOfFvRsTrustCtrlFvAEPg, childrenOfFvRsTrustCtrlFvAEPgExist := childClassDetails.(map[string]interface{})["children"]
							if childrenOfFvRsTrustCtrlFvAEPgExist {
								for _, childFvRsTrustCtrlFvAEPg := range childrenOfFvRsTrustCtrlFvAEPg.([]interface{}) {
									for childClassNameFvRsTrustCtrlFvAEPg, childClassDetailsFvRsTrustCtrlFvAEPg := range childFvRsTrustCtrlFvAEPg.(map[string]interface{}) {
										if childClassNameFvRsTrustCtrlFvAEPg == "tagAnnotation" {
											TagAnnotationFvRsTrustCtrlFvAEPg := getEmptyTagAnnotationFvRsTrustCtrlFvAEPgResourceModel()
											tagAnnotationchildAttributeValue := childClassDetailsFvRsTrustCtrlFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
												if childAttributeName == "key" {
													TagAnnotationFvRsTrustCtrlFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagAnnotationFvRsTrustCtrlFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationFvRsTrustCtrlFvAEPgList = append(TagAnnotationFvRsTrustCtrlFvAEPgList, TagAnnotationFvRsTrustCtrlFvAEPg)
										}
										if childClassNameFvRsTrustCtrlFvAEPg == "tagTag" {
											TagTagFvRsTrustCtrlFvAEPg := getEmptyTagTagFvRsTrustCtrlFvAEPgResourceModel()
											tagTagchildAttributeValue := childClassDetailsFvRsTrustCtrlFvAEPg.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
												if childAttributeName == "key" {
													TagTagFvRsTrustCtrlFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagTagFvRsTrustCtrlFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagTagFvRsTrustCtrlFvAEPgList = append(TagTagFvRsTrustCtrlFvAEPgList, TagTagFvRsTrustCtrlFvAEPg)
										}
									}
								}
							}
							TagAnnotationFvRsTrustCtrlFvAEPgSet, _ := types.SetValueFrom(ctx, TagAnnotationFvRsTrustCtrlFvAEPgType, TagAnnotationFvRsTrustCtrlFvAEPgList)
							FvRsTrustCtrlFvAEPg.TagAnnotation = TagAnnotationFvRsTrustCtrlFvAEPgSet
							TagTagFvRsTrustCtrlFvAEPgSet, _ := types.SetValueFrom(ctx, TagTagFvRsTrustCtrlFvAEPgType, TagTagFvRsTrustCtrlFvAEPgList)
							FvRsTrustCtrlFvAEPg.TagTag = TagTagFvRsTrustCtrlFvAEPgSet
							FvRsTrustCtrlFvAEPgList = append(FvRsTrustCtrlFvAEPgList, FvRsTrustCtrlFvAEPg)
						}
						if childClassName == "tagAnnotation" {
							TagAnnotationFvAEPg := getEmptyTagAnnotationFvAEPgResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "key" {
									TagAnnotationFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "value" {
									TagAnnotationFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagAnnotationFvAEPgList = append(TagAnnotationFvAEPgList, TagAnnotationFvAEPg)
						}
						if childClassName == "tagTag" {
							TagTagFvAEPg := getEmptyTagTagFvAEPgResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "key" {
									TagTagFvAEPg.Key = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "value" {
									TagTagFvAEPg.Value = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagTagFvAEPgList = append(TagTagFvAEPgList, TagTagFvAEPg)
						}
					}
				}
			}
			if len(FvCrtrnFvAEPgList) == 1 {
				fvCrtrnObject, _ := types.ObjectValueFrom(ctx, FvCrtrnFvAEPgType, FvCrtrnFvAEPgList[0])
				readData.FvCrtrn = fvCrtrnObject
			} else {
				fvCrtrnObject, _ := types.ObjectValueFrom(ctx, FvCrtrnFvAEPgType, getEmptyFvCrtrnFvAEPgResourceModel())
				readData.FvCrtrn = fvCrtrnObject
			}
			if len(FvRsAEPgMonPolFvAEPgList) == 1 {
				fvRsAEPgMonPolObject, _ := types.ObjectValueFrom(ctx, FvRsAEPgMonPolFvAEPgType, FvRsAEPgMonPolFvAEPgList[0])
				readData.FvRsAEPgMonPol = fvRsAEPgMonPolObject
			} else {
				fvRsAEPgMonPolObject, _ := types.ObjectValueFrom(ctx, FvRsAEPgMonPolFvAEPgType, getEmptyFvRsAEPgMonPolFvAEPgResourceModel())
				readData.FvRsAEPgMonPol = fvRsAEPgMonPolObject
			}
			if len(FvRsBdFvAEPgList) == 1 {
				fvRsBdObject, _ := types.ObjectValueFrom(ctx, FvRsBdFvAEPgType, FvRsBdFvAEPgList[0])
				readData.FvRsBd = fvRsBdObject
			} else {
				fvRsBdObject, _ := types.ObjectValueFrom(ctx, FvRsBdFvAEPgType, getEmptyFvRsBdFvAEPgResourceModel())
				readData.FvRsBd = fvRsBdObject
			}
			fvRsConsSet, _ := types.SetValueFrom(ctx, readData.FvRsCons.ElementType(ctx), FvRsConsFvAEPgList)
			readData.FvRsCons = fvRsConsSet
			fvRsConsIfSet, _ := types.SetValueFrom(ctx, readData.FvRsConsIf.ElementType(ctx), FvRsConsIfFvAEPgList)
			readData.FvRsConsIf = fvRsConsIfSet
			if len(FvRsCustQosPolFvAEPgList) == 1 {
				fvRsCustQosPolObject, _ := types.ObjectValueFrom(ctx, FvRsCustQosPolFvAEPgType, FvRsCustQosPolFvAEPgList[0])
				readData.FvRsCustQosPol = fvRsCustQosPolObject
			} else {
				fvRsCustQosPolObject, _ := types.ObjectValueFrom(ctx, FvRsCustQosPolFvAEPgType, getEmptyFvRsCustQosPolFvAEPgResourceModel())
				readData.FvRsCustQosPol = fvRsCustQosPolObject
			}
			fvRsDomAttSet, _ := types.SetValueFrom(ctx, readData.FvRsDomAtt.ElementType(ctx), FvRsDomAttFvAEPgList)
			readData.FvRsDomAtt = fvRsDomAttSet
			if len(FvRsDppPolFvAEPgList) == 1 {
				fvRsDppPolObject, _ := types.ObjectValueFrom(ctx, FvRsDppPolFvAEPgType, FvRsDppPolFvAEPgList[0])
				readData.FvRsDppPol = fvRsDppPolObject
			} else {
				fvRsDppPolObject, _ := types.ObjectValueFrom(ctx, FvRsDppPolFvAEPgType, getEmptyFvRsDppPolFvAEPgResourceModel())
				readData.FvRsDppPol = fvRsDppPolObject
			}
			fvRsFcPathAttSet, _ := types.SetValueFrom(ctx, readData.FvRsFcPathAtt.ElementType(ctx), FvRsFcPathAttFvAEPgList)
			readData.FvRsFcPathAtt = fvRsFcPathAttSet
			fvRsIntraEpgSet, _ := types.SetValueFrom(ctx, readData.FvRsIntraEpg.ElementType(ctx), FvRsIntraEpgFvAEPgList)
			readData.FvRsIntraEpg = fvRsIntraEpgSet
			fvRsNodeAttSet, _ := types.SetValueFrom(ctx, readData.FvRsNodeAtt.ElementType(ctx), FvRsNodeAttFvAEPgList)
			readData.FvRsNodeAtt = fvRsNodeAttSet
			fvRsPathAttSet, _ := types.SetValueFrom(ctx, readData.FvRsPathAtt.ElementType(ctx), FvRsPathAttFvAEPgList)
			readData.FvRsPathAtt = fvRsPathAttSet
			fvRsProtBySet, _ := types.SetValueFrom(ctx, readData.FvRsProtBy.ElementType(ctx), FvRsProtByFvAEPgList)
			readData.FvRsProtBy = fvRsProtBySet
			fvRsProvSet, _ := types.SetValueFrom(ctx, readData.FvRsProv.ElementType(ctx), FvRsProvFvAEPgList)
			readData.FvRsProv = fvRsProvSet
			fvRsSecInheritedSet, _ := types.SetValueFrom(ctx, readData.FvRsSecInherited.ElementType(ctx), FvRsSecInheritedFvAEPgList)
			readData.FvRsSecInherited = fvRsSecInheritedSet
			if len(FvRsTrustCtrlFvAEPgList) == 1 {
				fvRsTrustCtrlObject, _ := types.ObjectValueFrom(ctx, FvRsTrustCtrlFvAEPgType, FvRsTrustCtrlFvAEPgList[0])
				readData.FvRsTrustCtrl = fvRsTrustCtrlObject
			} else {
				fvRsTrustCtrlObject, _ := types.ObjectValueFrom(ctx, FvRsTrustCtrlFvAEPgType, getEmptyFvRsTrustCtrlFvAEPgResourceModel())
				readData.FvRsTrustCtrl = fvRsTrustCtrlObject
			}
			tagAnnotationSet, _ := types.SetValueFrom(ctx, readData.TagAnnotation.ElementType(ctx), TagAnnotationFvAEPgList)
			readData.TagAnnotation = tagAnnotationSet
			tagTagSet, _ := types.SetValueFrom(ctx, readData.TagTag.ElementType(ctx), TagTagFvAEPgList)
			readData.TagTag = tagTagSet
			setFvAEPgLegacyAttributes(ctx, diags, readData, data, classReadInfo)
		} else {
			diags.AddError(
				"too many results in response",
				fmt.Sprintf("%v matches returned for class 'fvAEPg'. Please report this issue to the provider developers.", len(classReadInfo)),
			)
		}
	} else {
		readData.Id = basetypes.NewStringNull()
	}
	*data = *readData
}

func getFvAEPgRn(ctx context.Context, data *FvAEPgResourceModel) string {
	return fmt.Sprintf("epg-%s", data.Name.ValueString())
}

func setFvAEPgParentDn(ctx context.Context, dn string, data *FvAEPgResourceModel) {
	bracketIndex := 0
	rnIndex := 0
	for i := len(dn) - 1; i >= 0; i-- {
		if string(dn[i]) == "]" {
			bracketIndex = bracketIndex + 1
		} else if string(dn[i]) == "[" {
			bracketIndex = bracketIndex - 1
		} else if string(dn[i]) == "/" && bracketIndex == 0 {
			rnIndex = i
			break
		}
	}
	data.ParentDn = basetypes.NewStringValue(dn[:rnIndex])
}

func setFvAEPgId(ctx context.Context, data *FvAEPgResourceModel) {
	rn := getFvAEPgRn(ctx, data)
	data.Id = types.StringValue(fmt.Sprintf("%s/%s", data.ParentDn.ValueString(), rn))
}

func getFvAEPgFvCrtrnChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *FvAEPgResourceModel, fvCrtrnFvAEPgPlan, fvCrtrnFvAEPgState FvCrtrnFvAEPgResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.FvCrtrn.IsNull() && !data.FvCrtrn.IsUnknown() {
		FvCrtrnFvAEPgChildren := make([]map[string]interface{}, 0)
		childMap := NewAciObject()
		if !IsEmptySingleNestedAttribute(data.FvCrtrn.Attributes()) {
			if !fvCrtrnFvAEPgPlan.Annotation.IsUnknown() && !fvCrtrnFvAEPgPlan.Annotation.IsNull() {
				childMap.Attributes["annotation"] = fvCrtrnFvAEPgPlan.Annotation.ValueString()
			} else {
				childMap.Attributes["annotation"] = globalAnnotation
			}
			if !fvCrtrnFvAEPgPlan.Descr.IsUnknown() && !fvCrtrnFvAEPgPlan.Descr.IsNull() {
				childMap.Attributes["descr"] = fvCrtrnFvAEPgPlan.Descr.ValueString()
			}
			if !fvCrtrnFvAEPgPlan.Match.IsUnknown() && !fvCrtrnFvAEPgPlan.Match.IsNull() {
				childMap.Attributes["match"] = fvCrtrnFvAEPgPlan.Match.ValueString()
			}
			if !fvCrtrnFvAEPgPlan.Name.IsUnknown() && !fvCrtrnFvAEPgPlan.Name.IsNull() {
				childMap.Attributes["name"] = fvCrtrnFvAEPgPlan.Name.ValueString()
			}
			if !fvCrtrnFvAEPgPlan.NameAlias.IsUnknown() && !fvCrtrnFvAEPgPlan.NameAlias.IsNull() {
				childMap.Attributes["nameAlias"] = fvCrtrnFvAEPgPlan.NameAlias.ValueString()
			}
			if !fvCrtrnFvAEPgPlan.OwnerKey.IsUnknown() && !fvCrtrnFvAEPgPlan.OwnerKey.IsNull() {
				childMap.Attributes["ownerKey"] = fvCrtrnFvAEPgPlan.OwnerKey.ValueString()
			}
			if !fvCrtrnFvAEPgPlan.OwnerTag.IsUnknown() && !fvCrtrnFvAEPgPlan.OwnerTag.IsNull() {
				childMap.Attributes["ownerTag"] = fvCrtrnFvAEPgPlan.OwnerTag.ValueString()
			}
			if !fvCrtrnFvAEPgPlan.Prec.IsUnknown() && !fvCrtrnFvAEPgPlan.Prec.IsNull() {
				childMap.Attributes["prec"] = fvCrtrnFvAEPgPlan.Prec.ValueString()
			}
			if !fvCrtrnFvAEPgPlan.Scope.IsUnknown() && !fvCrtrnFvAEPgPlan.Scope.IsNull() {
				childMap.Attributes["scope"] = fvCrtrnFvAEPgPlan.Scope.ValueString()
			}

			var tagAnnotationFvCrtrnFvAEPgPlan, tagAnnotationFvCrtrnFvAEPgState []TagAnnotationFvCrtrnFvAEPgResourceModel
			fvCrtrnFvAEPgPlan.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvCrtrnFvAEPgPlan, false)
			if !fvCrtrnFvAEPgState.TagAnnotation.IsNull() {
				fvCrtrnFvAEPgState.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvCrtrnFvAEPgState, false)
			}
			if !fvCrtrnFvAEPgPlan.TagAnnotation.IsNull() && !fvCrtrnFvAEPgPlan.TagAnnotation.IsUnknown() {
				tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
				for _, tagAnnotationFvCrtrnFvAEPg := range tagAnnotationFvCrtrnFvAEPgPlan {
					tagAnnotationFvCrtrnFvAEPgChildMap := NewAciObject()
					if !tagAnnotationFvCrtrnFvAEPg.Key.IsNull() && !tagAnnotationFvCrtrnFvAEPg.Key.IsUnknown() {
						tagAnnotationFvCrtrnFvAEPgChildMap.Attributes["key"] = tagAnnotationFvCrtrnFvAEPg.Key.ValueString()
					}
					if !tagAnnotationFvCrtrnFvAEPg.Value.IsNull() && !tagAnnotationFvCrtrnFvAEPg.Value.IsUnknown() {
						tagAnnotationFvCrtrnFvAEPgChildMap.Attributes["value"] = tagAnnotationFvCrtrnFvAEPg.Value.ValueString()
					}
					FvCrtrnFvAEPgChildren = append(FvCrtrnFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvCrtrnFvAEPgChildMap})
					tagAnnotationIdentifier := TagAnnotationIdentifier{}
					tagAnnotationIdentifier.Key = tagAnnotationFvCrtrnFvAEPg.Key
					tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
				}
				for _, tagAnnotationFvCrtrnFvAEPg := range tagAnnotationFvCrtrnFvAEPgState {
					delete := true
					for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
						if tagAnnotationIdentifier.Key == tagAnnotationFvCrtrnFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagAnnotationFvCrtrnFvAEPgChildMapForDelete := NewAciObject()
						tagAnnotationFvCrtrnFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagAnnotationFvCrtrnFvAEPgChildMapForDelete.Attributes["key"] = tagAnnotationFvCrtrnFvAEPg.Key.ValueString()
						FvCrtrnFvAEPgChildren = append(FvCrtrnFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvCrtrnFvAEPgChildMapForDelete})
					}
				}
			}

			var tagTagFvCrtrnFvAEPgPlan, tagTagFvCrtrnFvAEPgState []TagTagFvCrtrnFvAEPgResourceModel
			fvCrtrnFvAEPgPlan.TagTag.ElementsAs(ctx, &tagTagFvCrtrnFvAEPgPlan, false)
			if !fvCrtrnFvAEPgState.TagTag.IsNull() {
				fvCrtrnFvAEPgState.TagTag.ElementsAs(ctx, &tagTagFvCrtrnFvAEPgState, false)
			}
			if !fvCrtrnFvAEPgPlan.TagTag.IsNull() && !fvCrtrnFvAEPgPlan.TagTag.IsUnknown() {
				tagTagIdentifiers := []TagTagIdentifier{}
				for _, tagTagFvCrtrnFvAEPg := range tagTagFvCrtrnFvAEPgPlan {
					tagTagFvCrtrnFvAEPgChildMap := NewAciObject()
					if !tagTagFvCrtrnFvAEPg.Key.IsNull() && !tagTagFvCrtrnFvAEPg.Key.IsUnknown() {
						tagTagFvCrtrnFvAEPgChildMap.Attributes["key"] = tagTagFvCrtrnFvAEPg.Key.ValueString()
					}
					if !tagTagFvCrtrnFvAEPg.Value.IsNull() && !tagTagFvCrtrnFvAEPg.Value.IsUnknown() {
						tagTagFvCrtrnFvAEPgChildMap.Attributes["value"] = tagTagFvCrtrnFvAEPg.Value.ValueString()
					}
					FvCrtrnFvAEPgChildren = append(FvCrtrnFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvCrtrnFvAEPgChildMap})
					tagTagIdentifier := TagTagIdentifier{}
					tagTagIdentifier.Key = tagTagFvCrtrnFvAEPg.Key
					tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
				}
				for _, tagTagFvCrtrnFvAEPg := range tagTagFvCrtrnFvAEPgState {
					delete := true
					for _, tagTagIdentifier := range tagTagIdentifiers {
						if tagTagIdentifier.Key == tagTagFvCrtrnFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagTagFvCrtrnFvAEPgChildMapForDelete := NewAciObject()
						tagTagFvCrtrnFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagTagFvCrtrnFvAEPgChildMapForDelete.Attributes["key"] = tagTagFvCrtrnFvAEPg.Key.ValueString()
						FvCrtrnFvAEPgChildren = append(FvCrtrnFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvCrtrnFvAEPgChildMapForDelete})
					}
				}
			}
			childMap.Children = FvCrtrnFvAEPgChildren
		} else {
			childMap.Attributes["status"] = "deleted"
		}
		childPayloads = append(childPayloads, map[string]interface{}{"fvCrtrn": childMap})
	} else {
		FvCrtrnObject, _ := types.ObjectValueFrom(ctx, FvCrtrnFvAEPgType, getEmptyFvCrtrnFvAEPgResourceModel())
		data.FvCrtrn = FvCrtrnObject
	}

	return childPayloads
}

func getFvAEPgFvRsAEPgMonPolChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *FvAEPgResourceModel, fvRsAEPgMonPolFvAEPgPlan, fvRsAEPgMonPolFvAEPgState FvRsAEPgMonPolFvAEPgResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.FvRsAEPgMonPol.IsNull() && !data.FvRsAEPgMonPol.IsUnknown() {
		FvRsAEPgMonPolFvAEPgChildren := make([]map[string]interface{}, 0)
		childMap := NewAciObject()
		if !IsEmptySingleNestedAttribute(data.FvRsAEPgMonPol.Attributes()) {
			if !fvRsAEPgMonPolFvAEPgPlan.Annotation.IsUnknown() && !fvRsAEPgMonPolFvAEPgPlan.Annotation.IsNull() {
				childMap.Attributes["annotation"] = fvRsAEPgMonPolFvAEPgPlan.Annotation.ValueString()
			} else {
				childMap.Attributes["annotation"] = globalAnnotation
			}
			if !fvRsAEPgMonPolFvAEPgPlan.TnMonEPGPolName.IsUnknown() && !fvRsAEPgMonPolFvAEPgPlan.TnMonEPGPolName.IsNull() {
				childMap.Attributes["tnMonEPGPolName"] = fvRsAEPgMonPolFvAEPgPlan.TnMonEPGPolName.ValueString()
			}

			var tagAnnotationFvRsAEPgMonPolFvAEPgPlan, tagAnnotationFvRsAEPgMonPolFvAEPgState []TagAnnotationFvRsAEPgMonPolFvAEPgResourceModel
			fvRsAEPgMonPolFvAEPgPlan.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsAEPgMonPolFvAEPgPlan, false)
			if !fvRsAEPgMonPolFvAEPgState.TagAnnotation.IsNull() {
				fvRsAEPgMonPolFvAEPgState.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsAEPgMonPolFvAEPgState, false)
			}
			if !fvRsAEPgMonPolFvAEPgPlan.TagAnnotation.IsNull() && !fvRsAEPgMonPolFvAEPgPlan.TagAnnotation.IsUnknown() {
				tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
				for _, tagAnnotationFvRsAEPgMonPolFvAEPg := range tagAnnotationFvRsAEPgMonPolFvAEPgPlan {
					tagAnnotationFvRsAEPgMonPolFvAEPgChildMap := NewAciObject()
					if !tagAnnotationFvRsAEPgMonPolFvAEPg.Key.IsNull() && !tagAnnotationFvRsAEPgMonPolFvAEPg.Key.IsUnknown() {
						tagAnnotationFvRsAEPgMonPolFvAEPgChildMap.Attributes["key"] = tagAnnotationFvRsAEPgMonPolFvAEPg.Key.ValueString()
					}
					if !tagAnnotationFvRsAEPgMonPolFvAEPg.Value.IsNull() && !tagAnnotationFvRsAEPgMonPolFvAEPg.Value.IsUnknown() {
						tagAnnotationFvRsAEPgMonPolFvAEPgChildMap.Attributes["value"] = tagAnnotationFvRsAEPgMonPolFvAEPg.Value.ValueString()
					}
					FvRsAEPgMonPolFvAEPgChildren = append(FvRsAEPgMonPolFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsAEPgMonPolFvAEPgChildMap})
					tagAnnotationIdentifier := TagAnnotationIdentifier{}
					tagAnnotationIdentifier.Key = tagAnnotationFvRsAEPgMonPolFvAEPg.Key
					tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
				}
				for _, tagAnnotationFvRsAEPgMonPolFvAEPg := range tagAnnotationFvRsAEPgMonPolFvAEPgState {
					delete := true
					for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
						if tagAnnotationIdentifier.Key == tagAnnotationFvRsAEPgMonPolFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagAnnotationFvRsAEPgMonPolFvAEPgChildMapForDelete := NewAciObject()
						tagAnnotationFvRsAEPgMonPolFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagAnnotationFvRsAEPgMonPolFvAEPgChildMapForDelete.Attributes["key"] = tagAnnotationFvRsAEPgMonPolFvAEPg.Key.ValueString()
						FvRsAEPgMonPolFvAEPgChildren = append(FvRsAEPgMonPolFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsAEPgMonPolFvAEPgChildMapForDelete})
					}
				}
			}

			var tagTagFvRsAEPgMonPolFvAEPgPlan, tagTagFvRsAEPgMonPolFvAEPgState []TagTagFvRsAEPgMonPolFvAEPgResourceModel
			fvRsAEPgMonPolFvAEPgPlan.TagTag.ElementsAs(ctx, &tagTagFvRsAEPgMonPolFvAEPgPlan, false)
			if !fvRsAEPgMonPolFvAEPgState.TagTag.IsNull() {
				fvRsAEPgMonPolFvAEPgState.TagTag.ElementsAs(ctx, &tagTagFvRsAEPgMonPolFvAEPgState, false)
			}
			if !fvRsAEPgMonPolFvAEPgPlan.TagTag.IsNull() && !fvRsAEPgMonPolFvAEPgPlan.TagTag.IsUnknown() {
				tagTagIdentifiers := []TagTagIdentifier{}
				for _, tagTagFvRsAEPgMonPolFvAEPg := range tagTagFvRsAEPgMonPolFvAEPgPlan {
					tagTagFvRsAEPgMonPolFvAEPgChildMap := NewAciObject()
					if !tagTagFvRsAEPgMonPolFvAEPg.Key.IsNull() && !tagTagFvRsAEPgMonPolFvAEPg.Key.IsUnknown() {
						tagTagFvRsAEPgMonPolFvAEPgChildMap.Attributes["key"] = tagTagFvRsAEPgMonPolFvAEPg.Key.ValueString()
					}
					if !tagTagFvRsAEPgMonPolFvAEPg.Value.IsNull() && !tagTagFvRsAEPgMonPolFvAEPg.Value.IsUnknown() {
						tagTagFvRsAEPgMonPolFvAEPgChildMap.Attributes["value"] = tagTagFvRsAEPgMonPolFvAEPg.Value.ValueString()
					}
					FvRsAEPgMonPolFvAEPgChildren = append(FvRsAEPgMonPolFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsAEPgMonPolFvAEPgChildMap})
					tagTagIdentifier := TagTagIdentifier{}
					tagTagIdentifier.Key = tagTagFvRsAEPgMonPolFvAEPg.Key
					tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
				}
				for _, tagTagFvRsAEPgMonPolFvAEPg := range tagTagFvRsAEPgMonPolFvAEPgState {
					delete := true
					for _, tagTagIdentifier := range tagTagIdentifiers {
						if tagTagIdentifier.Key == tagTagFvRsAEPgMonPolFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagTagFvRsAEPgMonPolFvAEPgChildMapForDelete := NewAciObject()
						tagTagFvRsAEPgMonPolFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagTagFvRsAEPgMonPolFvAEPgChildMapForDelete.Attributes["key"] = tagTagFvRsAEPgMonPolFvAEPg.Key.ValueString()
						FvRsAEPgMonPolFvAEPgChildren = append(FvRsAEPgMonPolFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsAEPgMonPolFvAEPgChildMapForDelete})
					}
				}
			}
			childMap.Children = FvRsAEPgMonPolFvAEPgChildren
		} else {
			childMap.Attributes["status"] = "deleted"
		}
		childPayloads = append(childPayloads, map[string]interface{}{"fvRsAEPgMonPol": childMap})
	} else {
		FvRsAEPgMonPolObject, _ := types.ObjectValueFrom(ctx, FvRsAEPgMonPolFvAEPgType, getEmptyFvRsAEPgMonPolFvAEPgResourceModel())
		data.FvRsAEPgMonPol = FvRsAEPgMonPolObject
	}

	return childPayloads
}

func getFvAEPgFvRsBdChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *FvAEPgResourceModel, fvRsBdFvAEPgPlan, fvRsBdFvAEPgState FvRsBdFvAEPgResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.FvRsBd.IsNull() && !data.FvRsBd.IsUnknown() {
		FvRsBdFvAEPgChildren := make([]map[string]interface{}, 0)
		childMap := NewAciObject()
		if !IsEmptySingleNestedAttribute(data.FvRsBd.Attributes()) {
			if !fvRsBdFvAEPgPlan.Annotation.IsUnknown() && !fvRsBdFvAEPgPlan.Annotation.IsNull() {
				childMap.Attributes["annotation"] = fvRsBdFvAEPgPlan.Annotation.ValueString()
			} else {
				childMap.Attributes["annotation"] = globalAnnotation
			}
			if !fvRsBdFvAEPgPlan.TnFvBDName.IsUnknown() && !fvRsBdFvAEPgPlan.TnFvBDName.IsNull() {
				childMap.Attributes["tnFvBDName"] = fvRsBdFvAEPgPlan.TnFvBDName.ValueString()
			}

			var tagAnnotationFvRsBdFvAEPgPlan, tagAnnotationFvRsBdFvAEPgState []TagAnnotationFvRsBdFvAEPgResourceModel
			fvRsBdFvAEPgPlan.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsBdFvAEPgPlan, false)
			if !fvRsBdFvAEPgState.TagAnnotation.IsNull() {
				fvRsBdFvAEPgState.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsBdFvAEPgState, false)
			}
			if !fvRsBdFvAEPgPlan.TagAnnotation.IsNull() && !fvRsBdFvAEPgPlan.TagAnnotation.IsUnknown() {
				tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
				for _, tagAnnotationFvRsBdFvAEPg := range tagAnnotationFvRsBdFvAEPgPlan {
					tagAnnotationFvRsBdFvAEPgChildMap := NewAciObject()
					if !tagAnnotationFvRsBdFvAEPg.Key.IsNull() && !tagAnnotationFvRsBdFvAEPg.Key.IsUnknown() {
						tagAnnotationFvRsBdFvAEPgChildMap.Attributes["key"] = tagAnnotationFvRsBdFvAEPg.Key.ValueString()
					}
					if !tagAnnotationFvRsBdFvAEPg.Value.IsNull() && !tagAnnotationFvRsBdFvAEPg.Value.IsUnknown() {
						tagAnnotationFvRsBdFvAEPgChildMap.Attributes["value"] = tagAnnotationFvRsBdFvAEPg.Value.ValueString()
					}
					FvRsBdFvAEPgChildren = append(FvRsBdFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsBdFvAEPgChildMap})
					tagAnnotationIdentifier := TagAnnotationIdentifier{}
					tagAnnotationIdentifier.Key = tagAnnotationFvRsBdFvAEPg.Key
					tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
				}
				for _, tagAnnotationFvRsBdFvAEPg := range tagAnnotationFvRsBdFvAEPgState {
					delete := true
					for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
						if tagAnnotationIdentifier.Key == tagAnnotationFvRsBdFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagAnnotationFvRsBdFvAEPgChildMapForDelete := NewAciObject()
						tagAnnotationFvRsBdFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagAnnotationFvRsBdFvAEPgChildMapForDelete.Attributes["key"] = tagAnnotationFvRsBdFvAEPg.Key.ValueString()
						FvRsBdFvAEPgChildren = append(FvRsBdFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsBdFvAEPgChildMapForDelete})
					}
				}
			}

			var tagTagFvRsBdFvAEPgPlan, tagTagFvRsBdFvAEPgState []TagTagFvRsBdFvAEPgResourceModel
			fvRsBdFvAEPgPlan.TagTag.ElementsAs(ctx, &tagTagFvRsBdFvAEPgPlan, false)
			if !fvRsBdFvAEPgState.TagTag.IsNull() {
				fvRsBdFvAEPgState.TagTag.ElementsAs(ctx, &tagTagFvRsBdFvAEPgState, false)
			}
			if !fvRsBdFvAEPgPlan.TagTag.IsNull() && !fvRsBdFvAEPgPlan.TagTag.IsUnknown() {
				tagTagIdentifiers := []TagTagIdentifier{}
				for _, tagTagFvRsBdFvAEPg := range tagTagFvRsBdFvAEPgPlan {
					tagTagFvRsBdFvAEPgChildMap := NewAciObject()
					if !tagTagFvRsBdFvAEPg.Key.IsNull() && !tagTagFvRsBdFvAEPg.Key.IsUnknown() {
						tagTagFvRsBdFvAEPgChildMap.Attributes["key"] = tagTagFvRsBdFvAEPg.Key.ValueString()
					}
					if !tagTagFvRsBdFvAEPg.Value.IsNull() && !tagTagFvRsBdFvAEPg.Value.IsUnknown() {
						tagTagFvRsBdFvAEPgChildMap.Attributes["value"] = tagTagFvRsBdFvAEPg.Value.ValueString()
					}
					FvRsBdFvAEPgChildren = append(FvRsBdFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsBdFvAEPgChildMap})
					tagTagIdentifier := TagTagIdentifier{}
					tagTagIdentifier.Key = tagTagFvRsBdFvAEPg.Key
					tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
				}
				for _, tagTagFvRsBdFvAEPg := range tagTagFvRsBdFvAEPgState {
					delete := true
					for _, tagTagIdentifier := range tagTagIdentifiers {
						if tagTagIdentifier.Key == tagTagFvRsBdFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagTagFvRsBdFvAEPgChildMapForDelete := NewAciObject()
						tagTagFvRsBdFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagTagFvRsBdFvAEPgChildMapForDelete.Attributes["key"] = tagTagFvRsBdFvAEPg.Key.ValueString()
						FvRsBdFvAEPgChildren = append(FvRsBdFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsBdFvAEPgChildMapForDelete})
					}
				}
			}
			childMap.Children = FvRsBdFvAEPgChildren
			childPayloads = append(childPayloads, map[string]interface{}{"fvRsBd": childMap})
		}
	} else {
		FvRsBdObject, _ := types.ObjectValueFrom(ctx, FvRsBdFvAEPgType, getEmptyFvRsBdFvAEPgResourceModel())
		data.FvRsBd = FvRsBdObject
	}

	return childPayloads
}

func getFvAEPgFvRsConsChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *FvAEPgResourceModel, fvRsConsFvAEPgPlan, fvRsConsFvAEPgState []FvRsConsFvAEPgResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.FvRsCons.IsNull() && !data.FvRsCons.IsUnknown() {
		fvRsConsIdentifiers := []FvRsConsIdentifier{}
		for _, fvRsConsFvAEPg := range fvRsConsFvAEPgPlan {
			FvRsConsFvAEPgChildren := make([]map[string]interface{}, 0)
			childMap := NewAciObject()
			if !fvRsConsFvAEPg.Annotation.IsNull() && !fvRsConsFvAEPg.Annotation.IsUnknown() {
				childMap.Attributes["annotation"] = fvRsConsFvAEPg.Annotation.ValueString()
			} else {
				childMap.Attributes["annotation"] = globalAnnotation
			}
			if !fvRsConsFvAEPg.Prio.IsNull() && !fvRsConsFvAEPg.Prio.IsUnknown() {
				childMap.Attributes["prio"] = fvRsConsFvAEPg.Prio.ValueString()
			}
			if !fvRsConsFvAEPg.TnVzBrCPName.IsNull() && !fvRsConsFvAEPg.TnVzBrCPName.IsUnknown() {
				childMap.Attributes["tnVzBrCPName"] = fvRsConsFvAEPg.TnVzBrCPName.ValueString()
			}

			var tagAnnotationFvRsConsFvAEPgPlan, tagAnnotationFvRsConsFvAEPgState []TagAnnotationFvRsConsFvAEPgResourceModel
			fvRsConsFvAEPg.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsConsFvAEPgPlan, false)
			for _, tagAnnotationFvRsConsFvAEPgstate := range fvRsConsFvAEPgState {
				tagAnnotationFvRsConsFvAEPgstate.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsConsFvAEPgState, false)
			}
			if !fvRsConsFvAEPg.TagAnnotation.IsNull() && !fvRsConsFvAEPg.TagAnnotation.IsUnknown() {
				tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
				for _, tagAnnotationFvRsConsFvAEPg := range tagAnnotationFvRsConsFvAEPgPlan {
					tagAnnotationFvRsConsFvAEPgChildMap := NewAciObject()
					if !tagAnnotationFvRsConsFvAEPg.Key.IsNull() && !tagAnnotationFvRsConsFvAEPg.Key.IsUnknown() {
						tagAnnotationFvRsConsFvAEPgChildMap.Attributes["key"] = tagAnnotationFvRsConsFvAEPg.Key.ValueString()
					}
					if !tagAnnotationFvRsConsFvAEPg.Value.IsNull() && !tagAnnotationFvRsConsFvAEPg.Value.IsUnknown() {
						tagAnnotationFvRsConsFvAEPgChildMap.Attributes["value"] = tagAnnotationFvRsConsFvAEPg.Value.ValueString()
					}
					FvRsConsFvAEPgChildren = append(FvRsConsFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsConsFvAEPgChildMap})
					tagAnnotationIdentifier := TagAnnotationIdentifier{}
					tagAnnotationIdentifier.Key = tagAnnotationFvRsConsFvAEPg.Key
					tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
				}
				for _, tagAnnotationFvRsConsFvAEPg := range tagAnnotationFvRsConsFvAEPgState {
					delete := true
					for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
						if tagAnnotationIdentifier.Key == tagAnnotationFvRsConsFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagAnnotationFvRsConsFvAEPgChildMapForDelete := NewAciObject()
						tagAnnotationFvRsConsFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagAnnotationFvRsConsFvAEPgChildMapForDelete.Attributes["key"] = tagAnnotationFvRsConsFvAEPg.Key.ValueString()
						FvRsConsFvAEPgChildren = append(FvRsConsFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsConsFvAEPgChildMapForDelete})
					}
				}
			}

			var tagTagFvRsConsFvAEPgPlan, tagTagFvRsConsFvAEPgState []TagTagFvRsConsFvAEPgResourceModel
			fvRsConsFvAEPg.TagTag.ElementsAs(ctx, &tagTagFvRsConsFvAEPgPlan, false)
			for _, tagTagFvRsConsFvAEPgstate := range fvRsConsFvAEPgState {
				tagTagFvRsConsFvAEPgstate.TagTag.ElementsAs(ctx, &tagTagFvRsConsFvAEPgState, false)
			}
			if !fvRsConsFvAEPg.TagTag.IsNull() && !fvRsConsFvAEPg.TagTag.IsUnknown() {
				tagTagIdentifiers := []TagTagIdentifier{}
				for _, tagTagFvRsConsFvAEPg := range tagTagFvRsConsFvAEPgPlan {
					tagTagFvRsConsFvAEPgChildMap := NewAciObject()
					if !tagTagFvRsConsFvAEPg.Key.IsNull() && !tagTagFvRsConsFvAEPg.Key.IsUnknown() {
						tagTagFvRsConsFvAEPgChildMap.Attributes["key"] = tagTagFvRsConsFvAEPg.Key.ValueString()
					}
					if !tagTagFvRsConsFvAEPg.Value.IsNull() && !tagTagFvRsConsFvAEPg.Value.IsUnknown() {
						tagTagFvRsConsFvAEPgChildMap.Attributes["value"] = tagTagFvRsConsFvAEPg.Value.ValueString()
					}
					FvRsConsFvAEPgChildren = append(FvRsConsFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsConsFvAEPgChildMap})
					tagTagIdentifier := TagTagIdentifier{}
					tagTagIdentifier.Key = tagTagFvRsConsFvAEPg.Key
					tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
				}
				for _, tagTagFvRsConsFvAEPg := range tagTagFvRsConsFvAEPgState {
					delete := true
					for _, tagTagIdentifier := range tagTagIdentifiers {
						if tagTagIdentifier.Key == tagTagFvRsConsFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagTagFvRsConsFvAEPgChildMapForDelete := NewAciObject()
						tagTagFvRsConsFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagTagFvRsConsFvAEPgChildMapForDelete.Attributes["key"] = tagTagFvRsConsFvAEPg.Key.ValueString()
						FvRsConsFvAEPgChildren = append(FvRsConsFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsConsFvAEPgChildMapForDelete})
					}
				}
			}
			childMap.Children = FvRsConsFvAEPgChildren
			childPayloads = append(childPayloads, map[string]interface{}{"fvRsCons": childMap})
			fvRsConsIdentifier := FvRsConsIdentifier{}
			fvRsConsIdentifier.TnVzBrCPName = fvRsConsFvAEPg.TnVzBrCPName
			fvRsConsIdentifiers = append(fvRsConsIdentifiers, fvRsConsIdentifier)
		}
		for _, fvRsCons := range fvRsConsFvAEPgState {
			delete := true
			for _, fvRsConsIdentifier := range fvRsConsIdentifiers {
				if fvRsConsIdentifier.TnVzBrCPName == fvRsCons.TnVzBrCPName {
					delete = false
					break
				}
			}
			if delete {
				fvRsConsChildMapForDelete := NewAciObject()
				fvRsConsChildMapForDelete.Attributes["status"] = "deleted"
				fvRsConsChildMapForDelete.Attributes["tnVzBrCPName"] = fvRsCons.TnVzBrCPName.ValueString()
				childPayloads = append(childPayloads, map[string]interface{}{"fvRsCons": fvRsConsChildMapForDelete})
			}
		}
	} else {
		data.FvRsCons = types.SetNull(data.FvRsCons.ElementType(ctx))
	}

	return childPayloads
}

func getFvAEPgFvRsConsIfChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *FvAEPgResourceModel, fvRsConsIfFvAEPgPlan, fvRsConsIfFvAEPgState []FvRsConsIfFvAEPgResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.FvRsConsIf.IsNull() && !data.FvRsConsIf.IsUnknown() {
		fvRsConsIfIdentifiers := []FvRsConsIfIdentifier{}
		for _, fvRsConsIfFvAEPg := range fvRsConsIfFvAEPgPlan {
			FvRsConsIfFvAEPgChildren := make([]map[string]interface{}, 0)
			childMap := NewAciObject()
			if !fvRsConsIfFvAEPg.Annotation.IsNull() && !fvRsConsIfFvAEPg.Annotation.IsUnknown() {
				childMap.Attributes["annotation"] = fvRsConsIfFvAEPg.Annotation.ValueString()
			} else {
				childMap.Attributes["annotation"] = globalAnnotation
			}
			if !fvRsConsIfFvAEPg.Prio.IsNull() && !fvRsConsIfFvAEPg.Prio.IsUnknown() {
				childMap.Attributes["prio"] = fvRsConsIfFvAEPg.Prio.ValueString()
			}
			if !fvRsConsIfFvAEPg.TnVzCPIfName.IsNull() && !fvRsConsIfFvAEPg.TnVzCPIfName.IsUnknown() {
				childMap.Attributes["tnVzCPIfName"] = fvRsConsIfFvAEPg.TnVzCPIfName.ValueString()
			}

			var tagAnnotationFvRsConsIfFvAEPgPlan, tagAnnotationFvRsConsIfFvAEPgState []TagAnnotationFvRsConsIfFvAEPgResourceModel
			fvRsConsIfFvAEPg.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsConsIfFvAEPgPlan, false)
			for _, tagAnnotationFvRsConsIfFvAEPgstate := range fvRsConsIfFvAEPgState {
				tagAnnotationFvRsConsIfFvAEPgstate.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsConsIfFvAEPgState, false)
			}
			if !fvRsConsIfFvAEPg.TagAnnotation.IsNull() && !fvRsConsIfFvAEPg.TagAnnotation.IsUnknown() {
				tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
				for _, tagAnnotationFvRsConsIfFvAEPg := range tagAnnotationFvRsConsIfFvAEPgPlan {
					tagAnnotationFvRsConsIfFvAEPgChildMap := NewAciObject()
					if !tagAnnotationFvRsConsIfFvAEPg.Key.IsNull() && !tagAnnotationFvRsConsIfFvAEPg.Key.IsUnknown() {
						tagAnnotationFvRsConsIfFvAEPgChildMap.Attributes["key"] = tagAnnotationFvRsConsIfFvAEPg.Key.ValueString()
					}
					if !tagAnnotationFvRsConsIfFvAEPg.Value.IsNull() && !tagAnnotationFvRsConsIfFvAEPg.Value.IsUnknown() {
						tagAnnotationFvRsConsIfFvAEPgChildMap.Attributes["value"] = tagAnnotationFvRsConsIfFvAEPg.Value.ValueString()
					}
					FvRsConsIfFvAEPgChildren = append(FvRsConsIfFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsConsIfFvAEPgChildMap})
					tagAnnotationIdentifier := TagAnnotationIdentifier{}
					tagAnnotationIdentifier.Key = tagAnnotationFvRsConsIfFvAEPg.Key
					tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
				}
				for _, tagAnnotationFvRsConsIfFvAEPg := range tagAnnotationFvRsConsIfFvAEPgState {
					delete := true
					for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
						if tagAnnotationIdentifier.Key == tagAnnotationFvRsConsIfFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagAnnotationFvRsConsIfFvAEPgChildMapForDelete := NewAciObject()
						tagAnnotationFvRsConsIfFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagAnnotationFvRsConsIfFvAEPgChildMapForDelete.Attributes["key"] = tagAnnotationFvRsConsIfFvAEPg.Key.ValueString()
						FvRsConsIfFvAEPgChildren = append(FvRsConsIfFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsConsIfFvAEPgChildMapForDelete})
					}
				}
			}

			var tagTagFvRsConsIfFvAEPgPlan, tagTagFvRsConsIfFvAEPgState []TagTagFvRsConsIfFvAEPgResourceModel
			fvRsConsIfFvAEPg.TagTag.ElementsAs(ctx, &tagTagFvRsConsIfFvAEPgPlan, false)
			for _, tagTagFvRsConsIfFvAEPgstate := range fvRsConsIfFvAEPgState {
				tagTagFvRsConsIfFvAEPgstate.TagTag.ElementsAs(ctx, &tagTagFvRsConsIfFvAEPgState, false)
			}
			if !fvRsConsIfFvAEPg.TagTag.IsNull() && !fvRsConsIfFvAEPg.TagTag.IsUnknown() {
				tagTagIdentifiers := []TagTagIdentifier{}
				for _, tagTagFvRsConsIfFvAEPg := range tagTagFvRsConsIfFvAEPgPlan {
					tagTagFvRsConsIfFvAEPgChildMap := NewAciObject()
					if !tagTagFvRsConsIfFvAEPg.Key.IsNull() && !tagTagFvRsConsIfFvAEPg.Key.IsUnknown() {
						tagTagFvRsConsIfFvAEPgChildMap.Attributes["key"] = tagTagFvRsConsIfFvAEPg.Key.ValueString()
					}
					if !tagTagFvRsConsIfFvAEPg.Value.IsNull() && !tagTagFvRsConsIfFvAEPg.Value.IsUnknown() {
						tagTagFvRsConsIfFvAEPgChildMap.Attributes["value"] = tagTagFvRsConsIfFvAEPg.Value.ValueString()
					}
					FvRsConsIfFvAEPgChildren = append(FvRsConsIfFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsConsIfFvAEPgChildMap})
					tagTagIdentifier := TagTagIdentifier{}
					tagTagIdentifier.Key = tagTagFvRsConsIfFvAEPg.Key
					tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
				}
				for _, tagTagFvRsConsIfFvAEPg := range tagTagFvRsConsIfFvAEPgState {
					delete := true
					for _, tagTagIdentifier := range tagTagIdentifiers {
						if tagTagIdentifier.Key == tagTagFvRsConsIfFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagTagFvRsConsIfFvAEPgChildMapForDelete := NewAciObject()
						tagTagFvRsConsIfFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagTagFvRsConsIfFvAEPgChildMapForDelete.Attributes["key"] = tagTagFvRsConsIfFvAEPg.Key.ValueString()
						FvRsConsIfFvAEPgChildren = append(FvRsConsIfFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsConsIfFvAEPgChildMapForDelete})
					}
				}
			}
			childMap.Children = FvRsConsIfFvAEPgChildren
			childPayloads = append(childPayloads, map[string]interface{}{"fvRsConsIf": childMap})
			fvRsConsIfIdentifier := FvRsConsIfIdentifier{}
			fvRsConsIfIdentifier.TnVzCPIfName = fvRsConsIfFvAEPg.TnVzCPIfName
			fvRsConsIfIdentifiers = append(fvRsConsIfIdentifiers, fvRsConsIfIdentifier)
		}
		for _, fvRsConsIf := range fvRsConsIfFvAEPgState {
			delete := true
			for _, fvRsConsIfIdentifier := range fvRsConsIfIdentifiers {
				if fvRsConsIfIdentifier.TnVzCPIfName == fvRsConsIf.TnVzCPIfName {
					delete = false
					break
				}
			}
			if delete {
				fvRsConsIfChildMapForDelete := NewAciObject()
				fvRsConsIfChildMapForDelete.Attributes["status"] = "deleted"
				fvRsConsIfChildMapForDelete.Attributes["tnVzCPIfName"] = fvRsConsIf.TnVzCPIfName.ValueString()
				childPayloads = append(childPayloads, map[string]interface{}{"fvRsConsIf": fvRsConsIfChildMapForDelete})
			}
		}
	} else {
		data.FvRsConsIf = types.SetNull(data.FvRsConsIf.ElementType(ctx))
	}

	return childPayloads
}

func getFvAEPgFvRsCustQosPolChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *FvAEPgResourceModel, fvRsCustQosPolFvAEPgPlan, fvRsCustQosPolFvAEPgState FvRsCustQosPolFvAEPgResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.FvRsCustQosPol.IsNull() && !data.FvRsCustQosPol.IsUnknown() {
		FvRsCustQosPolFvAEPgChildren := make([]map[string]interface{}, 0)
		childMap := NewAciObject()
		if !IsEmptySingleNestedAttribute(data.FvRsCustQosPol.Attributes()) {
			if !fvRsCustQosPolFvAEPgPlan.Annotation.IsUnknown() && !fvRsCustQosPolFvAEPgPlan.Annotation.IsNull() {
				childMap.Attributes["annotation"] = fvRsCustQosPolFvAEPgPlan.Annotation.ValueString()
			} else {
				childMap.Attributes["annotation"] = globalAnnotation
			}
			if !fvRsCustQosPolFvAEPgPlan.TnQosCustomPolName.IsUnknown() && !fvRsCustQosPolFvAEPgPlan.TnQosCustomPolName.IsNull() {
				childMap.Attributes["tnQosCustomPolName"] = fvRsCustQosPolFvAEPgPlan.TnQosCustomPolName.ValueString()
			}

			var tagAnnotationFvRsCustQosPolFvAEPgPlan, tagAnnotationFvRsCustQosPolFvAEPgState []TagAnnotationFvRsCustQosPolFvAEPgResourceModel
			fvRsCustQosPolFvAEPgPlan.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsCustQosPolFvAEPgPlan, false)
			if !fvRsCustQosPolFvAEPgState.TagAnnotation.IsNull() {
				fvRsCustQosPolFvAEPgState.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsCustQosPolFvAEPgState, false)
			}
			if !fvRsCustQosPolFvAEPgPlan.TagAnnotation.IsNull() && !fvRsCustQosPolFvAEPgPlan.TagAnnotation.IsUnknown() {
				tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
				for _, tagAnnotationFvRsCustQosPolFvAEPg := range tagAnnotationFvRsCustQosPolFvAEPgPlan {
					tagAnnotationFvRsCustQosPolFvAEPgChildMap := NewAciObject()
					if !tagAnnotationFvRsCustQosPolFvAEPg.Key.IsNull() && !tagAnnotationFvRsCustQosPolFvAEPg.Key.IsUnknown() {
						tagAnnotationFvRsCustQosPolFvAEPgChildMap.Attributes["key"] = tagAnnotationFvRsCustQosPolFvAEPg.Key.ValueString()
					}
					if !tagAnnotationFvRsCustQosPolFvAEPg.Value.IsNull() && !tagAnnotationFvRsCustQosPolFvAEPg.Value.IsUnknown() {
						tagAnnotationFvRsCustQosPolFvAEPgChildMap.Attributes["value"] = tagAnnotationFvRsCustQosPolFvAEPg.Value.ValueString()
					}
					FvRsCustQosPolFvAEPgChildren = append(FvRsCustQosPolFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsCustQosPolFvAEPgChildMap})
					tagAnnotationIdentifier := TagAnnotationIdentifier{}
					tagAnnotationIdentifier.Key = tagAnnotationFvRsCustQosPolFvAEPg.Key
					tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
				}
				for _, tagAnnotationFvRsCustQosPolFvAEPg := range tagAnnotationFvRsCustQosPolFvAEPgState {
					delete := true
					for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
						if tagAnnotationIdentifier.Key == tagAnnotationFvRsCustQosPolFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagAnnotationFvRsCustQosPolFvAEPgChildMapForDelete := NewAciObject()
						tagAnnotationFvRsCustQosPolFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagAnnotationFvRsCustQosPolFvAEPgChildMapForDelete.Attributes["key"] = tagAnnotationFvRsCustQosPolFvAEPg.Key.ValueString()
						FvRsCustQosPolFvAEPgChildren = append(FvRsCustQosPolFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsCustQosPolFvAEPgChildMapForDelete})
					}
				}
			}

			var tagTagFvRsCustQosPolFvAEPgPlan, tagTagFvRsCustQosPolFvAEPgState []TagTagFvRsCustQosPolFvAEPgResourceModel
			fvRsCustQosPolFvAEPgPlan.TagTag.ElementsAs(ctx, &tagTagFvRsCustQosPolFvAEPgPlan, false)
			if !fvRsCustQosPolFvAEPgState.TagTag.IsNull() {
				fvRsCustQosPolFvAEPgState.TagTag.ElementsAs(ctx, &tagTagFvRsCustQosPolFvAEPgState, false)
			}
			if !fvRsCustQosPolFvAEPgPlan.TagTag.IsNull() && !fvRsCustQosPolFvAEPgPlan.TagTag.IsUnknown() {
				tagTagIdentifiers := []TagTagIdentifier{}
				for _, tagTagFvRsCustQosPolFvAEPg := range tagTagFvRsCustQosPolFvAEPgPlan {
					tagTagFvRsCustQosPolFvAEPgChildMap := NewAciObject()
					if !tagTagFvRsCustQosPolFvAEPg.Key.IsNull() && !tagTagFvRsCustQosPolFvAEPg.Key.IsUnknown() {
						tagTagFvRsCustQosPolFvAEPgChildMap.Attributes["key"] = tagTagFvRsCustQosPolFvAEPg.Key.ValueString()
					}
					if !tagTagFvRsCustQosPolFvAEPg.Value.IsNull() && !tagTagFvRsCustQosPolFvAEPg.Value.IsUnknown() {
						tagTagFvRsCustQosPolFvAEPgChildMap.Attributes["value"] = tagTagFvRsCustQosPolFvAEPg.Value.ValueString()
					}
					FvRsCustQosPolFvAEPgChildren = append(FvRsCustQosPolFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsCustQosPolFvAEPgChildMap})
					tagTagIdentifier := TagTagIdentifier{}
					tagTagIdentifier.Key = tagTagFvRsCustQosPolFvAEPg.Key
					tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
				}
				for _, tagTagFvRsCustQosPolFvAEPg := range tagTagFvRsCustQosPolFvAEPgState {
					delete := true
					for _, tagTagIdentifier := range tagTagIdentifiers {
						if tagTagIdentifier.Key == tagTagFvRsCustQosPolFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagTagFvRsCustQosPolFvAEPgChildMapForDelete := NewAciObject()
						tagTagFvRsCustQosPolFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagTagFvRsCustQosPolFvAEPgChildMapForDelete.Attributes["key"] = tagTagFvRsCustQosPolFvAEPg.Key.ValueString()
						FvRsCustQosPolFvAEPgChildren = append(FvRsCustQosPolFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsCustQosPolFvAEPgChildMapForDelete})
					}
				}
			}
			childMap.Children = FvRsCustQosPolFvAEPgChildren
			childPayloads = append(childPayloads, map[string]interface{}{"fvRsCustQosPol": childMap})
		}
	} else {
		FvRsCustQosPolObject, _ := types.ObjectValueFrom(ctx, FvRsCustQosPolFvAEPgType, getEmptyFvRsCustQosPolFvAEPgResourceModel())
		data.FvRsCustQosPol = FvRsCustQosPolObject
	}

	return childPayloads
}

func getFvAEPgFvRsDomAttChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *FvAEPgResourceModel, fvRsDomAttFvAEPgPlan, fvRsDomAttFvAEPgState []FvRsDomAttFvAEPgResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.FvRsDomAtt.IsNull() && !data.FvRsDomAtt.IsUnknown() {
		fvRsDomAttIdentifiers := []FvRsDomAttIdentifier{}
		for _, fvRsDomAttFvAEPg := range fvRsDomAttFvAEPgPlan {
			FvRsDomAttFvAEPgChildren := make([]map[string]interface{}, 0)
			childMap := NewAciObject()
			if !fvRsDomAttFvAEPg.Annotation.IsNull() && !fvRsDomAttFvAEPg.Annotation.IsUnknown() {
				childMap.Attributes["annotation"] = fvRsDomAttFvAEPg.Annotation.ValueString()
			} else {
				childMap.Attributes["annotation"] = globalAnnotation
			}
			if !fvRsDomAttFvAEPg.BindingType.IsNull() && !fvRsDomAttFvAEPg.BindingType.IsUnknown() {
				childMap.Attributes["bindingType"] = fvRsDomAttFvAEPg.BindingType.ValueString()
			}
			if !fvRsDomAttFvAEPg.ClassPref.IsNull() && !fvRsDomAttFvAEPg.ClassPref.IsUnknown() {
				childMap.Attributes["classPref"] = fvRsDomAttFvAEPg.ClassPref.ValueString()
			}
			if !fvRsDomAttFvAEPg.CustomEpgName.IsNull() && !fvRsDomAttFvAEPg.CustomEpgName.IsUnknown() {
				childMap.Attributes["customEpgName"] = fvRsDomAttFvAEPg.CustomEpgName.ValueString()
			}
			if !fvRsDomAttFvAEPg.Delimiter.IsNull() && !fvRsDomAttFvAEPg.Delimiter.IsUnknown() {
				childMap.Attributes["delimiter"] = fvRsDomAttFvAEPg.Delimiter.ValueString()
			}
			if !fvRsDomAttFvAEPg.Encap.IsNull() && !fvRsDomAttFvAEPg.Encap.IsUnknown() {
				childMap.Attributes["encap"] = fvRsDomAttFvAEPg.Encap.ValueString()
			}
			if !fvRsDomAttFvAEPg.EncapMode.IsNull() && !fvRsDomAttFvAEPg.EncapMode.IsUnknown() {
				childMap.Attributes["encapMode"] = fvRsDomAttFvAEPg.EncapMode.ValueString()
			}
			if !fvRsDomAttFvAEPg.EpgCos.IsNull() && !fvRsDomAttFvAEPg.EpgCos.IsUnknown() {
				childMap.Attributes["epgCos"] = fvRsDomAttFvAEPg.EpgCos.ValueString()
			}
			if !fvRsDomAttFvAEPg.EpgCosPref.IsNull() && !fvRsDomAttFvAEPg.EpgCosPref.IsUnknown() {
				childMap.Attributes["epgCosPref"] = fvRsDomAttFvAEPg.EpgCosPref.ValueString()
			}
			if !fvRsDomAttFvAEPg.InstrImedcy.IsNull() && !fvRsDomAttFvAEPg.InstrImedcy.IsUnknown() {
				childMap.Attributes["instrImedcy"] = fvRsDomAttFvAEPg.InstrImedcy.ValueString()
			}
			if !fvRsDomAttFvAEPg.IpamDhcpOverride.IsNull() && !fvRsDomAttFvAEPg.IpamDhcpOverride.IsUnknown() {
				childMap.Attributes["ipamDhcpOverride"] = fvRsDomAttFvAEPg.IpamDhcpOverride.ValueString()
			}
			if !fvRsDomAttFvAEPg.IpamEnabled.IsNull() && !fvRsDomAttFvAEPg.IpamEnabled.IsUnknown() {
				childMap.Attributes["ipamEnabled"] = fvRsDomAttFvAEPg.IpamEnabled.ValueString()
			}
			if !fvRsDomAttFvAEPg.IpamGateway.IsNull() && !fvRsDomAttFvAEPg.IpamGateway.IsUnknown() {
				childMap.Attributes["ipamGateway"] = fvRsDomAttFvAEPg.IpamGateway.ValueString()
			}
			if !fvRsDomAttFvAEPg.LagPolicyName.IsNull() && !fvRsDomAttFvAEPg.LagPolicyName.IsUnknown() {
				childMap.Attributes["lagPolicyName"] = fvRsDomAttFvAEPg.LagPolicyName.ValueString()
			}
			if !fvRsDomAttFvAEPg.NetflowDir.IsNull() && !fvRsDomAttFvAEPg.NetflowDir.IsUnknown() {
				childMap.Attributes["netflowDir"] = fvRsDomAttFvAEPg.NetflowDir.ValueString()
			}
			if !fvRsDomAttFvAEPg.NetflowPref.IsNull() && !fvRsDomAttFvAEPg.NetflowPref.IsUnknown() {
				childMap.Attributes["netflowPref"] = fvRsDomAttFvAEPg.NetflowPref.ValueString()
			}
			if !fvRsDomAttFvAEPg.NumPorts.IsNull() && !fvRsDomAttFvAEPg.NumPorts.IsUnknown() {
				childMap.Attributes["numPorts"] = fvRsDomAttFvAEPg.NumPorts.ValueString()
			}
			if !fvRsDomAttFvAEPg.PortAllocation.IsNull() && !fvRsDomAttFvAEPg.PortAllocation.IsUnknown() {
				childMap.Attributes["portAllocation"] = fvRsDomAttFvAEPg.PortAllocation.ValueString()
			}
			if !fvRsDomAttFvAEPg.PrimaryEncap.IsNull() && !fvRsDomAttFvAEPg.PrimaryEncap.IsUnknown() {
				childMap.Attributes["primaryEncap"] = fvRsDomAttFvAEPg.PrimaryEncap.ValueString()
			}
			if !fvRsDomAttFvAEPg.PrimaryEncapInner.IsNull() && !fvRsDomAttFvAEPg.PrimaryEncapInner.IsUnknown() {
				childMap.Attributes["primaryEncapInner"] = fvRsDomAttFvAEPg.PrimaryEncapInner.ValueString()
			}
			if !fvRsDomAttFvAEPg.ResImedcy.IsNull() && !fvRsDomAttFvAEPg.ResImedcy.IsUnknown() {
				childMap.Attributes["resImedcy"] = fvRsDomAttFvAEPg.ResImedcy.ValueString()
			}
			if !fvRsDomAttFvAEPg.SecondaryEncapInner.IsNull() && !fvRsDomAttFvAEPg.SecondaryEncapInner.IsUnknown() {
				childMap.Attributes["secondaryEncapInner"] = fvRsDomAttFvAEPg.SecondaryEncapInner.ValueString()
			}
			if !fvRsDomAttFvAEPg.SwitchingMode.IsNull() && !fvRsDomAttFvAEPg.SwitchingMode.IsUnknown() {
				childMap.Attributes["switchingMode"] = fvRsDomAttFvAEPg.SwitchingMode.ValueString()
			}
			if !fvRsDomAttFvAEPg.TDn.IsNull() && !fvRsDomAttFvAEPg.TDn.IsUnknown() {
				childMap.Attributes["tDn"] = fvRsDomAttFvAEPg.TDn.ValueString()
			}
			if !fvRsDomAttFvAEPg.Untagged.IsNull() && !fvRsDomAttFvAEPg.Untagged.IsUnknown() {
				childMap.Attributes["untagged"] = fvRsDomAttFvAEPg.Untagged.ValueString()
			}

			var tagAnnotationFvRsDomAttFvAEPgPlan, tagAnnotationFvRsDomAttFvAEPgState []TagAnnotationFvRsDomAttFvAEPgResourceModel
			fvRsDomAttFvAEPg.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsDomAttFvAEPgPlan, false)
			for _, tagAnnotationFvRsDomAttFvAEPgstate := range fvRsDomAttFvAEPgState {
				tagAnnotationFvRsDomAttFvAEPgstate.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsDomAttFvAEPgState, false)
			}
			if !fvRsDomAttFvAEPg.TagAnnotation.IsNull() && !fvRsDomAttFvAEPg.TagAnnotation.IsUnknown() {
				tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
				for _, tagAnnotationFvRsDomAttFvAEPg := range tagAnnotationFvRsDomAttFvAEPgPlan {
					tagAnnotationFvRsDomAttFvAEPgChildMap := NewAciObject()
					if !tagAnnotationFvRsDomAttFvAEPg.Key.IsNull() && !tagAnnotationFvRsDomAttFvAEPg.Key.IsUnknown() {
						tagAnnotationFvRsDomAttFvAEPgChildMap.Attributes["key"] = tagAnnotationFvRsDomAttFvAEPg.Key.ValueString()
					}
					if !tagAnnotationFvRsDomAttFvAEPg.Value.IsNull() && !tagAnnotationFvRsDomAttFvAEPg.Value.IsUnknown() {
						tagAnnotationFvRsDomAttFvAEPgChildMap.Attributes["value"] = tagAnnotationFvRsDomAttFvAEPg.Value.ValueString()
					}
					FvRsDomAttFvAEPgChildren = append(FvRsDomAttFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsDomAttFvAEPgChildMap})
					tagAnnotationIdentifier := TagAnnotationIdentifier{}
					tagAnnotationIdentifier.Key = tagAnnotationFvRsDomAttFvAEPg.Key
					tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
				}
				for _, tagAnnotationFvRsDomAttFvAEPg := range tagAnnotationFvRsDomAttFvAEPgState {
					delete := true
					for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
						if tagAnnotationIdentifier.Key == tagAnnotationFvRsDomAttFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagAnnotationFvRsDomAttFvAEPgChildMapForDelete := NewAciObject()
						tagAnnotationFvRsDomAttFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagAnnotationFvRsDomAttFvAEPgChildMapForDelete.Attributes["key"] = tagAnnotationFvRsDomAttFvAEPg.Key.ValueString()
						FvRsDomAttFvAEPgChildren = append(FvRsDomAttFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsDomAttFvAEPgChildMapForDelete})
					}
				}
			}

			var tagTagFvRsDomAttFvAEPgPlan, tagTagFvRsDomAttFvAEPgState []TagTagFvRsDomAttFvAEPgResourceModel
			fvRsDomAttFvAEPg.TagTag.ElementsAs(ctx, &tagTagFvRsDomAttFvAEPgPlan, false)
			for _, tagTagFvRsDomAttFvAEPgstate := range fvRsDomAttFvAEPgState {
				tagTagFvRsDomAttFvAEPgstate.TagTag.ElementsAs(ctx, &tagTagFvRsDomAttFvAEPgState, false)
			}
			if !fvRsDomAttFvAEPg.TagTag.IsNull() && !fvRsDomAttFvAEPg.TagTag.IsUnknown() {
				tagTagIdentifiers := []TagTagIdentifier{}
				for _, tagTagFvRsDomAttFvAEPg := range tagTagFvRsDomAttFvAEPgPlan {
					tagTagFvRsDomAttFvAEPgChildMap := NewAciObject()
					if !tagTagFvRsDomAttFvAEPg.Key.IsNull() && !tagTagFvRsDomAttFvAEPg.Key.IsUnknown() {
						tagTagFvRsDomAttFvAEPgChildMap.Attributes["key"] = tagTagFvRsDomAttFvAEPg.Key.ValueString()
					}
					if !tagTagFvRsDomAttFvAEPg.Value.IsNull() && !tagTagFvRsDomAttFvAEPg.Value.IsUnknown() {
						tagTagFvRsDomAttFvAEPgChildMap.Attributes["value"] = tagTagFvRsDomAttFvAEPg.Value.ValueString()
					}
					FvRsDomAttFvAEPgChildren = append(FvRsDomAttFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsDomAttFvAEPgChildMap})
					tagTagIdentifier := TagTagIdentifier{}
					tagTagIdentifier.Key = tagTagFvRsDomAttFvAEPg.Key
					tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
				}
				for _, tagTagFvRsDomAttFvAEPg := range tagTagFvRsDomAttFvAEPgState {
					delete := true
					for _, tagTagIdentifier := range tagTagIdentifiers {
						if tagTagIdentifier.Key == tagTagFvRsDomAttFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagTagFvRsDomAttFvAEPgChildMapForDelete := NewAciObject()
						tagTagFvRsDomAttFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagTagFvRsDomAttFvAEPgChildMapForDelete.Attributes["key"] = tagTagFvRsDomAttFvAEPg.Key.ValueString()
						FvRsDomAttFvAEPgChildren = append(FvRsDomAttFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsDomAttFvAEPgChildMapForDelete})
					}
				}
			}
			childMap.Children = FvRsDomAttFvAEPgChildren
			childPayloads = append(childPayloads, map[string]interface{}{"fvRsDomAtt": childMap})
			fvRsDomAttIdentifier := FvRsDomAttIdentifier{}
			fvRsDomAttIdentifier.TDn = fvRsDomAttFvAEPg.TDn
			fvRsDomAttIdentifiers = append(fvRsDomAttIdentifiers, fvRsDomAttIdentifier)
		}
		for _, fvRsDomAtt := range fvRsDomAttFvAEPgState {
			delete := true
			for _, fvRsDomAttIdentifier := range fvRsDomAttIdentifiers {
				if fvRsDomAttIdentifier.TDn == fvRsDomAtt.TDn {
					delete = false
					break
				}
			}
			if delete {
				fvRsDomAttChildMapForDelete := NewAciObject()
				fvRsDomAttChildMapForDelete.Attributes["status"] = "deleted"
				fvRsDomAttChildMapForDelete.Attributes["tDn"] = fvRsDomAtt.TDn.ValueString()
				childPayloads = append(childPayloads, map[string]interface{}{"fvRsDomAtt": fvRsDomAttChildMapForDelete})
			}
		}
	} else {
		data.FvRsDomAtt = types.SetNull(data.FvRsDomAtt.ElementType(ctx))
	}

	return childPayloads
}

func getFvAEPgFvRsDppPolChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *FvAEPgResourceModel, fvRsDppPolFvAEPgPlan, fvRsDppPolFvAEPgState FvRsDppPolFvAEPgResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.FvRsDppPol.IsNull() && !data.FvRsDppPol.IsUnknown() {
		FvRsDppPolFvAEPgChildren := make([]map[string]interface{}, 0)
		childMap := NewAciObject()
		if !IsEmptySingleNestedAttribute(data.FvRsDppPol.Attributes()) {
			if !fvRsDppPolFvAEPgPlan.Annotation.IsUnknown() && !fvRsDppPolFvAEPgPlan.Annotation.IsNull() {
				childMap.Attributes["annotation"] = fvRsDppPolFvAEPgPlan.Annotation.ValueString()
			} else {
				childMap.Attributes["annotation"] = globalAnnotation
			}
			if !fvRsDppPolFvAEPgPlan.TnQosDppPolName.IsUnknown() && !fvRsDppPolFvAEPgPlan.TnQosDppPolName.IsNull() {
				childMap.Attributes["tnQosDppPolName"] = fvRsDppPolFvAEPgPlan.TnQosDppPolName.ValueString()
			}

			var tagAnnotationFvRsDppPolFvAEPgPlan, tagAnnotationFvRsDppPolFvAEPgState []TagAnnotationFvRsDppPolFvAEPgResourceModel
			fvRsDppPolFvAEPgPlan.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsDppPolFvAEPgPlan, false)
			if !fvRsDppPolFvAEPgState.TagAnnotation.IsNull() {
				fvRsDppPolFvAEPgState.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsDppPolFvAEPgState, false)
			}
			if !fvRsDppPolFvAEPgPlan.TagAnnotation.IsNull() && !fvRsDppPolFvAEPgPlan.TagAnnotation.IsUnknown() {
				tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
				for _, tagAnnotationFvRsDppPolFvAEPg := range tagAnnotationFvRsDppPolFvAEPgPlan {
					tagAnnotationFvRsDppPolFvAEPgChildMap := NewAciObject()
					if !tagAnnotationFvRsDppPolFvAEPg.Key.IsNull() && !tagAnnotationFvRsDppPolFvAEPg.Key.IsUnknown() {
						tagAnnotationFvRsDppPolFvAEPgChildMap.Attributes["key"] = tagAnnotationFvRsDppPolFvAEPg.Key.ValueString()
					}
					if !tagAnnotationFvRsDppPolFvAEPg.Value.IsNull() && !tagAnnotationFvRsDppPolFvAEPg.Value.IsUnknown() {
						tagAnnotationFvRsDppPolFvAEPgChildMap.Attributes["value"] = tagAnnotationFvRsDppPolFvAEPg.Value.ValueString()
					}
					FvRsDppPolFvAEPgChildren = append(FvRsDppPolFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsDppPolFvAEPgChildMap})
					tagAnnotationIdentifier := TagAnnotationIdentifier{}
					tagAnnotationIdentifier.Key = tagAnnotationFvRsDppPolFvAEPg.Key
					tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
				}
				for _, tagAnnotationFvRsDppPolFvAEPg := range tagAnnotationFvRsDppPolFvAEPgState {
					delete := true
					for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
						if tagAnnotationIdentifier.Key == tagAnnotationFvRsDppPolFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagAnnotationFvRsDppPolFvAEPgChildMapForDelete := NewAciObject()
						tagAnnotationFvRsDppPolFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagAnnotationFvRsDppPolFvAEPgChildMapForDelete.Attributes["key"] = tagAnnotationFvRsDppPolFvAEPg.Key.ValueString()
						FvRsDppPolFvAEPgChildren = append(FvRsDppPolFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsDppPolFvAEPgChildMapForDelete})
					}
				}
			}

			var tagTagFvRsDppPolFvAEPgPlan, tagTagFvRsDppPolFvAEPgState []TagTagFvRsDppPolFvAEPgResourceModel
			fvRsDppPolFvAEPgPlan.TagTag.ElementsAs(ctx, &tagTagFvRsDppPolFvAEPgPlan, false)
			if !fvRsDppPolFvAEPgState.TagTag.IsNull() {
				fvRsDppPolFvAEPgState.TagTag.ElementsAs(ctx, &tagTagFvRsDppPolFvAEPgState, false)
			}
			if !fvRsDppPolFvAEPgPlan.TagTag.IsNull() && !fvRsDppPolFvAEPgPlan.TagTag.IsUnknown() {
				tagTagIdentifiers := []TagTagIdentifier{}
				for _, tagTagFvRsDppPolFvAEPg := range tagTagFvRsDppPolFvAEPgPlan {
					tagTagFvRsDppPolFvAEPgChildMap := NewAciObject()
					if !tagTagFvRsDppPolFvAEPg.Key.IsNull() && !tagTagFvRsDppPolFvAEPg.Key.IsUnknown() {
						tagTagFvRsDppPolFvAEPgChildMap.Attributes["key"] = tagTagFvRsDppPolFvAEPg.Key.ValueString()
					}
					if !tagTagFvRsDppPolFvAEPg.Value.IsNull() && !tagTagFvRsDppPolFvAEPg.Value.IsUnknown() {
						tagTagFvRsDppPolFvAEPgChildMap.Attributes["value"] = tagTagFvRsDppPolFvAEPg.Value.ValueString()
					}
					FvRsDppPolFvAEPgChildren = append(FvRsDppPolFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsDppPolFvAEPgChildMap})
					tagTagIdentifier := TagTagIdentifier{}
					tagTagIdentifier.Key = tagTagFvRsDppPolFvAEPg.Key
					tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
				}
				for _, tagTagFvRsDppPolFvAEPg := range tagTagFvRsDppPolFvAEPgState {
					delete := true
					for _, tagTagIdentifier := range tagTagIdentifiers {
						if tagTagIdentifier.Key == tagTagFvRsDppPolFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagTagFvRsDppPolFvAEPgChildMapForDelete := NewAciObject()
						tagTagFvRsDppPolFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagTagFvRsDppPolFvAEPgChildMapForDelete.Attributes["key"] = tagTagFvRsDppPolFvAEPg.Key.ValueString()
						FvRsDppPolFvAEPgChildren = append(FvRsDppPolFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsDppPolFvAEPgChildMapForDelete})
					}
				}
			}
			childMap.Children = FvRsDppPolFvAEPgChildren
		} else {
			childMap.Attributes["status"] = "deleted"
		}
		childPayloads = append(childPayloads, map[string]interface{}{"fvRsDppPol": childMap})
	} else {
		FvRsDppPolObject, _ := types.ObjectValueFrom(ctx, FvRsDppPolFvAEPgType, getEmptyFvRsDppPolFvAEPgResourceModel())
		data.FvRsDppPol = FvRsDppPolObject
	}

	return childPayloads
}

func getFvAEPgFvRsFcPathAttChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *FvAEPgResourceModel, fvRsFcPathAttFvAEPgPlan, fvRsFcPathAttFvAEPgState []FvRsFcPathAttFvAEPgResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.FvRsFcPathAtt.IsNull() && !data.FvRsFcPathAtt.IsUnknown() {
		fvRsFcPathAttIdentifiers := []FvRsFcPathAttIdentifier{}
		for _, fvRsFcPathAttFvAEPg := range fvRsFcPathAttFvAEPgPlan {
			FvRsFcPathAttFvAEPgChildren := make([]map[string]interface{}, 0)
			childMap := NewAciObject()
			if !fvRsFcPathAttFvAEPg.Annotation.IsNull() && !fvRsFcPathAttFvAEPg.Annotation.IsUnknown() {
				childMap.Attributes["annotation"] = fvRsFcPathAttFvAEPg.Annotation.ValueString()
			} else {
				childMap.Attributes["annotation"] = globalAnnotation
			}
			if !fvRsFcPathAttFvAEPg.Descr.IsNull() && !fvRsFcPathAttFvAEPg.Descr.IsUnknown() {
				childMap.Attributes["descr"] = fvRsFcPathAttFvAEPg.Descr.ValueString()
			}
			if !fvRsFcPathAttFvAEPg.TDn.IsNull() && !fvRsFcPathAttFvAEPg.TDn.IsUnknown() {
				childMap.Attributes["tDn"] = fvRsFcPathAttFvAEPg.TDn.ValueString()
			}
			if !fvRsFcPathAttFvAEPg.Vsan.IsNull() && !fvRsFcPathAttFvAEPg.Vsan.IsUnknown() {
				childMap.Attributes["vsan"] = fvRsFcPathAttFvAEPg.Vsan.ValueString()
			}
			if !fvRsFcPathAttFvAEPg.VsanMode.IsNull() && !fvRsFcPathAttFvAEPg.VsanMode.IsUnknown() {
				childMap.Attributes["vsanMode"] = fvRsFcPathAttFvAEPg.VsanMode.ValueString()
			}

			var tagAnnotationFvRsFcPathAttFvAEPgPlan, tagAnnotationFvRsFcPathAttFvAEPgState []TagAnnotationFvRsFcPathAttFvAEPgResourceModel
			fvRsFcPathAttFvAEPg.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsFcPathAttFvAEPgPlan, false)
			for _, tagAnnotationFvRsFcPathAttFvAEPgstate := range fvRsFcPathAttFvAEPgState {
				tagAnnotationFvRsFcPathAttFvAEPgstate.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsFcPathAttFvAEPgState, false)
			}
			if !fvRsFcPathAttFvAEPg.TagAnnotation.IsNull() && !fvRsFcPathAttFvAEPg.TagAnnotation.IsUnknown() {
				tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
				for _, tagAnnotationFvRsFcPathAttFvAEPg := range tagAnnotationFvRsFcPathAttFvAEPgPlan {
					tagAnnotationFvRsFcPathAttFvAEPgChildMap := NewAciObject()
					if !tagAnnotationFvRsFcPathAttFvAEPg.Key.IsNull() && !tagAnnotationFvRsFcPathAttFvAEPg.Key.IsUnknown() {
						tagAnnotationFvRsFcPathAttFvAEPgChildMap.Attributes["key"] = tagAnnotationFvRsFcPathAttFvAEPg.Key.ValueString()
					}
					if !tagAnnotationFvRsFcPathAttFvAEPg.Value.IsNull() && !tagAnnotationFvRsFcPathAttFvAEPg.Value.IsUnknown() {
						tagAnnotationFvRsFcPathAttFvAEPgChildMap.Attributes["value"] = tagAnnotationFvRsFcPathAttFvAEPg.Value.ValueString()
					}
					FvRsFcPathAttFvAEPgChildren = append(FvRsFcPathAttFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsFcPathAttFvAEPgChildMap})
					tagAnnotationIdentifier := TagAnnotationIdentifier{}
					tagAnnotationIdentifier.Key = tagAnnotationFvRsFcPathAttFvAEPg.Key
					tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
				}
				for _, tagAnnotationFvRsFcPathAttFvAEPg := range tagAnnotationFvRsFcPathAttFvAEPgState {
					delete := true
					for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
						if tagAnnotationIdentifier.Key == tagAnnotationFvRsFcPathAttFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagAnnotationFvRsFcPathAttFvAEPgChildMapForDelete := NewAciObject()
						tagAnnotationFvRsFcPathAttFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagAnnotationFvRsFcPathAttFvAEPgChildMapForDelete.Attributes["key"] = tagAnnotationFvRsFcPathAttFvAEPg.Key.ValueString()
						FvRsFcPathAttFvAEPgChildren = append(FvRsFcPathAttFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsFcPathAttFvAEPgChildMapForDelete})
					}
				}
			}

			var tagTagFvRsFcPathAttFvAEPgPlan, tagTagFvRsFcPathAttFvAEPgState []TagTagFvRsFcPathAttFvAEPgResourceModel
			fvRsFcPathAttFvAEPg.TagTag.ElementsAs(ctx, &tagTagFvRsFcPathAttFvAEPgPlan, false)
			for _, tagTagFvRsFcPathAttFvAEPgstate := range fvRsFcPathAttFvAEPgState {
				tagTagFvRsFcPathAttFvAEPgstate.TagTag.ElementsAs(ctx, &tagTagFvRsFcPathAttFvAEPgState, false)
			}
			if !fvRsFcPathAttFvAEPg.TagTag.IsNull() && !fvRsFcPathAttFvAEPg.TagTag.IsUnknown() {
				tagTagIdentifiers := []TagTagIdentifier{}
				for _, tagTagFvRsFcPathAttFvAEPg := range tagTagFvRsFcPathAttFvAEPgPlan {
					tagTagFvRsFcPathAttFvAEPgChildMap := NewAciObject()
					if !tagTagFvRsFcPathAttFvAEPg.Key.IsNull() && !tagTagFvRsFcPathAttFvAEPg.Key.IsUnknown() {
						tagTagFvRsFcPathAttFvAEPgChildMap.Attributes["key"] = tagTagFvRsFcPathAttFvAEPg.Key.ValueString()
					}
					if !tagTagFvRsFcPathAttFvAEPg.Value.IsNull() && !tagTagFvRsFcPathAttFvAEPg.Value.IsUnknown() {
						tagTagFvRsFcPathAttFvAEPgChildMap.Attributes["value"] = tagTagFvRsFcPathAttFvAEPg.Value.ValueString()
					}
					FvRsFcPathAttFvAEPgChildren = append(FvRsFcPathAttFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsFcPathAttFvAEPgChildMap})
					tagTagIdentifier := TagTagIdentifier{}
					tagTagIdentifier.Key = tagTagFvRsFcPathAttFvAEPg.Key
					tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
				}
				for _, tagTagFvRsFcPathAttFvAEPg := range tagTagFvRsFcPathAttFvAEPgState {
					delete := true
					for _, tagTagIdentifier := range tagTagIdentifiers {
						if tagTagIdentifier.Key == tagTagFvRsFcPathAttFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagTagFvRsFcPathAttFvAEPgChildMapForDelete := NewAciObject()
						tagTagFvRsFcPathAttFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagTagFvRsFcPathAttFvAEPgChildMapForDelete.Attributes["key"] = tagTagFvRsFcPathAttFvAEPg.Key.ValueString()
						FvRsFcPathAttFvAEPgChildren = append(FvRsFcPathAttFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsFcPathAttFvAEPgChildMapForDelete})
					}
				}
			}
			childMap.Children = FvRsFcPathAttFvAEPgChildren
			childPayloads = append(childPayloads, map[string]interface{}{"fvRsFcPathAtt": childMap})
			fvRsFcPathAttIdentifier := FvRsFcPathAttIdentifier{}
			fvRsFcPathAttIdentifier.TDn = fvRsFcPathAttFvAEPg.TDn
			fvRsFcPathAttIdentifiers = append(fvRsFcPathAttIdentifiers, fvRsFcPathAttIdentifier)
		}
		for _, fvRsFcPathAtt := range fvRsFcPathAttFvAEPgState {
			delete := true
			for _, fvRsFcPathAttIdentifier := range fvRsFcPathAttIdentifiers {
				if fvRsFcPathAttIdentifier.TDn == fvRsFcPathAtt.TDn {
					delete = false
					break
				}
			}
			if delete {
				fvRsFcPathAttChildMapForDelete := NewAciObject()
				fvRsFcPathAttChildMapForDelete.Attributes["status"] = "deleted"
				fvRsFcPathAttChildMapForDelete.Attributes["tDn"] = fvRsFcPathAtt.TDn.ValueString()
				childPayloads = append(childPayloads, map[string]interface{}{"fvRsFcPathAtt": fvRsFcPathAttChildMapForDelete})
			}
		}
	} else {
		data.FvRsFcPathAtt = types.SetNull(data.FvRsFcPathAtt.ElementType(ctx))
	}

	return childPayloads
}

func getFvAEPgFvRsIntraEpgChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *FvAEPgResourceModel, fvRsIntraEpgFvAEPgPlan, fvRsIntraEpgFvAEPgState []FvRsIntraEpgFvAEPgResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.FvRsIntraEpg.IsNull() && !data.FvRsIntraEpg.IsUnknown() {
		fvRsIntraEpgIdentifiers := []FvRsIntraEpgIdentifier{}
		for _, fvRsIntraEpgFvAEPg := range fvRsIntraEpgFvAEPgPlan {
			FvRsIntraEpgFvAEPgChildren := make([]map[string]interface{}, 0)
			childMap := NewAciObject()
			if !fvRsIntraEpgFvAEPg.Annotation.IsNull() && !fvRsIntraEpgFvAEPg.Annotation.IsUnknown() {
				childMap.Attributes["annotation"] = fvRsIntraEpgFvAEPg.Annotation.ValueString()
			} else {
				childMap.Attributes["annotation"] = globalAnnotation
			}
			if !fvRsIntraEpgFvAEPg.TnVzBrCPName.IsNull() && !fvRsIntraEpgFvAEPg.TnVzBrCPName.IsUnknown() {
				childMap.Attributes["tnVzBrCPName"] = fvRsIntraEpgFvAEPg.TnVzBrCPName.ValueString()
			}

			var tagAnnotationFvRsIntraEpgFvAEPgPlan, tagAnnotationFvRsIntraEpgFvAEPgState []TagAnnotationFvRsIntraEpgFvAEPgResourceModel
			fvRsIntraEpgFvAEPg.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsIntraEpgFvAEPgPlan, false)
			for _, tagAnnotationFvRsIntraEpgFvAEPgstate := range fvRsIntraEpgFvAEPgState {
				tagAnnotationFvRsIntraEpgFvAEPgstate.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsIntraEpgFvAEPgState, false)
			}
			if !fvRsIntraEpgFvAEPg.TagAnnotation.IsNull() && !fvRsIntraEpgFvAEPg.TagAnnotation.IsUnknown() {
				tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
				for _, tagAnnotationFvRsIntraEpgFvAEPg := range tagAnnotationFvRsIntraEpgFvAEPgPlan {
					tagAnnotationFvRsIntraEpgFvAEPgChildMap := NewAciObject()
					if !tagAnnotationFvRsIntraEpgFvAEPg.Key.IsNull() && !tagAnnotationFvRsIntraEpgFvAEPg.Key.IsUnknown() {
						tagAnnotationFvRsIntraEpgFvAEPgChildMap.Attributes["key"] = tagAnnotationFvRsIntraEpgFvAEPg.Key.ValueString()
					}
					if !tagAnnotationFvRsIntraEpgFvAEPg.Value.IsNull() && !tagAnnotationFvRsIntraEpgFvAEPg.Value.IsUnknown() {
						tagAnnotationFvRsIntraEpgFvAEPgChildMap.Attributes["value"] = tagAnnotationFvRsIntraEpgFvAEPg.Value.ValueString()
					}
					FvRsIntraEpgFvAEPgChildren = append(FvRsIntraEpgFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsIntraEpgFvAEPgChildMap})
					tagAnnotationIdentifier := TagAnnotationIdentifier{}
					tagAnnotationIdentifier.Key = tagAnnotationFvRsIntraEpgFvAEPg.Key
					tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
				}
				for _, tagAnnotationFvRsIntraEpgFvAEPg := range tagAnnotationFvRsIntraEpgFvAEPgState {
					delete := true
					for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
						if tagAnnotationIdentifier.Key == tagAnnotationFvRsIntraEpgFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagAnnotationFvRsIntraEpgFvAEPgChildMapForDelete := NewAciObject()
						tagAnnotationFvRsIntraEpgFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagAnnotationFvRsIntraEpgFvAEPgChildMapForDelete.Attributes["key"] = tagAnnotationFvRsIntraEpgFvAEPg.Key.ValueString()
						FvRsIntraEpgFvAEPgChildren = append(FvRsIntraEpgFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsIntraEpgFvAEPgChildMapForDelete})
					}
				}
			}

			var tagTagFvRsIntraEpgFvAEPgPlan, tagTagFvRsIntraEpgFvAEPgState []TagTagFvRsIntraEpgFvAEPgResourceModel
			fvRsIntraEpgFvAEPg.TagTag.ElementsAs(ctx, &tagTagFvRsIntraEpgFvAEPgPlan, false)
			for _, tagTagFvRsIntraEpgFvAEPgstate := range fvRsIntraEpgFvAEPgState {
				tagTagFvRsIntraEpgFvAEPgstate.TagTag.ElementsAs(ctx, &tagTagFvRsIntraEpgFvAEPgState, false)
			}
			if !fvRsIntraEpgFvAEPg.TagTag.IsNull() && !fvRsIntraEpgFvAEPg.TagTag.IsUnknown() {
				tagTagIdentifiers := []TagTagIdentifier{}
				for _, tagTagFvRsIntraEpgFvAEPg := range tagTagFvRsIntraEpgFvAEPgPlan {
					tagTagFvRsIntraEpgFvAEPgChildMap := NewAciObject()
					if !tagTagFvRsIntraEpgFvAEPg.Key.IsNull() && !tagTagFvRsIntraEpgFvAEPg.Key.IsUnknown() {
						tagTagFvRsIntraEpgFvAEPgChildMap.Attributes["key"] = tagTagFvRsIntraEpgFvAEPg.Key.ValueString()
					}
					if !tagTagFvRsIntraEpgFvAEPg.Value.IsNull() && !tagTagFvRsIntraEpgFvAEPg.Value.IsUnknown() {
						tagTagFvRsIntraEpgFvAEPgChildMap.Attributes["value"] = tagTagFvRsIntraEpgFvAEPg.Value.ValueString()
					}
					FvRsIntraEpgFvAEPgChildren = append(FvRsIntraEpgFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsIntraEpgFvAEPgChildMap})
					tagTagIdentifier := TagTagIdentifier{}
					tagTagIdentifier.Key = tagTagFvRsIntraEpgFvAEPg.Key
					tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
				}
				for _, tagTagFvRsIntraEpgFvAEPg := range tagTagFvRsIntraEpgFvAEPgState {
					delete := true
					for _, tagTagIdentifier := range tagTagIdentifiers {
						if tagTagIdentifier.Key == tagTagFvRsIntraEpgFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagTagFvRsIntraEpgFvAEPgChildMapForDelete := NewAciObject()
						tagTagFvRsIntraEpgFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagTagFvRsIntraEpgFvAEPgChildMapForDelete.Attributes["key"] = tagTagFvRsIntraEpgFvAEPg.Key.ValueString()
						FvRsIntraEpgFvAEPgChildren = append(FvRsIntraEpgFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsIntraEpgFvAEPgChildMapForDelete})
					}
				}
			}
			childMap.Children = FvRsIntraEpgFvAEPgChildren
			childPayloads = append(childPayloads, map[string]interface{}{"fvRsIntraEpg": childMap})
			fvRsIntraEpgIdentifier := FvRsIntraEpgIdentifier{}
			fvRsIntraEpgIdentifier.TnVzBrCPName = fvRsIntraEpgFvAEPg.TnVzBrCPName
			fvRsIntraEpgIdentifiers = append(fvRsIntraEpgIdentifiers, fvRsIntraEpgIdentifier)
		}
		for _, fvRsIntraEpg := range fvRsIntraEpgFvAEPgState {
			delete := true
			for _, fvRsIntraEpgIdentifier := range fvRsIntraEpgIdentifiers {
				if fvRsIntraEpgIdentifier.TnVzBrCPName == fvRsIntraEpg.TnVzBrCPName {
					delete = false
					break
				}
			}
			if delete {
				fvRsIntraEpgChildMapForDelete := NewAciObject()
				fvRsIntraEpgChildMapForDelete.Attributes["status"] = "deleted"
				fvRsIntraEpgChildMapForDelete.Attributes["tnVzBrCPName"] = fvRsIntraEpg.TnVzBrCPName.ValueString()
				childPayloads = append(childPayloads, map[string]interface{}{"fvRsIntraEpg": fvRsIntraEpgChildMapForDelete})
			}
		}
	} else {
		data.FvRsIntraEpg = types.SetNull(data.FvRsIntraEpg.ElementType(ctx))
	}

	return childPayloads
}

func getFvAEPgFvRsNodeAttChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *FvAEPgResourceModel, fvRsNodeAttFvAEPgPlan, fvRsNodeAttFvAEPgState []FvRsNodeAttFvAEPgResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.FvRsNodeAtt.IsNull() && !data.FvRsNodeAtt.IsUnknown() {
		fvRsNodeAttIdentifiers := []FvRsNodeAttIdentifier{}
		for _, fvRsNodeAttFvAEPg := range fvRsNodeAttFvAEPgPlan {
			FvRsNodeAttFvAEPgChildren := make([]map[string]interface{}, 0)
			childMap := NewAciObject()
			if !fvRsNodeAttFvAEPg.Annotation.IsNull() && !fvRsNodeAttFvAEPg.Annotation.IsUnknown() {
				childMap.Attributes["annotation"] = fvRsNodeAttFvAEPg.Annotation.ValueString()
			} else {
				childMap.Attributes["annotation"] = globalAnnotation
			}
			if !fvRsNodeAttFvAEPg.Descr.IsNull() && !fvRsNodeAttFvAEPg.Descr.IsUnknown() {
				childMap.Attributes["descr"] = fvRsNodeAttFvAEPg.Descr.ValueString()
			}
			if !fvRsNodeAttFvAEPg.Encap.IsNull() && !fvRsNodeAttFvAEPg.Encap.IsUnknown() {
				childMap.Attributes["encap"] = fvRsNodeAttFvAEPg.Encap.ValueString()
			}
			if !fvRsNodeAttFvAEPg.InstrImedcy.IsNull() && !fvRsNodeAttFvAEPg.InstrImedcy.IsUnknown() {
				childMap.Attributes["instrImedcy"] = fvRsNodeAttFvAEPg.InstrImedcy.ValueString()
			}
			if !fvRsNodeAttFvAEPg.Mode.IsNull() && !fvRsNodeAttFvAEPg.Mode.IsUnknown() {
				childMap.Attributes["mode"] = fvRsNodeAttFvAEPg.Mode.ValueString()
			}
			if !fvRsNodeAttFvAEPg.TDn.IsNull() && !fvRsNodeAttFvAEPg.TDn.IsUnknown() {
				childMap.Attributes["tDn"] = fvRsNodeAttFvAEPg.TDn.ValueString()
			}

			var tagAnnotationFvRsNodeAttFvAEPgPlan, tagAnnotationFvRsNodeAttFvAEPgState []TagAnnotationFvRsNodeAttFvAEPgResourceModel
			fvRsNodeAttFvAEPg.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsNodeAttFvAEPgPlan, false)
			for _, tagAnnotationFvRsNodeAttFvAEPgstate := range fvRsNodeAttFvAEPgState {
				tagAnnotationFvRsNodeAttFvAEPgstate.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsNodeAttFvAEPgState, false)
			}
			if !fvRsNodeAttFvAEPg.TagAnnotation.IsNull() && !fvRsNodeAttFvAEPg.TagAnnotation.IsUnknown() {
				tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
				for _, tagAnnotationFvRsNodeAttFvAEPg := range tagAnnotationFvRsNodeAttFvAEPgPlan {
					tagAnnotationFvRsNodeAttFvAEPgChildMap := NewAciObject()
					if !tagAnnotationFvRsNodeAttFvAEPg.Key.IsNull() && !tagAnnotationFvRsNodeAttFvAEPg.Key.IsUnknown() {
						tagAnnotationFvRsNodeAttFvAEPgChildMap.Attributes["key"] = tagAnnotationFvRsNodeAttFvAEPg.Key.ValueString()
					}
					if !tagAnnotationFvRsNodeAttFvAEPg.Value.IsNull() && !tagAnnotationFvRsNodeAttFvAEPg.Value.IsUnknown() {
						tagAnnotationFvRsNodeAttFvAEPgChildMap.Attributes["value"] = tagAnnotationFvRsNodeAttFvAEPg.Value.ValueString()
					}
					FvRsNodeAttFvAEPgChildren = append(FvRsNodeAttFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsNodeAttFvAEPgChildMap})
					tagAnnotationIdentifier := TagAnnotationIdentifier{}
					tagAnnotationIdentifier.Key = tagAnnotationFvRsNodeAttFvAEPg.Key
					tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
				}
				for _, tagAnnotationFvRsNodeAttFvAEPg := range tagAnnotationFvRsNodeAttFvAEPgState {
					delete := true
					for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
						if tagAnnotationIdentifier.Key == tagAnnotationFvRsNodeAttFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagAnnotationFvRsNodeAttFvAEPgChildMapForDelete := NewAciObject()
						tagAnnotationFvRsNodeAttFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagAnnotationFvRsNodeAttFvAEPgChildMapForDelete.Attributes["key"] = tagAnnotationFvRsNodeAttFvAEPg.Key.ValueString()
						FvRsNodeAttFvAEPgChildren = append(FvRsNodeAttFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsNodeAttFvAEPgChildMapForDelete})
					}
				}
			}

			var tagTagFvRsNodeAttFvAEPgPlan, tagTagFvRsNodeAttFvAEPgState []TagTagFvRsNodeAttFvAEPgResourceModel
			fvRsNodeAttFvAEPg.TagTag.ElementsAs(ctx, &tagTagFvRsNodeAttFvAEPgPlan, false)
			for _, tagTagFvRsNodeAttFvAEPgstate := range fvRsNodeAttFvAEPgState {
				tagTagFvRsNodeAttFvAEPgstate.TagTag.ElementsAs(ctx, &tagTagFvRsNodeAttFvAEPgState, false)
			}
			if !fvRsNodeAttFvAEPg.TagTag.IsNull() && !fvRsNodeAttFvAEPg.TagTag.IsUnknown() {
				tagTagIdentifiers := []TagTagIdentifier{}
				for _, tagTagFvRsNodeAttFvAEPg := range tagTagFvRsNodeAttFvAEPgPlan {
					tagTagFvRsNodeAttFvAEPgChildMap := NewAciObject()
					if !tagTagFvRsNodeAttFvAEPg.Key.IsNull() && !tagTagFvRsNodeAttFvAEPg.Key.IsUnknown() {
						tagTagFvRsNodeAttFvAEPgChildMap.Attributes["key"] = tagTagFvRsNodeAttFvAEPg.Key.ValueString()
					}
					if !tagTagFvRsNodeAttFvAEPg.Value.IsNull() && !tagTagFvRsNodeAttFvAEPg.Value.IsUnknown() {
						tagTagFvRsNodeAttFvAEPgChildMap.Attributes["value"] = tagTagFvRsNodeAttFvAEPg.Value.ValueString()
					}
					FvRsNodeAttFvAEPgChildren = append(FvRsNodeAttFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsNodeAttFvAEPgChildMap})
					tagTagIdentifier := TagTagIdentifier{}
					tagTagIdentifier.Key = tagTagFvRsNodeAttFvAEPg.Key
					tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
				}
				for _, tagTagFvRsNodeAttFvAEPg := range tagTagFvRsNodeAttFvAEPgState {
					delete := true
					for _, tagTagIdentifier := range tagTagIdentifiers {
						if tagTagIdentifier.Key == tagTagFvRsNodeAttFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagTagFvRsNodeAttFvAEPgChildMapForDelete := NewAciObject()
						tagTagFvRsNodeAttFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagTagFvRsNodeAttFvAEPgChildMapForDelete.Attributes["key"] = tagTagFvRsNodeAttFvAEPg.Key.ValueString()
						FvRsNodeAttFvAEPgChildren = append(FvRsNodeAttFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsNodeAttFvAEPgChildMapForDelete})
					}
				}
			}
			childMap.Children = FvRsNodeAttFvAEPgChildren
			childPayloads = append(childPayloads, map[string]interface{}{"fvRsNodeAtt": childMap})
			fvRsNodeAttIdentifier := FvRsNodeAttIdentifier{}
			fvRsNodeAttIdentifier.TDn = fvRsNodeAttFvAEPg.TDn
			fvRsNodeAttIdentifiers = append(fvRsNodeAttIdentifiers, fvRsNodeAttIdentifier)
		}
		for _, fvRsNodeAtt := range fvRsNodeAttFvAEPgState {
			delete := true
			for _, fvRsNodeAttIdentifier := range fvRsNodeAttIdentifiers {
				if fvRsNodeAttIdentifier.TDn == fvRsNodeAtt.TDn {
					delete = false
					break
				}
			}
			if delete {
				fvRsNodeAttChildMapForDelete := NewAciObject()
				fvRsNodeAttChildMapForDelete.Attributes["status"] = "deleted"
				fvRsNodeAttChildMapForDelete.Attributes["tDn"] = fvRsNodeAtt.TDn.ValueString()
				childPayloads = append(childPayloads, map[string]interface{}{"fvRsNodeAtt": fvRsNodeAttChildMapForDelete})
			}
		}
	} else {
		data.FvRsNodeAtt = types.SetNull(data.FvRsNodeAtt.ElementType(ctx))
	}

	return childPayloads
}

func getFvAEPgFvRsPathAttChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *FvAEPgResourceModel, fvRsPathAttFvAEPgPlan, fvRsPathAttFvAEPgState []FvRsPathAttFvAEPgResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.FvRsPathAtt.IsNull() && !data.FvRsPathAtt.IsUnknown() {
		fvRsPathAttIdentifiers := []FvRsPathAttIdentifier{}
		for _, fvRsPathAttFvAEPg := range fvRsPathAttFvAEPgPlan {
			FvRsPathAttFvAEPgChildren := make([]map[string]interface{}, 0)
			childMap := NewAciObject()
			if !fvRsPathAttFvAEPg.Annotation.IsNull() && !fvRsPathAttFvAEPg.Annotation.IsUnknown() {
				childMap.Attributes["annotation"] = fvRsPathAttFvAEPg.Annotation.ValueString()
			} else {
				childMap.Attributes["annotation"] = globalAnnotation
			}
			if !fvRsPathAttFvAEPg.Descr.IsNull() && !fvRsPathAttFvAEPg.Descr.IsUnknown() {
				childMap.Attributes["descr"] = fvRsPathAttFvAEPg.Descr.ValueString()
			}
			if !fvRsPathAttFvAEPg.Encap.IsNull() && !fvRsPathAttFvAEPg.Encap.IsUnknown() {
				childMap.Attributes["encap"] = fvRsPathAttFvAEPg.Encap.ValueString()
			}
			if !fvRsPathAttFvAEPg.InstrImedcy.IsNull() && !fvRsPathAttFvAEPg.InstrImedcy.IsUnknown() {
				childMap.Attributes["instrImedcy"] = fvRsPathAttFvAEPg.InstrImedcy.ValueString()
			}
			if !fvRsPathAttFvAEPg.Mode.IsNull() && !fvRsPathAttFvAEPg.Mode.IsUnknown() {
				childMap.Attributes["mode"] = fvRsPathAttFvAEPg.Mode.ValueString()
			}
			if !fvRsPathAttFvAEPg.PrimaryEncap.IsNull() && !fvRsPathAttFvAEPg.PrimaryEncap.IsUnknown() {
				childMap.Attributes["primaryEncap"] = fvRsPathAttFvAEPg.PrimaryEncap.ValueString()
			}
			if !fvRsPathAttFvAEPg.TDn.IsNull() && !fvRsPathAttFvAEPg.TDn.IsUnknown() {
				childMap.Attributes["tDn"] = fvRsPathAttFvAEPg.TDn.ValueString()
			}

			var tagAnnotationFvRsPathAttFvAEPgPlan, tagAnnotationFvRsPathAttFvAEPgState []TagAnnotationFvRsPathAttFvAEPgResourceModel
			fvRsPathAttFvAEPg.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsPathAttFvAEPgPlan, false)
			for _, tagAnnotationFvRsPathAttFvAEPgstate := range fvRsPathAttFvAEPgState {
				tagAnnotationFvRsPathAttFvAEPgstate.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsPathAttFvAEPgState, false)
			}
			if !fvRsPathAttFvAEPg.TagAnnotation.IsNull() && !fvRsPathAttFvAEPg.TagAnnotation.IsUnknown() {
				tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
				for _, tagAnnotationFvRsPathAttFvAEPg := range tagAnnotationFvRsPathAttFvAEPgPlan {
					tagAnnotationFvRsPathAttFvAEPgChildMap := NewAciObject()
					if !tagAnnotationFvRsPathAttFvAEPg.Key.IsNull() && !tagAnnotationFvRsPathAttFvAEPg.Key.IsUnknown() {
						tagAnnotationFvRsPathAttFvAEPgChildMap.Attributes["key"] = tagAnnotationFvRsPathAttFvAEPg.Key.ValueString()
					}
					if !tagAnnotationFvRsPathAttFvAEPg.Value.IsNull() && !tagAnnotationFvRsPathAttFvAEPg.Value.IsUnknown() {
						tagAnnotationFvRsPathAttFvAEPgChildMap.Attributes["value"] = tagAnnotationFvRsPathAttFvAEPg.Value.ValueString()
					}
					FvRsPathAttFvAEPgChildren = append(FvRsPathAttFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsPathAttFvAEPgChildMap})
					tagAnnotationIdentifier := TagAnnotationIdentifier{}
					tagAnnotationIdentifier.Key = tagAnnotationFvRsPathAttFvAEPg.Key
					tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
				}
				for _, tagAnnotationFvRsPathAttFvAEPg := range tagAnnotationFvRsPathAttFvAEPgState {
					delete := true
					for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
						if tagAnnotationIdentifier.Key == tagAnnotationFvRsPathAttFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagAnnotationFvRsPathAttFvAEPgChildMapForDelete := NewAciObject()
						tagAnnotationFvRsPathAttFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagAnnotationFvRsPathAttFvAEPgChildMapForDelete.Attributes["key"] = tagAnnotationFvRsPathAttFvAEPg.Key.ValueString()
						FvRsPathAttFvAEPgChildren = append(FvRsPathAttFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsPathAttFvAEPgChildMapForDelete})
					}
				}
			}

			var tagTagFvRsPathAttFvAEPgPlan, tagTagFvRsPathAttFvAEPgState []TagTagFvRsPathAttFvAEPgResourceModel
			fvRsPathAttFvAEPg.TagTag.ElementsAs(ctx, &tagTagFvRsPathAttFvAEPgPlan, false)
			for _, tagTagFvRsPathAttFvAEPgstate := range fvRsPathAttFvAEPgState {
				tagTagFvRsPathAttFvAEPgstate.TagTag.ElementsAs(ctx, &tagTagFvRsPathAttFvAEPgState, false)
			}
			if !fvRsPathAttFvAEPg.TagTag.IsNull() && !fvRsPathAttFvAEPg.TagTag.IsUnknown() {
				tagTagIdentifiers := []TagTagIdentifier{}
				for _, tagTagFvRsPathAttFvAEPg := range tagTagFvRsPathAttFvAEPgPlan {
					tagTagFvRsPathAttFvAEPgChildMap := NewAciObject()
					if !tagTagFvRsPathAttFvAEPg.Key.IsNull() && !tagTagFvRsPathAttFvAEPg.Key.IsUnknown() {
						tagTagFvRsPathAttFvAEPgChildMap.Attributes["key"] = tagTagFvRsPathAttFvAEPg.Key.ValueString()
					}
					if !tagTagFvRsPathAttFvAEPg.Value.IsNull() && !tagTagFvRsPathAttFvAEPg.Value.IsUnknown() {
						tagTagFvRsPathAttFvAEPgChildMap.Attributes["value"] = tagTagFvRsPathAttFvAEPg.Value.ValueString()
					}
					FvRsPathAttFvAEPgChildren = append(FvRsPathAttFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsPathAttFvAEPgChildMap})
					tagTagIdentifier := TagTagIdentifier{}
					tagTagIdentifier.Key = tagTagFvRsPathAttFvAEPg.Key
					tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
				}
				for _, tagTagFvRsPathAttFvAEPg := range tagTagFvRsPathAttFvAEPgState {
					delete := true
					for _, tagTagIdentifier := range tagTagIdentifiers {
						if tagTagIdentifier.Key == tagTagFvRsPathAttFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagTagFvRsPathAttFvAEPgChildMapForDelete := NewAciObject()
						tagTagFvRsPathAttFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagTagFvRsPathAttFvAEPgChildMapForDelete.Attributes["key"] = tagTagFvRsPathAttFvAEPg.Key.ValueString()
						FvRsPathAttFvAEPgChildren = append(FvRsPathAttFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsPathAttFvAEPgChildMapForDelete})
					}
				}
			}
			childMap.Children = FvRsPathAttFvAEPgChildren
			childPayloads = append(childPayloads, map[string]interface{}{"fvRsPathAtt": childMap})
			fvRsPathAttIdentifier := FvRsPathAttIdentifier{}
			fvRsPathAttIdentifier.TDn = fvRsPathAttFvAEPg.TDn
			fvRsPathAttIdentifiers = append(fvRsPathAttIdentifiers, fvRsPathAttIdentifier)
		}
		for _, fvRsPathAtt := range fvRsPathAttFvAEPgState {
			delete := true
			for _, fvRsPathAttIdentifier := range fvRsPathAttIdentifiers {
				if fvRsPathAttIdentifier.TDn == fvRsPathAtt.TDn {
					delete = false
					break
				}
			}
			if delete {
				fvRsPathAttChildMapForDelete := NewAciObject()
				fvRsPathAttChildMapForDelete.Attributes["status"] = "deleted"
				fvRsPathAttChildMapForDelete.Attributes["tDn"] = fvRsPathAtt.TDn.ValueString()
				childPayloads = append(childPayloads, map[string]interface{}{"fvRsPathAtt": fvRsPathAttChildMapForDelete})
			}
		}
	} else {
		data.FvRsPathAtt = types.SetNull(data.FvRsPathAtt.ElementType(ctx))
	}

	return childPayloads
}

func getFvAEPgFvRsProtByChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *FvAEPgResourceModel, fvRsProtByFvAEPgPlan, fvRsProtByFvAEPgState []FvRsProtByFvAEPgResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.FvRsProtBy.IsNull() && !data.FvRsProtBy.IsUnknown() {
		fvRsProtByIdentifiers := []FvRsProtByIdentifier{}
		for _, fvRsProtByFvAEPg := range fvRsProtByFvAEPgPlan {
			FvRsProtByFvAEPgChildren := make([]map[string]interface{}, 0)
			childMap := NewAciObject()
			if !fvRsProtByFvAEPg.Annotation.IsNull() && !fvRsProtByFvAEPg.Annotation.IsUnknown() {
				childMap.Attributes["annotation"] = fvRsProtByFvAEPg.Annotation.ValueString()
			} else {
				childMap.Attributes["annotation"] = globalAnnotation
			}
			if !fvRsProtByFvAEPg.TnVzTabooName.IsNull() && !fvRsProtByFvAEPg.TnVzTabooName.IsUnknown() {
				childMap.Attributes["tnVzTabooName"] = fvRsProtByFvAEPg.TnVzTabooName.ValueString()
			}

			var tagAnnotationFvRsProtByFvAEPgPlan, tagAnnotationFvRsProtByFvAEPgState []TagAnnotationFvRsProtByFvAEPgResourceModel
			fvRsProtByFvAEPg.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsProtByFvAEPgPlan, false)
			for _, tagAnnotationFvRsProtByFvAEPgstate := range fvRsProtByFvAEPgState {
				tagAnnotationFvRsProtByFvAEPgstate.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsProtByFvAEPgState, false)
			}
			if !fvRsProtByFvAEPg.TagAnnotation.IsNull() && !fvRsProtByFvAEPg.TagAnnotation.IsUnknown() {
				tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
				for _, tagAnnotationFvRsProtByFvAEPg := range tagAnnotationFvRsProtByFvAEPgPlan {
					tagAnnotationFvRsProtByFvAEPgChildMap := NewAciObject()
					if !tagAnnotationFvRsProtByFvAEPg.Key.IsNull() && !tagAnnotationFvRsProtByFvAEPg.Key.IsUnknown() {
						tagAnnotationFvRsProtByFvAEPgChildMap.Attributes["key"] = tagAnnotationFvRsProtByFvAEPg.Key.ValueString()
					}
					if !tagAnnotationFvRsProtByFvAEPg.Value.IsNull() && !tagAnnotationFvRsProtByFvAEPg.Value.IsUnknown() {
						tagAnnotationFvRsProtByFvAEPgChildMap.Attributes["value"] = tagAnnotationFvRsProtByFvAEPg.Value.ValueString()
					}
					FvRsProtByFvAEPgChildren = append(FvRsProtByFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsProtByFvAEPgChildMap})
					tagAnnotationIdentifier := TagAnnotationIdentifier{}
					tagAnnotationIdentifier.Key = tagAnnotationFvRsProtByFvAEPg.Key
					tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
				}
				for _, tagAnnotationFvRsProtByFvAEPg := range tagAnnotationFvRsProtByFvAEPgState {
					delete := true
					for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
						if tagAnnotationIdentifier.Key == tagAnnotationFvRsProtByFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagAnnotationFvRsProtByFvAEPgChildMapForDelete := NewAciObject()
						tagAnnotationFvRsProtByFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagAnnotationFvRsProtByFvAEPgChildMapForDelete.Attributes["key"] = tagAnnotationFvRsProtByFvAEPg.Key.ValueString()
						FvRsProtByFvAEPgChildren = append(FvRsProtByFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsProtByFvAEPgChildMapForDelete})
					}
				}
			}

			var tagTagFvRsProtByFvAEPgPlan, tagTagFvRsProtByFvAEPgState []TagTagFvRsProtByFvAEPgResourceModel
			fvRsProtByFvAEPg.TagTag.ElementsAs(ctx, &tagTagFvRsProtByFvAEPgPlan, false)
			for _, tagTagFvRsProtByFvAEPgstate := range fvRsProtByFvAEPgState {
				tagTagFvRsProtByFvAEPgstate.TagTag.ElementsAs(ctx, &tagTagFvRsProtByFvAEPgState, false)
			}
			if !fvRsProtByFvAEPg.TagTag.IsNull() && !fvRsProtByFvAEPg.TagTag.IsUnknown() {
				tagTagIdentifiers := []TagTagIdentifier{}
				for _, tagTagFvRsProtByFvAEPg := range tagTagFvRsProtByFvAEPgPlan {
					tagTagFvRsProtByFvAEPgChildMap := NewAciObject()
					if !tagTagFvRsProtByFvAEPg.Key.IsNull() && !tagTagFvRsProtByFvAEPg.Key.IsUnknown() {
						tagTagFvRsProtByFvAEPgChildMap.Attributes["key"] = tagTagFvRsProtByFvAEPg.Key.ValueString()
					}
					if !tagTagFvRsProtByFvAEPg.Value.IsNull() && !tagTagFvRsProtByFvAEPg.Value.IsUnknown() {
						tagTagFvRsProtByFvAEPgChildMap.Attributes["value"] = tagTagFvRsProtByFvAEPg.Value.ValueString()
					}
					FvRsProtByFvAEPgChildren = append(FvRsProtByFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsProtByFvAEPgChildMap})
					tagTagIdentifier := TagTagIdentifier{}
					tagTagIdentifier.Key = tagTagFvRsProtByFvAEPg.Key
					tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
				}
				for _, tagTagFvRsProtByFvAEPg := range tagTagFvRsProtByFvAEPgState {
					delete := true
					for _, tagTagIdentifier := range tagTagIdentifiers {
						if tagTagIdentifier.Key == tagTagFvRsProtByFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagTagFvRsProtByFvAEPgChildMapForDelete := NewAciObject()
						tagTagFvRsProtByFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagTagFvRsProtByFvAEPgChildMapForDelete.Attributes["key"] = tagTagFvRsProtByFvAEPg.Key.ValueString()
						FvRsProtByFvAEPgChildren = append(FvRsProtByFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsProtByFvAEPgChildMapForDelete})
					}
				}
			}
			childMap.Children = FvRsProtByFvAEPgChildren
			childPayloads = append(childPayloads, map[string]interface{}{"fvRsProtBy": childMap})
			fvRsProtByIdentifier := FvRsProtByIdentifier{}
			fvRsProtByIdentifier.TnVzTabooName = fvRsProtByFvAEPg.TnVzTabooName
			fvRsProtByIdentifiers = append(fvRsProtByIdentifiers, fvRsProtByIdentifier)
		}
		for _, fvRsProtBy := range fvRsProtByFvAEPgState {
			delete := true
			for _, fvRsProtByIdentifier := range fvRsProtByIdentifiers {
				if fvRsProtByIdentifier.TnVzTabooName == fvRsProtBy.TnVzTabooName {
					delete = false
					break
				}
			}
			if delete {
				fvRsProtByChildMapForDelete := NewAciObject()
				fvRsProtByChildMapForDelete.Attributes["status"] = "deleted"
				fvRsProtByChildMapForDelete.Attributes["tnVzTabooName"] = fvRsProtBy.TnVzTabooName.ValueString()
				childPayloads = append(childPayloads, map[string]interface{}{"fvRsProtBy": fvRsProtByChildMapForDelete})
			}
		}
	} else {
		data.FvRsProtBy = types.SetNull(data.FvRsProtBy.ElementType(ctx))
	}

	return childPayloads
}

func getFvAEPgFvRsProvChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *FvAEPgResourceModel, fvRsProvFvAEPgPlan, fvRsProvFvAEPgState []FvRsProvFvAEPgResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.FvRsProv.IsNull() && !data.FvRsProv.IsUnknown() {
		fvRsProvIdentifiers := []FvRsProvIdentifier{}
		for _, fvRsProvFvAEPg := range fvRsProvFvAEPgPlan {
			FvRsProvFvAEPgChildren := make([]map[string]interface{}, 0)
			childMap := NewAciObject()
			if !fvRsProvFvAEPg.Annotation.IsNull() && !fvRsProvFvAEPg.Annotation.IsUnknown() {
				childMap.Attributes["annotation"] = fvRsProvFvAEPg.Annotation.ValueString()
			} else {
				childMap.Attributes["annotation"] = globalAnnotation
			}
			if !fvRsProvFvAEPg.MatchT.IsNull() && !fvRsProvFvAEPg.MatchT.IsUnknown() {
				childMap.Attributes["matchT"] = fvRsProvFvAEPg.MatchT.ValueString()
			}
			if !fvRsProvFvAEPg.Prio.IsNull() && !fvRsProvFvAEPg.Prio.IsUnknown() {
				childMap.Attributes["prio"] = fvRsProvFvAEPg.Prio.ValueString()
			}
			if !fvRsProvFvAEPg.TnVzBrCPName.IsNull() && !fvRsProvFvAEPg.TnVzBrCPName.IsUnknown() {
				childMap.Attributes["tnVzBrCPName"] = fvRsProvFvAEPg.TnVzBrCPName.ValueString()
			}

			var tagAnnotationFvRsProvFvAEPgPlan, tagAnnotationFvRsProvFvAEPgState []TagAnnotationFvRsProvFvAEPgResourceModel
			fvRsProvFvAEPg.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsProvFvAEPgPlan, false)
			for _, tagAnnotationFvRsProvFvAEPgstate := range fvRsProvFvAEPgState {
				tagAnnotationFvRsProvFvAEPgstate.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsProvFvAEPgState, false)
			}
			if !fvRsProvFvAEPg.TagAnnotation.IsNull() && !fvRsProvFvAEPg.TagAnnotation.IsUnknown() {
				tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
				for _, tagAnnotationFvRsProvFvAEPg := range tagAnnotationFvRsProvFvAEPgPlan {
					tagAnnotationFvRsProvFvAEPgChildMap := NewAciObject()
					if !tagAnnotationFvRsProvFvAEPg.Key.IsNull() && !tagAnnotationFvRsProvFvAEPg.Key.IsUnknown() {
						tagAnnotationFvRsProvFvAEPgChildMap.Attributes["key"] = tagAnnotationFvRsProvFvAEPg.Key.ValueString()
					}
					if !tagAnnotationFvRsProvFvAEPg.Value.IsNull() && !tagAnnotationFvRsProvFvAEPg.Value.IsUnknown() {
						tagAnnotationFvRsProvFvAEPgChildMap.Attributes["value"] = tagAnnotationFvRsProvFvAEPg.Value.ValueString()
					}
					FvRsProvFvAEPgChildren = append(FvRsProvFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsProvFvAEPgChildMap})
					tagAnnotationIdentifier := TagAnnotationIdentifier{}
					tagAnnotationIdentifier.Key = tagAnnotationFvRsProvFvAEPg.Key
					tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
				}
				for _, tagAnnotationFvRsProvFvAEPg := range tagAnnotationFvRsProvFvAEPgState {
					delete := true
					for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
						if tagAnnotationIdentifier.Key == tagAnnotationFvRsProvFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagAnnotationFvRsProvFvAEPgChildMapForDelete := NewAciObject()
						tagAnnotationFvRsProvFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagAnnotationFvRsProvFvAEPgChildMapForDelete.Attributes["key"] = tagAnnotationFvRsProvFvAEPg.Key.ValueString()
						FvRsProvFvAEPgChildren = append(FvRsProvFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsProvFvAEPgChildMapForDelete})
					}
				}
			}

			var tagTagFvRsProvFvAEPgPlan, tagTagFvRsProvFvAEPgState []TagTagFvRsProvFvAEPgResourceModel
			fvRsProvFvAEPg.TagTag.ElementsAs(ctx, &tagTagFvRsProvFvAEPgPlan, false)
			for _, tagTagFvRsProvFvAEPgstate := range fvRsProvFvAEPgState {
				tagTagFvRsProvFvAEPgstate.TagTag.ElementsAs(ctx, &tagTagFvRsProvFvAEPgState, false)
			}
			if !fvRsProvFvAEPg.TagTag.IsNull() && !fvRsProvFvAEPg.TagTag.IsUnknown() {
				tagTagIdentifiers := []TagTagIdentifier{}
				for _, tagTagFvRsProvFvAEPg := range tagTagFvRsProvFvAEPgPlan {
					tagTagFvRsProvFvAEPgChildMap := NewAciObject()
					if !tagTagFvRsProvFvAEPg.Key.IsNull() && !tagTagFvRsProvFvAEPg.Key.IsUnknown() {
						tagTagFvRsProvFvAEPgChildMap.Attributes["key"] = tagTagFvRsProvFvAEPg.Key.ValueString()
					}
					if !tagTagFvRsProvFvAEPg.Value.IsNull() && !tagTagFvRsProvFvAEPg.Value.IsUnknown() {
						tagTagFvRsProvFvAEPgChildMap.Attributes["value"] = tagTagFvRsProvFvAEPg.Value.ValueString()
					}
					FvRsProvFvAEPgChildren = append(FvRsProvFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsProvFvAEPgChildMap})
					tagTagIdentifier := TagTagIdentifier{}
					tagTagIdentifier.Key = tagTagFvRsProvFvAEPg.Key
					tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
				}
				for _, tagTagFvRsProvFvAEPg := range tagTagFvRsProvFvAEPgState {
					delete := true
					for _, tagTagIdentifier := range tagTagIdentifiers {
						if tagTagIdentifier.Key == tagTagFvRsProvFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagTagFvRsProvFvAEPgChildMapForDelete := NewAciObject()
						tagTagFvRsProvFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagTagFvRsProvFvAEPgChildMapForDelete.Attributes["key"] = tagTagFvRsProvFvAEPg.Key.ValueString()
						FvRsProvFvAEPgChildren = append(FvRsProvFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsProvFvAEPgChildMapForDelete})
					}
				}
			}
			childMap.Children = FvRsProvFvAEPgChildren
			childPayloads = append(childPayloads, map[string]interface{}{"fvRsProv": childMap})
			fvRsProvIdentifier := FvRsProvIdentifier{}
			fvRsProvIdentifier.TnVzBrCPName = fvRsProvFvAEPg.TnVzBrCPName
			fvRsProvIdentifiers = append(fvRsProvIdentifiers, fvRsProvIdentifier)
		}
		for _, fvRsProv := range fvRsProvFvAEPgState {
			delete := true
			for _, fvRsProvIdentifier := range fvRsProvIdentifiers {
				if fvRsProvIdentifier.TnVzBrCPName == fvRsProv.TnVzBrCPName {
					delete = false
					break
				}
			}
			if delete {
				fvRsProvChildMapForDelete := NewAciObject()
				fvRsProvChildMapForDelete.Attributes["status"] = "deleted"
				fvRsProvChildMapForDelete.Attributes["tnVzBrCPName"] = fvRsProv.TnVzBrCPName.ValueString()
				childPayloads = append(childPayloads, map[string]interface{}{"fvRsProv": fvRsProvChildMapForDelete})
			}
		}
	} else {
		data.FvRsProv = types.SetNull(data.FvRsProv.ElementType(ctx))
	}

	return childPayloads
}

func getFvAEPgFvRsSecInheritedChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *FvAEPgResourceModel, fvRsSecInheritedFvAEPgPlan, fvRsSecInheritedFvAEPgState []FvRsSecInheritedFvAEPgResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.FvRsSecInherited.IsNull() && !data.FvRsSecInherited.IsUnknown() {
		fvRsSecInheritedIdentifiers := []FvRsSecInheritedIdentifier{}
		for _, fvRsSecInheritedFvAEPg := range fvRsSecInheritedFvAEPgPlan {
			FvRsSecInheritedFvAEPgChildren := make([]map[string]interface{}, 0)
			childMap := NewAciObject()
			if !fvRsSecInheritedFvAEPg.Annotation.IsNull() && !fvRsSecInheritedFvAEPg.Annotation.IsUnknown() {
				childMap.Attributes["annotation"] = fvRsSecInheritedFvAEPg.Annotation.ValueString()
			} else {
				childMap.Attributes["annotation"] = globalAnnotation
			}
			if !fvRsSecInheritedFvAEPg.TDn.IsNull() && !fvRsSecInheritedFvAEPg.TDn.IsUnknown() {
				childMap.Attributes["tDn"] = fvRsSecInheritedFvAEPg.TDn.ValueString()
			}

			var tagAnnotationFvRsSecInheritedFvAEPgPlan, tagAnnotationFvRsSecInheritedFvAEPgState []TagAnnotationFvRsSecInheritedFvAEPgResourceModel
			fvRsSecInheritedFvAEPg.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsSecInheritedFvAEPgPlan, false)
			for _, tagAnnotationFvRsSecInheritedFvAEPgstate := range fvRsSecInheritedFvAEPgState {
				tagAnnotationFvRsSecInheritedFvAEPgstate.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsSecInheritedFvAEPgState, false)
			}
			if !fvRsSecInheritedFvAEPg.TagAnnotation.IsNull() && !fvRsSecInheritedFvAEPg.TagAnnotation.IsUnknown() {
				tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
				for _, tagAnnotationFvRsSecInheritedFvAEPg := range tagAnnotationFvRsSecInheritedFvAEPgPlan {
					tagAnnotationFvRsSecInheritedFvAEPgChildMap := NewAciObject()
					if !tagAnnotationFvRsSecInheritedFvAEPg.Key.IsNull() && !tagAnnotationFvRsSecInheritedFvAEPg.Key.IsUnknown() {
						tagAnnotationFvRsSecInheritedFvAEPgChildMap.Attributes["key"] = tagAnnotationFvRsSecInheritedFvAEPg.Key.ValueString()
					}
					if !tagAnnotationFvRsSecInheritedFvAEPg.Value.IsNull() && !tagAnnotationFvRsSecInheritedFvAEPg.Value.IsUnknown() {
						tagAnnotationFvRsSecInheritedFvAEPgChildMap.Attributes["value"] = tagAnnotationFvRsSecInheritedFvAEPg.Value.ValueString()
					}
					FvRsSecInheritedFvAEPgChildren = append(FvRsSecInheritedFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsSecInheritedFvAEPgChildMap})
					tagAnnotationIdentifier := TagAnnotationIdentifier{}
					tagAnnotationIdentifier.Key = tagAnnotationFvRsSecInheritedFvAEPg.Key
					tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
				}
				for _, tagAnnotationFvRsSecInheritedFvAEPg := range tagAnnotationFvRsSecInheritedFvAEPgState {
					delete := true
					for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
						if tagAnnotationIdentifier.Key == tagAnnotationFvRsSecInheritedFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagAnnotationFvRsSecInheritedFvAEPgChildMapForDelete := NewAciObject()
						tagAnnotationFvRsSecInheritedFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagAnnotationFvRsSecInheritedFvAEPgChildMapForDelete.Attributes["key"] = tagAnnotationFvRsSecInheritedFvAEPg.Key.ValueString()
						FvRsSecInheritedFvAEPgChildren = append(FvRsSecInheritedFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsSecInheritedFvAEPgChildMapForDelete})
					}
				}
			}

			var tagTagFvRsSecInheritedFvAEPgPlan, tagTagFvRsSecInheritedFvAEPgState []TagTagFvRsSecInheritedFvAEPgResourceModel
			fvRsSecInheritedFvAEPg.TagTag.ElementsAs(ctx, &tagTagFvRsSecInheritedFvAEPgPlan, false)
			for _, tagTagFvRsSecInheritedFvAEPgstate := range fvRsSecInheritedFvAEPgState {
				tagTagFvRsSecInheritedFvAEPgstate.TagTag.ElementsAs(ctx, &tagTagFvRsSecInheritedFvAEPgState, false)
			}
			if !fvRsSecInheritedFvAEPg.TagTag.IsNull() && !fvRsSecInheritedFvAEPg.TagTag.IsUnknown() {
				tagTagIdentifiers := []TagTagIdentifier{}
				for _, tagTagFvRsSecInheritedFvAEPg := range tagTagFvRsSecInheritedFvAEPgPlan {
					tagTagFvRsSecInheritedFvAEPgChildMap := NewAciObject()
					if !tagTagFvRsSecInheritedFvAEPg.Key.IsNull() && !tagTagFvRsSecInheritedFvAEPg.Key.IsUnknown() {
						tagTagFvRsSecInheritedFvAEPgChildMap.Attributes["key"] = tagTagFvRsSecInheritedFvAEPg.Key.ValueString()
					}
					if !tagTagFvRsSecInheritedFvAEPg.Value.IsNull() && !tagTagFvRsSecInheritedFvAEPg.Value.IsUnknown() {
						tagTagFvRsSecInheritedFvAEPgChildMap.Attributes["value"] = tagTagFvRsSecInheritedFvAEPg.Value.ValueString()
					}
					FvRsSecInheritedFvAEPgChildren = append(FvRsSecInheritedFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsSecInheritedFvAEPgChildMap})
					tagTagIdentifier := TagTagIdentifier{}
					tagTagIdentifier.Key = tagTagFvRsSecInheritedFvAEPg.Key
					tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
				}
				for _, tagTagFvRsSecInheritedFvAEPg := range tagTagFvRsSecInheritedFvAEPgState {
					delete := true
					for _, tagTagIdentifier := range tagTagIdentifiers {
						if tagTagIdentifier.Key == tagTagFvRsSecInheritedFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagTagFvRsSecInheritedFvAEPgChildMapForDelete := NewAciObject()
						tagTagFvRsSecInheritedFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagTagFvRsSecInheritedFvAEPgChildMapForDelete.Attributes["key"] = tagTagFvRsSecInheritedFvAEPg.Key.ValueString()
						FvRsSecInheritedFvAEPgChildren = append(FvRsSecInheritedFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsSecInheritedFvAEPgChildMapForDelete})
					}
				}
			}
			childMap.Children = FvRsSecInheritedFvAEPgChildren
			childPayloads = append(childPayloads, map[string]interface{}{"fvRsSecInherited": childMap})
			fvRsSecInheritedIdentifier := FvRsSecInheritedIdentifier{}
			fvRsSecInheritedIdentifier.TDn = fvRsSecInheritedFvAEPg.TDn
			fvRsSecInheritedIdentifiers = append(fvRsSecInheritedIdentifiers, fvRsSecInheritedIdentifier)
		}
		for _, fvRsSecInherited := range fvRsSecInheritedFvAEPgState {
			delete := true
			for _, fvRsSecInheritedIdentifier := range fvRsSecInheritedIdentifiers {
				if fvRsSecInheritedIdentifier.TDn == fvRsSecInherited.TDn {
					delete = false
					break
				}
			}
			if delete {
				fvRsSecInheritedChildMapForDelete := NewAciObject()
				fvRsSecInheritedChildMapForDelete.Attributes["status"] = "deleted"
				fvRsSecInheritedChildMapForDelete.Attributes["tDn"] = fvRsSecInherited.TDn.ValueString()
				childPayloads = append(childPayloads, map[string]interface{}{"fvRsSecInherited": fvRsSecInheritedChildMapForDelete})
			}
		}
	} else {
		data.FvRsSecInherited = types.SetNull(data.FvRsSecInherited.ElementType(ctx))
	}

	return childPayloads
}

func getFvAEPgFvRsTrustCtrlChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *FvAEPgResourceModel, fvRsTrustCtrlFvAEPgPlan, fvRsTrustCtrlFvAEPgState FvRsTrustCtrlFvAEPgResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.FvRsTrustCtrl.IsNull() && !data.FvRsTrustCtrl.IsUnknown() {
		FvRsTrustCtrlFvAEPgChildren := make([]map[string]interface{}, 0)
		childMap := NewAciObject()
		if !IsEmptySingleNestedAttribute(data.FvRsTrustCtrl.Attributes()) {
			if !fvRsTrustCtrlFvAEPgPlan.Annotation.IsUnknown() && !fvRsTrustCtrlFvAEPgPlan.Annotation.IsNull() {
				childMap.Attributes["annotation"] = fvRsTrustCtrlFvAEPgPlan.Annotation.ValueString()
			} else {
				childMap.Attributes["annotation"] = globalAnnotation
			}
			if !fvRsTrustCtrlFvAEPgPlan.TnFhsTrustCtrlPolName.IsUnknown() && !fvRsTrustCtrlFvAEPgPlan.TnFhsTrustCtrlPolName.IsNull() {
				childMap.Attributes["tnFhsTrustCtrlPolName"] = fvRsTrustCtrlFvAEPgPlan.TnFhsTrustCtrlPolName.ValueString()
			}

			var tagAnnotationFvRsTrustCtrlFvAEPgPlan, tagAnnotationFvRsTrustCtrlFvAEPgState []TagAnnotationFvRsTrustCtrlFvAEPgResourceModel
			fvRsTrustCtrlFvAEPgPlan.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsTrustCtrlFvAEPgPlan, false)
			if !fvRsTrustCtrlFvAEPgState.TagAnnotation.IsNull() {
				fvRsTrustCtrlFvAEPgState.TagAnnotation.ElementsAs(ctx, &tagAnnotationFvRsTrustCtrlFvAEPgState, false)
			}
			if !fvRsTrustCtrlFvAEPgPlan.TagAnnotation.IsNull() && !fvRsTrustCtrlFvAEPgPlan.TagAnnotation.IsUnknown() {
				tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
				for _, tagAnnotationFvRsTrustCtrlFvAEPg := range tagAnnotationFvRsTrustCtrlFvAEPgPlan {
					tagAnnotationFvRsTrustCtrlFvAEPgChildMap := NewAciObject()
					if !tagAnnotationFvRsTrustCtrlFvAEPg.Key.IsNull() && !tagAnnotationFvRsTrustCtrlFvAEPg.Key.IsUnknown() {
						tagAnnotationFvRsTrustCtrlFvAEPgChildMap.Attributes["key"] = tagAnnotationFvRsTrustCtrlFvAEPg.Key.ValueString()
					}
					if !tagAnnotationFvRsTrustCtrlFvAEPg.Value.IsNull() && !tagAnnotationFvRsTrustCtrlFvAEPg.Value.IsUnknown() {
						tagAnnotationFvRsTrustCtrlFvAEPgChildMap.Attributes["value"] = tagAnnotationFvRsTrustCtrlFvAEPg.Value.ValueString()
					}
					FvRsTrustCtrlFvAEPgChildren = append(FvRsTrustCtrlFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsTrustCtrlFvAEPgChildMap})
					tagAnnotationIdentifier := TagAnnotationIdentifier{}
					tagAnnotationIdentifier.Key = tagAnnotationFvRsTrustCtrlFvAEPg.Key
					tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
				}
				for _, tagAnnotationFvRsTrustCtrlFvAEPg := range tagAnnotationFvRsTrustCtrlFvAEPgState {
					delete := true
					for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
						if tagAnnotationIdentifier.Key == tagAnnotationFvRsTrustCtrlFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagAnnotationFvRsTrustCtrlFvAEPgChildMapForDelete := NewAciObject()
						tagAnnotationFvRsTrustCtrlFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagAnnotationFvRsTrustCtrlFvAEPgChildMapForDelete.Attributes["key"] = tagAnnotationFvRsTrustCtrlFvAEPg.Key.ValueString()
						FvRsTrustCtrlFvAEPgChildren = append(FvRsTrustCtrlFvAEPgChildren, map[string]interface{}{"tagAnnotation": tagAnnotationFvRsTrustCtrlFvAEPgChildMapForDelete})
					}
				}
			}

			var tagTagFvRsTrustCtrlFvAEPgPlan, tagTagFvRsTrustCtrlFvAEPgState []TagTagFvRsTrustCtrlFvAEPgResourceModel
			fvRsTrustCtrlFvAEPgPlan.TagTag.ElementsAs(ctx, &tagTagFvRsTrustCtrlFvAEPgPlan, false)
			if !fvRsTrustCtrlFvAEPgState.TagTag.IsNull() {
				fvRsTrustCtrlFvAEPgState.TagTag.ElementsAs(ctx, &tagTagFvRsTrustCtrlFvAEPgState, false)
			}
			if !fvRsTrustCtrlFvAEPgPlan.TagTag.IsNull() && !fvRsTrustCtrlFvAEPgPlan.TagTag.IsUnknown() {
				tagTagIdentifiers := []TagTagIdentifier{}
				for _, tagTagFvRsTrustCtrlFvAEPg := range tagTagFvRsTrustCtrlFvAEPgPlan {
					tagTagFvRsTrustCtrlFvAEPgChildMap := NewAciObject()
					if !tagTagFvRsTrustCtrlFvAEPg.Key.IsNull() && !tagTagFvRsTrustCtrlFvAEPg.Key.IsUnknown() {
						tagTagFvRsTrustCtrlFvAEPgChildMap.Attributes["key"] = tagTagFvRsTrustCtrlFvAEPg.Key.ValueString()
					}
					if !tagTagFvRsTrustCtrlFvAEPg.Value.IsNull() && !tagTagFvRsTrustCtrlFvAEPg.Value.IsUnknown() {
						tagTagFvRsTrustCtrlFvAEPgChildMap.Attributes["value"] = tagTagFvRsTrustCtrlFvAEPg.Value.ValueString()
					}
					FvRsTrustCtrlFvAEPgChildren = append(FvRsTrustCtrlFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsTrustCtrlFvAEPgChildMap})
					tagTagIdentifier := TagTagIdentifier{}
					tagTagIdentifier.Key = tagTagFvRsTrustCtrlFvAEPg.Key
					tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
				}
				for _, tagTagFvRsTrustCtrlFvAEPg := range tagTagFvRsTrustCtrlFvAEPgState {
					delete := true
					for _, tagTagIdentifier := range tagTagIdentifiers {
						if tagTagIdentifier.Key == tagTagFvRsTrustCtrlFvAEPg.Key {
							delete = false
							break
						}
					}
					if delete {
						tagTagFvRsTrustCtrlFvAEPgChildMapForDelete := NewAciObject()
						tagTagFvRsTrustCtrlFvAEPgChildMapForDelete.Attributes["status"] = "deleted"
						tagTagFvRsTrustCtrlFvAEPgChildMapForDelete.Attributes["key"] = tagTagFvRsTrustCtrlFvAEPg.Key.ValueString()
						FvRsTrustCtrlFvAEPgChildren = append(FvRsTrustCtrlFvAEPgChildren, map[string]interface{}{"tagTag": tagTagFvRsTrustCtrlFvAEPgChildMapForDelete})
					}
				}
			}
			childMap.Children = FvRsTrustCtrlFvAEPgChildren
		} else {
			childMap.Attributes["status"] = "deleted"
		}
		childPayloads = append(childPayloads, map[string]interface{}{"fvRsTrustCtrl": childMap})
	} else {
		FvRsTrustCtrlObject, _ := types.ObjectValueFrom(ctx, FvRsTrustCtrlFvAEPgType, getEmptyFvRsTrustCtrlFvAEPgResourceModel())
		data.FvRsTrustCtrl = FvRsTrustCtrlObject
	}

	return childPayloads
}

func getFvAEPgTagAnnotationChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *FvAEPgResourceModel, tagAnnotationFvAEPgPlan, tagAnnotationFvAEPgState []TagAnnotationFvAEPgResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.TagAnnotation.IsNull() && !data.TagAnnotation.IsUnknown() {
		tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
		for _, tagAnnotationFvAEPg := range tagAnnotationFvAEPgPlan {
			childMap := NewAciObject()
			if !tagAnnotationFvAEPg.Key.IsNull() && !tagAnnotationFvAEPg.Key.IsUnknown() {
				childMap.Attributes["key"] = tagAnnotationFvAEPg.Key.ValueString()
			}
			if !tagAnnotationFvAEPg.Value.IsNull() && !tagAnnotationFvAEPg.Value.IsUnknown() {
				childMap.Attributes["value"] = tagAnnotationFvAEPg.Value.ValueString()
			}
			childPayloads = append(childPayloads, map[string]interface{}{"tagAnnotation": childMap})
			tagAnnotationIdentifier := TagAnnotationIdentifier{}
			tagAnnotationIdentifier.Key = tagAnnotationFvAEPg.Key
			tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
		}
		for _, tagAnnotation := range tagAnnotationFvAEPgState {
			delete := true
			for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
				if tagAnnotationIdentifier.Key == tagAnnotation.Key {
					delete = false
					break
				}
			}
			if delete {
				tagAnnotationChildMapForDelete := NewAciObject()
				tagAnnotationChildMapForDelete.Attributes["status"] = "deleted"
				tagAnnotationChildMapForDelete.Attributes["key"] = tagAnnotation.Key.ValueString()
				childPayloads = append(childPayloads, map[string]interface{}{"tagAnnotation": tagAnnotationChildMapForDelete})
			}
		}
	} else {
		data.TagAnnotation = types.SetNull(data.TagAnnotation.ElementType(ctx))
	}

	return childPayloads
}

func getFvAEPgTagTagChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *FvAEPgResourceModel, tagTagFvAEPgPlan, tagTagFvAEPgState []TagTagFvAEPgResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.TagTag.IsNull() && !data.TagTag.IsUnknown() {
		tagTagIdentifiers := []TagTagIdentifier{}
		for _, tagTagFvAEPg := range tagTagFvAEPgPlan {
			childMap := NewAciObject()
			if !tagTagFvAEPg.Key.IsNull() && !tagTagFvAEPg.Key.IsUnknown() {
				childMap.Attributes["key"] = tagTagFvAEPg.Key.ValueString()
			}
			if !tagTagFvAEPg.Value.IsNull() && !tagTagFvAEPg.Value.IsUnknown() {
				childMap.Attributes["value"] = tagTagFvAEPg.Value.ValueString()
			}
			childPayloads = append(childPayloads, map[string]interface{}{"tagTag": childMap})
			tagTagIdentifier := TagTagIdentifier{}
			tagTagIdentifier.Key = tagTagFvAEPg.Key
			tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
		}
		for _, tagTag := range tagTagFvAEPgState {
			delete := true
			for _, tagTagIdentifier := range tagTagIdentifiers {
				if tagTagIdentifier.Key == tagTag.Key {
					delete = false
					break
				}
			}
			if delete {
				tagTagChildMapForDelete := NewAciObject()
				tagTagChildMapForDelete.Attributes["status"] = "deleted"
				tagTagChildMapForDelete.Attributes["key"] = tagTag.Key.ValueString()
				childPayloads = append(childPayloads, map[string]interface{}{"tagTag": tagTagChildMapForDelete})
			}
		}
	} else {
		data.TagTag = types.SetNull(data.TagTag.ElementType(ctx))
	}

	return childPayloads
}

func getFvAEPgCreateJsonPayload(ctx context.Context, diags *diag.Diagnostics, createType bool, data *FvAEPgResourceModel, fvCrtrnPlan, fvCrtrnState FvCrtrnFvAEPgResourceModel, fvRsAEPgMonPolPlan, fvRsAEPgMonPolState FvRsAEPgMonPolFvAEPgResourceModel, fvRsBdPlan, fvRsBdState FvRsBdFvAEPgResourceModel, fvRsConsPlan, fvRsConsState []FvRsConsFvAEPgResourceModel, fvRsConsIfPlan, fvRsConsIfState []FvRsConsIfFvAEPgResourceModel, fvRsCustQosPolPlan, fvRsCustQosPolState FvRsCustQosPolFvAEPgResourceModel, fvRsDomAttPlan, fvRsDomAttState []FvRsDomAttFvAEPgResourceModel, fvRsDppPolPlan, fvRsDppPolState FvRsDppPolFvAEPgResourceModel, fvRsFcPathAttPlan, fvRsFcPathAttState []FvRsFcPathAttFvAEPgResourceModel, fvRsIntraEpgPlan, fvRsIntraEpgState []FvRsIntraEpgFvAEPgResourceModel, fvRsNodeAttPlan, fvRsNodeAttState []FvRsNodeAttFvAEPgResourceModel, fvRsPathAttPlan, fvRsPathAttState []FvRsPathAttFvAEPgResourceModel, fvRsProtByPlan, fvRsProtByState []FvRsProtByFvAEPgResourceModel, fvRsProvPlan, fvRsProvState []FvRsProvFvAEPgResourceModel, fvRsSecInheritedPlan, fvRsSecInheritedState []FvRsSecInheritedFvAEPgResourceModel, fvRsTrustCtrlPlan, fvRsTrustCtrlState FvRsTrustCtrlFvAEPgResourceModel, tagAnnotationPlan, tagAnnotationState []TagAnnotationFvAEPgResourceModel, tagTagPlan, tagTagState []TagTagFvAEPgResourceModel) *container.Container {
	payloadMap := map[string]interface{}{}
	payloadMap["attributes"] = map[string]string{}

	if createType && !globalAllowExistingOnCreate {
		payloadMap["attributes"].(map[string]string)["status"] = "created"
	}
	childPayloads := []map[string]interface{}{}

	FvCrtrnchildPayloads := getFvAEPgFvCrtrnChildPayloads(ctx, diags, data, fvCrtrnPlan, fvCrtrnState)
	if FvCrtrnchildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, FvCrtrnchildPayloads...)

	FvRsAEPgMonPolchildPayloads := getFvAEPgFvRsAEPgMonPolChildPayloads(ctx, diags, data, fvRsAEPgMonPolPlan, fvRsAEPgMonPolState)
	if FvRsAEPgMonPolchildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, FvRsAEPgMonPolchildPayloads...)

	FvRsBdchildPayloads := getFvAEPgFvRsBdChildPayloads(ctx, diags, data, fvRsBdPlan, fvRsBdState)
	if FvRsBdchildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, FvRsBdchildPayloads...)

	FvRsConschildPayloads := getFvAEPgFvRsConsChildPayloads(ctx, diags, data, fvRsConsPlan, fvRsConsState)
	if FvRsConschildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, FvRsConschildPayloads...)

	FvRsConsIfchildPayloads := getFvAEPgFvRsConsIfChildPayloads(ctx, diags, data, fvRsConsIfPlan, fvRsConsIfState)
	if FvRsConsIfchildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, FvRsConsIfchildPayloads...)

	FvRsCustQosPolchildPayloads := getFvAEPgFvRsCustQosPolChildPayloads(ctx, diags, data, fvRsCustQosPolPlan, fvRsCustQosPolState)
	if FvRsCustQosPolchildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, FvRsCustQosPolchildPayloads...)

	FvRsDomAttchildPayloads := getFvAEPgFvRsDomAttChildPayloads(ctx, diags, data, fvRsDomAttPlan, fvRsDomAttState)
	if FvRsDomAttchildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, FvRsDomAttchildPayloads...)

	FvRsDppPolchildPayloads := getFvAEPgFvRsDppPolChildPayloads(ctx, diags, data, fvRsDppPolPlan, fvRsDppPolState)
	if FvRsDppPolchildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, FvRsDppPolchildPayloads...)

	FvRsFcPathAttchildPayloads := getFvAEPgFvRsFcPathAttChildPayloads(ctx, diags, data, fvRsFcPathAttPlan, fvRsFcPathAttState)
	if FvRsFcPathAttchildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, FvRsFcPathAttchildPayloads...)

	FvRsIntraEpgchildPayloads := getFvAEPgFvRsIntraEpgChildPayloads(ctx, diags, data, fvRsIntraEpgPlan, fvRsIntraEpgState)
	if FvRsIntraEpgchildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, FvRsIntraEpgchildPayloads...)

	FvRsNodeAttchildPayloads := getFvAEPgFvRsNodeAttChildPayloads(ctx, diags, data, fvRsNodeAttPlan, fvRsNodeAttState)
	if FvRsNodeAttchildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, FvRsNodeAttchildPayloads...)

	FvRsPathAttchildPayloads := getFvAEPgFvRsPathAttChildPayloads(ctx, diags, data, fvRsPathAttPlan, fvRsPathAttState)
	if FvRsPathAttchildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, FvRsPathAttchildPayloads...)

	FvRsProtBychildPayloads := getFvAEPgFvRsProtByChildPayloads(ctx, diags, data, fvRsProtByPlan, fvRsProtByState)
	if FvRsProtBychildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, FvRsProtBychildPayloads...)

	FvRsProvchildPayloads := getFvAEPgFvRsProvChildPayloads(ctx, diags, data, fvRsProvPlan, fvRsProvState)
	if FvRsProvchildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, FvRsProvchildPayloads...)

	FvRsSecInheritedchildPayloads := getFvAEPgFvRsSecInheritedChildPayloads(ctx, diags, data, fvRsSecInheritedPlan, fvRsSecInheritedState)
	if FvRsSecInheritedchildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, FvRsSecInheritedchildPayloads...)

	FvRsTrustCtrlchildPayloads := getFvAEPgFvRsTrustCtrlChildPayloads(ctx, diags, data, fvRsTrustCtrlPlan, fvRsTrustCtrlState)
	if FvRsTrustCtrlchildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, FvRsTrustCtrlchildPayloads...)

	TagAnnotationchildPayloads := getFvAEPgTagAnnotationChildPayloads(ctx, diags, data, tagAnnotationPlan, tagAnnotationState)
	if TagAnnotationchildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, TagAnnotationchildPayloads...)

	TagTagchildPayloads := getFvAEPgTagTagChildPayloads(ctx, diags, data, tagTagPlan, tagTagState)
	if TagTagchildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, TagTagchildPayloads...)

	payloadMap["children"] = childPayloads
	if !data.Annotation.IsNull() && !data.Annotation.IsUnknown() {
		payloadMap["attributes"].(map[string]string)["annotation"] = data.Annotation.ValueString()
	}
	if !data.Descr.IsNull() && !data.Descr.IsUnknown() {
		payloadMap["attributes"].(map[string]string)["descr"] = data.Descr.ValueString()
	}
	if !data.ExceptionTag.IsNull() && !data.ExceptionTag.IsUnknown() {
		payloadMap["attributes"].(map[string]string)["exceptionTag"] = data.ExceptionTag.ValueString()
	}
	if !data.FloodOnEncap.IsNull() && !data.FloodOnEncap.IsUnknown() {
		payloadMap["attributes"].(map[string]string)["floodOnEncap"] = data.FloodOnEncap.ValueString()
	}
	if !data.FwdCtrl.IsNull() && !data.FwdCtrl.IsUnknown() {
		payloadMap["attributes"].(map[string]string)["fwdCtrl"] = data.FwdCtrl.ValueString()
	}
	if !data.HasMcastSource.IsNull() && !data.HasMcastSource.IsUnknown() {
		payloadMap["attributes"].(map[string]string)["hasMcastSource"] = data.HasMcastSource.ValueString()
	}
	if !data.IsAttrBasedEPg.IsNull() && !data.IsAttrBasedEPg.IsUnknown() {
		payloadMap["attributes"].(map[string]string)["isAttrBasedEPg"] = data.IsAttrBasedEPg.ValueString()
	}
	if !data.MatchT.IsNull() && !data.MatchT.IsUnknown() {
		payloadMap["attributes"].(map[string]string)["matchT"] = data.MatchT.ValueString()
	}
	if !data.Name.IsNull() && !data.Name.IsUnknown() {
		payloadMap["attributes"].(map[string]string)["name"] = data.Name.ValueString()
	}
	if !data.NameAlias.IsNull() && !data.NameAlias.IsUnknown() {
		payloadMap["attributes"].(map[string]string)["nameAlias"] = data.NameAlias.ValueString()
	}
	if !data.PcEnfPref.IsNull() && !data.PcEnfPref.IsUnknown() {
		payloadMap["attributes"].(map[string]string)["pcEnfPref"] = data.PcEnfPref.ValueString()
	}
	if !data.PrefGrMemb.IsNull() && !data.PrefGrMemb.IsUnknown() {
		payloadMap["attributes"].(map[string]string)["prefGrMemb"] = data.PrefGrMemb.ValueString()
	}
	if !data.Prio.IsNull() && !data.Prio.IsUnknown() {
		payloadMap["attributes"].(map[string]string)["prio"] = data.Prio.ValueString()
	}
	if !data.Shutdown.IsNull() && !data.Shutdown.IsUnknown() {
		payloadMap["attributes"].(map[string]string)["shutdown"] = data.Shutdown.ValueString()
	}
	payload, err := json.Marshal(map[string]interface{}{"fvAEPg": payloadMap})
	if err != nil {
		diags.AddError(
			"Marshalling of json payload failed",
			fmt.Sprintf("Err: %s. Please report this issue to the provider developers.", err),
		)
		return nil
	}

	jsonPayload, err := container.ParseJSON(payload)

	if err != nil {
		diags.AddError(
			"Construction of json payload failed",
			fmt.Sprintf("Err: %s. Please report this issue to the provider developers.", err),
		)
		return nil
	}
	return jsonPayload
}
