// 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"
	"strings"

	"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 = &CommPolResource{}
var _ resource.ResourceWithImportState = &CommPolResource{}

func NewCommPolResource() resource.Resource {
	return &CommPolResource{}
}

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

// CommPolResourceModel describes the resource data model.
type CommPolResourceModel struct {
	Id                            types.String `tfsdk:"id"`
	Annotation                    types.String `tfsdk:"annotation"`
	Descr                         types.String `tfsdk:"description"`
	Name                          types.String `tfsdk:"name"`
	NameAlias                     types.String `tfsdk:"name_alias"`
	OwnerKey                      types.String `tfsdk:"owner_key"`
	OwnerTag                      types.String `tfsdk:"owner_tag"`
	StrictSecurityOnApicOOBSubnet types.String `tfsdk:"strict_security_on_apic_oob_subnet"`
	CommHttp                      types.Object `tfsdk:"http_service"`
	CommHttps                     types.Object `tfsdk:"http_ssl_configuration"`
	CommShellinabox               types.Object `tfsdk:"ssh_access_via_web"`
	CommSsh                       types.Object `tfsdk:"ssh_service"`
	CommTelnet                    types.Object `tfsdk:"telnet_service"`
	TagAnnotation                 types.Set    `tfsdk:"annotations"`
	TagTag                        types.Set    `tfsdk:"tags"`
}

func getEmptyCommPolResourceModel() *CommPolResourceModel {
	return &CommPolResourceModel{
		Id:                            basetypes.NewStringNull(),
		Annotation:                    basetypes.NewStringNull(),
		Descr:                         basetypes.NewStringNull(),
		Name:                          basetypes.NewStringNull(),
		NameAlias:                     basetypes.NewStringNull(),
		OwnerKey:                      basetypes.NewStringNull(),
		OwnerTag:                      basetypes.NewStringNull(),
		StrictSecurityOnApicOOBSubnet: basetypes.NewStringNull(),
		CommHttp: types.ObjectNull(map[string]attr.Type{
			"allow_credentials":        types.StringType,
			"allow_origins":            types.StringType,
			"admin_state":              types.StringType,
			"annotation":               types.StringType,
			"cli_only_mode":            types.StringType,
			"description":              types.StringType,
			"global_throttle_rate":     types.StringType,
			"global_throttle_state":    types.StringType,
			"global_throttle_unit":     types.StringType,
			"max_request_status_count": types.StringType,
			"name":                     types.StringType,
			"name_alias":               types.StringType,
			"node_exporter":            types.StringType,
			"port":                     types.StringType,
			"redirect_state":           types.StringType,
			"server_header":            types.StringType,
			"login_throttle_rate":      types.StringType,
			"login_throttle_state":     types.StringType,
			"visore_access":            types.StringType,
			"annotations":              types.SetType{ElemType: TagAnnotationCommHttpCommPolType},
			"tags":                     types.SetType{ElemType: TagTagCommHttpCommPolType},
		}),
		CommHttps: types.ObjectNull(map[string]attr.Type{
			"allow_credentials": types.StringType,
			"allow_origins":     types.StringType,
			"admin_state":       types.StringType,
			"annotation":        types.StringType,
			"cli_only_mode":     types.StringType,
			"client_certificate_authentication_state": types.StringType,
			"description":              types.StringType,
			"dh_parameter":             types.StringType,
			"global_throttle_rate":     types.StringType,
			"global_throttle_state":    types.StringType,
			"global_throttle_unit":     types.StringType,
			"max_request_status_count": types.StringType,
			"name":                     types.StringType,
			"name_alias":               types.StringType,
			"node_exporter":            types.StringType,
			"port":                     types.StringType,
			"referer":                  types.StringType,
			"server_header":            types.StringType,
			"ssl_protocols":            types.SetType{ElemType: types.StringType},
			"login_throttle_rate":      types.StringType,
			"login_throttle_state":     types.StringType,
			"visore_access":            types.StringType,
			"certificate_authority":    types.ObjectType{AttrTypes: CommRsClientCertCACommHttpsCommPolType},
			"key_ring":                 types.ObjectType{AttrTypes: CommRsKeyRingCommHttpsCommPolType},
			"annotations":              types.SetType{ElemType: TagAnnotationCommHttpsCommPolType},
			"tags":                     types.SetType{ElemType: TagTagCommHttpsCommPolType},
		}),
		CommShellinabox: types.ObjectNull(map[string]attr.Type{
			"admin_state": types.StringType,
			"annotation":  types.StringType,
			"description": types.StringType,
			"name":        types.StringType,
			"name_alias":  types.StringType,
			"annotations": types.SetType{ElemType: TagAnnotationCommShellinaboxCommPolType},
			"tags":        types.SetType{ElemType: TagTagCommShellinaboxCommPolType},
		}),
		CommSsh: types.ObjectNull(map[string]attr.Type{
			"admin_state":                   types.StringType,
			"annotation":                    types.StringType,
			"description":                   types.StringType,
			"host_key_algorithms":           types.SetType{ElemType: types.StringType},
			"kex_algorithms":                types.SetType{ElemType: types.StringType},
			"name":                          types.StringType,
			"name_alias":                    types.StringType,
			"password_authentication_state": types.StringType,
			"port":                          types.StringType,
			"ssh_ciphers":                   types.SetType{ElemType: types.StringType},
			"ssh_macs":                      types.SetType{ElemType: types.StringType},
			"annotations":                   types.SetType{ElemType: TagAnnotationCommSshCommPolType},
			"tags":                          types.SetType{ElemType: TagTagCommSshCommPolType},
		}),
		CommTelnet: types.ObjectNull(map[string]attr.Type{
			"admin_state": types.StringType,
			"annotation":  types.StringType,
			"description": types.StringType,
			"name":        types.StringType,
			"name_alias":  types.StringType,
			"port":        types.StringType,
			"annotations": types.SetType{ElemType: TagAnnotationCommTelnetCommPolType},
			"tags":        types.SetType{ElemType: TagTagCommTelnetCommPolType},
		}),
		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,
			},
		}),
	}
}

// CommHttpCommPolResourceModel describes the resource data model for the children without relation ships.
type CommHttpCommPolResourceModel struct {
	AccessControlAllowCredential types.String `tfsdk:"allow_credentials"`
	AccessControlAllowOrigins    types.String `tfsdk:"allow_origins"`
	AdminSt                      types.String `tfsdk:"admin_state"`
	Annotation                   types.String `tfsdk:"annotation"`
	CliOnlyMode                  types.String `tfsdk:"cli_only_mode"`
	Descr                        types.String `tfsdk:"description"`
	GlobalThrottleRate           types.String `tfsdk:"global_throttle_rate"`
	GlobalThrottleSt             types.String `tfsdk:"global_throttle_state"`
	GlobalThrottleUnit           types.String `tfsdk:"global_throttle_unit"`
	MaxRequestStatusCount        types.String `tfsdk:"max_request_status_count"`
	Name                         types.String `tfsdk:"name"`
	NameAlias                    types.String `tfsdk:"name_alias"`
	NodeExporter                 types.String `tfsdk:"node_exporter"`
	Port                         types.String `tfsdk:"port"`
	RedirectSt                   types.String `tfsdk:"redirect_state"`
	ServerHeader                 types.String `tfsdk:"server_header"`
	ThrottleRate                 types.String `tfsdk:"login_throttle_rate"`
	ThrottleSt                   types.String `tfsdk:"login_throttle_state"`
	VisoreAccess                 types.String `tfsdk:"visore_access"`
	TagAnnotation                types.Set    `tfsdk:"annotations"`
	TagTag                       types.Set    `tfsdk:"tags"`
}

func getEmptyCommHttpCommPolResourceModel() CommHttpCommPolResourceModel {
	return CommHttpCommPolResourceModel{
		AccessControlAllowCredential: basetypes.NewStringNull(),
		AccessControlAllowOrigins:    basetypes.NewStringNull(),
		AdminSt:                      basetypes.NewStringNull(),
		Annotation:                   basetypes.NewStringNull(),
		CliOnlyMode:                  basetypes.NewStringNull(),
		Descr:                        basetypes.NewStringNull(),
		GlobalThrottleRate:           basetypes.NewStringNull(),
		GlobalThrottleSt:             basetypes.NewStringNull(),
		GlobalThrottleUnit:           basetypes.NewStringNull(),
		MaxRequestStatusCount:        basetypes.NewStringNull(),
		Name:                         basetypes.NewStringNull(),
		NameAlias:                    basetypes.NewStringNull(),
		NodeExporter:                 basetypes.NewStringNull(),
		Port:                         basetypes.NewStringNull(),
		RedirectSt:                   basetypes.NewStringNull(),
		ServerHeader:                 basetypes.NewStringNull(),
		ThrottleRate:                 basetypes.NewStringNull(),
		ThrottleSt:                   basetypes.NewStringNull(),
		VisoreAccess:                 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 CommHttpCommPolType = map[string]attr.Type{
	"allow_credentials":        types.StringType,
	"allow_origins":            types.StringType,
	"admin_state":              types.StringType,
	"annotation":               types.StringType,
	"cli_only_mode":            types.StringType,
	"description":              types.StringType,
	"global_throttle_rate":     types.StringType,
	"global_throttle_state":    types.StringType,
	"global_throttle_unit":     types.StringType,
	"max_request_status_count": types.StringType,
	"name":                     types.StringType,
	"name_alias":               types.StringType,
	"node_exporter":            types.StringType,
	"port":                     types.StringType,
	"redirect_state":           types.StringType,
	"server_header":            types.StringType,
	"login_throttle_rate":      types.StringType,
	"login_throttle_state":     types.StringType,
	"visore_access":            types.StringType,
	"annotations":              types.SetType{ElemType: TagAnnotationCommHttpCommPolType},
	"tags":                     types.SetType{ElemType: TagTagCommHttpCommPolType},
}

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

func getEmptyTagAnnotationCommHttpCommPolResourceModel() TagAnnotationCommHttpCommPolResourceModel {
	return TagAnnotationCommHttpCommPolResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

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

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

func getEmptyTagTagCommHttpCommPolResourceModel() TagTagCommHttpCommPolResourceModel {
	return TagTagCommHttpCommPolResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

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

// CommHttpsCommPolResourceModel describes the resource data model for the children without relation ships.
type CommHttpsCommPolResourceModel struct {
	AccessControlAllowCredential types.String `tfsdk:"allow_credentials"`
	AccessControlAllowOrigins    types.String `tfsdk:"allow_origins"`
	AdminSt                      types.String `tfsdk:"admin_state"`
	Annotation                   types.String `tfsdk:"annotation"`
	CliOnlyMode                  types.String `tfsdk:"cli_only_mode"`
	ClientCertAuthState          types.String `tfsdk:"client_certificate_authentication_state"`
	Descr                        types.String `tfsdk:"description"`
	DhParam                      types.String `tfsdk:"dh_parameter"`
	GlobalThrottleRate           types.String `tfsdk:"global_throttle_rate"`
	GlobalThrottleSt             types.String `tfsdk:"global_throttle_state"`
	GlobalThrottleUnit           types.String `tfsdk:"global_throttle_unit"`
	MaxRequestStatusCount        types.String `tfsdk:"max_request_status_count"`
	Name                         types.String `tfsdk:"name"`
	NameAlias                    types.String `tfsdk:"name_alias"`
	NodeExporter                 types.String `tfsdk:"node_exporter"`
	Port                         types.String `tfsdk:"port"`
	Referer                      types.String `tfsdk:"referer"`
	ServerHeader                 types.String `tfsdk:"server_header"`
	SslProtocols                 types.Set    `tfsdk:"ssl_protocols"`
	ThrottleRate                 types.String `tfsdk:"login_throttle_rate"`
	ThrottleSt                   types.String `tfsdk:"login_throttle_state"`
	VisoreAccess                 types.String `tfsdk:"visore_access"`
	CommRsClientCertCA           types.Object `tfsdk:"certificate_authority"`
	CommRsKeyRing                types.Object `tfsdk:"key_ring"`
	TagAnnotation                types.Set    `tfsdk:"annotations"`
	TagTag                       types.Set    `tfsdk:"tags"`
}

func getEmptyCommHttpsCommPolResourceModel() CommHttpsCommPolResourceModel {
	return CommHttpsCommPolResourceModel{
		AccessControlAllowCredential: basetypes.NewStringNull(),
		AccessControlAllowOrigins:    basetypes.NewStringNull(),
		AdminSt:                      basetypes.NewStringNull(),
		Annotation:                   basetypes.NewStringNull(),
		CliOnlyMode:                  basetypes.NewStringNull(),
		ClientCertAuthState:          basetypes.NewStringNull(),
		Descr:                        basetypes.NewStringNull(),
		DhParam:                      basetypes.NewStringNull(),
		GlobalThrottleRate:           basetypes.NewStringNull(),
		GlobalThrottleSt:             basetypes.NewStringNull(),
		GlobalThrottleUnit:           basetypes.NewStringNull(),
		MaxRequestStatusCount:        basetypes.NewStringNull(),
		Name:                         basetypes.NewStringNull(),
		NameAlias:                    basetypes.NewStringNull(),
		NodeExporter:                 basetypes.NewStringNull(),
		Port:                         basetypes.NewStringNull(),
		Referer:                      basetypes.NewStringNull(),
		ServerHeader:                 basetypes.NewStringNull(),
		SslProtocols:                 types.SetNull(types.StringType),
		ThrottleRate:                 basetypes.NewStringNull(),
		ThrottleSt:                   basetypes.NewStringNull(),
		VisoreAccess:                 basetypes.NewStringNull(),
		CommRsClientCertCA: types.ObjectNull(map[string]attr.Type{
			"annotation":  types.StringType,
			"target_dn":   types.StringType,
			"annotations": types.SetType{ElemType: TagAnnotationCommRsClientCertCACommHttpsCommPolType},
			"tags":        types.SetType{ElemType: TagTagCommRsClientCertCACommHttpsCommPolType},
		}),
		CommRsKeyRing: types.ObjectNull(map[string]attr.Type{
			"annotation":    types.StringType,
			"key_ring_name": types.StringType,
			"annotations":   types.SetType{ElemType: TagAnnotationCommRsKeyRingCommHttpsCommPolType},
			"tags":          types.SetType{ElemType: TagTagCommRsKeyRingCommHttpsCommPolType},
		}),
		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 CommHttpsCommPolType = map[string]attr.Type{
	"allow_credentials": types.StringType,
	"allow_origins":     types.StringType,
	"admin_state":       types.StringType,
	"annotation":        types.StringType,
	"cli_only_mode":     types.StringType,
	"client_certificate_authentication_state": types.StringType,
	"description":              types.StringType,
	"dh_parameter":             types.StringType,
	"global_throttle_rate":     types.StringType,
	"global_throttle_state":    types.StringType,
	"global_throttle_unit":     types.StringType,
	"max_request_status_count": types.StringType,
	"name":                     types.StringType,
	"name_alias":               types.StringType,
	"node_exporter":            types.StringType,
	"port":                     types.StringType,
	"referer":                  types.StringType,
	"server_header":            types.StringType,
	"ssl_protocols":            types.SetType{ElemType: types.StringType},
	"login_throttle_rate":      types.StringType,
	"login_throttle_state":     types.StringType,
	"visore_access":            types.StringType,
	"certificate_authority":    types.ObjectType{AttrTypes: CommRsClientCertCACommHttpsCommPolType},
	"key_ring":                 types.ObjectType{AttrTypes: CommRsKeyRingCommHttpsCommPolType},
	"annotations":              types.SetType{ElemType: TagAnnotationCommHttpsCommPolType},
	"tags":                     types.SetType{ElemType: TagTagCommHttpsCommPolType},
}

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

func getEmptyCommRsClientCertCACommHttpsCommPolResourceModel() CommRsClientCertCACommHttpsCommPolResourceModel {
	return CommRsClientCertCACommHttpsCommPolResourceModel{
		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 CommRsClientCertCACommHttpsCommPolType = map[string]attr.Type{
	"annotation":  types.StringType,
	"target_dn":   types.StringType,
	"annotations": types.SetType{ElemType: TagAnnotationCommRsClientCertCACommHttpsCommPolType},
	"tags":        types.SetType{ElemType: TagTagCommRsClientCertCACommHttpsCommPolType},
}

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

func getEmptyTagAnnotationCommRsClientCertCACommHttpsCommPolResourceModel() TagAnnotationCommRsClientCertCACommHttpsCommPolResourceModel {
	return TagAnnotationCommRsClientCertCACommHttpsCommPolResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

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

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

func getEmptyTagTagCommRsClientCertCACommHttpsCommPolResourceModel() TagTagCommRsClientCertCACommHttpsCommPolResourceModel {
	return TagTagCommRsClientCertCACommHttpsCommPolResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

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

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

func getEmptyCommRsKeyRingCommHttpsCommPolResourceModel() CommRsKeyRingCommHttpsCommPolResourceModel {
	return CommRsKeyRingCommHttpsCommPolResourceModel{
		Annotation:       basetypes.NewStringNull(),
		TnPkiKeyRingName: 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 CommRsKeyRingCommHttpsCommPolType = map[string]attr.Type{
	"annotation":    types.StringType,
	"key_ring_name": types.StringType,
	"annotations":   types.SetType{ElemType: TagAnnotationCommRsKeyRingCommHttpsCommPolType},
	"tags":          types.SetType{ElemType: TagTagCommRsKeyRingCommHttpsCommPolType},
}

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

func getEmptyTagAnnotationCommRsKeyRingCommHttpsCommPolResourceModel() TagAnnotationCommRsKeyRingCommHttpsCommPolResourceModel {
	return TagAnnotationCommRsKeyRingCommHttpsCommPolResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

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

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

func getEmptyTagTagCommRsKeyRingCommHttpsCommPolResourceModel() TagTagCommRsKeyRingCommHttpsCommPolResourceModel {
	return TagTagCommRsKeyRingCommHttpsCommPolResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

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

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

func getEmptyTagAnnotationCommHttpsCommPolResourceModel() TagAnnotationCommHttpsCommPolResourceModel {
	return TagAnnotationCommHttpsCommPolResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

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

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

func getEmptyTagTagCommHttpsCommPolResourceModel() TagTagCommHttpsCommPolResourceModel {
	return TagTagCommHttpsCommPolResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

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

// CommShellinaboxCommPolResourceModel describes the resource data model for the children without relation ships.
type CommShellinaboxCommPolResourceModel struct {
	AdminSt       types.String `tfsdk:"admin_state"`
	Annotation    types.String `tfsdk:"annotation"`
	Descr         types.String `tfsdk:"description"`
	Name          types.String `tfsdk:"name"`
	NameAlias     types.String `tfsdk:"name_alias"`
	TagAnnotation types.Set    `tfsdk:"annotations"`
	TagTag        types.Set    `tfsdk:"tags"`
}

func getEmptyCommShellinaboxCommPolResourceModel() CommShellinaboxCommPolResourceModel {
	return CommShellinaboxCommPolResourceModel{
		AdminSt:    basetypes.NewStringNull(),
		Annotation: basetypes.NewStringNull(),
		Descr:      basetypes.NewStringNull(),
		Name:       basetypes.NewStringNull(),
		NameAlias:  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 CommShellinaboxCommPolType = map[string]attr.Type{
	"admin_state": types.StringType,
	"annotation":  types.StringType,
	"description": types.StringType,
	"name":        types.StringType,
	"name_alias":  types.StringType,
	"annotations": types.SetType{ElemType: TagAnnotationCommShellinaboxCommPolType},
	"tags":        types.SetType{ElemType: TagTagCommShellinaboxCommPolType},
}

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

func getEmptyTagAnnotationCommShellinaboxCommPolResourceModel() TagAnnotationCommShellinaboxCommPolResourceModel {
	return TagAnnotationCommShellinaboxCommPolResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

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

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

func getEmptyTagTagCommShellinaboxCommPolResourceModel() TagTagCommShellinaboxCommPolResourceModel {
	return TagTagCommShellinaboxCommPolResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

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

// CommSshCommPolResourceModel describes the resource data model for the children without relation ships.
type CommSshCommPolResourceModel struct {
	AdminSt       types.String `tfsdk:"admin_state"`
	Annotation    types.String `tfsdk:"annotation"`
	Descr         types.String `tfsdk:"description"`
	HostkeyAlgos  types.Set    `tfsdk:"host_key_algorithms"`
	KexAlgos      types.Set    `tfsdk:"kex_algorithms"`
	Name          types.String `tfsdk:"name"`
	NameAlias     types.String `tfsdk:"name_alias"`
	PasswordAuth  types.String `tfsdk:"password_authentication_state"`
	Port          types.String `tfsdk:"port"`
	SshCiphers    types.Set    `tfsdk:"ssh_ciphers"`
	SshMacs       types.Set    `tfsdk:"ssh_macs"`
	TagAnnotation types.Set    `tfsdk:"annotations"`
	TagTag        types.Set    `tfsdk:"tags"`
}

func getEmptyCommSshCommPolResourceModel() CommSshCommPolResourceModel {
	return CommSshCommPolResourceModel{
		AdminSt:      basetypes.NewStringNull(),
		Annotation:   basetypes.NewStringNull(),
		Descr:        basetypes.NewStringNull(),
		HostkeyAlgos: types.SetNull(types.StringType),
		KexAlgos:     types.SetNull(types.StringType),
		Name:         basetypes.NewStringNull(),
		NameAlias:    basetypes.NewStringNull(),
		PasswordAuth: basetypes.NewStringNull(),
		Port:         basetypes.NewStringNull(),
		SshCiphers:   types.SetNull(types.StringType),
		SshMacs:      types.SetNull(types.StringType),
		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 CommSshCommPolType = map[string]attr.Type{
	"admin_state":                   types.StringType,
	"annotation":                    types.StringType,
	"description":                   types.StringType,
	"host_key_algorithms":           types.SetType{ElemType: types.StringType},
	"kex_algorithms":                types.SetType{ElemType: types.StringType},
	"name":                          types.StringType,
	"name_alias":                    types.StringType,
	"password_authentication_state": types.StringType,
	"port":                          types.StringType,
	"ssh_ciphers":                   types.SetType{ElemType: types.StringType},
	"ssh_macs":                      types.SetType{ElemType: types.StringType},
	"annotations":                   types.SetType{ElemType: TagAnnotationCommSshCommPolType},
	"tags":                          types.SetType{ElemType: TagTagCommSshCommPolType},
}

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

func getEmptyTagAnnotationCommSshCommPolResourceModel() TagAnnotationCommSshCommPolResourceModel {
	return TagAnnotationCommSshCommPolResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

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

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

func getEmptyTagTagCommSshCommPolResourceModel() TagTagCommSshCommPolResourceModel {
	return TagTagCommSshCommPolResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

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

// CommTelnetCommPolResourceModel describes the resource data model for the children without relation ships.
type CommTelnetCommPolResourceModel struct {
	AdminSt       types.String `tfsdk:"admin_state"`
	Annotation    types.String `tfsdk:"annotation"`
	Descr         types.String `tfsdk:"description"`
	Name          types.String `tfsdk:"name"`
	NameAlias     types.String `tfsdk:"name_alias"`
	Port          types.String `tfsdk:"port"`
	TagAnnotation types.Set    `tfsdk:"annotations"`
	TagTag        types.Set    `tfsdk:"tags"`
}

func getEmptyCommTelnetCommPolResourceModel() CommTelnetCommPolResourceModel {
	return CommTelnetCommPolResourceModel{
		AdminSt:    basetypes.NewStringNull(),
		Annotation: basetypes.NewStringNull(),
		Descr:      basetypes.NewStringNull(),
		Name:       basetypes.NewStringNull(),
		NameAlias:  basetypes.NewStringNull(),
		Port:       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 CommTelnetCommPolType = map[string]attr.Type{
	"admin_state": types.StringType,
	"annotation":  types.StringType,
	"description": types.StringType,
	"name":        types.StringType,
	"name_alias":  types.StringType,
	"port":        types.StringType,
	"annotations": types.SetType{ElemType: TagAnnotationCommTelnetCommPolType},
	"tags":        types.SetType{ElemType: TagTagCommTelnetCommPolType},
}

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

func getEmptyTagAnnotationCommTelnetCommPolResourceModel() TagAnnotationCommTelnetCommPolResourceModel {
	return TagAnnotationCommTelnetCommPolResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

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

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

func getEmptyTagTagCommTelnetCommPolResourceModel() TagTagCommTelnetCommPolResourceModel {
	return TagTagCommTelnetCommPolResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

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

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

func getEmptyTagAnnotationCommPolResourceModel() TagAnnotationCommPolResourceModel {
	return TagAnnotationCommPolResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

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

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

func getEmptyTagTagCommPolResourceModel() TagTagCommPolResourceModel {
	return TagTagCommPolResourceModel{
		Key:   basetypes.NewStringNull(),
		Value: basetypes.NewStringNull(),
	}
}

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

type CommPolIdentifier struct {
	Name types.String
}

func (r *CommPolResource) ModifyPlan(ctx context.Context, req resource.ModifyPlanRequest, resp *resource.ModifyPlanResponse) {
	if !req.Plan.Raw.IsNull() {
		var planData, stateData, configData *CommPolResourceModel
		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.Name.IsUnknown() {
			setCommPolId(ctx, planData)
		}

		if stateData == nil && !globalAllowExistingOnCreate && !planData.Id.IsUnknown() && !planData.Id.IsNull() {
			CheckDn(ctx, &resp.Diagnostics, r.client, "commPol", planData.Id.ValueString())
			if resp.Diagnostics.HasError() {
				return
			}
		}
		CommHttpsCommPol := getEmptyCommHttpsCommPolResourceModel()
		CommHttpsCommPolList := make([]CommHttpsCommPolResourceModel, 0)
		CommRsClientCertCACommHttpsCommPol := getEmptyCommRsClientCertCACommHttpsCommPolResourceModel()
		CommRsClientCertCACommHttpsCommPolList := make([]CommRsClientCertCACommHttpsCommPolResourceModel, 0)
		TagAnnotationCommRsClientCertCACommHttpsCommPol := getEmptyTagAnnotationCommRsClientCertCACommHttpsCommPolResourceModel()
		TagAnnotationCommRsClientCertCACommHttpsCommPolList := make([]TagAnnotationCommRsClientCertCACommHttpsCommPolResourceModel, 0)
		TagTagCommRsClientCertCACommHttpsCommPol := getEmptyTagTagCommRsClientCertCACommHttpsCommPolResourceModel()
		TagTagCommRsClientCertCACommHttpsCommPolList := make([]TagTagCommRsClientCertCACommHttpsCommPolResourceModel, 0)
		CommRsKeyRingCommHttpsCommPol := getEmptyCommRsKeyRingCommHttpsCommPolResourceModel()
		CommRsKeyRingCommHttpsCommPolList := make([]CommRsKeyRingCommHttpsCommPolResourceModel, 0)
		TagAnnotationCommRsKeyRingCommHttpsCommPol := getEmptyTagAnnotationCommRsKeyRingCommHttpsCommPolResourceModel()
		TagAnnotationCommRsKeyRingCommHttpsCommPolList := make([]TagAnnotationCommRsKeyRingCommHttpsCommPolResourceModel, 0)
		TagTagCommRsKeyRingCommHttpsCommPol := getEmptyTagTagCommRsKeyRingCommHttpsCommPolResourceModel()
		TagTagCommRsKeyRingCommHttpsCommPolList := make([]TagTagCommRsKeyRingCommHttpsCommPolResourceModel, 0)
		TagAnnotationCommHttpsCommPol := getEmptyTagAnnotationCommHttpsCommPolResourceModel()
		TagAnnotationCommHttpsCommPolList := make([]TagAnnotationCommHttpsCommPolResourceModel, 0)
		TagTagCommHttpsCommPol := getEmptyTagTagCommHttpsCommPolResourceModel()
		TagTagCommHttpsCommPolList := make([]TagTagCommHttpsCommPolResourceModel, 0)
		var CommHttpsConfigData CommHttpsCommPolResourceModel
		configData.CommHttps.As(ctx, &CommHttpsConfigData, basetypes.ObjectAsOptions{})
		var commRsClientCertCACommHttpsCommPolConfigData CommRsClientCertCACommHttpsCommPolResourceModel
		if !CommHttpsConfigData.CommRsClientCertCA.IsNull() && stateData != nil {
			CommHttpsConfigData.CommRsClientCertCA.As(ctx, &commRsClientCertCACommHttpsCommPolConfigData, basetypes.ObjectAsOptions{})
			if IsEmptySingleNestedAttribute(CommHttpsConfigData.CommRsClientCertCA.Attributes()) {
				CommRsClientCertCACommHttpsCommPolObject, _ := types.ObjectValueFrom(ctx, CommRsClientCertCACommHttpsCommPolType, getEmptyCommRsClientCertCACommHttpsCommPolResourceModel())
				CommHttpsCommPol.CommRsClientCertCA = CommRsClientCertCACommHttpsCommPolObject
			} else {
				CommRsClientCertCACommHttpsCommPolObject, _ := types.ObjectValueFrom(ctx, CommRsClientCertCACommHttpsCommPolType, commRsClientCertCACommHttpsCommPolConfigData)
				CommHttpsCommPol.CommRsClientCertCA = CommRsClientCertCACommHttpsCommPolObject
			}
		}
		var tagAnnotationCommRsClientCertCACommHttpsCommPolConfigData []TagAnnotationCommRsClientCertCACommHttpsCommPolResourceModel
		if !commRsClientCertCACommHttpsCommPolConfigData.TagAnnotation.IsNull() && stateData != nil {
			commRsClientCertCACommHttpsCommPolConfigData.TagAnnotation.ElementsAs(ctx, &tagAnnotationCommRsClientCertCACommHttpsCommPolConfigData, false)
			TagAnnotationCommRsClientCertCACommHttpsCommPolSet, _ := types.SetValueFrom(ctx, TagAnnotationCommRsClientCertCACommHttpsCommPolType, tagAnnotationCommRsClientCertCACommHttpsCommPolConfigData)
			CommRsClientCertCACommHttpsCommPol.TagAnnotation = TagAnnotationCommRsClientCertCACommHttpsCommPolSet
		}
		TagAnnotationCommRsClientCertCACommHttpsCommPolList = append(TagAnnotationCommRsClientCertCACommHttpsCommPolList, TagAnnotationCommRsClientCertCACommHttpsCommPol)
		var tagTagCommRsClientCertCACommHttpsCommPolConfigData []TagTagCommRsClientCertCACommHttpsCommPolResourceModel
		if !commRsClientCertCACommHttpsCommPolConfigData.TagTag.IsNull() && stateData != nil {
			commRsClientCertCACommHttpsCommPolConfigData.TagTag.ElementsAs(ctx, &tagTagCommRsClientCertCACommHttpsCommPolConfigData, false)
			TagTagCommRsClientCertCACommHttpsCommPolSet, _ := types.SetValueFrom(ctx, TagTagCommRsClientCertCACommHttpsCommPolType, tagTagCommRsClientCertCACommHttpsCommPolConfigData)
			CommRsClientCertCACommHttpsCommPol.TagTag = TagTagCommRsClientCertCACommHttpsCommPolSet
		}
		TagTagCommRsClientCertCACommHttpsCommPolList = append(TagTagCommRsClientCertCACommHttpsCommPolList, TagTagCommRsClientCertCACommHttpsCommPol)
		CommRsClientCertCACommHttpsCommPolList = append(CommRsClientCertCACommHttpsCommPolList, CommRsClientCertCACommHttpsCommPol)
		var commRsKeyRingCommHttpsCommPolConfigData CommRsKeyRingCommHttpsCommPolResourceModel
		if !CommHttpsConfigData.CommRsKeyRing.IsNull() && stateData != nil {
			CommHttpsConfigData.CommRsKeyRing.As(ctx, &commRsKeyRingCommHttpsCommPolConfigData, basetypes.ObjectAsOptions{})
			if IsEmptySingleNestedAttribute(CommHttpsConfigData.CommRsKeyRing.Attributes()) {
				CommRsKeyRingCommHttpsCommPolObject, _ := types.ObjectValueFrom(ctx, CommRsKeyRingCommHttpsCommPolType, getEmptyCommRsKeyRingCommHttpsCommPolResourceModel())
				CommHttpsCommPol.CommRsKeyRing = CommRsKeyRingCommHttpsCommPolObject
			} else {
				CommRsKeyRingCommHttpsCommPolObject, _ := types.ObjectValueFrom(ctx, CommRsKeyRingCommHttpsCommPolType, commRsKeyRingCommHttpsCommPolConfigData)
				CommHttpsCommPol.CommRsKeyRing = CommRsKeyRingCommHttpsCommPolObject
			}
		}
		var tagAnnotationCommRsKeyRingCommHttpsCommPolConfigData []TagAnnotationCommRsKeyRingCommHttpsCommPolResourceModel
		if !commRsKeyRingCommHttpsCommPolConfigData.TagAnnotation.IsNull() && stateData != nil {
			commRsKeyRingCommHttpsCommPolConfigData.TagAnnotation.ElementsAs(ctx, &tagAnnotationCommRsKeyRingCommHttpsCommPolConfigData, false)
			TagAnnotationCommRsKeyRingCommHttpsCommPolSet, _ := types.SetValueFrom(ctx, TagAnnotationCommRsKeyRingCommHttpsCommPolType, tagAnnotationCommRsKeyRingCommHttpsCommPolConfigData)
			CommRsKeyRingCommHttpsCommPol.TagAnnotation = TagAnnotationCommRsKeyRingCommHttpsCommPolSet
		}
		TagAnnotationCommRsKeyRingCommHttpsCommPolList = append(TagAnnotationCommRsKeyRingCommHttpsCommPolList, TagAnnotationCommRsKeyRingCommHttpsCommPol)
		var tagTagCommRsKeyRingCommHttpsCommPolConfigData []TagTagCommRsKeyRingCommHttpsCommPolResourceModel
		if !commRsKeyRingCommHttpsCommPolConfigData.TagTag.IsNull() && stateData != nil {
			commRsKeyRingCommHttpsCommPolConfigData.TagTag.ElementsAs(ctx, &tagTagCommRsKeyRingCommHttpsCommPolConfigData, false)
			TagTagCommRsKeyRingCommHttpsCommPolSet, _ := types.SetValueFrom(ctx, TagTagCommRsKeyRingCommHttpsCommPolType, tagTagCommRsKeyRingCommHttpsCommPolConfigData)
			CommRsKeyRingCommHttpsCommPol.TagTag = TagTagCommRsKeyRingCommHttpsCommPolSet
		}
		TagTagCommRsKeyRingCommHttpsCommPolList = append(TagTagCommRsKeyRingCommHttpsCommPolList, TagTagCommRsKeyRingCommHttpsCommPol)
		CommRsKeyRingCommHttpsCommPolList = append(CommRsKeyRingCommHttpsCommPolList, CommRsKeyRingCommHttpsCommPol)
		var tagAnnotationCommHttpsCommPolConfigData []TagAnnotationCommHttpsCommPolResourceModel
		if !CommHttpsConfigData.TagAnnotation.IsNull() && stateData != nil {
			CommHttpsConfigData.TagAnnotation.ElementsAs(ctx, &tagAnnotationCommHttpsCommPolConfigData, false)
			TagAnnotationCommHttpsCommPolSet, _ := types.SetValueFrom(ctx, TagAnnotationCommHttpsCommPolType, tagAnnotationCommHttpsCommPolConfigData)
			CommHttpsCommPol.TagAnnotation = TagAnnotationCommHttpsCommPolSet
		}
		TagAnnotationCommHttpsCommPolList = append(TagAnnotationCommHttpsCommPolList, TagAnnotationCommHttpsCommPol)
		var tagTagCommHttpsCommPolConfigData []TagTagCommHttpsCommPolResourceModel
		if !CommHttpsConfigData.TagTag.IsNull() && stateData != nil {
			CommHttpsConfigData.TagTag.ElementsAs(ctx, &tagTagCommHttpsCommPolConfigData, false)
			TagTagCommHttpsCommPolSet, _ := types.SetValueFrom(ctx, TagTagCommHttpsCommPolType, tagTagCommHttpsCommPolConfigData)
			CommHttpsCommPol.TagTag = TagTagCommHttpsCommPolSet
		}
		TagTagCommHttpsCommPolList = append(TagTagCommHttpsCommPolList, TagTagCommHttpsCommPol)
		if !configData.CommHttp.IsNull() && stateData != nil {
			if IsEmptySingleNestedAttribute(configData.CommHttp.Attributes()) {
				CommHttpObject, _ := types.ObjectValueFrom(ctx, CommHttpCommPolType, getEmptyCommHttpCommPolResourceModel())
				planData.CommHttp = CommHttpObject
			}
		}
		if !configData.CommHttps.IsNull() && stateData != nil {
			if IsEmptySingleNestedAttribute(configData.CommHttps.Attributes()) {
				CommHttpsObject, _ := types.ObjectValueFrom(ctx, CommHttpsCommPolType, getEmptyCommHttpsCommPolResourceModel())
				planData.CommHttps = CommHttpsObject
			} else {
				CommHttpsCommPol.AccessControlAllowCredential = CommHttpsConfigData.AccessControlAllowCredential
				CommHttpsCommPol.AccessControlAllowOrigins = CommHttpsConfigData.AccessControlAllowOrigins
				CommHttpsCommPol.AdminSt = CommHttpsConfigData.AdminSt
				CommHttpsCommPol.Annotation = CommHttpsConfigData.Annotation
				CommHttpsCommPol.CliOnlyMode = CommHttpsConfigData.CliOnlyMode
				CommHttpsCommPol.ClientCertAuthState = CommHttpsConfigData.ClientCertAuthState
				CommHttpsCommPol.Descr = CommHttpsConfigData.Descr
				CommHttpsCommPol.DhParam = CommHttpsConfigData.DhParam
				CommHttpsCommPol.GlobalThrottleRate = CommHttpsConfigData.GlobalThrottleRate
				CommHttpsCommPol.GlobalThrottleSt = CommHttpsConfigData.GlobalThrottleSt
				CommHttpsCommPol.GlobalThrottleUnit = CommHttpsConfigData.GlobalThrottleUnit
				CommHttpsCommPol.MaxRequestStatusCount = CommHttpsConfigData.MaxRequestStatusCount
				CommHttpsCommPol.Name = CommHttpsConfigData.Name
				CommHttpsCommPol.NameAlias = CommHttpsConfigData.NameAlias
				CommHttpsCommPol.NodeExporter = CommHttpsConfigData.NodeExporter
				CommHttpsCommPol.Port = CommHttpsConfigData.Port
				CommHttpsCommPol.Referer = CommHttpsConfigData.Referer
				CommHttpsCommPol.ServerHeader = CommHttpsConfigData.ServerHeader
				CommHttpsCommPol.SslProtocols = CommHttpsConfigData.SslProtocols
				CommHttpsCommPol.ThrottleRate = CommHttpsConfigData.ThrottleRate
				CommHttpsCommPol.ThrottleSt = CommHttpsConfigData.ThrottleSt
				CommHttpsCommPol.VisoreAccess = CommHttpsConfigData.VisoreAccess
				CommHttpsCommPolList = append(CommHttpsCommPolList, CommHttpsCommPol)
				CommHttpsObject, _ := types.ObjectValueFrom(ctx, CommHttpsCommPolType, CommHttpsCommPolList[0])
				planData.CommHttps = CommHttpsObject
			}
		}
		if !configData.CommShellinabox.IsNull() && stateData != nil {
			if IsEmptySingleNestedAttribute(configData.CommShellinabox.Attributes()) {
				CommShellinaboxObject, _ := types.ObjectValueFrom(ctx, CommShellinaboxCommPolType, getEmptyCommShellinaboxCommPolResourceModel())
				planData.CommShellinabox = CommShellinaboxObject
			}
		}
		if !configData.CommSsh.IsNull() && stateData != nil {
			if IsEmptySingleNestedAttribute(configData.CommSsh.Attributes()) {
				CommSshObject, _ := types.ObjectValueFrom(ctx, CommSshCommPolType, getEmptyCommSshCommPolResourceModel())
				planData.CommSsh = CommSshObject
			}
		}
		if !configData.CommTelnet.IsNull() && stateData != nil {
			if IsEmptySingleNestedAttribute(configData.CommTelnet.Attributes()) {
				CommTelnetObject, _ := types.ObjectValueFrom(ctx, CommTelnetCommPolType, getEmptyCommTelnetCommPolResourceModel())
				planData.CommTelnet = CommTelnetObject
			}
		}

		resp.Diagnostics.Append(resp.Plan.Set(ctx, &planData)...)
	}
}

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

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

		Attributes: map[string]schema.Attribute{
			"id": schema.StringAttribute{
				Computed:            true,
				MarkdownDescription: "The distinguished name (DN) of the Management Access Policy object.",
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
				},
			},
			"annotation": schema.StringAttribute{
				Optional: true,
				Computed: true,
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
					SetToStringNullWhenStateIsNullPlanIsUnknownDuringUpdate(),
				},
				Default:             stringdefault.StaticString(globalAnnotation),
				MarkdownDescription: `The annotation of the Management Access Policy object.`,
			},
			"description": schema.StringAttribute{
				Optional: true,
				Computed: true,
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
					SetToStringNullWhenStateIsNullPlanIsUnknownDuringUpdate(),
				},
				MarkdownDescription: `The description of the Management Access Policy object.`,
			},
			"name": schema.StringAttribute{
				Required: true,
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
					SetToStringNullWhenStateIsNullPlanIsUnknownDuringUpdate(),
					stringplanmodifier.RequiresReplace(),
				},
				MarkdownDescription: `The name of the Management Access Policy object.`,
			},
			"name_alias": schema.StringAttribute{
				Optional: true,
				Computed: true,
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
					SetToStringNullWhenStateIsNullPlanIsUnknownDuringUpdate(),
				},
				MarkdownDescription: `The name alias of the Management Access Policy object.`,
			},
			"owner_key": schema.StringAttribute{
				Optional: true,
				Computed: true,
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
					SetToStringNullWhenStateIsNullPlanIsUnknownDuringUpdate(),
				},
				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(),
					SetToStringNullWhenStateIsNullPlanIsUnknownDuringUpdate(),
				},
				MarkdownDescription: `A tag for enabling clients to add their own data. For example, to indicate who created this object.`,
			},
			"strict_security_on_apic_oob_subnet": schema.StringAttribute{
				Optional: true,
				Computed: true,
				PlanModifiers: []planmodifier.String{
					stringplanmodifier.UseStateForUnknown(),
					SetToStringNullWhenStateIsNullPlanIsUnknownDuringUpdate(),
				},
				Validators: []validator.String{
					stringvalidator.OneOf("no", "yes"),
				},
				MarkdownDescription: `Removes implicit access permissions from any APIC out-of-band (OOB) subnet IP address.`,
			},
			"http_service": schema.SingleNestedAttribute{
				MarkdownDescription: `HTTP`,
				Optional:            true,
				Computed:            true,
				PlanModifiers: []planmodifier.Object{
					objectplanmodifier.UseStateForUnknown(),
				},
				Attributes: map[string]schema.Attribute{
					"allow_credentials": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("disabled", "enabled"),
						},
						MarkdownDescription: `Determines if credentials are allowed in HTTP responses.`,
					},
					"allow_origins": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `Determines which origins can access the resource. For example, inputting http://127.0.0.1:8000 would allow access from a source device with that IP address and port.`,
					},
					"admin_state": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("disabled", "enabled"),
						},
						MarkdownDescription: `The administrative state of the HTTP Service.`,
					},
					"annotation": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The annotation of the HTTP Service object.`,
					},
					"cli_only_mode": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("disabled", "enabled"),
						},
						MarkdownDescription: `Determines if CLI-only mode is enabled.`,
					},
					"description": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The description of the HTTP Service object.`,
					},
					"global_throttle_rate": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The maximum amount of API calls allowed per unit time.`,
					},
					"global_throttle_state": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("disabled", "enabled"),
						},
						MarkdownDescription: `The throttle state for all clients without specific identifier in their headers.`,
					},
					"global_throttle_unit": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The unit of measurement for rate limiting.`,
					},
					"max_request_status_count": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The maximum number of request status objects to keep.`,
					},
					"name": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The name of the HTTP Service object.`,
					},
					"name_alias": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The name alias of the HTTP Service object.`,
					},
					"node_exporter": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("disabled", "enabled"),
						},
						MarkdownDescription: `The node exporter service status.`,
					},
					"port": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The port used by the HTTP communication service.`,
					},
					"redirect_state": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("disabled", "enabled", "tested"),
						},
						MarkdownDescription: `The state of HTTP communication service.`,
					},
					"server_header": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("disabled", "enabled"),
						},
						MarkdownDescription: `Determines if the server header is included in responses.`,
					},
					"login_throttle_rate": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The maximum login/refresh allowed per second.`,
					},
					"login_throttle_state": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("disabled", "enabled"),
						},
						MarkdownDescription: `The state of login and refresh throttling.`,
					},
					"visore_access": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("disabled", "enabled"),
						},
						MarkdownDescription: `Grants permissions for accessing the Visore tool, also known as Object Store Browser, in Cisco ACI.`,
					},
					"annotations": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Optional:            true,
						Computed:            true,
						PlanModifiers: []planmodifier.Set{
							setplanmodifier.UseStateForUnknown(),
						},
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Required: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Required: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									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{
									Required: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Required: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
				},
			},
			"http_ssl_configuration": schema.SingleNestedAttribute{
				MarkdownDescription: `HTTPS`,
				Optional:            true,
				Computed:            true,
				PlanModifiers: []planmodifier.Object{
					objectplanmodifier.UseStateForUnknown(),
				},
				Attributes: map[string]schema.Attribute{
					"allow_credentials": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("disabled", "enabled"),
						},
						MarkdownDescription: `Determines if credentials are allowed in HTTPS responses.`,
					},
					"allow_origins": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `Determines which origins can access the resource. For example, inputting http://127.0.0.1:8000 would allow access from a source device with that IP address and port.`,
					},
					"admin_state": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("enabled"),
						},
						MarkdownDescription: `The administrative state of the HTTPS Service.`,
					},
					"annotation": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The annotation of the HTTPS Service object.`,
					},
					"cli_only_mode": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("disabled", "enabled"),
						},
						MarkdownDescription: `Determines if CLI-only mode is enabled.`,
					},
					"client_certificate_authentication_state": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("disabled", "enabled"),
						},
						MarkdownDescription: `The authentication state of the client certificate.`,
					},
					"description": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The description of the HTTPS Service object.`,
					},
					"dh_parameter": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("1024", "2048", "4096", "none"),
						},
						MarkdownDescription: `Determines the settings for Diffie-Hellman (DH) parameters.`,
					},
					"global_throttle_rate": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The maximum amount of API calls allowed per unit time.`,
					},
					"global_throttle_state": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("disabled", "enabled"),
						},
						MarkdownDescription: `The throttle state for all clients without specific identifier in their headers.`,
					},
					"global_throttle_unit": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("r/m", "r/s"),
						},
						MarkdownDescription: `The unit of measurement for rate limiting specified with the 'global_throttle_rate' attribute.`,
					},
					"max_request_status_count": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The maximum number of request status objects to keep.`,
					},
					"name": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The name of the HTTPS Service object.`,
					},
					"name_alias": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The name alias of the HTTPS Service object.`,
					},
					"node_exporter": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("disabled", "enabled"),
						},
						MarkdownDescription: `The node exporter service status.`,
					},
					"port": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The port used by the HTTPS communication service.`,
					},
					"referer": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `Allowed HTTP referers.`,
					},
					"server_header": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("disabled", "enabled"),
						},
						MarkdownDescription: `Determines if the server header is included in responses.`,
					},
					"ssl_protocols": schema.SetAttribute{
						MarkdownDescription: `The SSL protocols allowed by HTTPS communication service.`,
						Optional:            true,
						Computed:            true,
						PlanModifiers: []planmodifier.Set{
							setplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.Set{
							setvalidator.SizeAtMost(4),
							setvalidator.ValueStringsAre(
								stringvalidator.OneOf("TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3"),
							),
						},
						ElementType: types.StringType,
					},
					"login_throttle_rate": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The maximum login/refresh allowed per second.`,
					},
					"login_throttle_state": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("disabled", "enabled"),
						},
						MarkdownDescription: `The state of login and refresh throttling.`,
					},
					"visore_access": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("disabled", "enabled"),
						},
						MarkdownDescription: `Grants permissions for accessing the Visore tool, also known as Object Store Browser, in Cisco ACI.`,
					},
					"certificate_authority": schema.SingleNestedAttribute{
						MarkdownDescription: ``,
						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 Certificate Authority object.`,
							},
							"target_dn": schema.StringAttribute{
								Optional: true,
								Computed: true,
								PlanModifiers: []planmodifier.String{
									stringplanmodifier.UseStateForUnknown(),
								},
								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{
											Required: true,
											PlanModifiers: []planmodifier.String{
												stringplanmodifier.UseStateForUnknown(),
											},
											MarkdownDescription: `The key used to uniquely identify this configuration object.`,
										},
										"value": schema.StringAttribute{
											Required: true,
											PlanModifiers: []planmodifier.String{
												stringplanmodifier.UseStateForUnknown(),
											},
											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{
											Required: true,
											PlanModifiers: []planmodifier.String{
												stringplanmodifier.UseStateForUnknown(),
											},
											MarkdownDescription: `The key used to uniquely identify this configuration object.`,
										},
										"value": schema.StringAttribute{
											Required: true,
											PlanModifiers: []planmodifier.String{
												stringplanmodifier.UseStateForUnknown(),
											},
											MarkdownDescription: `The value of the property.`,
										},
									},
								},
							},
						},
					},
					"key_ring": schema.SingleNestedAttribute{
						MarkdownDescription: `A source relation to a key ring.`,
						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 Key Ring object.`,
							},
							"key_ring_name": schema.StringAttribute{
								Optional: true,
								Computed: true,
								PlanModifiers: []planmodifier.String{
									stringplanmodifier.UseStateForUnknown(),
								},
								MarkdownDescription: `The HTTP connection key ring. Each PKI device holds a pair of asymmetric Rivest-Shamir-Adleman (RSA) or Elliptic Curve Cryptography (ECC) encryption keys, one kept private and one made public, stored in an internal key ring.`,
							},
							"annotations": schema.SetNestedAttribute{
								MarkdownDescription: ``,
								Optional:            true,
								Computed:            true,
								PlanModifiers: []planmodifier.Set{
									setplanmodifier.UseStateForUnknown(),
								},
								NestedObject: schema.NestedAttributeObject{
									Attributes: map[string]schema.Attribute{
										"key": schema.StringAttribute{
											Required: true,
											PlanModifiers: []planmodifier.String{
												stringplanmodifier.UseStateForUnknown(),
											},
											MarkdownDescription: `The key used to uniquely identify this configuration object.`,
										},
										"value": schema.StringAttribute{
											Required: true,
											PlanModifiers: []planmodifier.String{
												stringplanmodifier.UseStateForUnknown(),
											},
											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{
											Required: true,
											PlanModifiers: []planmodifier.String{
												stringplanmodifier.UseStateForUnknown(),
											},
											MarkdownDescription: `The key used to uniquely identify this configuration object.`,
										},
										"value": schema.StringAttribute{
											Required: true,
											PlanModifiers: []planmodifier.String{
												stringplanmodifier.UseStateForUnknown(),
											},
											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{
									Required: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Required: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									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{
									Required: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Required: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
				},
			},
			"ssh_access_via_web": schema.SingleNestedAttribute{
				MarkdownDescription: ``,
				Optional:            true,
				Computed:            true,
				PlanModifiers: []planmodifier.Object{
					objectplanmodifier.UseStateForUnknown(),
				},
				Attributes: map[string]schema.Attribute{
					"admin_state": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("disabled", "enabled"),
						},
						MarkdownDescription: `The administrative state of the SSH access via WEB object.`,
					},
					"annotation": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The annotation of the SSH access via WEB object.`,
					},
					"description": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The description of the SSH access via WEB object.`,
					},
					"name": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The name of the SSH access via WEB object.`,
					},
					"name_alias": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The name alias of the SSH access via WEB 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{
									Required: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Required: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									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{
									Required: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Required: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
				},
			},
			"ssh_service": schema.SingleNestedAttribute{
				MarkdownDescription: `Object that encompasses properties related to Secure Shell access to the APIC, namely admin-state (default=enabled) and port(default=22).`,
				Optional:            true,
				Computed:            true,
				PlanModifiers: []planmodifier.Object{
					objectplanmodifier.UseStateForUnknown(),
				},
				Attributes: map[string]schema.Attribute{
					"admin_state": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("disabled", "enabled"),
						},
						MarkdownDescription: `The administrative state of the SSH Service object.`,
					},
					"annotation": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The annotation of the SSH Service object.`,
					},
					"description": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The description of the SSH Service object.`,
					},
					"host_key_algorithms": schema.SetAttribute{
						MarkdownDescription: `The supported algorithms for the host key.`,
						Optional:            true,
						Computed:            true,
						PlanModifiers: []planmodifier.Set{
							setplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.Set{
							setvalidator.SizeAtMost(3),
							setvalidator.ValueStringsAre(
								stringvalidator.OneOf("rsa-sha2-256", "rsa-sha2-512", "ssh-ed25519"),
							),
						},
						ElementType: types.StringType,
					},
					"kex_algorithms": schema.SetAttribute{
						MarkdownDescription: `The supported algorithms for key exchange.`,
						Optional:            true,
						Computed:            true,
						PlanModifiers: []planmodifier.Set{
							setplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.Set{
							setvalidator.SizeAtMost(9),
							setvalidator.ValueStringsAre(
								stringvalidator.OneOf("curve25519-sha256", "curve25519-sha256@libssh.org", "diffie-hellman-group1-sha1", "diffie-hellman-group14-sha1", "diffie-hellman-group14-sha256", "diffie-hellman-group16-sha512", "ecdh-sha2-nistp256", "ecdh-sha2-nistp384", "ecdh-sha2-nistp521"),
							),
						},
						ElementType: types.StringType,
					},
					"name": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The name of the SSH Service object.`,
					},
					"name_alias": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The name alias of the SSH Service object.`,
					},
					"password_authentication_state": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("disabled", "enabled"),
						},
						MarkdownDescription: `Determines the state of password-based authentication to control administrator access to the management interfaces of the ACI fabric.`,
					},
					"port": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The port used by the SSH service.`,
					},
					"ssh_ciphers": schema.SetAttribute{
						MarkdownDescription: `The ciphers supported by the SSH service.`,
						Optional:            true,
						Computed:            true,
						PlanModifiers: []planmodifier.Set{
							setplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.Set{
							setvalidator.SizeAtMost(6),
							setvalidator.ValueStringsAre(
								stringvalidator.OneOf("aes128-ctr", "aes128-gcm@openssh.com", "aes192-ctr", "aes256-ctr", "aes256-gcm@openssh.com", "chacha20-poly1305@openssh.com"),
							),
						},
						ElementType: types.StringType,
					},
					"ssh_macs": schema.SetAttribute{
						MarkdownDescription: `The message authentication codes (MACs) supported by the SSH service.`,
						Optional:            true,
						Computed:            true,
						PlanModifiers: []planmodifier.Set{
							setplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.Set{
							setvalidator.SizeAtMost(5),
							setvalidator.ValueStringsAre(
								stringvalidator.OneOf("hmac-sha1", "hmac-sha2-256", "hmac-sha2-256-etm@openssh.com", "hmac-sha2-512", "hmac-sha2-512-etm@openssh.com"),
							),
						},
						ElementType: types.StringType,
					},
					"annotations": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Optional:            true,
						Computed:            true,
						PlanModifiers: []planmodifier.Set{
							setplanmodifier.UseStateForUnknown(),
						},
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Required: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Required: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									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{
									Required: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Required: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
				},
			},
			"telnet_service": schema.SingleNestedAttribute{
				MarkdownDescription: `Telnet`,
				Optional:            true,
				Computed:            true,
				PlanModifiers: []planmodifier.Object{
					objectplanmodifier.UseStateForUnknown(),
				},
				Attributes: map[string]schema.Attribute{
					"admin_state": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						Validators: []validator.String{
							stringvalidator.OneOf("disabled", "enabled"),
						},
						MarkdownDescription: `The administrative state of the Telnet Service object.`,
					},
					"annotation": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The annotation of the Telnet Service object.`,
					},
					"description": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The description of the Telnet Service object.`,
					},
					"name": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The name of the Telnet Service object.`,
					},
					"name_alias": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The name alias of the Telnet Service object.`,
					},
					"port": schema.StringAttribute{
						Optional: true,
						Computed: true,
						PlanModifiers: []planmodifier.String{
							stringplanmodifier.UseStateForUnknown(),
						},
						MarkdownDescription: `The port used by the Telnet service.`,
					},
					"annotations": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Optional:            true,
						Computed:            true,
						PlanModifiers: []planmodifier.Set{
							setplanmodifier.UseStateForUnknown(),
						},
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Required: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Required: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									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{
									Required: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Required: true,
									PlanModifiers: []planmodifier.String{
										stringplanmodifier.UseStateForUnknown(),
									},
									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{
							Required: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							MarkdownDescription: `The key used to uniquely identify this configuration object.`,
						},
						"value": schema.StringAttribute{
							Required: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							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{
							Required: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							MarkdownDescription: `The key used to uniquely identify this configuration object.`,
						},
						"value": schema.StringAttribute{
							Required: true,
							PlanModifiers: []planmodifier.String{
								stringplanmodifier.UseStateForUnknown(),
							},
							MarkdownDescription: `The value of the property.`,
						},
					},
				},
			},
		},
	}
	tflog.Debug(ctx, "End schema of resource: aci_management_access_policy")
}

func (r *CommPolResource) Configure(ctx context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse) {
	tflog.Debug(ctx, "Start configure of resource: aci_management_access_policy")
	// 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_management_access_policy")
}

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

	var data *CommPolResourceModel

	// 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() {
		setCommPolId(ctx, data)
	}

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

	var commHttpPlan, commHttpState CommHttpCommPolResourceModel
	data.CommHttp.As(ctx, &commHttpPlan, basetypes.ObjectAsOptions{})
	stateData.CommHttp.As(ctx, &commHttpState, basetypes.ObjectAsOptions{})
	var commHttpsPlan, commHttpsState CommHttpsCommPolResourceModel
	data.CommHttps.As(ctx, &commHttpsPlan, basetypes.ObjectAsOptions{})
	stateData.CommHttps.As(ctx, &commHttpsState, basetypes.ObjectAsOptions{})
	var commShellinaboxPlan, commShellinaboxState CommShellinaboxCommPolResourceModel
	data.CommShellinabox.As(ctx, &commShellinaboxPlan, basetypes.ObjectAsOptions{})
	stateData.CommShellinabox.As(ctx, &commShellinaboxState, basetypes.ObjectAsOptions{})
	var commSshPlan, commSshState CommSshCommPolResourceModel
	data.CommSsh.As(ctx, &commSshPlan, basetypes.ObjectAsOptions{})
	stateData.CommSsh.As(ctx, &commSshState, basetypes.ObjectAsOptions{})
	var commTelnetPlan, commTelnetState CommTelnetCommPolResourceModel
	data.CommTelnet.As(ctx, &commTelnetPlan, basetypes.ObjectAsOptions{})
	stateData.CommTelnet.As(ctx, &commTelnetState, basetypes.ObjectAsOptions{})
	var tagAnnotationPlan, tagAnnotationState []TagAnnotationCommPolResourceModel
	data.TagAnnotation.ElementsAs(ctx, &tagAnnotationPlan, false)
	stateData.TagAnnotation.ElementsAs(ctx, &tagAnnotationState, false)
	var tagTagPlan, tagTagState []TagTagCommPolResourceModel
	data.TagTag.ElementsAs(ctx, &tagTagPlan, false)
	stateData.TagTag.ElementsAs(ctx, &tagTagState, false)
	jsonPayload := getCommPolCreateJsonPayload(ctx, &resp.Diagnostics, true, data, commHttpPlan, commHttpState, commHttpsPlan, commHttpsState, commShellinaboxPlan, commShellinaboxState, commSshPlan, commSshState, commTelnetPlan, commTelnetState, 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
	}

	getAndSetCommPolAttributes(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_management_access_policy with id '%s'", data.Id.ValueString()))
}

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

	// 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_management_access_policy with id '%s'", data.Id.ValueString()))

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

	// Save updated data into Terraform state
	if data.Id.IsNull() {
		var emptyData *CommPolResourceModel
		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_management_access_policy with id '%s'", data.Id.ValueString()))
}

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

	// 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 commHttp is being deleted
	if IsEmptySingleNestedAttribute(data.CommHttp.Attributes()) && !IsEmptySingleNestedAttribute(stateData.CommHttp.Attributes()) {
		resp.Diagnostics.AddError(
			"CommHttp object cannot be deleted",
			"deletion of child is only possible upon deletion of the parent",
		)
	}
	// Error out when child object commHttps is being deleted
	if IsEmptySingleNestedAttribute(data.CommHttps.Attributes()) && !IsEmptySingleNestedAttribute(stateData.CommHttps.Attributes()) {
		resp.Diagnostics.AddError(
			"CommHttps object cannot be deleted",
			"deletion of child is only possible upon deletion of the parent",
		)
	}
	var CommHttpsData CommHttpsCommPolResourceModel
	var CommHttpsStateData CommHttpsCommPolResourceModel
	data.CommHttps.As(ctx, &CommHttpsData, basetypes.ObjectAsOptions{})
	stateData.CommHttps.As(ctx, &CommHttpsStateData, basetypes.ObjectAsOptions{})
	var commRsKeyRingCommHttpsCommPolData CommRsKeyRingCommHttpsCommPolResourceModel
	var commRsKeyRingCommHttpsCommPolStateData CommRsKeyRingCommHttpsCommPolResourceModel
	CommHttpsData.CommRsKeyRing.As(ctx, &commRsKeyRingCommHttpsCommPolData, basetypes.ObjectAsOptions{})
	CommHttpsStateData.CommRsKeyRing.As(ctx, &commRsKeyRingCommHttpsCommPolStateData, basetypes.ObjectAsOptions{})
	if IsEmptySingleNestedAttribute(CommHttpsData.CommRsKeyRing.Attributes()) && !IsEmptySingleNestedAttribute(CommHttpsStateData.CommRsKeyRing.Attributes()) {
		resp.Diagnostics.AddError(
			"CommRsKeyRing object cannot be deleted",
			"deletion of child is only possible upon deletion of the parent",
		)
	}
	// Error out when child object commShellinabox is being deleted
	if IsEmptySingleNestedAttribute(data.CommShellinabox.Attributes()) && !IsEmptySingleNestedAttribute(stateData.CommShellinabox.Attributes()) {
		resp.Diagnostics.AddError(
			"CommShellinabox object cannot be deleted",
			"deletion of child is only possible upon deletion of the parent",
		)
	}
	// Error out when child object commSsh is being deleted
	if IsEmptySingleNestedAttribute(data.CommSsh.Attributes()) && !IsEmptySingleNestedAttribute(stateData.CommSsh.Attributes()) {
		resp.Diagnostics.AddError(
			"CommSsh object cannot be deleted",
			"deletion of child is only possible upon deletion of the parent",
		)
	}
	// Error out when child object commTelnet is being deleted
	if IsEmptySingleNestedAttribute(data.CommTelnet.Attributes()) && !IsEmptySingleNestedAttribute(stateData.CommTelnet.Attributes()) {
		resp.Diagnostics.AddError(
			"CommTelnet 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_management_access_policy with id '%s'", data.Id.ValueString()))

	var commHttpPlan, commHttpState CommHttpCommPolResourceModel
	data.CommHttp.As(ctx, &commHttpPlan, basetypes.ObjectAsOptions{})
	stateData.CommHttp.As(ctx, &commHttpState, basetypes.ObjectAsOptions{})
	var commHttpsPlan, commHttpsState CommHttpsCommPolResourceModel
	data.CommHttps.As(ctx, &commHttpsPlan, basetypes.ObjectAsOptions{})
	stateData.CommHttps.As(ctx, &commHttpsState, basetypes.ObjectAsOptions{})
	var commShellinaboxPlan, commShellinaboxState CommShellinaboxCommPolResourceModel
	data.CommShellinabox.As(ctx, &commShellinaboxPlan, basetypes.ObjectAsOptions{})
	stateData.CommShellinabox.As(ctx, &commShellinaboxState, basetypes.ObjectAsOptions{})
	var commSshPlan, commSshState CommSshCommPolResourceModel
	data.CommSsh.As(ctx, &commSshPlan, basetypes.ObjectAsOptions{})
	stateData.CommSsh.As(ctx, &commSshState, basetypes.ObjectAsOptions{})
	var commTelnetPlan, commTelnetState CommTelnetCommPolResourceModel
	data.CommTelnet.As(ctx, &commTelnetPlan, basetypes.ObjectAsOptions{})
	stateData.CommTelnet.As(ctx, &commTelnetState, basetypes.ObjectAsOptions{})
	var tagAnnotationPlan, tagAnnotationState []TagAnnotationCommPolResourceModel
	data.TagAnnotation.ElementsAs(ctx, &tagAnnotationPlan, false)
	stateData.TagAnnotation.ElementsAs(ctx, &tagAnnotationState, false)
	var tagTagPlan, tagTagState []TagTagCommPolResourceModel
	data.TagTag.ElementsAs(ctx, &tagTagPlan, false)
	stateData.TagTag.ElementsAs(ctx, &tagTagState, false)
	jsonPayload := getCommPolCreateJsonPayload(ctx, &resp.Diagnostics, false, data, commHttpPlan, commHttpState, commHttpsPlan, commHttpsState, commShellinaboxPlan, commShellinaboxState, commSshPlan, commSshState, commTelnetPlan, commTelnetState, 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
	}

	getAndSetCommPolAttributes(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_management_access_policy with id '%s'", data.Id.ValueString()))
}

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

	// 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_management_access_policy with id '%s'", data.Id.ValueString()))
	jsonPayload := GetDeleteJsonPayload(ctx, &resp.Diagnostics, "commPol", 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_management_access_policy with id '%s'", data.Id.ValueString()))
}

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

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

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

func getAndSetCommPolAttributes(ctx context.Context, diags *diag.Diagnostics, client *client.Client, data *CommPolResourceModel) {
	requestData := DoRestRequest(ctx, diags, client, fmt.Sprintf("api/mo/%s.json?rsp-subtree=full&rsp-subtree-class=%s", data.Id.ValueString(), "commPol,commHttp,commHttps,commShellinabox,commSsh,commTelnet,tagAnnotation,tagTag,tagAnnotation,tagTag,commRsClientCertCA,commRsKeyRing,tagAnnotation,tagTag,tagAnnotation,tagTag,tagAnnotation,tagTag,tagAnnotation,tagTag,tagAnnotation,tagTag,tagAnnotation,tagTag"), "GET", nil)

	readData := getEmptyCommPolResourceModel()

	if diags.HasError() {
		return
	}
	if requestData.Search("imdata").Search("commPol").Data() != nil {
		classReadInfo := requestData.Search("imdata").Search("commPol").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))
				}
				if attributeName == "annotation" {
					readData.Annotation = basetypes.NewStringValue(attributeValue.(string))
				}
				if attributeName == "descr" {
					readData.Descr = basetypes.NewStringValue(attributeValue.(string))
				}
				if attributeName == "name" {
					readData.Name = basetypes.NewStringValue(attributeValue.(string))
				}
				if attributeName == "nameAlias" {
					readData.NameAlias = basetypes.NewStringValue(attributeValue.(string))
				}
				if attributeName == "ownerKey" {
					readData.OwnerKey = basetypes.NewStringValue(attributeValue.(string))
				}
				if attributeName == "ownerTag" {
					readData.OwnerTag = basetypes.NewStringValue(attributeValue.(string))
				}
				if attributeName == "strictSecurityOnApicOOBSubnet" {
					readData.StrictSecurityOnApicOOBSubnet = basetypes.NewStringValue(attributeValue.(string))
				}
			}
			CommHttpCommPolList := make([]CommHttpCommPolResourceModel, 0)
			CommHttpsCommPolList := make([]CommHttpsCommPolResourceModel, 0)
			CommShellinaboxCommPolList := make([]CommShellinaboxCommPolResourceModel, 0)
			CommSshCommPolList := make([]CommSshCommPolResourceModel, 0)
			CommTelnetCommPolList := make([]CommTelnetCommPolResourceModel, 0)
			TagAnnotationCommPolList := make([]TagAnnotationCommPolResourceModel, 0)
			TagTagCommPolList := make([]TagTagCommPolResourceModel, 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 == "commHttp" {
							CommHttpCommPol := getEmptyCommHttpCommPolResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "accessControlAllowCredential" {
									CommHttpCommPol.AccessControlAllowCredential = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "accessControlAllowOrigins" {
									CommHttpCommPol.AccessControlAllowOrigins = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "adminSt" {
									CommHttpCommPol.AdminSt = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "annotation" {
									CommHttpCommPol.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "cliOnlyMode" {
									CommHttpCommPol.CliOnlyMode = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "descr" {
									CommHttpCommPol.Descr = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "globalThrottleRate" {
									CommHttpCommPol.GlobalThrottleRate = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "globalThrottleSt" {
									CommHttpCommPol.GlobalThrottleSt = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "globalThrottleUnit" {
									CommHttpCommPol.GlobalThrottleUnit = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "maxRequestStatusCount" {
									CommHttpCommPol.MaxRequestStatusCount = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "name" {
									CommHttpCommPol.Name = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "nameAlias" {
									CommHttpCommPol.NameAlias = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "nodeExporter" {
									CommHttpCommPol.NodeExporter = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "port" {
									CommHttpCommPol.Port = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "redirectSt" {
									CommHttpCommPol.RedirectSt = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "serverHeader" {
									CommHttpCommPol.ServerHeader = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "throttleRate" {
									CommHttpCommPol.ThrottleRate = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "throttleSt" {
									CommHttpCommPol.ThrottleSt = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "visoreAccess" {
									CommHttpCommPol.VisoreAccess = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagAnnotationCommHttpCommPolList := make([]TagAnnotationCommHttpCommPolResourceModel, 0)
							TagTagCommHttpCommPolList := make([]TagTagCommHttpCommPolResourceModel, 0)
							childrenOfCommHttpCommPol, childrenOfCommHttpCommPolExist := childClassDetails.(map[string]interface{})["children"]
							if childrenOfCommHttpCommPolExist {
								for _, childCommHttpCommPol := range childrenOfCommHttpCommPol.([]interface{}) {
									for childClassNameCommHttpCommPol, childClassDetailsCommHttpCommPol := range childCommHttpCommPol.(map[string]interface{}) {
										if childClassNameCommHttpCommPol == "tagAnnotation" {
											TagAnnotationCommHttpCommPol := getEmptyTagAnnotationCommHttpCommPolResourceModel()
											tagAnnotationchildAttributeValue := childClassDetailsCommHttpCommPol.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
												if childAttributeName == "key" {
													TagAnnotationCommHttpCommPol.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagAnnotationCommHttpCommPol.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationCommHttpCommPolList = append(TagAnnotationCommHttpCommPolList, TagAnnotationCommHttpCommPol)
										}
										if childClassNameCommHttpCommPol == "tagTag" {
											TagTagCommHttpCommPol := getEmptyTagTagCommHttpCommPolResourceModel()
											tagTagchildAttributeValue := childClassDetailsCommHttpCommPol.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
												if childAttributeName == "key" {
													TagTagCommHttpCommPol.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagTagCommHttpCommPol.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagTagCommHttpCommPolList = append(TagTagCommHttpCommPolList, TagTagCommHttpCommPol)
										}
									}
								}
							}
							TagAnnotationCommHttpCommPolSet, _ := types.SetValueFrom(ctx, TagAnnotationCommHttpCommPolType, TagAnnotationCommHttpCommPolList)
							CommHttpCommPol.TagAnnotation = TagAnnotationCommHttpCommPolSet
							TagTagCommHttpCommPolSet, _ := types.SetValueFrom(ctx, TagTagCommHttpCommPolType, TagTagCommHttpCommPolList)
							CommHttpCommPol.TagTag = TagTagCommHttpCommPolSet
							CommHttpCommPolList = append(CommHttpCommPolList, CommHttpCommPol)
						}
						if childClassName == "commHttps" {
							CommHttpsCommPol := getEmptyCommHttpsCommPolResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "accessControlAllowCredential" {
									CommHttpsCommPol.AccessControlAllowCredential = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "accessControlAllowOrigins" {
									CommHttpsCommPol.AccessControlAllowOrigins = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "adminSt" {
									CommHttpsCommPol.AdminSt = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "annotation" {
									CommHttpsCommPol.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "cliOnlyMode" {
									CommHttpsCommPol.CliOnlyMode = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "clientCertAuthState" {
									CommHttpsCommPol.ClientCertAuthState = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "descr" {
									CommHttpsCommPol.Descr = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "dhParam" && childAttributeValue.(string) == "" {
									CommHttpsCommPol.DhParam = basetypes.NewStringValue("none")
								} else if childAttributeName == "dhParam" {
									CommHttpsCommPol.DhParam = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "globalThrottleRate" {
									CommHttpsCommPol.GlobalThrottleRate = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "globalThrottleSt" {
									CommHttpsCommPol.GlobalThrottleSt = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "globalThrottleUnit" {
									CommHttpsCommPol.GlobalThrottleUnit = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "maxRequestStatusCount" {
									CommHttpsCommPol.MaxRequestStatusCount = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "name" {
									CommHttpsCommPol.Name = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "nameAlias" {
									CommHttpsCommPol.NameAlias = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "nodeExporter" {
									CommHttpsCommPol.NodeExporter = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "port" {
									CommHttpsCommPol.Port = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "referer" {
									CommHttpsCommPol.Referer = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "serverHeader" {
									CommHttpsCommPol.ServerHeader = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "sslProtocols" {
									sslProtocolsList := make([]string, 0)
									if childAttributeValue.(string) != "" {
										sslProtocolsList = strings.Split(childAttributeValue.(string), ",")
									}
									sslProtocolsSet, _ := types.SetValueFrom(ctx, basetypes.StringType{}, sslProtocolsList)
									CommHttpsCommPol.SslProtocols = sslProtocolsSet

								}
								if childAttributeName == "throttleRate" {
									CommHttpsCommPol.ThrottleRate = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "throttleSt" {
									CommHttpsCommPol.ThrottleSt = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "visoreAccess" {
									CommHttpsCommPol.VisoreAccess = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							CommRsClientCertCACommHttpsCommPolList := make([]CommRsClientCertCACommHttpsCommPolResourceModel, 0)
							CommRsKeyRingCommHttpsCommPolList := make([]CommRsKeyRingCommHttpsCommPolResourceModel, 0)
							TagAnnotationCommHttpsCommPolList := make([]TagAnnotationCommHttpsCommPolResourceModel, 0)
							TagTagCommHttpsCommPolList := make([]TagTagCommHttpsCommPolResourceModel, 0)
							childrenOfCommHttpsCommPol, childrenOfCommHttpsCommPolExist := childClassDetails.(map[string]interface{})["children"]
							if childrenOfCommHttpsCommPolExist {
								for _, childCommHttpsCommPol := range childrenOfCommHttpsCommPol.([]interface{}) {
									for childClassNameCommHttpsCommPol, childClassDetailsCommHttpsCommPol := range childCommHttpsCommPol.(map[string]interface{}) {
										if childClassNameCommHttpsCommPol == "commRsClientCertCA" {
											CommRsClientCertCACommHttpsCommPol := getEmptyCommRsClientCertCACommHttpsCommPolResourceModel()
											commRsClientCertCAchildAttributeValue := childClassDetailsCommHttpsCommPol.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range commRsClientCertCAchildAttributeValue {
												if childAttributeName == "annotation" {
													CommRsClientCertCACommHttpsCommPol.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "tDn" {
													CommRsClientCertCACommHttpsCommPol.TDn = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationCommRsClientCertCACommHttpsCommPolList := make([]TagAnnotationCommRsClientCertCACommHttpsCommPolResourceModel, 0)
											TagTagCommRsClientCertCACommHttpsCommPolList := make([]TagTagCommRsClientCertCACommHttpsCommPolResourceModel, 0)
											childrenOfCommRsClientCertCACommHttpsCommPol, childrenOfCommRsClientCertCACommHttpsCommPolExist := childClassDetailsCommHttpsCommPol.(map[string]interface{})["children"]
											if childrenOfCommRsClientCertCACommHttpsCommPolExist {
												for _, childCommRsClientCertCACommHttpsCommPol := range childrenOfCommRsClientCertCACommHttpsCommPol.([]interface{}) {
													for childClassNameCommRsClientCertCACommHttpsCommPol, childClassDetailsCommRsClientCertCACommHttpsCommPol := range childCommRsClientCertCACommHttpsCommPol.(map[string]interface{}) {
														if childClassNameCommRsClientCertCACommHttpsCommPol == "tagAnnotation" {
															TagAnnotationCommRsClientCertCACommHttpsCommPol := getEmptyTagAnnotationCommRsClientCertCACommHttpsCommPolResourceModel()
															tagAnnotationchildAttributeValue := childClassDetailsCommRsClientCertCACommHttpsCommPol.(map[string]interface{})["attributes"].(map[string]interface{})
															for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
																if childAttributeName == "key" {
																	TagAnnotationCommRsClientCertCACommHttpsCommPol.Key = basetypes.NewStringValue(childAttributeValue.(string))
																}
																if childAttributeName == "value" {
																	TagAnnotationCommRsClientCertCACommHttpsCommPol.Value = basetypes.NewStringValue(childAttributeValue.(string))
																}
															}
															TagAnnotationCommRsClientCertCACommHttpsCommPolList = append(TagAnnotationCommRsClientCertCACommHttpsCommPolList, TagAnnotationCommRsClientCertCACommHttpsCommPol)
														}
														if childClassNameCommRsClientCertCACommHttpsCommPol == "tagTag" {
															TagTagCommRsClientCertCACommHttpsCommPol := getEmptyTagTagCommRsClientCertCACommHttpsCommPolResourceModel()
															tagTagchildAttributeValue := childClassDetailsCommRsClientCertCACommHttpsCommPol.(map[string]interface{})["attributes"].(map[string]interface{})
															for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
																if childAttributeName == "key" {
																	TagTagCommRsClientCertCACommHttpsCommPol.Key = basetypes.NewStringValue(childAttributeValue.(string))
																}
																if childAttributeName == "value" {
																	TagTagCommRsClientCertCACommHttpsCommPol.Value = basetypes.NewStringValue(childAttributeValue.(string))
																}
															}
															TagTagCommRsClientCertCACommHttpsCommPolList = append(TagTagCommRsClientCertCACommHttpsCommPolList, TagTagCommRsClientCertCACommHttpsCommPol)
														}
													}
												}
											}
											TagAnnotationCommRsClientCertCACommHttpsCommPolSet, _ := types.SetValueFrom(ctx, TagAnnotationCommRsClientCertCACommHttpsCommPolType, TagAnnotationCommRsClientCertCACommHttpsCommPolList)
											CommRsClientCertCACommHttpsCommPol.TagAnnotation = TagAnnotationCommRsClientCertCACommHttpsCommPolSet
											TagTagCommRsClientCertCACommHttpsCommPolSet, _ := types.SetValueFrom(ctx, TagTagCommRsClientCertCACommHttpsCommPolType, TagTagCommRsClientCertCACommHttpsCommPolList)
											CommRsClientCertCACommHttpsCommPol.TagTag = TagTagCommRsClientCertCACommHttpsCommPolSet
											CommRsClientCertCACommHttpsCommPolList = append(CommRsClientCertCACommHttpsCommPolList, CommRsClientCertCACommHttpsCommPol)
										}
										if childClassNameCommHttpsCommPol == "commRsKeyRing" {
											CommRsKeyRingCommHttpsCommPol := getEmptyCommRsKeyRingCommHttpsCommPolResourceModel()
											commRsKeyRingchildAttributeValue := childClassDetailsCommHttpsCommPol.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range commRsKeyRingchildAttributeValue {
												if childAttributeName == "annotation" {
													CommRsKeyRingCommHttpsCommPol.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "tnPkiKeyRingName" {
													CommRsKeyRingCommHttpsCommPol.TnPkiKeyRingName = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationCommRsKeyRingCommHttpsCommPolList := make([]TagAnnotationCommRsKeyRingCommHttpsCommPolResourceModel, 0)
											TagTagCommRsKeyRingCommHttpsCommPolList := make([]TagTagCommRsKeyRingCommHttpsCommPolResourceModel, 0)
											childrenOfCommRsKeyRingCommHttpsCommPol, childrenOfCommRsKeyRingCommHttpsCommPolExist := childClassDetailsCommHttpsCommPol.(map[string]interface{})["children"]
											if childrenOfCommRsKeyRingCommHttpsCommPolExist {
												for _, childCommRsKeyRingCommHttpsCommPol := range childrenOfCommRsKeyRingCommHttpsCommPol.([]interface{}) {
													for childClassNameCommRsKeyRingCommHttpsCommPol, childClassDetailsCommRsKeyRingCommHttpsCommPol := range childCommRsKeyRingCommHttpsCommPol.(map[string]interface{}) {
														if childClassNameCommRsKeyRingCommHttpsCommPol == "tagAnnotation" {
															TagAnnotationCommRsKeyRingCommHttpsCommPol := getEmptyTagAnnotationCommRsKeyRingCommHttpsCommPolResourceModel()
															tagAnnotationchildAttributeValue := childClassDetailsCommRsKeyRingCommHttpsCommPol.(map[string]interface{})["attributes"].(map[string]interface{})
															for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
																if childAttributeName == "key" {
																	TagAnnotationCommRsKeyRingCommHttpsCommPol.Key = basetypes.NewStringValue(childAttributeValue.(string))
																}
																if childAttributeName == "value" {
																	TagAnnotationCommRsKeyRingCommHttpsCommPol.Value = basetypes.NewStringValue(childAttributeValue.(string))
																}
															}
															TagAnnotationCommRsKeyRingCommHttpsCommPolList = append(TagAnnotationCommRsKeyRingCommHttpsCommPolList, TagAnnotationCommRsKeyRingCommHttpsCommPol)
														}
														if childClassNameCommRsKeyRingCommHttpsCommPol == "tagTag" {
															TagTagCommRsKeyRingCommHttpsCommPol := getEmptyTagTagCommRsKeyRingCommHttpsCommPolResourceModel()
															tagTagchildAttributeValue := childClassDetailsCommRsKeyRingCommHttpsCommPol.(map[string]interface{})["attributes"].(map[string]interface{})
															for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
																if childAttributeName == "key" {
																	TagTagCommRsKeyRingCommHttpsCommPol.Key = basetypes.NewStringValue(childAttributeValue.(string))
																}
																if childAttributeName == "value" {
																	TagTagCommRsKeyRingCommHttpsCommPol.Value = basetypes.NewStringValue(childAttributeValue.(string))
																}
															}
															TagTagCommRsKeyRingCommHttpsCommPolList = append(TagTagCommRsKeyRingCommHttpsCommPolList, TagTagCommRsKeyRingCommHttpsCommPol)
														}
													}
												}
											}
											TagAnnotationCommRsKeyRingCommHttpsCommPolSet, _ := types.SetValueFrom(ctx, TagAnnotationCommRsKeyRingCommHttpsCommPolType, TagAnnotationCommRsKeyRingCommHttpsCommPolList)
											CommRsKeyRingCommHttpsCommPol.TagAnnotation = TagAnnotationCommRsKeyRingCommHttpsCommPolSet
											TagTagCommRsKeyRingCommHttpsCommPolSet, _ := types.SetValueFrom(ctx, TagTagCommRsKeyRingCommHttpsCommPolType, TagTagCommRsKeyRingCommHttpsCommPolList)
											CommRsKeyRingCommHttpsCommPol.TagTag = TagTagCommRsKeyRingCommHttpsCommPolSet
											CommRsKeyRingCommHttpsCommPolList = append(CommRsKeyRingCommHttpsCommPolList, CommRsKeyRingCommHttpsCommPol)
										}
										if childClassNameCommHttpsCommPol == "tagAnnotation" {
											TagAnnotationCommHttpsCommPol := getEmptyTagAnnotationCommHttpsCommPolResourceModel()
											tagAnnotationchildAttributeValue := childClassDetailsCommHttpsCommPol.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
												if childAttributeName == "key" {
													TagAnnotationCommHttpsCommPol.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagAnnotationCommHttpsCommPol.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationCommHttpsCommPolList = append(TagAnnotationCommHttpsCommPolList, TagAnnotationCommHttpsCommPol)
										}
										if childClassNameCommHttpsCommPol == "tagTag" {
											TagTagCommHttpsCommPol := getEmptyTagTagCommHttpsCommPolResourceModel()
											tagTagchildAttributeValue := childClassDetailsCommHttpsCommPol.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
												if childAttributeName == "key" {
													TagTagCommHttpsCommPol.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagTagCommHttpsCommPol.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagTagCommHttpsCommPolList = append(TagTagCommHttpsCommPolList, TagTagCommHttpsCommPol)
										}
									}
								}
							}
							if len(CommRsClientCertCACommHttpsCommPolList) == 1 {
								CommRsClientCertCACommHttpsCommPolObject, _ := types.ObjectValueFrom(ctx, CommRsClientCertCACommHttpsCommPolType, CommRsClientCertCACommHttpsCommPolList[0])
								CommHttpsCommPol.CommRsClientCertCA = CommRsClientCertCACommHttpsCommPolObject
							} else {
								CommRsClientCertCACommHttpsCommPolObject, _ := types.ObjectValueFrom(ctx, CommRsClientCertCACommHttpsCommPolType, getEmptyCommRsClientCertCACommHttpsCommPolResourceModel())
								CommHttpsCommPol.CommRsClientCertCA = CommRsClientCertCACommHttpsCommPolObject
							}
							if len(CommRsKeyRingCommHttpsCommPolList) == 1 {
								CommRsKeyRingCommHttpsCommPolObject, _ := types.ObjectValueFrom(ctx, CommRsKeyRingCommHttpsCommPolType, CommRsKeyRingCommHttpsCommPolList[0])
								CommHttpsCommPol.CommRsKeyRing = CommRsKeyRingCommHttpsCommPolObject
							} else {
								CommRsKeyRingCommHttpsCommPolObject, _ := types.ObjectValueFrom(ctx, CommRsKeyRingCommHttpsCommPolType, getEmptyCommRsKeyRingCommHttpsCommPolResourceModel())
								CommHttpsCommPol.CommRsKeyRing = CommRsKeyRingCommHttpsCommPolObject
							}
							TagAnnotationCommHttpsCommPolSet, _ := types.SetValueFrom(ctx, TagAnnotationCommHttpsCommPolType, TagAnnotationCommHttpsCommPolList)
							CommHttpsCommPol.TagAnnotation = TagAnnotationCommHttpsCommPolSet
							TagTagCommHttpsCommPolSet, _ := types.SetValueFrom(ctx, TagTagCommHttpsCommPolType, TagTagCommHttpsCommPolList)
							CommHttpsCommPol.TagTag = TagTagCommHttpsCommPolSet
							CommHttpsCommPolList = append(CommHttpsCommPolList, CommHttpsCommPol)
						}
						if childClassName == "commShellinabox" {
							CommShellinaboxCommPol := getEmptyCommShellinaboxCommPolResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "adminSt" {
									CommShellinaboxCommPol.AdminSt = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "annotation" {
									CommShellinaboxCommPol.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "descr" {
									CommShellinaboxCommPol.Descr = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "name" {
									CommShellinaboxCommPol.Name = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "nameAlias" {
									CommShellinaboxCommPol.NameAlias = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagAnnotationCommShellinaboxCommPolList := make([]TagAnnotationCommShellinaboxCommPolResourceModel, 0)
							TagTagCommShellinaboxCommPolList := make([]TagTagCommShellinaboxCommPolResourceModel, 0)
							childrenOfCommShellinaboxCommPol, childrenOfCommShellinaboxCommPolExist := childClassDetails.(map[string]interface{})["children"]
							if childrenOfCommShellinaboxCommPolExist {
								for _, childCommShellinaboxCommPol := range childrenOfCommShellinaboxCommPol.([]interface{}) {
									for childClassNameCommShellinaboxCommPol, childClassDetailsCommShellinaboxCommPol := range childCommShellinaboxCommPol.(map[string]interface{}) {
										if childClassNameCommShellinaboxCommPol == "tagAnnotation" {
											TagAnnotationCommShellinaboxCommPol := getEmptyTagAnnotationCommShellinaboxCommPolResourceModel()
											tagAnnotationchildAttributeValue := childClassDetailsCommShellinaboxCommPol.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
												if childAttributeName == "key" {
													TagAnnotationCommShellinaboxCommPol.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagAnnotationCommShellinaboxCommPol.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationCommShellinaboxCommPolList = append(TagAnnotationCommShellinaboxCommPolList, TagAnnotationCommShellinaboxCommPol)
										}
										if childClassNameCommShellinaboxCommPol == "tagTag" {
											TagTagCommShellinaboxCommPol := getEmptyTagTagCommShellinaboxCommPolResourceModel()
											tagTagchildAttributeValue := childClassDetailsCommShellinaboxCommPol.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
												if childAttributeName == "key" {
													TagTagCommShellinaboxCommPol.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagTagCommShellinaboxCommPol.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagTagCommShellinaboxCommPolList = append(TagTagCommShellinaboxCommPolList, TagTagCommShellinaboxCommPol)
										}
									}
								}
							}
							TagAnnotationCommShellinaboxCommPolSet, _ := types.SetValueFrom(ctx, TagAnnotationCommShellinaboxCommPolType, TagAnnotationCommShellinaboxCommPolList)
							CommShellinaboxCommPol.TagAnnotation = TagAnnotationCommShellinaboxCommPolSet
							TagTagCommShellinaboxCommPolSet, _ := types.SetValueFrom(ctx, TagTagCommShellinaboxCommPolType, TagTagCommShellinaboxCommPolList)
							CommShellinaboxCommPol.TagTag = TagTagCommShellinaboxCommPolSet
							CommShellinaboxCommPolList = append(CommShellinaboxCommPolList, CommShellinaboxCommPol)
						}
						if childClassName == "commSsh" {
							CommSshCommPol := getEmptyCommSshCommPolResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "adminSt" {
									CommSshCommPol.AdminSt = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "annotation" {
									CommSshCommPol.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "descr" {
									CommSshCommPol.Descr = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "hostkeyAlgos" {
									hostkeyAlgosList := make([]string, 0)
									if childAttributeValue.(string) != "" {
										hostkeyAlgosList = strings.Split(childAttributeValue.(string), ",")
									}
									hostkeyAlgosSet, _ := types.SetValueFrom(ctx, basetypes.StringType{}, hostkeyAlgosList)
									CommSshCommPol.HostkeyAlgos = hostkeyAlgosSet

								}
								if childAttributeName == "kexAlgos" {
									kexAlgosList := make([]string, 0)
									if childAttributeValue.(string) != "" {
										kexAlgosList = strings.Split(childAttributeValue.(string), ",")
									}
									kexAlgosSet, _ := types.SetValueFrom(ctx, basetypes.StringType{}, kexAlgosList)
									CommSshCommPol.KexAlgos = kexAlgosSet

								}
								if childAttributeName == "name" {
									CommSshCommPol.Name = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "nameAlias" {
									CommSshCommPol.NameAlias = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "passwordAuth" {
									CommSshCommPol.PasswordAuth = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "port" {
									CommSshCommPol.Port = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "sshCiphers" {
									sshCiphersList := make([]string, 0)
									if childAttributeValue.(string) != "" {
										sshCiphersList = strings.Split(childAttributeValue.(string), ",")
									}
									sshCiphersSet, _ := types.SetValueFrom(ctx, basetypes.StringType{}, sshCiphersList)
									CommSshCommPol.SshCiphers = sshCiphersSet

								}
								if childAttributeName == "sshMacs" {
									sshMacsList := make([]string, 0)
									if childAttributeValue.(string) != "" {
										sshMacsList = strings.Split(childAttributeValue.(string), ",")
									}
									sshMacsSet, _ := types.SetValueFrom(ctx, basetypes.StringType{}, sshMacsList)
									CommSshCommPol.SshMacs = sshMacsSet

								}

							}
							TagAnnotationCommSshCommPolList := make([]TagAnnotationCommSshCommPolResourceModel, 0)
							TagTagCommSshCommPolList := make([]TagTagCommSshCommPolResourceModel, 0)
							childrenOfCommSshCommPol, childrenOfCommSshCommPolExist := childClassDetails.(map[string]interface{})["children"]
							if childrenOfCommSshCommPolExist {
								for _, childCommSshCommPol := range childrenOfCommSshCommPol.([]interface{}) {
									for childClassNameCommSshCommPol, childClassDetailsCommSshCommPol := range childCommSshCommPol.(map[string]interface{}) {
										if childClassNameCommSshCommPol == "tagAnnotation" {
											TagAnnotationCommSshCommPol := getEmptyTagAnnotationCommSshCommPolResourceModel()
											tagAnnotationchildAttributeValue := childClassDetailsCommSshCommPol.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
												if childAttributeName == "key" {
													TagAnnotationCommSshCommPol.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagAnnotationCommSshCommPol.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationCommSshCommPolList = append(TagAnnotationCommSshCommPolList, TagAnnotationCommSshCommPol)
										}
										if childClassNameCommSshCommPol == "tagTag" {
											TagTagCommSshCommPol := getEmptyTagTagCommSshCommPolResourceModel()
											tagTagchildAttributeValue := childClassDetailsCommSshCommPol.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
												if childAttributeName == "key" {
													TagTagCommSshCommPol.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagTagCommSshCommPol.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagTagCommSshCommPolList = append(TagTagCommSshCommPolList, TagTagCommSshCommPol)
										}
									}
								}
							}
							TagAnnotationCommSshCommPolSet, _ := types.SetValueFrom(ctx, TagAnnotationCommSshCommPolType, TagAnnotationCommSshCommPolList)
							CommSshCommPol.TagAnnotation = TagAnnotationCommSshCommPolSet
							TagTagCommSshCommPolSet, _ := types.SetValueFrom(ctx, TagTagCommSshCommPolType, TagTagCommSshCommPolList)
							CommSshCommPol.TagTag = TagTagCommSshCommPolSet
							CommSshCommPolList = append(CommSshCommPolList, CommSshCommPol)
						}
						if childClassName == "commTelnet" {
							CommTelnetCommPol := getEmptyCommTelnetCommPolResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "adminSt" {
									CommTelnetCommPol.AdminSt = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "annotation" {
									CommTelnetCommPol.Annotation = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "descr" {
									CommTelnetCommPol.Descr = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "name" {
									CommTelnetCommPol.Name = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "nameAlias" {
									CommTelnetCommPol.NameAlias = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "port" {
									CommTelnetCommPol.Port = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagAnnotationCommTelnetCommPolList := make([]TagAnnotationCommTelnetCommPolResourceModel, 0)
							TagTagCommTelnetCommPolList := make([]TagTagCommTelnetCommPolResourceModel, 0)
							childrenOfCommTelnetCommPol, childrenOfCommTelnetCommPolExist := childClassDetails.(map[string]interface{})["children"]
							if childrenOfCommTelnetCommPolExist {
								for _, childCommTelnetCommPol := range childrenOfCommTelnetCommPol.([]interface{}) {
									for childClassNameCommTelnetCommPol, childClassDetailsCommTelnetCommPol := range childCommTelnetCommPol.(map[string]interface{}) {
										if childClassNameCommTelnetCommPol == "tagAnnotation" {
											TagAnnotationCommTelnetCommPol := getEmptyTagAnnotationCommTelnetCommPolResourceModel()
											tagAnnotationchildAttributeValue := childClassDetailsCommTelnetCommPol.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagAnnotationchildAttributeValue {
												if childAttributeName == "key" {
													TagAnnotationCommTelnetCommPol.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagAnnotationCommTelnetCommPol.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagAnnotationCommTelnetCommPolList = append(TagAnnotationCommTelnetCommPolList, TagAnnotationCommTelnetCommPol)
										}
										if childClassNameCommTelnetCommPol == "tagTag" {
											TagTagCommTelnetCommPol := getEmptyTagTagCommTelnetCommPolResourceModel()
											tagTagchildAttributeValue := childClassDetailsCommTelnetCommPol.(map[string]interface{})["attributes"].(map[string]interface{})
											for childAttributeName, childAttributeValue := range tagTagchildAttributeValue {
												if childAttributeName == "key" {
													TagTagCommTelnetCommPol.Key = basetypes.NewStringValue(childAttributeValue.(string))
												}
												if childAttributeName == "value" {
													TagTagCommTelnetCommPol.Value = basetypes.NewStringValue(childAttributeValue.(string))
												}
											}
											TagTagCommTelnetCommPolList = append(TagTagCommTelnetCommPolList, TagTagCommTelnetCommPol)
										}
									}
								}
							}
							TagAnnotationCommTelnetCommPolSet, _ := types.SetValueFrom(ctx, TagAnnotationCommTelnetCommPolType, TagAnnotationCommTelnetCommPolList)
							CommTelnetCommPol.TagAnnotation = TagAnnotationCommTelnetCommPolSet
							TagTagCommTelnetCommPolSet, _ := types.SetValueFrom(ctx, TagTagCommTelnetCommPolType, TagTagCommTelnetCommPolList)
							CommTelnetCommPol.TagTag = TagTagCommTelnetCommPolSet
							CommTelnetCommPolList = append(CommTelnetCommPolList, CommTelnetCommPol)
						}
						if childClassName == "tagAnnotation" {
							TagAnnotationCommPol := getEmptyTagAnnotationCommPolResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "key" {
									TagAnnotationCommPol.Key = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "value" {
									TagAnnotationCommPol.Value = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagAnnotationCommPolList = append(TagAnnotationCommPolList, TagAnnotationCommPol)
						}
						if childClassName == "tagTag" {
							TagTagCommPol := getEmptyTagTagCommPolResourceModel()
							for childAttributeName, childAttributeValue := range childAttributes {
								if childAttributeName == "key" {
									TagTagCommPol.Key = basetypes.NewStringValue(childAttributeValue.(string))
								}
								if childAttributeName == "value" {
									TagTagCommPol.Value = basetypes.NewStringValue(childAttributeValue.(string))
								}

							}
							TagTagCommPolList = append(TagTagCommPolList, TagTagCommPol)
						}
					}
				}
			}
			if len(CommHttpCommPolList) == 1 {
				commHttpObject, _ := types.ObjectValueFrom(ctx, CommHttpCommPolType, CommHttpCommPolList[0])
				readData.CommHttp = commHttpObject
			} else {
				commHttpObject, _ := types.ObjectValueFrom(ctx, CommHttpCommPolType, getEmptyCommHttpCommPolResourceModel())
				readData.CommHttp = commHttpObject
			}
			if len(CommHttpsCommPolList) == 1 {
				commHttpsObject, _ := types.ObjectValueFrom(ctx, CommHttpsCommPolType, CommHttpsCommPolList[0])
				readData.CommHttps = commHttpsObject
			} else {
				commHttpsObject, _ := types.ObjectValueFrom(ctx, CommHttpsCommPolType, getEmptyCommHttpsCommPolResourceModel())
				readData.CommHttps = commHttpsObject
			}
			if len(CommShellinaboxCommPolList) == 1 {
				commShellinaboxObject, _ := types.ObjectValueFrom(ctx, CommShellinaboxCommPolType, CommShellinaboxCommPolList[0])
				readData.CommShellinabox = commShellinaboxObject
			} else {
				commShellinaboxObject, _ := types.ObjectValueFrom(ctx, CommShellinaboxCommPolType, getEmptyCommShellinaboxCommPolResourceModel())
				readData.CommShellinabox = commShellinaboxObject
			}
			if len(CommSshCommPolList) == 1 {
				commSshObject, _ := types.ObjectValueFrom(ctx, CommSshCommPolType, CommSshCommPolList[0])
				readData.CommSsh = commSshObject
			} else {
				commSshObject, _ := types.ObjectValueFrom(ctx, CommSshCommPolType, getEmptyCommSshCommPolResourceModel())
				readData.CommSsh = commSshObject
			}
			if len(CommTelnetCommPolList) == 1 {
				commTelnetObject, _ := types.ObjectValueFrom(ctx, CommTelnetCommPolType, CommTelnetCommPolList[0])
				readData.CommTelnet = commTelnetObject
			} else {
				commTelnetObject, _ := types.ObjectValueFrom(ctx, CommTelnetCommPolType, getEmptyCommTelnetCommPolResourceModel())
				readData.CommTelnet = commTelnetObject
			}
			tagAnnotationSet, _ := types.SetValueFrom(ctx, readData.TagAnnotation.ElementType(ctx), TagAnnotationCommPolList)
			readData.TagAnnotation = tagAnnotationSet
			tagTagSet, _ := types.SetValueFrom(ctx, readData.TagTag.ElementType(ctx), TagTagCommPolList)
			readData.TagTag = tagTagSet
		} else {
			diags.AddError(
				"too many results in response",
				fmt.Sprintf("%v matches returned for class 'commPol'. Please report this issue to the provider developers.", len(classReadInfo)),
			)
		}
	} else {
		readData.Id = basetypes.NewStringNull()
	}
	*data = *readData
}

func getCommPolRn(ctx context.Context, data *CommPolResourceModel) string {
	return fmt.Sprintf("fabric/comm-%s", data.Name.ValueString())
}

func setCommPolId(ctx context.Context, data *CommPolResourceModel) {
	rn := getCommPolRn(ctx, data)
	data.Id = types.StringValue(fmt.Sprintf("%s/%s", strings.Split([]string{"uni/fabric/comm-{name}"}[0], "/")[0], rn))
}

func getCommPolCommHttpChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *CommPolResourceModel, commHttpCommPolPlan, commHttpCommPolState CommHttpCommPolResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.CommHttp.IsNull() && !data.CommHttp.IsUnknown() {
		CommHttpCommPolChildren := make([]map[string]interface{}, 0)
		childMap := NewAciObject()
		if !IsEmptySingleNestedAttribute(data.CommHttp.Attributes()) {
			if !commHttpCommPolPlan.AccessControlAllowCredential.IsUnknown() && !commHttpCommPolPlan.AccessControlAllowCredential.IsNull() {
				childMap.Attributes["accessControlAllowCredential"] = commHttpCommPolPlan.AccessControlAllowCredential.ValueString()
			}
			if !commHttpCommPolPlan.AccessControlAllowOrigins.IsUnknown() && !commHttpCommPolPlan.AccessControlAllowOrigins.IsNull() {
				childMap.Attributes["accessControlAllowOrigins"] = commHttpCommPolPlan.AccessControlAllowOrigins.ValueString()
			}
			if !commHttpCommPolPlan.AdminSt.IsUnknown() && !commHttpCommPolPlan.AdminSt.IsNull() {
				childMap.Attributes["adminSt"] = commHttpCommPolPlan.AdminSt.ValueString()
			}
			if !commHttpCommPolPlan.Annotation.IsUnknown() && !commHttpCommPolPlan.Annotation.IsNull() {
				childMap.Attributes["annotation"] = commHttpCommPolPlan.Annotation.ValueString()
			} else {
				childMap.Attributes["annotation"] = globalAnnotation
			}
			if !commHttpCommPolPlan.CliOnlyMode.IsUnknown() && !commHttpCommPolPlan.CliOnlyMode.IsNull() {
				childMap.Attributes["cliOnlyMode"] = commHttpCommPolPlan.CliOnlyMode.ValueString()
			}
			if !commHttpCommPolPlan.Descr.IsUnknown() && !commHttpCommPolPlan.Descr.IsNull() {
				childMap.Attributes["descr"] = commHttpCommPolPlan.Descr.ValueString()
			}
			if !commHttpCommPolPlan.GlobalThrottleRate.IsUnknown() && !commHttpCommPolPlan.GlobalThrottleRate.IsNull() {
				childMap.Attributes["globalThrottleRate"] = commHttpCommPolPlan.GlobalThrottleRate.ValueString()
			}
			if !commHttpCommPolPlan.GlobalThrottleSt.IsUnknown() && !commHttpCommPolPlan.GlobalThrottleSt.IsNull() {
				childMap.Attributes["globalThrottleSt"] = commHttpCommPolPlan.GlobalThrottleSt.ValueString()
			}
			if !commHttpCommPolPlan.GlobalThrottleUnit.IsUnknown() && !commHttpCommPolPlan.GlobalThrottleUnit.IsNull() {
				childMap.Attributes["globalThrottleUnit"] = commHttpCommPolPlan.GlobalThrottleUnit.ValueString()
			}
			if !commHttpCommPolPlan.MaxRequestStatusCount.IsUnknown() && !commHttpCommPolPlan.MaxRequestStatusCount.IsNull() {
				childMap.Attributes["maxRequestStatusCount"] = commHttpCommPolPlan.MaxRequestStatusCount.ValueString()
			}
			if !commHttpCommPolPlan.Name.IsUnknown() && !commHttpCommPolPlan.Name.IsNull() {
				childMap.Attributes["name"] = commHttpCommPolPlan.Name.ValueString()
			}
			if !commHttpCommPolPlan.NameAlias.IsUnknown() && !commHttpCommPolPlan.NameAlias.IsNull() {
				childMap.Attributes["nameAlias"] = commHttpCommPolPlan.NameAlias.ValueString()
			}
			if !commHttpCommPolPlan.NodeExporter.IsUnknown() && !commHttpCommPolPlan.NodeExporter.IsNull() {
				childMap.Attributes["nodeExporter"] = commHttpCommPolPlan.NodeExporter.ValueString()
			}
			if !commHttpCommPolPlan.Port.IsUnknown() && !commHttpCommPolPlan.Port.IsNull() {
				childMap.Attributes["port"] = commHttpCommPolPlan.Port.ValueString()
			}
			if !commHttpCommPolPlan.RedirectSt.IsUnknown() && !commHttpCommPolPlan.RedirectSt.IsNull() {
				childMap.Attributes["redirectSt"] = commHttpCommPolPlan.RedirectSt.ValueString()
			}
			if !commHttpCommPolPlan.ServerHeader.IsUnknown() && !commHttpCommPolPlan.ServerHeader.IsNull() {
				childMap.Attributes["serverHeader"] = commHttpCommPolPlan.ServerHeader.ValueString()
			}
			if !commHttpCommPolPlan.ThrottleRate.IsUnknown() && !commHttpCommPolPlan.ThrottleRate.IsNull() {
				childMap.Attributes["throttleRate"] = commHttpCommPolPlan.ThrottleRate.ValueString()
			}
			if !commHttpCommPolPlan.ThrottleSt.IsUnknown() && !commHttpCommPolPlan.ThrottleSt.IsNull() {
				childMap.Attributes["throttleSt"] = commHttpCommPolPlan.ThrottleSt.ValueString()
			}
			if !commHttpCommPolPlan.VisoreAccess.IsUnknown() && !commHttpCommPolPlan.VisoreAccess.IsNull() {
				childMap.Attributes["visoreAccess"] = commHttpCommPolPlan.VisoreAccess.ValueString()
			}

			var tagAnnotationCommHttpCommPolPlan, tagAnnotationCommHttpCommPolState []TagAnnotationCommHttpCommPolResourceModel
			commHttpCommPolPlan.TagAnnotation.ElementsAs(ctx, &tagAnnotationCommHttpCommPolPlan, false)
			if !commHttpCommPolState.TagAnnotation.IsNull() {
				commHttpCommPolState.TagAnnotation.ElementsAs(ctx, &tagAnnotationCommHttpCommPolState, false)
			}
			if !commHttpCommPolPlan.TagAnnotation.IsNull() && !commHttpCommPolPlan.TagAnnotation.IsUnknown() {
				tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
				for _, tagAnnotationCommHttpCommPol := range tagAnnotationCommHttpCommPolPlan {
					tagAnnotationCommHttpCommPolChildMap := NewAciObject()
					if !tagAnnotationCommHttpCommPol.Key.IsNull() && !tagAnnotationCommHttpCommPol.Key.IsUnknown() {
						tagAnnotationCommHttpCommPolChildMap.Attributes["key"] = tagAnnotationCommHttpCommPol.Key.ValueString()
					}
					if !tagAnnotationCommHttpCommPol.Value.IsNull() && !tagAnnotationCommHttpCommPol.Value.IsUnknown() {
						tagAnnotationCommHttpCommPolChildMap.Attributes["value"] = tagAnnotationCommHttpCommPol.Value.ValueString()
					}
					CommHttpCommPolChildren = append(CommHttpCommPolChildren, map[string]interface{}{"tagAnnotation": tagAnnotationCommHttpCommPolChildMap})
					tagAnnotationIdentifier := TagAnnotationIdentifier{}
					tagAnnotationIdentifier.Key = tagAnnotationCommHttpCommPol.Key
					tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
				}
				for _, tagAnnotationCommHttpCommPol := range tagAnnotationCommHttpCommPolState {
					delete := true
					for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
						if tagAnnotationIdentifier.Key == tagAnnotationCommHttpCommPol.Key {
							delete = false
							break
						}
					}
					if delete {
						tagAnnotationCommHttpCommPolChildMapForDelete := NewAciObject()
						tagAnnotationCommHttpCommPolChildMapForDelete.Attributes["status"] = "deleted"
						tagAnnotationCommHttpCommPolChildMapForDelete.Attributes["key"] = tagAnnotationCommHttpCommPol.Key.ValueString()
						CommHttpCommPolChildren = append(CommHttpCommPolChildren, map[string]interface{}{"tagAnnotation": tagAnnotationCommHttpCommPolChildMapForDelete})
					}
				}
			}

			var tagTagCommHttpCommPolPlan, tagTagCommHttpCommPolState []TagTagCommHttpCommPolResourceModel
			commHttpCommPolPlan.TagTag.ElementsAs(ctx, &tagTagCommHttpCommPolPlan, false)
			if !commHttpCommPolState.TagTag.IsNull() {
				commHttpCommPolState.TagTag.ElementsAs(ctx, &tagTagCommHttpCommPolState, false)
			}
			if !commHttpCommPolPlan.TagTag.IsNull() && !commHttpCommPolPlan.TagTag.IsUnknown() {
				tagTagIdentifiers := []TagTagIdentifier{}
				for _, tagTagCommHttpCommPol := range tagTagCommHttpCommPolPlan {
					tagTagCommHttpCommPolChildMap := NewAciObject()
					if !tagTagCommHttpCommPol.Key.IsNull() && !tagTagCommHttpCommPol.Key.IsUnknown() {
						tagTagCommHttpCommPolChildMap.Attributes["key"] = tagTagCommHttpCommPol.Key.ValueString()
					}
					if !tagTagCommHttpCommPol.Value.IsNull() && !tagTagCommHttpCommPol.Value.IsUnknown() {
						tagTagCommHttpCommPolChildMap.Attributes["value"] = tagTagCommHttpCommPol.Value.ValueString()
					}
					CommHttpCommPolChildren = append(CommHttpCommPolChildren, map[string]interface{}{"tagTag": tagTagCommHttpCommPolChildMap})
					tagTagIdentifier := TagTagIdentifier{}
					tagTagIdentifier.Key = tagTagCommHttpCommPol.Key
					tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
				}
				for _, tagTagCommHttpCommPol := range tagTagCommHttpCommPolState {
					delete := true
					for _, tagTagIdentifier := range tagTagIdentifiers {
						if tagTagIdentifier.Key == tagTagCommHttpCommPol.Key {
							delete = false
							break
						}
					}
					if delete {
						tagTagCommHttpCommPolChildMapForDelete := NewAciObject()
						tagTagCommHttpCommPolChildMapForDelete.Attributes["status"] = "deleted"
						tagTagCommHttpCommPolChildMapForDelete.Attributes["key"] = tagTagCommHttpCommPol.Key.ValueString()
						CommHttpCommPolChildren = append(CommHttpCommPolChildren, map[string]interface{}{"tagTag": tagTagCommHttpCommPolChildMapForDelete})
					}
				}
			}
			childMap.Children = CommHttpCommPolChildren
			childPayloads = append(childPayloads, map[string]interface{}{"commHttp": childMap})
		}
	} else {
		CommHttpObject, _ := types.ObjectValueFrom(ctx, CommHttpCommPolType, getEmptyCommHttpCommPolResourceModel())
		data.CommHttp = CommHttpObject
	}

	return childPayloads
}

func getCommPolCommHttpsChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *CommPolResourceModel, commHttpsCommPolPlan, commHttpsCommPolState CommHttpsCommPolResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	CommRsClientCertCACommHttpsCommPolChildren := make([]map[string]interface{}, 0)
	CommRsKeyRingCommHttpsCommPolChildren := make([]map[string]interface{}, 0)
	if !data.CommHttps.IsNull() && !data.CommHttps.IsUnknown() {
		CommHttpsCommPolChildren := make([]map[string]interface{}, 0)
		childMap := NewAciObject()
		if !IsEmptySingleNestedAttribute(data.CommHttps.Attributes()) {
			if !commHttpsCommPolPlan.AccessControlAllowCredential.IsUnknown() && !commHttpsCommPolPlan.AccessControlAllowCredential.IsNull() {
				childMap.Attributes["accessControlAllowCredential"] = commHttpsCommPolPlan.AccessControlAllowCredential.ValueString()
			}
			if !commHttpsCommPolPlan.AccessControlAllowOrigins.IsUnknown() && !commHttpsCommPolPlan.AccessControlAllowOrigins.IsNull() {
				childMap.Attributes["accessControlAllowOrigins"] = commHttpsCommPolPlan.AccessControlAllowOrigins.ValueString()
			}
			if !commHttpsCommPolPlan.AdminSt.IsUnknown() && !commHttpsCommPolPlan.AdminSt.IsNull() {
				childMap.Attributes["adminSt"] = commHttpsCommPolPlan.AdminSt.ValueString()
			}
			if !commHttpsCommPolPlan.Annotation.IsUnknown() && !commHttpsCommPolPlan.Annotation.IsNull() {
				childMap.Attributes["annotation"] = commHttpsCommPolPlan.Annotation.ValueString()
			} else {
				childMap.Attributes["annotation"] = globalAnnotation
			}
			if !commHttpsCommPolPlan.CliOnlyMode.IsUnknown() && !commHttpsCommPolPlan.CliOnlyMode.IsNull() {
				childMap.Attributes["cliOnlyMode"] = commHttpsCommPolPlan.CliOnlyMode.ValueString()
			}
			if !commHttpsCommPolPlan.ClientCertAuthState.IsUnknown() && !commHttpsCommPolPlan.ClientCertAuthState.IsNull() {
				childMap.Attributes["clientCertAuthState"] = commHttpsCommPolPlan.ClientCertAuthState.ValueString()
			}
			if !commHttpsCommPolPlan.Descr.IsUnknown() && !commHttpsCommPolPlan.Descr.IsNull() {
				childMap.Attributes["descr"] = commHttpsCommPolPlan.Descr.ValueString()
			}
			if !commHttpsCommPolPlan.DhParam.IsUnknown() && !commHttpsCommPolPlan.DhParam.IsNull() {
				childMap.Attributes["dhParam"] = commHttpsCommPolPlan.DhParam.ValueString()
			}
			if !commHttpsCommPolPlan.GlobalThrottleRate.IsUnknown() && !commHttpsCommPolPlan.GlobalThrottleRate.IsNull() {
				childMap.Attributes["globalThrottleRate"] = commHttpsCommPolPlan.GlobalThrottleRate.ValueString()
			}
			if !commHttpsCommPolPlan.GlobalThrottleSt.IsUnknown() && !commHttpsCommPolPlan.GlobalThrottleSt.IsNull() {
				childMap.Attributes["globalThrottleSt"] = commHttpsCommPolPlan.GlobalThrottleSt.ValueString()
			}
			if !commHttpsCommPolPlan.GlobalThrottleUnit.IsUnknown() && !commHttpsCommPolPlan.GlobalThrottleUnit.IsNull() {
				childMap.Attributes["globalThrottleUnit"] = commHttpsCommPolPlan.GlobalThrottleUnit.ValueString()
			}
			if !commHttpsCommPolPlan.MaxRequestStatusCount.IsUnknown() && !commHttpsCommPolPlan.MaxRequestStatusCount.IsNull() {
				childMap.Attributes["maxRequestStatusCount"] = commHttpsCommPolPlan.MaxRequestStatusCount.ValueString()
			}
			if !commHttpsCommPolPlan.Name.IsUnknown() && !commHttpsCommPolPlan.Name.IsNull() {
				childMap.Attributes["name"] = commHttpsCommPolPlan.Name.ValueString()
			}
			if !commHttpsCommPolPlan.NameAlias.IsUnknown() && !commHttpsCommPolPlan.NameAlias.IsNull() {
				childMap.Attributes["nameAlias"] = commHttpsCommPolPlan.NameAlias.ValueString()
			}
			if !commHttpsCommPolPlan.NodeExporter.IsUnknown() && !commHttpsCommPolPlan.NodeExporter.IsNull() {
				childMap.Attributes["nodeExporter"] = commHttpsCommPolPlan.NodeExporter.ValueString()
			}
			if !commHttpsCommPolPlan.Port.IsUnknown() && !commHttpsCommPolPlan.Port.IsNull() {
				childMap.Attributes["port"] = commHttpsCommPolPlan.Port.ValueString()
			}
			if !commHttpsCommPolPlan.Referer.IsUnknown() && !commHttpsCommPolPlan.Referer.IsNull() {
				childMap.Attributes["referer"] = commHttpsCommPolPlan.Referer.ValueString()
			}
			if !commHttpsCommPolPlan.ServerHeader.IsUnknown() && !commHttpsCommPolPlan.ServerHeader.IsNull() {
				childMap.Attributes["serverHeader"] = commHttpsCommPolPlan.ServerHeader.ValueString()
			}
			if !commHttpsCommPolPlan.SslProtocols.IsUnknown() && !commHttpsCommPolPlan.SslProtocols.IsNull() {
				var tmpSslProtocols []string
				commHttpsCommPolPlan.SslProtocols.ElementsAs(ctx, &tmpSslProtocols, false)
				childMap.Attributes["sslProtocols"] = strings.Join(tmpSslProtocols, ",")
			}
			if !commHttpsCommPolPlan.ThrottleRate.IsUnknown() && !commHttpsCommPolPlan.ThrottleRate.IsNull() {
				childMap.Attributes["throttleRate"] = commHttpsCommPolPlan.ThrottleRate.ValueString()
			}
			if !commHttpsCommPolPlan.ThrottleSt.IsUnknown() && !commHttpsCommPolPlan.ThrottleSt.IsNull() {
				childMap.Attributes["throttleSt"] = commHttpsCommPolPlan.ThrottleSt.ValueString()
			}
			if !commHttpsCommPolPlan.VisoreAccess.IsUnknown() && !commHttpsCommPolPlan.VisoreAccess.IsNull() {
				childMap.Attributes["visoreAccess"] = commHttpsCommPolPlan.VisoreAccess.ValueString()
			}

			var commRsClientCertCACommHttpsCommPolPlan, commRsClientCertCACommHttpsCommPolState CommRsClientCertCACommHttpsCommPolResourceModel
			commHttpsCommPolPlan.CommRsClientCertCA.As(ctx, &commRsClientCertCACommHttpsCommPolPlan, basetypes.ObjectAsOptions{})
			if !commHttpsCommPolState.CommRsClientCertCA.IsNull() {
				commHttpsCommPolState.CommRsClientCertCA.As(ctx, &commRsClientCertCACommHttpsCommPolState, basetypes.ObjectAsOptions{})
			}
			if !commHttpsCommPolPlan.CommRsClientCertCA.IsNull() && !commHttpsCommPolPlan.CommRsClientCertCA.IsUnknown() {
				commRsClientCertCACommHttpsCommPolChildMap := NewAciObject()
				if !IsEmptySingleNestedAttribute(commHttpsCommPolPlan.CommRsClientCertCA.Attributes()) {
					if !commRsClientCertCACommHttpsCommPolPlan.Annotation.IsUnknown() && !commRsClientCertCACommHttpsCommPolPlan.Annotation.IsNull() {
						commRsClientCertCACommHttpsCommPolChildMap.Attributes["annotation"] = commRsClientCertCACommHttpsCommPolPlan.Annotation.ValueString()
					} else {
						commRsClientCertCACommHttpsCommPolChildMap.Attributes["annotation"] = globalAnnotation
					}
					if !commRsClientCertCACommHttpsCommPolPlan.TDn.IsUnknown() && !commRsClientCertCACommHttpsCommPolPlan.TDn.IsNull() {
						commRsClientCertCACommHttpsCommPolChildMap.Attributes["tDn"] = commRsClientCertCACommHttpsCommPolPlan.TDn.ValueString()
					}
				} else {
					commRsClientCertCACommHttpsCommPolChildMap.Attributes["status"] = "deleted"
				}

				var tagAnnotationCommRsClientCertCACommHttpsCommPolPlan, tagAnnotationCommRsClientCertCACommHttpsCommPolState []TagAnnotationCommRsClientCertCACommHttpsCommPolResourceModel
				commRsClientCertCACommHttpsCommPolPlan.TagAnnotation.ElementsAs(ctx, &tagAnnotationCommRsClientCertCACommHttpsCommPolPlan, false)
				if !commRsClientCertCACommHttpsCommPolState.TagAnnotation.IsNull() {
					commRsClientCertCACommHttpsCommPolState.TagAnnotation.ElementsAs(ctx, &tagAnnotationCommRsClientCertCACommHttpsCommPolState, false)
				}
				if !commRsClientCertCACommHttpsCommPolPlan.TagAnnotation.IsNull() && !commRsClientCertCACommHttpsCommPolPlan.TagAnnotation.IsUnknown() {
					tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
					for _, tagAnnotationCommRsClientCertCACommHttpsCommPol := range tagAnnotationCommRsClientCertCACommHttpsCommPolPlan {
						tagAnnotationCommRsClientCertCACommHttpsCommPolChildMap := NewAciObject()
						if !tagAnnotationCommRsClientCertCACommHttpsCommPol.Key.IsNull() && !tagAnnotationCommRsClientCertCACommHttpsCommPol.Key.IsUnknown() {
							tagAnnotationCommRsClientCertCACommHttpsCommPolChildMap.Attributes["key"] = tagAnnotationCommRsClientCertCACommHttpsCommPol.Key.ValueString()
						}
						if !tagAnnotationCommRsClientCertCACommHttpsCommPol.Value.IsNull() && !tagAnnotationCommRsClientCertCACommHttpsCommPol.Value.IsUnknown() {
							tagAnnotationCommRsClientCertCACommHttpsCommPolChildMap.Attributes["value"] = tagAnnotationCommRsClientCertCACommHttpsCommPol.Value.ValueString()
						}
						CommRsClientCertCACommHttpsCommPolChildren = append(CommRsClientCertCACommHttpsCommPolChildren, map[string]interface{}{"tagAnnotation": tagAnnotationCommRsClientCertCACommHttpsCommPolChildMap})
						tagAnnotationIdentifier := TagAnnotationIdentifier{}
						tagAnnotationIdentifier.Key = tagAnnotationCommRsClientCertCACommHttpsCommPol.Key
						tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
					}
					for _, tagAnnotationCommRsClientCertCACommHttpsCommPol := range tagAnnotationCommRsClientCertCACommHttpsCommPolState {
						delete := true
						for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
							if tagAnnotationIdentifier.Key == tagAnnotationCommRsClientCertCACommHttpsCommPol.Key {
								delete = false
								break
							}
						}
						if delete {
							tagAnnotationCommRsClientCertCACommHttpsCommPolChildMapForDelete := NewAciObject()
							tagAnnotationCommRsClientCertCACommHttpsCommPolChildMapForDelete.Attributes["status"] = "deleted"
							tagAnnotationCommRsClientCertCACommHttpsCommPolChildMapForDelete.Attributes["key"] = tagAnnotationCommRsClientCertCACommHttpsCommPol.Key.ValueString()
							CommRsClientCertCACommHttpsCommPolChildren = append(CommRsClientCertCACommHttpsCommPolChildren, map[string]interface{}{"tagAnnotation": tagAnnotationCommRsClientCertCACommHttpsCommPolChildMapForDelete})
						}
					}
				}

				var tagTagCommRsClientCertCACommHttpsCommPolPlan, tagTagCommRsClientCertCACommHttpsCommPolState []TagTagCommRsClientCertCACommHttpsCommPolResourceModel
				commRsClientCertCACommHttpsCommPolPlan.TagTag.ElementsAs(ctx, &tagTagCommRsClientCertCACommHttpsCommPolPlan, false)
				if !commRsClientCertCACommHttpsCommPolState.TagTag.IsNull() {
					commRsClientCertCACommHttpsCommPolState.TagTag.ElementsAs(ctx, &tagTagCommRsClientCertCACommHttpsCommPolState, false)
				}
				if !commRsClientCertCACommHttpsCommPolPlan.TagTag.IsNull() && !commRsClientCertCACommHttpsCommPolPlan.TagTag.IsUnknown() {
					tagTagIdentifiers := []TagTagIdentifier{}
					for _, tagTagCommRsClientCertCACommHttpsCommPol := range tagTagCommRsClientCertCACommHttpsCommPolPlan {
						tagTagCommRsClientCertCACommHttpsCommPolChildMap := NewAciObject()
						if !tagTagCommRsClientCertCACommHttpsCommPol.Key.IsNull() && !tagTagCommRsClientCertCACommHttpsCommPol.Key.IsUnknown() {
							tagTagCommRsClientCertCACommHttpsCommPolChildMap.Attributes["key"] = tagTagCommRsClientCertCACommHttpsCommPol.Key.ValueString()
						}
						if !tagTagCommRsClientCertCACommHttpsCommPol.Value.IsNull() && !tagTagCommRsClientCertCACommHttpsCommPol.Value.IsUnknown() {
							tagTagCommRsClientCertCACommHttpsCommPolChildMap.Attributes["value"] = tagTagCommRsClientCertCACommHttpsCommPol.Value.ValueString()
						}
						CommRsClientCertCACommHttpsCommPolChildren = append(CommRsClientCertCACommHttpsCommPolChildren, map[string]interface{}{"tagTag": tagTagCommRsClientCertCACommHttpsCommPolChildMap})
						tagTagIdentifier := TagTagIdentifier{}
						tagTagIdentifier.Key = tagTagCommRsClientCertCACommHttpsCommPol.Key
						tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
					}
					for _, tagTagCommRsClientCertCACommHttpsCommPol := range tagTagCommRsClientCertCACommHttpsCommPolState {
						delete := true
						for _, tagTagIdentifier := range tagTagIdentifiers {
							if tagTagIdentifier.Key == tagTagCommRsClientCertCACommHttpsCommPol.Key {
								delete = false
								break
							}
						}
						if delete {
							tagTagCommRsClientCertCACommHttpsCommPolChildMapForDelete := NewAciObject()
							tagTagCommRsClientCertCACommHttpsCommPolChildMapForDelete.Attributes["status"] = "deleted"
							tagTagCommRsClientCertCACommHttpsCommPolChildMapForDelete.Attributes["key"] = tagTagCommRsClientCertCACommHttpsCommPol.Key.ValueString()
							CommRsClientCertCACommHttpsCommPolChildren = append(CommRsClientCertCACommHttpsCommPolChildren, map[string]interface{}{"tagTag": tagTagCommRsClientCertCACommHttpsCommPolChildMapForDelete})
						}
					}
				}
				commRsClientCertCACommHttpsCommPolChildMap.Children = CommRsClientCertCACommHttpsCommPolChildren
				CommHttpsCommPolChildren = append(CommHttpsCommPolChildren, map[string]interface{}{"commRsClientCertCA": commRsClientCertCACommHttpsCommPolChildMap})
			}

			var commRsKeyRingCommHttpsCommPolPlan, commRsKeyRingCommHttpsCommPolState CommRsKeyRingCommHttpsCommPolResourceModel
			commHttpsCommPolPlan.CommRsKeyRing.As(ctx, &commRsKeyRingCommHttpsCommPolPlan, basetypes.ObjectAsOptions{})
			if !commHttpsCommPolState.CommRsKeyRing.IsNull() {
				commHttpsCommPolState.CommRsKeyRing.As(ctx, &commRsKeyRingCommHttpsCommPolState, basetypes.ObjectAsOptions{})
			}
			if !commHttpsCommPolPlan.CommRsKeyRing.IsNull() && !commHttpsCommPolPlan.CommRsKeyRing.IsUnknown() {
				commRsKeyRingCommHttpsCommPolChildMap := NewAciObject()
				if !IsEmptySingleNestedAttribute(commHttpsCommPolPlan.CommRsKeyRing.Attributes()) {
					if !commRsKeyRingCommHttpsCommPolPlan.Annotation.IsUnknown() && !commRsKeyRingCommHttpsCommPolPlan.Annotation.IsNull() {
						commRsKeyRingCommHttpsCommPolChildMap.Attributes["annotation"] = commRsKeyRingCommHttpsCommPolPlan.Annotation.ValueString()
					} else {
						commRsKeyRingCommHttpsCommPolChildMap.Attributes["annotation"] = globalAnnotation
					}
					if !commRsKeyRingCommHttpsCommPolPlan.TnPkiKeyRingName.IsUnknown() && !commRsKeyRingCommHttpsCommPolPlan.TnPkiKeyRingName.IsNull() {
						commRsKeyRingCommHttpsCommPolChildMap.Attributes["tnPkiKeyRingName"] = commRsKeyRingCommHttpsCommPolPlan.TnPkiKeyRingName.ValueString()
					}
				}

				var tagAnnotationCommRsKeyRingCommHttpsCommPolPlan, tagAnnotationCommRsKeyRingCommHttpsCommPolState []TagAnnotationCommRsKeyRingCommHttpsCommPolResourceModel
				commRsKeyRingCommHttpsCommPolPlan.TagAnnotation.ElementsAs(ctx, &tagAnnotationCommRsKeyRingCommHttpsCommPolPlan, false)
				if !commRsKeyRingCommHttpsCommPolState.TagAnnotation.IsNull() {
					commRsKeyRingCommHttpsCommPolState.TagAnnotation.ElementsAs(ctx, &tagAnnotationCommRsKeyRingCommHttpsCommPolState, false)
				}
				if !commRsKeyRingCommHttpsCommPolPlan.TagAnnotation.IsNull() && !commRsKeyRingCommHttpsCommPolPlan.TagAnnotation.IsUnknown() {
					tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
					for _, tagAnnotationCommRsKeyRingCommHttpsCommPol := range tagAnnotationCommRsKeyRingCommHttpsCommPolPlan {
						tagAnnotationCommRsKeyRingCommHttpsCommPolChildMap := NewAciObject()
						if !tagAnnotationCommRsKeyRingCommHttpsCommPol.Key.IsNull() && !tagAnnotationCommRsKeyRingCommHttpsCommPol.Key.IsUnknown() {
							tagAnnotationCommRsKeyRingCommHttpsCommPolChildMap.Attributes["key"] = tagAnnotationCommRsKeyRingCommHttpsCommPol.Key.ValueString()
						}
						if !tagAnnotationCommRsKeyRingCommHttpsCommPol.Value.IsNull() && !tagAnnotationCommRsKeyRingCommHttpsCommPol.Value.IsUnknown() {
							tagAnnotationCommRsKeyRingCommHttpsCommPolChildMap.Attributes["value"] = tagAnnotationCommRsKeyRingCommHttpsCommPol.Value.ValueString()
						}
						CommRsKeyRingCommHttpsCommPolChildren = append(CommRsKeyRingCommHttpsCommPolChildren, map[string]interface{}{"tagAnnotation": tagAnnotationCommRsKeyRingCommHttpsCommPolChildMap})
						tagAnnotationIdentifier := TagAnnotationIdentifier{}
						tagAnnotationIdentifier.Key = tagAnnotationCommRsKeyRingCommHttpsCommPol.Key
						tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
					}
					for _, tagAnnotationCommRsKeyRingCommHttpsCommPol := range tagAnnotationCommRsKeyRingCommHttpsCommPolState {
						delete := true
						for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
							if tagAnnotationIdentifier.Key == tagAnnotationCommRsKeyRingCommHttpsCommPol.Key {
								delete = false
								break
							}
						}
						if delete {
							tagAnnotationCommRsKeyRingCommHttpsCommPolChildMapForDelete := NewAciObject()
							tagAnnotationCommRsKeyRingCommHttpsCommPolChildMapForDelete.Attributes["status"] = "deleted"
							tagAnnotationCommRsKeyRingCommHttpsCommPolChildMapForDelete.Attributes["key"] = tagAnnotationCommRsKeyRingCommHttpsCommPol.Key.ValueString()
							CommRsKeyRingCommHttpsCommPolChildren = append(CommRsKeyRingCommHttpsCommPolChildren, map[string]interface{}{"tagAnnotation": tagAnnotationCommRsKeyRingCommHttpsCommPolChildMapForDelete})
						}
					}
				}

				var tagTagCommRsKeyRingCommHttpsCommPolPlan, tagTagCommRsKeyRingCommHttpsCommPolState []TagTagCommRsKeyRingCommHttpsCommPolResourceModel
				commRsKeyRingCommHttpsCommPolPlan.TagTag.ElementsAs(ctx, &tagTagCommRsKeyRingCommHttpsCommPolPlan, false)
				if !commRsKeyRingCommHttpsCommPolState.TagTag.IsNull() {
					commRsKeyRingCommHttpsCommPolState.TagTag.ElementsAs(ctx, &tagTagCommRsKeyRingCommHttpsCommPolState, false)
				}
				if !commRsKeyRingCommHttpsCommPolPlan.TagTag.IsNull() && !commRsKeyRingCommHttpsCommPolPlan.TagTag.IsUnknown() {
					tagTagIdentifiers := []TagTagIdentifier{}
					for _, tagTagCommRsKeyRingCommHttpsCommPol := range tagTagCommRsKeyRingCommHttpsCommPolPlan {
						tagTagCommRsKeyRingCommHttpsCommPolChildMap := NewAciObject()
						if !tagTagCommRsKeyRingCommHttpsCommPol.Key.IsNull() && !tagTagCommRsKeyRingCommHttpsCommPol.Key.IsUnknown() {
							tagTagCommRsKeyRingCommHttpsCommPolChildMap.Attributes["key"] = tagTagCommRsKeyRingCommHttpsCommPol.Key.ValueString()
						}
						if !tagTagCommRsKeyRingCommHttpsCommPol.Value.IsNull() && !tagTagCommRsKeyRingCommHttpsCommPol.Value.IsUnknown() {
							tagTagCommRsKeyRingCommHttpsCommPolChildMap.Attributes["value"] = tagTagCommRsKeyRingCommHttpsCommPol.Value.ValueString()
						}
						CommRsKeyRingCommHttpsCommPolChildren = append(CommRsKeyRingCommHttpsCommPolChildren, map[string]interface{}{"tagTag": tagTagCommRsKeyRingCommHttpsCommPolChildMap})
						tagTagIdentifier := TagTagIdentifier{}
						tagTagIdentifier.Key = tagTagCommRsKeyRingCommHttpsCommPol.Key
						tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
					}
					for _, tagTagCommRsKeyRingCommHttpsCommPol := range tagTagCommRsKeyRingCommHttpsCommPolState {
						delete := true
						for _, tagTagIdentifier := range tagTagIdentifiers {
							if tagTagIdentifier.Key == tagTagCommRsKeyRingCommHttpsCommPol.Key {
								delete = false
								break
							}
						}
						if delete {
							tagTagCommRsKeyRingCommHttpsCommPolChildMapForDelete := NewAciObject()
							tagTagCommRsKeyRingCommHttpsCommPolChildMapForDelete.Attributes["status"] = "deleted"
							tagTagCommRsKeyRingCommHttpsCommPolChildMapForDelete.Attributes["key"] = tagTagCommRsKeyRingCommHttpsCommPol.Key.ValueString()
							CommRsKeyRingCommHttpsCommPolChildren = append(CommRsKeyRingCommHttpsCommPolChildren, map[string]interface{}{"tagTag": tagTagCommRsKeyRingCommHttpsCommPolChildMapForDelete})
						}
					}
				}
				commRsKeyRingCommHttpsCommPolChildMap.Children = CommRsKeyRingCommHttpsCommPolChildren
				CommHttpsCommPolChildren = append(CommHttpsCommPolChildren, map[string]interface{}{"commRsKeyRing": commRsKeyRingCommHttpsCommPolChildMap})
			}

			var tagAnnotationCommHttpsCommPolPlan, tagAnnotationCommHttpsCommPolState []TagAnnotationCommHttpsCommPolResourceModel
			commHttpsCommPolPlan.TagAnnotation.ElementsAs(ctx, &tagAnnotationCommHttpsCommPolPlan, false)
			if !commHttpsCommPolState.TagAnnotation.IsNull() {
				commHttpsCommPolState.TagAnnotation.ElementsAs(ctx, &tagAnnotationCommHttpsCommPolState, false)
			}
			if !commHttpsCommPolPlan.TagAnnotation.IsNull() && !commHttpsCommPolPlan.TagAnnotation.IsUnknown() {
				tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
				for _, tagAnnotationCommHttpsCommPol := range tagAnnotationCommHttpsCommPolPlan {
					tagAnnotationCommHttpsCommPolChildMap := NewAciObject()
					if !tagAnnotationCommHttpsCommPol.Key.IsNull() && !tagAnnotationCommHttpsCommPol.Key.IsUnknown() {
						tagAnnotationCommHttpsCommPolChildMap.Attributes["key"] = tagAnnotationCommHttpsCommPol.Key.ValueString()
					}
					if !tagAnnotationCommHttpsCommPol.Value.IsNull() && !tagAnnotationCommHttpsCommPol.Value.IsUnknown() {
						tagAnnotationCommHttpsCommPolChildMap.Attributes["value"] = tagAnnotationCommHttpsCommPol.Value.ValueString()
					}
					CommHttpsCommPolChildren = append(CommHttpsCommPolChildren, map[string]interface{}{"tagAnnotation": tagAnnotationCommHttpsCommPolChildMap})
					tagAnnotationIdentifier := TagAnnotationIdentifier{}
					tagAnnotationIdentifier.Key = tagAnnotationCommHttpsCommPol.Key
					tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
				}
				for _, tagAnnotationCommHttpsCommPol := range tagAnnotationCommHttpsCommPolState {
					delete := true
					for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
						if tagAnnotationIdentifier.Key == tagAnnotationCommHttpsCommPol.Key {
							delete = false
							break
						}
					}
					if delete {
						tagAnnotationCommHttpsCommPolChildMapForDelete := NewAciObject()
						tagAnnotationCommHttpsCommPolChildMapForDelete.Attributes["status"] = "deleted"
						tagAnnotationCommHttpsCommPolChildMapForDelete.Attributes["key"] = tagAnnotationCommHttpsCommPol.Key.ValueString()
						CommHttpsCommPolChildren = append(CommHttpsCommPolChildren, map[string]interface{}{"tagAnnotation": tagAnnotationCommHttpsCommPolChildMapForDelete})
					}
				}
			}

			var tagTagCommHttpsCommPolPlan, tagTagCommHttpsCommPolState []TagTagCommHttpsCommPolResourceModel
			commHttpsCommPolPlan.TagTag.ElementsAs(ctx, &tagTagCommHttpsCommPolPlan, false)
			if !commHttpsCommPolState.TagTag.IsNull() {
				commHttpsCommPolState.TagTag.ElementsAs(ctx, &tagTagCommHttpsCommPolState, false)
			}
			if !commHttpsCommPolPlan.TagTag.IsNull() && !commHttpsCommPolPlan.TagTag.IsUnknown() {
				tagTagIdentifiers := []TagTagIdentifier{}
				for _, tagTagCommHttpsCommPol := range tagTagCommHttpsCommPolPlan {
					tagTagCommHttpsCommPolChildMap := NewAciObject()
					if !tagTagCommHttpsCommPol.Key.IsNull() && !tagTagCommHttpsCommPol.Key.IsUnknown() {
						tagTagCommHttpsCommPolChildMap.Attributes["key"] = tagTagCommHttpsCommPol.Key.ValueString()
					}
					if !tagTagCommHttpsCommPol.Value.IsNull() && !tagTagCommHttpsCommPol.Value.IsUnknown() {
						tagTagCommHttpsCommPolChildMap.Attributes["value"] = tagTagCommHttpsCommPol.Value.ValueString()
					}
					CommHttpsCommPolChildren = append(CommHttpsCommPolChildren, map[string]interface{}{"tagTag": tagTagCommHttpsCommPolChildMap})
					tagTagIdentifier := TagTagIdentifier{}
					tagTagIdentifier.Key = tagTagCommHttpsCommPol.Key
					tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
				}
				for _, tagTagCommHttpsCommPol := range tagTagCommHttpsCommPolState {
					delete := true
					for _, tagTagIdentifier := range tagTagIdentifiers {
						if tagTagIdentifier.Key == tagTagCommHttpsCommPol.Key {
							delete = false
							break
						}
					}
					if delete {
						tagTagCommHttpsCommPolChildMapForDelete := NewAciObject()
						tagTagCommHttpsCommPolChildMapForDelete.Attributes["status"] = "deleted"
						tagTagCommHttpsCommPolChildMapForDelete.Attributes["key"] = tagTagCommHttpsCommPol.Key.ValueString()
						CommHttpsCommPolChildren = append(CommHttpsCommPolChildren, map[string]interface{}{"tagTag": tagTagCommHttpsCommPolChildMapForDelete})
					}
				}
			}
			childMap.Children = CommHttpsCommPolChildren
			childPayloads = append(childPayloads, map[string]interface{}{"commHttps": childMap})
		}
	} else {
		CommHttpsObject, _ := types.ObjectValueFrom(ctx, CommHttpsCommPolType, getEmptyCommHttpsCommPolResourceModel())
		data.CommHttps = CommHttpsObject
	}

	return childPayloads
}

func getCommPolCommShellinaboxChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *CommPolResourceModel, commShellinaboxCommPolPlan, commShellinaboxCommPolState CommShellinaboxCommPolResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.CommShellinabox.IsNull() && !data.CommShellinabox.IsUnknown() {
		CommShellinaboxCommPolChildren := make([]map[string]interface{}, 0)
		childMap := NewAciObject()
		if !IsEmptySingleNestedAttribute(data.CommShellinabox.Attributes()) {
			if !commShellinaboxCommPolPlan.AdminSt.IsUnknown() && !commShellinaboxCommPolPlan.AdminSt.IsNull() {
				childMap.Attributes["adminSt"] = commShellinaboxCommPolPlan.AdminSt.ValueString()
			}
			if !commShellinaboxCommPolPlan.Annotation.IsUnknown() && !commShellinaboxCommPolPlan.Annotation.IsNull() {
				childMap.Attributes["annotation"] = commShellinaboxCommPolPlan.Annotation.ValueString()
			} else {
				childMap.Attributes["annotation"] = globalAnnotation
			}
			if !commShellinaboxCommPolPlan.Descr.IsUnknown() && !commShellinaboxCommPolPlan.Descr.IsNull() {
				childMap.Attributes["descr"] = commShellinaboxCommPolPlan.Descr.ValueString()
			}
			if !commShellinaboxCommPolPlan.Name.IsUnknown() && !commShellinaboxCommPolPlan.Name.IsNull() {
				childMap.Attributes["name"] = commShellinaboxCommPolPlan.Name.ValueString()
			}
			if !commShellinaboxCommPolPlan.NameAlias.IsUnknown() && !commShellinaboxCommPolPlan.NameAlias.IsNull() {
				childMap.Attributes["nameAlias"] = commShellinaboxCommPolPlan.NameAlias.ValueString()
			}

			var tagAnnotationCommShellinaboxCommPolPlan, tagAnnotationCommShellinaboxCommPolState []TagAnnotationCommShellinaboxCommPolResourceModel
			commShellinaboxCommPolPlan.TagAnnotation.ElementsAs(ctx, &tagAnnotationCommShellinaboxCommPolPlan, false)
			if !commShellinaboxCommPolState.TagAnnotation.IsNull() {
				commShellinaboxCommPolState.TagAnnotation.ElementsAs(ctx, &tagAnnotationCommShellinaboxCommPolState, false)
			}
			if !commShellinaboxCommPolPlan.TagAnnotation.IsNull() && !commShellinaboxCommPolPlan.TagAnnotation.IsUnknown() {
				tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
				for _, tagAnnotationCommShellinaboxCommPol := range tagAnnotationCommShellinaboxCommPolPlan {
					tagAnnotationCommShellinaboxCommPolChildMap := NewAciObject()
					if !tagAnnotationCommShellinaboxCommPol.Key.IsNull() && !tagAnnotationCommShellinaboxCommPol.Key.IsUnknown() {
						tagAnnotationCommShellinaboxCommPolChildMap.Attributes["key"] = tagAnnotationCommShellinaboxCommPol.Key.ValueString()
					}
					if !tagAnnotationCommShellinaboxCommPol.Value.IsNull() && !tagAnnotationCommShellinaboxCommPol.Value.IsUnknown() {
						tagAnnotationCommShellinaboxCommPolChildMap.Attributes["value"] = tagAnnotationCommShellinaboxCommPol.Value.ValueString()
					}
					CommShellinaboxCommPolChildren = append(CommShellinaboxCommPolChildren, map[string]interface{}{"tagAnnotation": tagAnnotationCommShellinaboxCommPolChildMap})
					tagAnnotationIdentifier := TagAnnotationIdentifier{}
					tagAnnotationIdentifier.Key = tagAnnotationCommShellinaboxCommPol.Key
					tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
				}
				for _, tagAnnotationCommShellinaboxCommPol := range tagAnnotationCommShellinaboxCommPolState {
					delete := true
					for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
						if tagAnnotationIdentifier.Key == tagAnnotationCommShellinaboxCommPol.Key {
							delete = false
							break
						}
					}
					if delete {
						tagAnnotationCommShellinaboxCommPolChildMapForDelete := NewAciObject()
						tagAnnotationCommShellinaboxCommPolChildMapForDelete.Attributes["status"] = "deleted"
						tagAnnotationCommShellinaboxCommPolChildMapForDelete.Attributes["key"] = tagAnnotationCommShellinaboxCommPol.Key.ValueString()
						CommShellinaboxCommPolChildren = append(CommShellinaboxCommPolChildren, map[string]interface{}{"tagAnnotation": tagAnnotationCommShellinaboxCommPolChildMapForDelete})
					}
				}
			}

			var tagTagCommShellinaboxCommPolPlan, tagTagCommShellinaboxCommPolState []TagTagCommShellinaboxCommPolResourceModel
			commShellinaboxCommPolPlan.TagTag.ElementsAs(ctx, &tagTagCommShellinaboxCommPolPlan, false)
			if !commShellinaboxCommPolState.TagTag.IsNull() {
				commShellinaboxCommPolState.TagTag.ElementsAs(ctx, &tagTagCommShellinaboxCommPolState, false)
			}
			if !commShellinaboxCommPolPlan.TagTag.IsNull() && !commShellinaboxCommPolPlan.TagTag.IsUnknown() {
				tagTagIdentifiers := []TagTagIdentifier{}
				for _, tagTagCommShellinaboxCommPol := range tagTagCommShellinaboxCommPolPlan {
					tagTagCommShellinaboxCommPolChildMap := NewAciObject()
					if !tagTagCommShellinaboxCommPol.Key.IsNull() && !tagTagCommShellinaboxCommPol.Key.IsUnknown() {
						tagTagCommShellinaboxCommPolChildMap.Attributes["key"] = tagTagCommShellinaboxCommPol.Key.ValueString()
					}
					if !tagTagCommShellinaboxCommPol.Value.IsNull() && !tagTagCommShellinaboxCommPol.Value.IsUnknown() {
						tagTagCommShellinaboxCommPolChildMap.Attributes["value"] = tagTagCommShellinaboxCommPol.Value.ValueString()
					}
					CommShellinaboxCommPolChildren = append(CommShellinaboxCommPolChildren, map[string]interface{}{"tagTag": tagTagCommShellinaboxCommPolChildMap})
					tagTagIdentifier := TagTagIdentifier{}
					tagTagIdentifier.Key = tagTagCommShellinaboxCommPol.Key
					tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
				}
				for _, tagTagCommShellinaboxCommPol := range tagTagCommShellinaboxCommPolState {
					delete := true
					for _, tagTagIdentifier := range tagTagIdentifiers {
						if tagTagIdentifier.Key == tagTagCommShellinaboxCommPol.Key {
							delete = false
							break
						}
					}
					if delete {
						tagTagCommShellinaboxCommPolChildMapForDelete := NewAciObject()
						tagTagCommShellinaboxCommPolChildMapForDelete.Attributes["status"] = "deleted"
						tagTagCommShellinaboxCommPolChildMapForDelete.Attributes["key"] = tagTagCommShellinaboxCommPol.Key.ValueString()
						CommShellinaboxCommPolChildren = append(CommShellinaboxCommPolChildren, map[string]interface{}{"tagTag": tagTagCommShellinaboxCommPolChildMapForDelete})
					}
				}
			}
			childMap.Children = CommShellinaboxCommPolChildren
			childPayloads = append(childPayloads, map[string]interface{}{"commShellinabox": childMap})
		}
	} else {
		CommShellinaboxObject, _ := types.ObjectValueFrom(ctx, CommShellinaboxCommPolType, getEmptyCommShellinaboxCommPolResourceModel())
		data.CommShellinabox = CommShellinaboxObject
	}

	return childPayloads
}

func getCommPolCommSshChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *CommPolResourceModel, commSshCommPolPlan, commSshCommPolState CommSshCommPolResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.CommSsh.IsNull() && !data.CommSsh.IsUnknown() {
		CommSshCommPolChildren := make([]map[string]interface{}, 0)
		childMap := NewAciObject()
		if !IsEmptySingleNestedAttribute(data.CommSsh.Attributes()) {
			if !commSshCommPolPlan.AdminSt.IsUnknown() && !commSshCommPolPlan.AdminSt.IsNull() {
				childMap.Attributes["adminSt"] = commSshCommPolPlan.AdminSt.ValueString()
			}
			if !commSshCommPolPlan.Annotation.IsUnknown() && !commSshCommPolPlan.Annotation.IsNull() {
				childMap.Attributes["annotation"] = commSshCommPolPlan.Annotation.ValueString()
			} else {
				childMap.Attributes["annotation"] = globalAnnotation
			}
			if !commSshCommPolPlan.Descr.IsUnknown() && !commSshCommPolPlan.Descr.IsNull() {
				childMap.Attributes["descr"] = commSshCommPolPlan.Descr.ValueString()
			}
			if !commSshCommPolPlan.HostkeyAlgos.IsUnknown() && !commSshCommPolPlan.HostkeyAlgos.IsNull() {
				var tmpHostkeyAlgos []string
				commSshCommPolPlan.HostkeyAlgos.ElementsAs(ctx, &tmpHostkeyAlgos, false)
				childMap.Attributes["hostkeyAlgos"] = strings.Join(tmpHostkeyAlgos, ",")
			}
			if !commSshCommPolPlan.KexAlgos.IsUnknown() && !commSshCommPolPlan.KexAlgos.IsNull() {
				var tmpKexAlgos []string
				commSshCommPolPlan.KexAlgos.ElementsAs(ctx, &tmpKexAlgos, false)
				childMap.Attributes["kexAlgos"] = strings.Join(tmpKexAlgos, ",")
			}
			if !commSshCommPolPlan.Name.IsUnknown() && !commSshCommPolPlan.Name.IsNull() {
				childMap.Attributes["name"] = commSshCommPolPlan.Name.ValueString()
			}
			if !commSshCommPolPlan.NameAlias.IsUnknown() && !commSshCommPolPlan.NameAlias.IsNull() {
				childMap.Attributes["nameAlias"] = commSshCommPolPlan.NameAlias.ValueString()
			}
			if !commSshCommPolPlan.PasswordAuth.IsUnknown() && !commSshCommPolPlan.PasswordAuth.IsNull() {
				childMap.Attributes["passwordAuth"] = commSshCommPolPlan.PasswordAuth.ValueString()
			}
			if !commSshCommPolPlan.Port.IsUnknown() && !commSshCommPolPlan.Port.IsNull() {
				childMap.Attributes["port"] = commSshCommPolPlan.Port.ValueString()
			}
			if !commSshCommPolPlan.SshCiphers.IsUnknown() && !commSshCommPolPlan.SshCiphers.IsNull() {
				var tmpSshCiphers []string
				commSshCommPolPlan.SshCiphers.ElementsAs(ctx, &tmpSshCiphers, false)
				childMap.Attributes["sshCiphers"] = strings.Join(tmpSshCiphers, ",")
			}
			if !commSshCommPolPlan.SshMacs.IsUnknown() && !commSshCommPolPlan.SshMacs.IsNull() {
				var tmpSshMacs []string
				commSshCommPolPlan.SshMacs.ElementsAs(ctx, &tmpSshMacs, false)
				childMap.Attributes["sshMacs"] = strings.Join(tmpSshMacs, ",")
			}

			var tagAnnotationCommSshCommPolPlan, tagAnnotationCommSshCommPolState []TagAnnotationCommSshCommPolResourceModel
			commSshCommPolPlan.TagAnnotation.ElementsAs(ctx, &tagAnnotationCommSshCommPolPlan, false)
			if !commSshCommPolState.TagAnnotation.IsNull() {
				commSshCommPolState.TagAnnotation.ElementsAs(ctx, &tagAnnotationCommSshCommPolState, false)
			}
			if !commSshCommPolPlan.TagAnnotation.IsNull() && !commSshCommPolPlan.TagAnnotation.IsUnknown() {
				tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
				for _, tagAnnotationCommSshCommPol := range tagAnnotationCommSshCommPolPlan {
					tagAnnotationCommSshCommPolChildMap := NewAciObject()
					if !tagAnnotationCommSshCommPol.Key.IsNull() && !tagAnnotationCommSshCommPol.Key.IsUnknown() {
						tagAnnotationCommSshCommPolChildMap.Attributes["key"] = tagAnnotationCommSshCommPol.Key.ValueString()
					}
					if !tagAnnotationCommSshCommPol.Value.IsNull() && !tagAnnotationCommSshCommPol.Value.IsUnknown() {
						tagAnnotationCommSshCommPolChildMap.Attributes["value"] = tagAnnotationCommSshCommPol.Value.ValueString()
					}
					CommSshCommPolChildren = append(CommSshCommPolChildren, map[string]interface{}{"tagAnnotation": tagAnnotationCommSshCommPolChildMap})
					tagAnnotationIdentifier := TagAnnotationIdentifier{}
					tagAnnotationIdentifier.Key = tagAnnotationCommSshCommPol.Key
					tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
				}
				for _, tagAnnotationCommSshCommPol := range tagAnnotationCommSshCommPolState {
					delete := true
					for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
						if tagAnnotationIdentifier.Key == tagAnnotationCommSshCommPol.Key {
							delete = false
							break
						}
					}
					if delete {
						tagAnnotationCommSshCommPolChildMapForDelete := NewAciObject()
						tagAnnotationCommSshCommPolChildMapForDelete.Attributes["status"] = "deleted"
						tagAnnotationCommSshCommPolChildMapForDelete.Attributes["key"] = tagAnnotationCommSshCommPol.Key.ValueString()
						CommSshCommPolChildren = append(CommSshCommPolChildren, map[string]interface{}{"tagAnnotation": tagAnnotationCommSshCommPolChildMapForDelete})
					}
				}
			}

			var tagTagCommSshCommPolPlan, tagTagCommSshCommPolState []TagTagCommSshCommPolResourceModel
			commSshCommPolPlan.TagTag.ElementsAs(ctx, &tagTagCommSshCommPolPlan, false)
			if !commSshCommPolState.TagTag.IsNull() {
				commSshCommPolState.TagTag.ElementsAs(ctx, &tagTagCommSshCommPolState, false)
			}
			if !commSshCommPolPlan.TagTag.IsNull() && !commSshCommPolPlan.TagTag.IsUnknown() {
				tagTagIdentifiers := []TagTagIdentifier{}
				for _, tagTagCommSshCommPol := range tagTagCommSshCommPolPlan {
					tagTagCommSshCommPolChildMap := NewAciObject()
					if !tagTagCommSshCommPol.Key.IsNull() && !tagTagCommSshCommPol.Key.IsUnknown() {
						tagTagCommSshCommPolChildMap.Attributes["key"] = tagTagCommSshCommPol.Key.ValueString()
					}
					if !tagTagCommSshCommPol.Value.IsNull() && !tagTagCommSshCommPol.Value.IsUnknown() {
						tagTagCommSshCommPolChildMap.Attributes["value"] = tagTagCommSshCommPol.Value.ValueString()
					}
					CommSshCommPolChildren = append(CommSshCommPolChildren, map[string]interface{}{"tagTag": tagTagCommSshCommPolChildMap})
					tagTagIdentifier := TagTagIdentifier{}
					tagTagIdentifier.Key = tagTagCommSshCommPol.Key
					tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
				}
				for _, tagTagCommSshCommPol := range tagTagCommSshCommPolState {
					delete := true
					for _, tagTagIdentifier := range tagTagIdentifiers {
						if tagTagIdentifier.Key == tagTagCommSshCommPol.Key {
							delete = false
							break
						}
					}
					if delete {
						tagTagCommSshCommPolChildMapForDelete := NewAciObject()
						tagTagCommSshCommPolChildMapForDelete.Attributes["status"] = "deleted"
						tagTagCommSshCommPolChildMapForDelete.Attributes["key"] = tagTagCommSshCommPol.Key.ValueString()
						CommSshCommPolChildren = append(CommSshCommPolChildren, map[string]interface{}{"tagTag": tagTagCommSshCommPolChildMapForDelete})
					}
				}
			}
			childMap.Children = CommSshCommPolChildren
			childPayloads = append(childPayloads, map[string]interface{}{"commSsh": childMap})
		}
	} else {
		CommSshObject, _ := types.ObjectValueFrom(ctx, CommSshCommPolType, getEmptyCommSshCommPolResourceModel())
		data.CommSsh = CommSshObject
	}

	return childPayloads
}

func getCommPolCommTelnetChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *CommPolResourceModel, commTelnetCommPolPlan, commTelnetCommPolState CommTelnetCommPolResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.CommTelnet.IsNull() && !data.CommTelnet.IsUnknown() {
		CommTelnetCommPolChildren := make([]map[string]interface{}, 0)
		childMap := NewAciObject()
		if !IsEmptySingleNestedAttribute(data.CommTelnet.Attributes()) {
			if !commTelnetCommPolPlan.AdminSt.IsUnknown() && !commTelnetCommPolPlan.AdminSt.IsNull() {
				childMap.Attributes["adminSt"] = commTelnetCommPolPlan.AdminSt.ValueString()
			}
			if !commTelnetCommPolPlan.Annotation.IsUnknown() && !commTelnetCommPolPlan.Annotation.IsNull() {
				childMap.Attributes["annotation"] = commTelnetCommPolPlan.Annotation.ValueString()
			} else {
				childMap.Attributes["annotation"] = globalAnnotation
			}
			if !commTelnetCommPolPlan.Descr.IsUnknown() && !commTelnetCommPolPlan.Descr.IsNull() {
				childMap.Attributes["descr"] = commTelnetCommPolPlan.Descr.ValueString()
			}
			if !commTelnetCommPolPlan.Name.IsUnknown() && !commTelnetCommPolPlan.Name.IsNull() {
				childMap.Attributes["name"] = commTelnetCommPolPlan.Name.ValueString()
			}
			if !commTelnetCommPolPlan.NameAlias.IsUnknown() && !commTelnetCommPolPlan.NameAlias.IsNull() {
				childMap.Attributes["nameAlias"] = commTelnetCommPolPlan.NameAlias.ValueString()
			}
			if !commTelnetCommPolPlan.Port.IsUnknown() && !commTelnetCommPolPlan.Port.IsNull() {
				childMap.Attributes["port"] = commTelnetCommPolPlan.Port.ValueString()
			}

			var tagAnnotationCommTelnetCommPolPlan, tagAnnotationCommTelnetCommPolState []TagAnnotationCommTelnetCommPolResourceModel
			commTelnetCommPolPlan.TagAnnotation.ElementsAs(ctx, &tagAnnotationCommTelnetCommPolPlan, false)
			if !commTelnetCommPolState.TagAnnotation.IsNull() {
				commTelnetCommPolState.TagAnnotation.ElementsAs(ctx, &tagAnnotationCommTelnetCommPolState, false)
			}
			if !commTelnetCommPolPlan.TagAnnotation.IsNull() && !commTelnetCommPolPlan.TagAnnotation.IsUnknown() {
				tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
				for _, tagAnnotationCommTelnetCommPol := range tagAnnotationCommTelnetCommPolPlan {
					tagAnnotationCommTelnetCommPolChildMap := NewAciObject()
					if !tagAnnotationCommTelnetCommPol.Key.IsNull() && !tagAnnotationCommTelnetCommPol.Key.IsUnknown() {
						tagAnnotationCommTelnetCommPolChildMap.Attributes["key"] = tagAnnotationCommTelnetCommPol.Key.ValueString()
					}
					if !tagAnnotationCommTelnetCommPol.Value.IsNull() && !tagAnnotationCommTelnetCommPol.Value.IsUnknown() {
						tagAnnotationCommTelnetCommPolChildMap.Attributes["value"] = tagAnnotationCommTelnetCommPol.Value.ValueString()
					}
					CommTelnetCommPolChildren = append(CommTelnetCommPolChildren, map[string]interface{}{"tagAnnotation": tagAnnotationCommTelnetCommPolChildMap})
					tagAnnotationIdentifier := TagAnnotationIdentifier{}
					tagAnnotationIdentifier.Key = tagAnnotationCommTelnetCommPol.Key
					tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
				}
				for _, tagAnnotationCommTelnetCommPol := range tagAnnotationCommTelnetCommPolState {
					delete := true
					for _, tagAnnotationIdentifier := range tagAnnotationIdentifiers {
						if tagAnnotationIdentifier.Key == tagAnnotationCommTelnetCommPol.Key {
							delete = false
							break
						}
					}
					if delete {
						tagAnnotationCommTelnetCommPolChildMapForDelete := NewAciObject()
						tagAnnotationCommTelnetCommPolChildMapForDelete.Attributes["status"] = "deleted"
						tagAnnotationCommTelnetCommPolChildMapForDelete.Attributes["key"] = tagAnnotationCommTelnetCommPol.Key.ValueString()
						CommTelnetCommPolChildren = append(CommTelnetCommPolChildren, map[string]interface{}{"tagAnnotation": tagAnnotationCommTelnetCommPolChildMapForDelete})
					}
				}
			}

			var tagTagCommTelnetCommPolPlan, tagTagCommTelnetCommPolState []TagTagCommTelnetCommPolResourceModel
			commTelnetCommPolPlan.TagTag.ElementsAs(ctx, &tagTagCommTelnetCommPolPlan, false)
			if !commTelnetCommPolState.TagTag.IsNull() {
				commTelnetCommPolState.TagTag.ElementsAs(ctx, &tagTagCommTelnetCommPolState, false)
			}
			if !commTelnetCommPolPlan.TagTag.IsNull() && !commTelnetCommPolPlan.TagTag.IsUnknown() {
				tagTagIdentifiers := []TagTagIdentifier{}
				for _, tagTagCommTelnetCommPol := range tagTagCommTelnetCommPolPlan {
					tagTagCommTelnetCommPolChildMap := NewAciObject()
					if !tagTagCommTelnetCommPol.Key.IsNull() && !tagTagCommTelnetCommPol.Key.IsUnknown() {
						tagTagCommTelnetCommPolChildMap.Attributes["key"] = tagTagCommTelnetCommPol.Key.ValueString()
					}
					if !tagTagCommTelnetCommPol.Value.IsNull() && !tagTagCommTelnetCommPol.Value.IsUnknown() {
						tagTagCommTelnetCommPolChildMap.Attributes["value"] = tagTagCommTelnetCommPol.Value.ValueString()
					}
					CommTelnetCommPolChildren = append(CommTelnetCommPolChildren, map[string]interface{}{"tagTag": tagTagCommTelnetCommPolChildMap})
					tagTagIdentifier := TagTagIdentifier{}
					tagTagIdentifier.Key = tagTagCommTelnetCommPol.Key
					tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
				}
				for _, tagTagCommTelnetCommPol := range tagTagCommTelnetCommPolState {
					delete := true
					for _, tagTagIdentifier := range tagTagIdentifiers {
						if tagTagIdentifier.Key == tagTagCommTelnetCommPol.Key {
							delete = false
							break
						}
					}
					if delete {
						tagTagCommTelnetCommPolChildMapForDelete := NewAciObject()
						tagTagCommTelnetCommPolChildMapForDelete.Attributes["status"] = "deleted"
						tagTagCommTelnetCommPolChildMapForDelete.Attributes["key"] = tagTagCommTelnetCommPol.Key.ValueString()
						CommTelnetCommPolChildren = append(CommTelnetCommPolChildren, map[string]interface{}{"tagTag": tagTagCommTelnetCommPolChildMapForDelete})
					}
				}
			}
			childMap.Children = CommTelnetCommPolChildren
			childPayloads = append(childPayloads, map[string]interface{}{"commTelnet": childMap})
		}
	} else {
		CommTelnetObject, _ := types.ObjectValueFrom(ctx, CommTelnetCommPolType, getEmptyCommTelnetCommPolResourceModel())
		data.CommTelnet = CommTelnetObject
	}

	return childPayloads
}

func getCommPolTagAnnotationChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *CommPolResourceModel, tagAnnotationCommPolPlan, tagAnnotationCommPolState []TagAnnotationCommPolResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.TagAnnotation.IsNull() && !data.TagAnnotation.IsUnknown() {
		tagAnnotationIdentifiers := []TagAnnotationIdentifier{}
		for _, tagAnnotationCommPol := range tagAnnotationCommPolPlan {
			childMap := NewAciObject()
			if !tagAnnotationCommPol.Key.IsNull() && !tagAnnotationCommPol.Key.IsUnknown() {
				childMap.Attributes["key"] = tagAnnotationCommPol.Key.ValueString()
			}
			if !tagAnnotationCommPol.Value.IsNull() && !tagAnnotationCommPol.Value.IsUnknown() {
				childMap.Attributes["value"] = tagAnnotationCommPol.Value.ValueString()
			}
			childPayloads = append(childPayloads, map[string]interface{}{"tagAnnotation": childMap})
			tagAnnotationIdentifier := TagAnnotationIdentifier{}
			tagAnnotationIdentifier.Key = tagAnnotationCommPol.Key
			tagAnnotationIdentifiers = append(tagAnnotationIdentifiers, tagAnnotationIdentifier)
		}
		for _, tagAnnotation := range tagAnnotationCommPolState {
			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 getCommPolTagTagChildPayloads(ctx context.Context, diags *diag.Diagnostics, data *CommPolResourceModel, tagTagCommPolPlan, tagTagCommPolState []TagTagCommPolResourceModel) []map[string]interface{} {
	childPayloads := []map[string]interface{}{}
	if !data.TagTag.IsNull() && !data.TagTag.IsUnknown() {
		tagTagIdentifiers := []TagTagIdentifier{}
		for _, tagTagCommPol := range tagTagCommPolPlan {
			childMap := NewAciObject()
			if !tagTagCommPol.Key.IsNull() && !tagTagCommPol.Key.IsUnknown() {
				childMap.Attributes["key"] = tagTagCommPol.Key.ValueString()
			}
			if !tagTagCommPol.Value.IsNull() && !tagTagCommPol.Value.IsUnknown() {
				childMap.Attributes["value"] = tagTagCommPol.Value.ValueString()
			}
			childPayloads = append(childPayloads, map[string]interface{}{"tagTag": childMap})
			tagTagIdentifier := TagTagIdentifier{}
			tagTagIdentifier.Key = tagTagCommPol.Key
			tagTagIdentifiers = append(tagTagIdentifiers, tagTagIdentifier)
		}
		for _, tagTag := range tagTagCommPolState {
			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 getCommPolCreateJsonPayload(ctx context.Context, diags *diag.Diagnostics, createType bool, data *CommPolResourceModel, commHttpPlan, commHttpState CommHttpCommPolResourceModel, commHttpsPlan, commHttpsState CommHttpsCommPolResourceModel, commShellinaboxPlan, commShellinaboxState CommShellinaboxCommPolResourceModel, commSshPlan, commSshState CommSshCommPolResourceModel, commTelnetPlan, commTelnetState CommTelnetCommPolResourceModel, tagAnnotationPlan, tagAnnotationState []TagAnnotationCommPolResourceModel, tagTagPlan, tagTagState []TagTagCommPolResourceModel) *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{}{}

	CommHttpchildPayloads := getCommPolCommHttpChildPayloads(ctx, diags, data, commHttpPlan, commHttpState)
	if CommHttpchildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, CommHttpchildPayloads...)

	CommHttpschildPayloads := getCommPolCommHttpsChildPayloads(ctx, diags, data, commHttpsPlan, commHttpsState)
	if CommHttpschildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, CommHttpschildPayloads...)

	CommShellinaboxchildPayloads := getCommPolCommShellinaboxChildPayloads(ctx, diags, data, commShellinaboxPlan, commShellinaboxState)
	if CommShellinaboxchildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, CommShellinaboxchildPayloads...)

	CommSshchildPayloads := getCommPolCommSshChildPayloads(ctx, diags, data, commSshPlan, commSshState)
	if CommSshchildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, CommSshchildPayloads...)

	CommTelnetchildPayloads := getCommPolCommTelnetChildPayloads(ctx, diags, data, commTelnetPlan, commTelnetState)
	if CommTelnetchildPayloads == nil {
		return nil
	}
	childPayloads = append(childPayloads, CommTelnetchildPayloads...)

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

	TagTagchildPayloads := getCommPolTagTagChildPayloads(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.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.OwnerKey.IsNull() && !data.OwnerKey.IsUnknown() {
		payloadMap["attributes"].(map[string]string)["ownerKey"] = data.OwnerKey.ValueString()
	}
	if !data.OwnerTag.IsNull() && !data.OwnerTag.IsUnknown() {
		payloadMap["attributes"].(map[string]string)["ownerTag"] = data.OwnerTag.ValueString()
	}
	if !data.StrictSecurityOnApicOOBSubnet.IsNull() && !data.StrictSecurityOnApicOOBSubnet.IsUnknown() {
		payloadMap["attributes"].(map[string]string)["strictSecurityOnApicOOBSubnet"] = data.StrictSecurityOnApicOOBSubnet.ValueString()
	}
	payload, err := json.Marshal(map[string]interface{}{"commPol": 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
}
