// Code generated by terraform-plugin-framework-generator DO NOT EDIT.

package resource_example

import (
	"context"
	"example.com/apisdk"
	"fmt"
	"github.com/hashicorp/terraform-plugin-framework/attr"
	"github.com/hashicorp/terraform-plugin-framework/diag"
	"github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault"
	"github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier"
	"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
	"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-go/tftypes"
	planmodifieralias "github.com/my_account/my_project/myboolplanmodifier"
	validatoralias "github.com/my_account/my_project/myboolvalidator"
	boolalias "github.com/my_account_my_project/bool"
	"strings"

	"github.com/hashicorp/terraform-plugin-framework/resource/schema"
)

func ExampleResourceSchema(ctx context.Context) schema.Schema {
	return schema.Schema{
		Attributes: map[string]schema.Attribute{
			"bool_attribute": schema.BoolAttribute{
				CustomType: my_bool_type,
				Computed:   true,
				PlanModifiers: []planmodifier.Bool{
					boolplanmodifier.RequiresReplace(),
					myboolplanmodifier.Modify(),
				},
				Validators: []validator.Bool{
					myboolvalidator.Validate(),
				},
				Default: booldefault.StaticBool(true),
			},
			"list_nested_attribute_assoc_ext_type": schema.ListNestedAttribute{
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"bool_attribute": schema.BoolAttribute{
							Optional: true,
						},
						"float64_attribute": schema.Float64Attribute{
							Optional: true,
						},
						"int64_attribute": schema.Int64Attribute{
							Optional: true,
						},
						"number_attribute": schema.NumberAttribute{
							Optional: true,
						},
						"string_attribute": schema.StringAttribute{
							Optional: true,
						},
					},
					CustomType: ListNestedAttributeAssocExtTypeType{
						ObjectType: types.ObjectType{
							AttrTypes: ListNestedAttributeAssocExtTypeValue{}.AttributeTypes(ctx),
						},
					},
				},
				Optional: true,
			},
			"map_nested_attribute_assoc_ext_type": schema.MapNestedAttribute{
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"bool_attribute": schema.BoolAttribute{
							Optional: true,
						},
						"float64_attribute": schema.Float64Attribute{
							Optional: true,
						},
						"int64_attribute": schema.Int64Attribute{
							Optional: true,
						},
						"number_attribute": schema.NumberAttribute{
							Optional: true,
						},
						"string_attribute": schema.StringAttribute{
							Optional: true,
						},
					},
					CustomType: MapNestedAttributeAssocExtTypeType{
						ObjectType: types.ObjectType{
							AttrTypes: MapNestedAttributeAssocExtTypeValue{}.AttributeTypes(ctx),
						},
					},
				},
				Optional: true,
			},
			"set_nested_attribute_assoc_ext_type": schema.SetNestedAttribute{
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"bool_attribute": schema.BoolAttribute{
							Optional: true,
						},
						"float64_attribute": schema.Float64Attribute{
							Optional: true,
						},
						"int64_attribute": schema.Int64Attribute{
							Optional: true,
						},
						"number_attribute": schema.NumberAttribute{
							Optional: true,
						},
						"string_attribute": schema.StringAttribute{
							Optional: true,
						},
					},
					CustomType: SetNestedAttributeAssocExtTypeType{
						ObjectType: types.ObjectType{
							AttrTypes: SetNestedAttributeAssocExtTypeValue{}.AttributeTypes(ctx),
						},
					},
				},
				Optional: true,
			},
			"single_nested_attribute_assoc_ext_type": schema.SingleNestedAttribute{
				Attributes: map[string]schema.Attribute{
					"bool_attribute": schema.BoolAttribute{
						Optional: true,
					},
					"float64_attribute": schema.Float64Attribute{
						Optional: true,
					},
					"int64_attribute": schema.Int64Attribute{
						Optional: true,
					},
					"number_attribute": schema.NumberAttribute{
						Optional: true,
					},
					"string_attribute": schema.StringAttribute{
						Optional: true,
					},
				},
				CustomType: SingleNestedAttributeAssocExtTypeType{
					ObjectType: types.ObjectType{
						AttrTypes: SingleNestedAttributeAssocExtTypeValue{}.AttributeTypes(ctx),
					},
				},
				Optional: true,
			},
		},
		Blocks: map[string]schema.Block{
			"list_nested_block_assoc_ext_type": schema.ListNestedBlock{
				NestedObject: schema.NestedBlockObject{
					Attributes: map[string]schema.Attribute{
						"bool_attribute": schema.BoolAttribute{
							Optional: true,
						},
						"float64_attribute": schema.Float64Attribute{
							Optional: true,
						},
						"int64_attribute": schema.Int64Attribute{
							Optional: true,
						},
						"number_attribute": schema.NumberAttribute{
							Optional: true,
						},
						"string_attribute": schema.StringAttribute{
							Optional: true,
						},
					},
					CustomType: ListNestedBlockAssocExtTypeType{
						ObjectType: types.ObjectType{
							AttrTypes: ListNestedBlockAssocExtTypeValue{}.AttributeTypes(ctx),
						},
					},
				},
			},
			"set_nested_block_assoc_ext_type": schema.SetNestedBlock{
				NestedObject: schema.NestedBlockObject{
					Attributes: map[string]schema.Attribute{
						"bool_attribute": schema.BoolAttribute{
							Optional: true,
						},
						"float64_attribute": schema.Float64Attribute{
							Optional: true,
						},
						"int64_attribute": schema.Int64Attribute{
							Optional: true,
						},
						"number_attribute": schema.NumberAttribute{
							Optional: true,
						},
						"string_attribute": schema.StringAttribute{
							Optional: true,
						},
					},
					CustomType: SetNestedBlockAssocExtTypeType{
						ObjectType: types.ObjectType{
							AttrTypes: SetNestedBlockAssocExtTypeValue{}.AttributeTypes(ctx),
						},
					},
				},
			},
			"single_nested_block_assoc_ext_type": schema.SingleNestedBlock{
				Attributes: map[string]schema.Attribute{
					"bool_attribute": schema.BoolAttribute{
						Optional: true,
					},
					"float64_attribute": schema.Float64Attribute{
						Optional: true,
					},
					"int64_attribute": schema.Int64Attribute{
						Optional: true,
					},
					"number_attribute": schema.NumberAttribute{
						Optional: true,
					},
					"string_attribute": schema.StringAttribute{
						Optional: true,
					},
				},
				CustomType: SingleNestedBlockAssocExtTypeType{
					ObjectType: types.ObjectType{
						AttrTypes: SingleNestedBlockAssocExtTypeValue{}.AttributeTypes(ctx),
					},
				},
			},
		},
		Description:         "\"Example\" resource",
		MarkdownDescription: "\"Example\" _resource_",
		DeprecationMessage:  "This resource is deprecated!",
	}
}

type ExampleModel struct {
	BoolAttribute                     my_bool_value                          `tfsdk:"bool_attribute"`
	ListNestedAttributeAssocExtType   types.List                             `tfsdk:"list_nested_attribute_assoc_ext_type"`
	MapNestedAttributeAssocExtType    types.Map                              `tfsdk:"map_nested_attribute_assoc_ext_type"`
	SetNestedAttributeAssocExtType    types.Set                              `tfsdk:"set_nested_attribute_assoc_ext_type"`
	SingleNestedAttributeAssocExtType SingleNestedAttributeAssocExtTypeValue `tfsdk:"single_nested_attribute_assoc_ext_type"`
	ListNestedBlockAssocExtType       types.List                             `tfsdk:"list_nested_block_assoc_ext_type"`
	SetNestedBlockAssocExtType        types.Set                              `tfsdk:"set_nested_block_assoc_ext_type"`
	SingleNestedBlockAssocExtType     SingleNestedBlockAssocExtTypeValue     `tfsdk:"single_nested_block_assoc_ext_type"`
}

var _ basetypes.ObjectTypable = ListNestedAttributeAssocExtTypeType{}

type ListNestedAttributeAssocExtTypeType struct {
	basetypes.ObjectType
}

func (t ListNestedAttributeAssocExtTypeType) Equal(o attr.Type) bool {
	other, ok := o.(ListNestedAttributeAssocExtTypeType)

	if !ok {
		return false
	}

	return t.ObjectType.Equal(other.ObjectType)
}

func (t ListNestedAttributeAssocExtTypeType) String() string {
	return "ListNestedAttributeAssocExtTypeType"
}

func (t ListNestedAttributeAssocExtTypeType) ValueFromObject(ctx context.Context, in basetypes.ObjectValue) (basetypes.ObjectValuable, diag.Diagnostics) {
	var diags diag.Diagnostics

	attributes := in.Attributes()

	boolAttributeAttribute, ok := attributes["bool_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`bool_attribute is missing from object`)

		return nil, diags
	}

	boolAttributeVal, ok := boolAttributeAttribute.(basetypes.BoolValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`bool_attribute expected to be basetypes.BoolValue, was: %T`, boolAttributeAttribute))
	}

	float64AttributeAttribute, ok := attributes["float64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`float64_attribute is missing from object`)

		return nil, diags
	}

	float64AttributeVal, ok := float64AttributeAttribute.(basetypes.Float64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`float64_attribute expected to be basetypes.Float64Value, was: %T`, float64AttributeAttribute))
	}

	int64AttributeAttribute, ok := attributes["int64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`int64_attribute is missing from object`)

		return nil, diags
	}

	int64AttributeVal, ok := int64AttributeAttribute.(basetypes.Int64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`int64_attribute expected to be basetypes.Int64Value, was: %T`, int64AttributeAttribute))
	}

	numberAttributeAttribute, ok := attributes["number_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`number_attribute is missing from object`)

		return nil, diags
	}

	numberAttributeVal, ok := numberAttributeAttribute.(basetypes.NumberValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`number_attribute expected to be basetypes.NumberValue, was: %T`, numberAttributeAttribute))
	}

	stringAttributeAttribute, ok := attributes["string_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`string_attribute is missing from object`)

		return nil, diags
	}

	stringAttributeVal, ok := stringAttributeAttribute.(basetypes.StringValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`string_attribute expected to be basetypes.StringValue, was: %T`, stringAttributeAttribute))
	}

	if diags.HasError() {
		return nil, diags
	}

	return ListNestedAttributeAssocExtTypeValue{
		BoolAttribute:    boolAttributeVal,
		Float64Attribute: float64AttributeVal,
		Int64Attribute:   int64AttributeVal,
		NumberAttribute:  numberAttributeVal,
		StringAttribute:  stringAttributeVal,
		state:            attr.ValueStateKnown,
	}, diags
}

func NewListNestedAttributeAssocExtTypeValueNull() ListNestedAttributeAssocExtTypeValue {
	return ListNestedAttributeAssocExtTypeValue{
		state: attr.ValueStateNull,
	}
}

func NewListNestedAttributeAssocExtTypeValueUnknown() ListNestedAttributeAssocExtTypeValue {
	return ListNestedAttributeAssocExtTypeValue{
		state: attr.ValueStateUnknown,
	}
}

func NewListNestedAttributeAssocExtTypeValue(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) (ListNestedAttributeAssocExtTypeValue, diag.Diagnostics) {
	var diags diag.Diagnostics

	// Reference: https://github.com/hashicorp/terraform-plugin-framework/issues/521
	ctx := context.Background()

	for name, attributeType := range attributeTypes {
		attribute, ok := attributes[name]

		if !ok {
			diags.AddError(
				"Missing ListNestedAttributeAssocExtTypeValue Attribute Value",
				"While creating a ListNestedAttributeAssocExtTypeValue value, a missing attribute value was detected. "+
					"A ListNestedAttributeAssocExtTypeValue must contain values for all attributes, even if null or unknown. "+
					"This is always an issue with the provider and should be reported to the provider developers.\n\n"+
					fmt.Sprintf("ListNestedAttributeAssocExtTypeValue Attribute Name (%s) Expected Type: %s", name, attributeType.String()),
			)

			continue
		}

		if !attributeType.Equal(attribute.Type(ctx)) {
			diags.AddError(
				"Invalid ListNestedAttributeAssocExtTypeValue Attribute Type",
				"While creating a ListNestedAttributeAssocExtTypeValue value, an invalid attribute value was detected. "+
					"A ListNestedAttributeAssocExtTypeValue must use a matching attribute type for the value. "+
					"This is always an issue with the provider and should be reported to the provider developers.\n\n"+
					fmt.Sprintf("ListNestedAttributeAssocExtTypeValue Attribute Name (%s) Expected Type: %s\n", name, attributeType.String())+
					fmt.Sprintf("ListNestedAttributeAssocExtTypeValue Attribute Name (%s) Given Type: %s", name, attribute.Type(ctx)),
			)
		}
	}

	for name := range attributes {
		_, ok := attributeTypes[name]

		if !ok {
			diags.AddError(
				"Extra ListNestedAttributeAssocExtTypeValue Attribute Value",
				"While creating a ListNestedAttributeAssocExtTypeValue value, an extra attribute value was detected. "+
					"A ListNestedAttributeAssocExtTypeValue must not contain values beyond the expected attribute types. "+
					"This is always an issue with the provider and should be reported to the provider developers.\n\n"+
					fmt.Sprintf("Extra ListNestedAttributeAssocExtTypeValue Attribute Name: %s", name),
			)
		}
	}

	if diags.HasError() {
		return NewListNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	boolAttributeAttribute, ok := attributes["bool_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`bool_attribute is missing from object`)

		return NewListNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	boolAttributeVal, ok := boolAttributeAttribute.(basetypes.BoolValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`bool_attribute expected to be basetypes.BoolValue, was: %T`, boolAttributeAttribute))
	}

	float64AttributeAttribute, ok := attributes["float64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`float64_attribute is missing from object`)

		return NewListNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	float64AttributeVal, ok := float64AttributeAttribute.(basetypes.Float64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`float64_attribute expected to be basetypes.Float64Value, was: %T`, float64AttributeAttribute))
	}

	int64AttributeAttribute, ok := attributes["int64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`int64_attribute is missing from object`)

		return NewListNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	int64AttributeVal, ok := int64AttributeAttribute.(basetypes.Int64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`int64_attribute expected to be basetypes.Int64Value, was: %T`, int64AttributeAttribute))
	}

	numberAttributeAttribute, ok := attributes["number_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`number_attribute is missing from object`)

		return NewListNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	numberAttributeVal, ok := numberAttributeAttribute.(basetypes.NumberValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`number_attribute expected to be basetypes.NumberValue, was: %T`, numberAttributeAttribute))
	}

	stringAttributeAttribute, ok := attributes["string_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`string_attribute is missing from object`)

		return NewListNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	stringAttributeVal, ok := stringAttributeAttribute.(basetypes.StringValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`string_attribute expected to be basetypes.StringValue, was: %T`, stringAttributeAttribute))
	}

	if diags.HasError() {
		return NewListNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	return ListNestedAttributeAssocExtTypeValue{
		BoolAttribute:    boolAttributeVal,
		Float64Attribute: float64AttributeVal,
		Int64Attribute:   int64AttributeVal,
		NumberAttribute:  numberAttributeVal,
		StringAttribute:  stringAttributeVal,
		state:            attr.ValueStateKnown,
	}, diags
}

func NewListNestedAttributeAssocExtTypeValueMust(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) ListNestedAttributeAssocExtTypeValue {
	object, diags := NewListNestedAttributeAssocExtTypeValue(attributeTypes, attributes)

	if diags.HasError() {
		// This could potentially be added to the diag package.
		diagsStrings := make([]string, 0, len(diags))

		for _, diagnostic := range diags {
			diagsStrings = append(diagsStrings, fmt.Sprintf(
				"%s | %s | %s",
				diagnostic.Severity(),
				diagnostic.Summary(),
				diagnostic.Detail()))
		}

		panic("NewListNestedAttributeAssocExtTypeValueMust received error(s): " + strings.Join(diagsStrings, "\n"))
	}

	return object
}

func (t ListNestedAttributeAssocExtTypeType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error) {
	if in.Type() == nil {
		return NewListNestedAttributeAssocExtTypeValueNull(), nil
	}

	if !in.Type().Equal(t.TerraformType(ctx)) {
		return nil, fmt.Errorf("expected %s, got %s", t.TerraformType(ctx), in.Type())
	}

	if !in.IsKnown() {
		return NewListNestedAttributeAssocExtTypeValueUnknown(), nil
	}

	if in.IsNull() {
		return NewListNestedAttributeAssocExtTypeValueNull(), nil
	}

	attributes := map[string]attr.Value{}

	val := map[string]tftypes.Value{}

	err := in.As(&val)

	if err != nil {
		return nil, err
	}

	for k, v := range val {
		a, err := t.AttrTypes[k].ValueFromTerraform(ctx, v)

		if err != nil {
			return nil, err
		}

		attributes[k] = a
	}

	return NewListNestedAttributeAssocExtTypeValueMust(ListNestedAttributeAssocExtTypeValue{}.AttributeTypes(ctx), attributes), nil
}

func (t ListNestedAttributeAssocExtTypeType) ValueType(ctx context.Context) attr.Value {
	return ListNestedAttributeAssocExtTypeValue{}
}

var _ basetypes.ObjectValuable = ListNestedAttributeAssocExtTypeValue{}

type ListNestedAttributeAssocExtTypeValue struct {
	BoolAttribute    basetypes.BoolValue    `tfsdk:"bool_attribute"`
	Float64Attribute basetypes.Float64Value `tfsdk:"float64_attribute"`
	Int64Attribute   basetypes.Int64Value   `tfsdk:"int64_attribute"`
	NumberAttribute  basetypes.NumberValue  `tfsdk:"number_attribute"`
	StringAttribute  basetypes.StringValue  `tfsdk:"string_attribute"`
	state            attr.ValueState
}

func (v ListNestedAttributeAssocExtTypeValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error) {
	attrTypes := make(map[string]tftypes.Type, 5)

	var val tftypes.Value
	var err error

	attrTypes["bool_attribute"] = basetypes.BoolType{}.TerraformType(ctx)
	attrTypes["float64_attribute"] = basetypes.Float64Type{}.TerraformType(ctx)
	attrTypes["int64_attribute"] = basetypes.Int64Type{}.TerraformType(ctx)
	attrTypes["number_attribute"] = basetypes.NumberType{}.TerraformType(ctx)
	attrTypes["string_attribute"] = basetypes.StringType{}.TerraformType(ctx)

	objectType := tftypes.Object{AttributeTypes: attrTypes}

	switch v.state {
	case attr.ValueStateKnown:
		vals := make(map[string]tftypes.Value, 5)

		val, err = v.BoolAttribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["bool_attribute"] = val

		val, err = v.Float64Attribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["float64_attribute"] = val

		val, err = v.Int64Attribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["int64_attribute"] = val

		val, err = v.NumberAttribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["number_attribute"] = val

		val, err = v.StringAttribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["string_attribute"] = val

		if err := tftypes.ValidateValue(objectType, vals); err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		return tftypes.NewValue(objectType, vals), nil
	case attr.ValueStateNull:
		return tftypes.NewValue(objectType, nil), nil
	case attr.ValueStateUnknown:
		return tftypes.NewValue(objectType, tftypes.UnknownValue), nil
	default:
		panic(fmt.Sprintf("unhandled Object state in ToTerraformValue: %s", v.state))
	}
}

func (v ListNestedAttributeAssocExtTypeValue) IsNull() bool {
	return v.state == attr.ValueStateNull
}

func (v ListNestedAttributeAssocExtTypeValue) IsUnknown() bool {
	return v.state == attr.ValueStateUnknown
}

func (v ListNestedAttributeAssocExtTypeValue) String() string {
	return "ListNestedAttributeAssocExtTypeValue"
}

func (v ListNestedAttributeAssocExtTypeValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) {
	var diags diag.Diagnostics

	attributeTypes := map[string]attr.Type{
		"bool_attribute":    basetypes.BoolType{},
		"float64_attribute": basetypes.Float64Type{},
		"int64_attribute":   basetypes.Int64Type{},
		"number_attribute":  basetypes.NumberType{},
		"string_attribute":  basetypes.StringType{},
	}

	if v.IsNull() {
		return types.ObjectNull(attributeTypes), diags
	}

	if v.IsUnknown() {
		return types.ObjectUnknown(attributeTypes), diags
	}

	objVal, diags := types.ObjectValue(
		attributeTypes,
		map[string]attr.Value{
			"bool_attribute":    v.BoolAttribute,
			"float64_attribute": v.Float64Attribute,
			"int64_attribute":   v.Int64Attribute,
			"number_attribute":  v.NumberAttribute,
			"string_attribute":  v.StringAttribute,
		})

	return objVal, diags
}

func (v ListNestedAttributeAssocExtTypeValue) Equal(o attr.Value) bool {
	other, ok := o.(ListNestedAttributeAssocExtTypeValue)

	if !ok {
		return false
	}

	if v.state != other.state {
		return false
	}

	if v.state != attr.ValueStateKnown {
		return true
	}

	if !v.BoolAttribute.Equal(other.BoolAttribute) {
		return false
	}

	if !v.Float64Attribute.Equal(other.Float64Attribute) {
		return false
	}

	if !v.Int64Attribute.Equal(other.Int64Attribute) {
		return false
	}

	if !v.NumberAttribute.Equal(other.NumberAttribute) {
		return false
	}

	if !v.StringAttribute.Equal(other.StringAttribute) {
		return false
	}

	return true
}

func (v ListNestedAttributeAssocExtTypeValue) Type(ctx context.Context) attr.Type {
	return ListNestedAttributeAssocExtTypeType{
		basetypes.ObjectType{
			AttrTypes: v.AttributeTypes(ctx),
		},
	}
}

func (v ListNestedAttributeAssocExtTypeValue) AttributeTypes(ctx context.Context) map[string]attr.Type {
	return map[string]attr.Type{
		"bool_attribute":    basetypes.BoolType{},
		"float64_attribute": basetypes.Float64Type{},
		"int64_attribute":   basetypes.Int64Type{},
		"number_attribute":  basetypes.NumberType{},
		"string_attribute":  basetypes.StringType{},
	}
}

var _ basetypes.ObjectTypable = MapNestedAttributeAssocExtTypeType{}

type MapNestedAttributeAssocExtTypeType struct {
	basetypes.ObjectType
}

func (t MapNestedAttributeAssocExtTypeType) Equal(o attr.Type) bool {
	other, ok := o.(MapNestedAttributeAssocExtTypeType)

	if !ok {
		return false
	}

	return t.ObjectType.Equal(other.ObjectType)
}

func (t MapNestedAttributeAssocExtTypeType) String() string {
	return "MapNestedAttributeAssocExtTypeType"
}

func (t MapNestedAttributeAssocExtTypeType) ValueFromObject(ctx context.Context, in basetypes.ObjectValue) (basetypes.ObjectValuable, diag.Diagnostics) {
	var diags diag.Diagnostics

	attributes := in.Attributes()

	boolAttributeAttribute, ok := attributes["bool_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`bool_attribute is missing from object`)

		return nil, diags
	}

	boolAttributeVal, ok := boolAttributeAttribute.(basetypes.BoolValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`bool_attribute expected to be basetypes.BoolValue, was: %T`, boolAttributeAttribute))
	}

	float64AttributeAttribute, ok := attributes["float64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`float64_attribute is missing from object`)

		return nil, diags
	}

	float64AttributeVal, ok := float64AttributeAttribute.(basetypes.Float64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`float64_attribute expected to be basetypes.Float64Value, was: %T`, float64AttributeAttribute))
	}

	int64AttributeAttribute, ok := attributes["int64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`int64_attribute is missing from object`)

		return nil, diags
	}

	int64AttributeVal, ok := int64AttributeAttribute.(basetypes.Int64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`int64_attribute expected to be basetypes.Int64Value, was: %T`, int64AttributeAttribute))
	}

	numberAttributeAttribute, ok := attributes["number_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`number_attribute is missing from object`)

		return nil, diags
	}

	numberAttributeVal, ok := numberAttributeAttribute.(basetypes.NumberValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`number_attribute expected to be basetypes.NumberValue, was: %T`, numberAttributeAttribute))
	}

	stringAttributeAttribute, ok := attributes["string_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`string_attribute is missing from object`)

		return nil, diags
	}

	stringAttributeVal, ok := stringAttributeAttribute.(basetypes.StringValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`string_attribute expected to be basetypes.StringValue, was: %T`, stringAttributeAttribute))
	}

	if diags.HasError() {
		return nil, diags
	}

	return MapNestedAttributeAssocExtTypeValue{
		BoolAttribute:    boolAttributeVal,
		Float64Attribute: float64AttributeVal,
		Int64Attribute:   int64AttributeVal,
		NumberAttribute:  numberAttributeVal,
		StringAttribute:  stringAttributeVal,
		state:            attr.ValueStateKnown,
	}, diags
}

func NewMapNestedAttributeAssocExtTypeValueNull() MapNestedAttributeAssocExtTypeValue {
	return MapNestedAttributeAssocExtTypeValue{
		state: attr.ValueStateNull,
	}
}

func NewMapNestedAttributeAssocExtTypeValueUnknown() MapNestedAttributeAssocExtTypeValue {
	return MapNestedAttributeAssocExtTypeValue{
		state: attr.ValueStateUnknown,
	}
}

func NewMapNestedAttributeAssocExtTypeValue(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) (MapNestedAttributeAssocExtTypeValue, diag.Diagnostics) {
	var diags diag.Diagnostics

	// Reference: https://github.com/hashicorp/terraform-plugin-framework/issues/521
	ctx := context.Background()

	for name, attributeType := range attributeTypes {
		attribute, ok := attributes[name]

		if !ok {
			diags.AddError(
				"Missing MapNestedAttributeAssocExtTypeValue Attribute Value",
				"While creating a MapNestedAttributeAssocExtTypeValue value, a missing attribute value was detected. "+
					"A MapNestedAttributeAssocExtTypeValue must contain values for all attributes, even if null or unknown. "+
					"This is always an issue with the provider and should be reported to the provider developers.\n\n"+
					fmt.Sprintf("MapNestedAttributeAssocExtTypeValue Attribute Name (%s) Expected Type: %s", name, attributeType.String()),
			)

			continue
		}

		if !attributeType.Equal(attribute.Type(ctx)) {
			diags.AddError(
				"Invalid MapNestedAttributeAssocExtTypeValue Attribute Type",
				"While creating a MapNestedAttributeAssocExtTypeValue value, an invalid attribute value was detected. "+
					"A MapNestedAttributeAssocExtTypeValue must use a matching attribute type for the value. "+
					"This is always an issue with the provider and should be reported to the provider developers.\n\n"+
					fmt.Sprintf("MapNestedAttributeAssocExtTypeValue Attribute Name (%s) Expected Type: %s\n", name, attributeType.String())+
					fmt.Sprintf("MapNestedAttributeAssocExtTypeValue Attribute Name (%s) Given Type: %s", name, attribute.Type(ctx)),
			)
		}
	}

	for name := range attributes {
		_, ok := attributeTypes[name]

		if !ok {
			diags.AddError(
				"Extra MapNestedAttributeAssocExtTypeValue Attribute Value",
				"While creating a MapNestedAttributeAssocExtTypeValue value, an extra attribute value was detected. "+
					"A MapNestedAttributeAssocExtTypeValue must not contain values beyond the expected attribute types. "+
					"This is always an issue with the provider and should be reported to the provider developers.\n\n"+
					fmt.Sprintf("Extra MapNestedAttributeAssocExtTypeValue Attribute Name: %s", name),
			)
		}
	}

	if diags.HasError() {
		return NewMapNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	boolAttributeAttribute, ok := attributes["bool_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`bool_attribute is missing from object`)

		return NewMapNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	boolAttributeVal, ok := boolAttributeAttribute.(basetypes.BoolValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`bool_attribute expected to be basetypes.BoolValue, was: %T`, boolAttributeAttribute))
	}

	float64AttributeAttribute, ok := attributes["float64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`float64_attribute is missing from object`)

		return NewMapNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	float64AttributeVal, ok := float64AttributeAttribute.(basetypes.Float64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`float64_attribute expected to be basetypes.Float64Value, was: %T`, float64AttributeAttribute))
	}

	int64AttributeAttribute, ok := attributes["int64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`int64_attribute is missing from object`)

		return NewMapNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	int64AttributeVal, ok := int64AttributeAttribute.(basetypes.Int64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`int64_attribute expected to be basetypes.Int64Value, was: %T`, int64AttributeAttribute))
	}

	numberAttributeAttribute, ok := attributes["number_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`number_attribute is missing from object`)

		return NewMapNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	numberAttributeVal, ok := numberAttributeAttribute.(basetypes.NumberValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`number_attribute expected to be basetypes.NumberValue, was: %T`, numberAttributeAttribute))
	}

	stringAttributeAttribute, ok := attributes["string_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`string_attribute is missing from object`)

		return NewMapNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	stringAttributeVal, ok := stringAttributeAttribute.(basetypes.StringValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`string_attribute expected to be basetypes.StringValue, was: %T`, stringAttributeAttribute))
	}

	if diags.HasError() {
		return NewMapNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	return MapNestedAttributeAssocExtTypeValue{
		BoolAttribute:    boolAttributeVal,
		Float64Attribute: float64AttributeVal,
		Int64Attribute:   int64AttributeVal,
		NumberAttribute:  numberAttributeVal,
		StringAttribute:  stringAttributeVal,
		state:            attr.ValueStateKnown,
	}, diags
}

func NewMapNestedAttributeAssocExtTypeValueMust(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) MapNestedAttributeAssocExtTypeValue {
	object, diags := NewMapNestedAttributeAssocExtTypeValue(attributeTypes, attributes)

	if diags.HasError() {
		// This could potentially be added to the diag package.
		diagsStrings := make([]string, 0, len(diags))

		for _, diagnostic := range diags {
			diagsStrings = append(diagsStrings, fmt.Sprintf(
				"%s | %s | %s",
				diagnostic.Severity(),
				diagnostic.Summary(),
				diagnostic.Detail()))
		}

		panic("NewMapNestedAttributeAssocExtTypeValueMust received error(s): " + strings.Join(diagsStrings, "\n"))
	}

	return object
}

func (t MapNestedAttributeAssocExtTypeType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error) {
	if in.Type() == nil {
		return NewMapNestedAttributeAssocExtTypeValueNull(), nil
	}

	if !in.Type().Equal(t.TerraformType(ctx)) {
		return nil, fmt.Errorf("expected %s, got %s", t.TerraformType(ctx), in.Type())
	}

	if !in.IsKnown() {
		return NewMapNestedAttributeAssocExtTypeValueUnknown(), nil
	}

	if in.IsNull() {
		return NewMapNestedAttributeAssocExtTypeValueNull(), nil
	}

	attributes := map[string]attr.Value{}

	val := map[string]tftypes.Value{}

	err := in.As(&val)

	if err != nil {
		return nil, err
	}

	for k, v := range val {
		a, err := t.AttrTypes[k].ValueFromTerraform(ctx, v)

		if err != nil {
			return nil, err
		}

		attributes[k] = a
	}

	return NewMapNestedAttributeAssocExtTypeValueMust(MapNestedAttributeAssocExtTypeValue{}.AttributeTypes(ctx), attributes), nil
}

func (t MapNestedAttributeAssocExtTypeType) ValueType(ctx context.Context) attr.Value {
	return MapNestedAttributeAssocExtTypeValue{}
}

var _ basetypes.ObjectValuable = MapNestedAttributeAssocExtTypeValue{}

type MapNestedAttributeAssocExtTypeValue struct {
	BoolAttribute    basetypes.BoolValue    `tfsdk:"bool_attribute"`
	Float64Attribute basetypes.Float64Value `tfsdk:"float64_attribute"`
	Int64Attribute   basetypes.Int64Value   `tfsdk:"int64_attribute"`
	NumberAttribute  basetypes.NumberValue  `tfsdk:"number_attribute"`
	StringAttribute  basetypes.StringValue  `tfsdk:"string_attribute"`
	state            attr.ValueState
}

func (v MapNestedAttributeAssocExtTypeValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error) {
	attrTypes := make(map[string]tftypes.Type, 5)

	var val tftypes.Value
	var err error

	attrTypes["bool_attribute"] = basetypes.BoolType{}.TerraformType(ctx)
	attrTypes["float64_attribute"] = basetypes.Float64Type{}.TerraformType(ctx)
	attrTypes["int64_attribute"] = basetypes.Int64Type{}.TerraformType(ctx)
	attrTypes["number_attribute"] = basetypes.NumberType{}.TerraformType(ctx)
	attrTypes["string_attribute"] = basetypes.StringType{}.TerraformType(ctx)

	objectType := tftypes.Object{AttributeTypes: attrTypes}

	switch v.state {
	case attr.ValueStateKnown:
		vals := make(map[string]tftypes.Value, 5)

		val, err = v.BoolAttribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["bool_attribute"] = val

		val, err = v.Float64Attribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["float64_attribute"] = val

		val, err = v.Int64Attribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["int64_attribute"] = val

		val, err = v.NumberAttribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["number_attribute"] = val

		val, err = v.StringAttribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["string_attribute"] = val

		if err := tftypes.ValidateValue(objectType, vals); err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		return tftypes.NewValue(objectType, vals), nil
	case attr.ValueStateNull:
		return tftypes.NewValue(objectType, nil), nil
	case attr.ValueStateUnknown:
		return tftypes.NewValue(objectType, tftypes.UnknownValue), nil
	default:
		panic(fmt.Sprintf("unhandled Object state in ToTerraformValue: %s", v.state))
	}
}

func (v MapNestedAttributeAssocExtTypeValue) IsNull() bool {
	return v.state == attr.ValueStateNull
}

func (v MapNestedAttributeAssocExtTypeValue) IsUnknown() bool {
	return v.state == attr.ValueStateUnknown
}

func (v MapNestedAttributeAssocExtTypeValue) String() string {
	return "MapNestedAttributeAssocExtTypeValue"
}

func (v MapNestedAttributeAssocExtTypeValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) {
	var diags diag.Diagnostics

	attributeTypes := map[string]attr.Type{
		"bool_attribute":    basetypes.BoolType{},
		"float64_attribute": basetypes.Float64Type{},
		"int64_attribute":   basetypes.Int64Type{},
		"number_attribute":  basetypes.NumberType{},
		"string_attribute":  basetypes.StringType{},
	}

	if v.IsNull() {
		return types.ObjectNull(attributeTypes), diags
	}

	if v.IsUnknown() {
		return types.ObjectUnknown(attributeTypes), diags
	}

	objVal, diags := types.ObjectValue(
		attributeTypes,
		map[string]attr.Value{
			"bool_attribute":    v.BoolAttribute,
			"float64_attribute": v.Float64Attribute,
			"int64_attribute":   v.Int64Attribute,
			"number_attribute":  v.NumberAttribute,
			"string_attribute":  v.StringAttribute,
		})

	return objVal, diags
}

func (v MapNestedAttributeAssocExtTypeValue) Equal(o attr.Value) bool {
	other, ok := o.(MapNestedAttributeAssocExtTypeValue)

	if !ok {
		return false
	}

	if v.state != other.state {
		return false
	}

	if v.state != attr.ValueStateKnown {
		return true
	}

	if !v.BoolAttribute.Equal(other.BoolAttribute) {
		return false
	}

	if !v.Float64Attribute.Equal(other.Float64Attribute) {
		return false
	}

	if !v.Int64Attribute.Equal(other.Int64Attribute) {
		return false
	}

	if !v.NumberAttribute.Equal(other.NumberAttribute) {
		return false
	}

	if !v.StringAttribute.Equal(other.StringAttribute) {
		return false
	}

	return true
}

func (v MapNestedAttributeAssocExtTypeValue) Type(ctx context.Context) attr.Type {
	return MapNestedAttributeAssocExtTypeType{
		basetypes.ObjectType{
			AttrTypes: v.AttributeTypes(ctx),
		},
	}
}

func (v MapNestedAttributeAssocExtTypeValue) AttributeTypes(ctx context.Context) map[string]attr.Type {
	return map[string]attr.Type{
		"bool_attribute":    basetypes.BoolType{},
		"float64_attribute": basetypes.Float64Type{},
		"int64_attribute":   basetypes.Int64Type{},
		"number_attribute":  basetypes.NumberType{},
		"string_attribute":  basetypes.StringType{},
	}
}

var _ basetypes.ObjectTypable = SetNestedAttributeAssocExtTypeType{}

type SetNestedAttributeAssocExtTypeType struct {
	basetypes.ObjectType
}

func (t SetNestedAttributeAssocExtTypeType) Equal(o attr.Type) bool {
	other, ok := o.(SetNestedAttributeAssocExtTypeType)

	if !ok {
		return false
	}

	return t.ObjectType.Equal(other.ObjectType)
}

func (t SetNestedAttributeAssocExtTypeType) String() string {
	return "SetNestedAttributeAssocExtTypeType"
}

func (t SetNestedAttributeAssocExtTypeType) ValueFromObject(ctx context.Context, in basetypes.ObjectValue) (basetypes.ObjectValuable, diag.Diagnostics) {
	var diags diag.Diagnostics

	attributes := in.Attributes()

	boolAttributeAttribute, ok := attributes["bool_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`bool_attribute is missing from object`)

		return nil, diags
	}

	boolAttributeVal, ok := boolAttributeAttribute.(basetypes.BoolValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`bool_attribute expected to be basetypes.BoolValue, was: %T`, boolAttributeAttribute))
	}

	float64AttributeAttribute, ok := attributes["float64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`float64_attribute is missing from object`)

		return nil, diags
	}

	float64AttributeVal, ok := float64AttributeAttribute.(basetypes.Float64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`float64_attribute expected to be basetypes.Float64Value, was: %T`, float64AttributeAttribute))
	}

	int64AttributeAttribute, ok := attributes["int64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`int64_attribute is missing from object`)

		return nil, diags
	}

	int64AttributeVal, ok := int64AttributeAttribute.(basetypes.Int64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`int64_attribute expected to be basetypes.Int64Value, was: %T`, int64AttributeAttribute))
	}

	numberAttributeAttribute, ok := attributes["number_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`number_attribute is missing from object`)

		return nil, diags
	}

	numberAttributeVal, ok := numberAttributeAttribute.(basetypes.NumberValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`number_attribute expected to be basetypes.NumberValue, was: %T`, numberAttributeAttribute))
	}

	stringAttributeAttribute, ok := attributes["string_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`string_attribute is missing from object`)

		return nil, diags
	}

	stringAttributeVal, ok := stringAttributeAttribute.(basetypes.StringValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`string_attribute expected to be basetypes.StringValue, was: %T`, stringAttributeAttribute))
	}

	if diags.HasError() {
		return nil, diags
	}

	return SetNestedAttributeAssocExtTypeValue{
		BoolAttribute:    boolAttributeVal,
		Float64Attribute: float64AttributeVal,
		Int64Attribute:   int64AttributeVal,
		NumberAttribute:  numberAttributeVal,
		StringAttribute:  stringAttributeVal,
		state:            attr.ValueStateKnown,
	}, diags
}

func NewSetNestedAttributeAssocExtTypeValueNull() SetNestedAttributeAssocExtTypeValue {
	return SetNestedAttributeAssocExtTypeValue{
		state: attr.ValueStateNull,
	}
}

func NewSetNestedAttributeAssocExtTypeValueUnknown() SetNestedAttributeAssocExtTypeValue {
	return SetNestedAttributeAssocExtTypeValue{
		state: attr.ValueStateUnknown,
	}
}

func NewSetNestedAttributeAssocExtTypeValue(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) (SetNestedAttributeAssocExtTypeValue, diag.Diagnostics) {
	var diags diag.Diagnostics

	// Reference: https://github.com/hashicorp/terraform-plugin-framework/issues/521
	ctx := context.Background()

	for name, attributeType := range attributeTypes {
		attribute, ok := attributes[name]

		if !ok {
			diags.AddError(
				"Missing SetNestedAttributeAssocExtTypeValue Attribute Value",
				"While creating a SetNestedAttributeAssocExtTypeValue value, a missing attribute value was detected. "+
					"A SetNestedAttributeAssocExtTypeValue must contain values for all attributes, even if null or unknown. "+
					"This is always an issue with the provider and should be reported to the provider developers.\n\n"+
					fmt.Sprintf("SetNestedAttributeAssocExtTypeValue Attribute Name (%s) Expected Type: %s", name, attributeType.String()),
			)

			continue
		}

		if !attributeType.Equal(attribute.Type(ctx)) {
			diags.AddError(
				"Invalid SetNestedAttributeAssocExtTypeValue Attribute Type",
				"While creating a SetNestedAttributeAssocExtTypeValue value, an invalid attribute value was detected. "+
					"A SetNestedAttributeAssocExtTypeValue must use a matching attribute type for the value. "+
					"This is always an issue with the provider and should be reported to the provider developers.\n\n"+
					fmt.Sprintf("SetNestedAttributeAssocExtTypeValue Attribute Name (%s) Expected Type: %s\n", name, attributeType.String())+
					fmt.Sprintf("SetNestedAttributeAssocExtTypeValue Attribute Name (%s) Given Type: %s", name, attribute.Type(ctx)),
			)
		}
	}

	for name := range attributes {
		_, ok := attributeTypes[name]

		if !ok {
			diags.AddError(
				"Extra SetNestedAttributeAssocExtTypeValue Attribute Value",
				"While creating a SetNestedAttributeAssocExtTypeValue value, an extra attribute value was detected. "+
					"A SetNestedAttributeAssocExtTypeValue must not contain values beyond the expected attribute types. "+
					"This is always an issue with the provider and should be reported to the provider developers.\n\n"+
					fmt.Sprintf("Extra SetNestedAttributeAssocExtTypeValue Attribute Name: %s", name),
			)
		}
	}

	if diags.HasError() {
		return NewSetNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	boolAttributeAttribute, ok := attributes["bool_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`bool_attribute is missing from object`)

		return NewSetNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	boolAttributeVal, ok := boolAttributeAttribute.(basetypes.BoolValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`bool_attribute expected to be basetypes.BoolValue, was: %T`, boolAttributeAttribute))
	}

	float64AttributeAttribute, ok := attributes["float64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`float64_attribute is missing from object`)

		return NewSetNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	float64AttributeVal, ok := float64AttributeAttribute.(basetypes.Float64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`float64_attribute expected to be basetypes.Float64Value, was: %T`, float64AttributeAttribute))
	}

	int64AttributeAttribute, ok := attributes["int64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`int64_attribute is missing from object`)

		return NewSetNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	int64AttributeVal, ok := int64AttributeAttribute.(basetypes.Int64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`int64_attribute expected to be basetypes.Int64Value, was: %T`, int64AttributeAttribute))
	}

	numberAttributeAttribute, ok := attributes["number_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`number_attribute is missing from object`)

		return NewSetNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	numberAttributeVal, ok := numberAttributeAttribute.(basetypes.NumberValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`number_attribute expected to be basetypes.NumberValue, was: %T`, numberAttributeAttribute))
	}

	stringAttributeAttribute, ok := attributes["string_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`string_attribute is missing from object`)

		return NewSetNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	stringAttributeVal, ok := stringAttributeAttribute.(basetypes.StringValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`string_attribute expected to be basetypes.StringValue, was: %T`, stringAttributeAttribute))
	}

	if diags.HasError() {
		return NewSetNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	return SetNestedAttributeAssocExtTypeValue{
		BoolAttribute:    boolAttributeVal,
		Float64Attribute: float64AttributeVal,
		Int64Attribute:   int64AttributeVal,
		NumberAttribute:  numberAttributeVal,
		StringAttribute:  stringAttributeVal,
		state:            attr.ValueStateKnown,
	}, diags
}

func NewSetNestedAttributeAssocExtTypeValueMust(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) SetNestedAttributeAssocExtTypeValue {
	object, diags := NewSetNestedAttributeAssocExtTypeValue(attributeTypes, attributes)

	if diags.HasError() {
		// This could potentially be added to the diag package.
		diagsStrings := make([]string, 0, len(diags))

		for _, diagnostic := range diags {
			diagsStrings = append(diagsStrings, fmt.Sprintf(
				"%s | %s | %s",
				diagnostic.Severity(),
				diagnostic.Summary(),
				diagnostic.Detail()))
		}

		panic("NewSetNestedAttributeAssocExtTypeValueMust received error(s): " + strings.Join(diagsStrings, "\n"))
	}

	return object
}

func (t SetNestedAttributeAssocExtTypeType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error) {
	if in.Type() == nil {
		return NewSetNestedAttributeAssocExtTypeValueNull(), nil
	}

	if !in.Type().Equal(t.TerraformType(ctx)) {
		return nil, fmt.Errorf("expected %s, got %s", t.TerraformType(ctx), in.Type())
	}

	if !in.IsKnown() {
		return NewSetNestedAttributeAssocExtTypeValueUnknown(), nil
	}

	if in.IsNull() {
		return NewSetNestedAttributeAssocExtTypeValueNull(), nil
	}

	attributes := map[string]attr.Value{}

	val := map[string]tftypes.Value{}

	err := in.As(&val)

	if err != nil {
		return nil, err
	}

	for k, v := range val {
		a, err := t.AttrTypes[k].ValueFromTerraform(ctx, v)

		if err != nil {
			return nil, err
		}

		attributes[k] = a
	}

	return NewSetNestedAttributeAssocExtTypeValueMust(SetNestedAttributeAssocExtTypeValue{}.AttributeTypes(ctx), attributes), nil
}

func (t SetNestedAttributeAssocExtTypeType) ValueType(ctx context.Context) attr.Value {
	return SetNestedAttributeAssocExtTypeValue{}
}

var _ basetypes.ObjectValuable = SetNestedAttributeAssocExtTypeValue{}

type SetNestedAttributeAssocExtTypeValue struct {
	BoolAttribute    basetypes.BoolValue    `tfsdk:"bool_attribute"`
	Float64Attribute basetypes.Float64Value `tfsdk:"float64_attribute"`
	Int64Attribute   basetypes.Int64Value   `tfsdk:"int64_attribute"`
	NumberAttribute  basetypes.NumberValue  `tfsdk:"number_attribute"`
	StringAttribute  basetypes.StringValue  `tfsdk:"string_attribute"`
	state            attr.ValueState
}

func (v SetNestedAttributeAssocExtTypeValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error) {
	attrTypes := make(map[string]tftypes.Type, 5)

	var val tftypes.Value
	var err error

	attrTypes["bool_attribute"] = basetypes.BoolType{}.TerraformType(ctx)
	attrTypes["float64_attribute"] = basetypes.Float64Type{}.TerraformType(ctx)
	attrTypes["int64_attribute"] = basetypes.Int64Type{}.TerraformType(ctx)
	attrTypes["number_attribute"] = basetypes.NumberType{}.TerraformType(ctx)
	attrTypes["string_attribute"] = basetypes.StringType{}.TerraformType(ctx)

	objectType := tftypes.Object{AttributeTypes: attrTypes}

	switch v.state {
	case attr.ValueStateKnown:
		vals := make(map[string]tftypes.Value, 5)

		val, err = v.BoolAttribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["bool_attribute"] = val

		val, err = v.Float64Attribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["float64_attribute"] = val

		val, err = v.Int64Attribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["int64_attribute"] = val

		val, err = v.NumberAttribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["number_attribute"] = val

		val, err = v.StringAttribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["string_attribute"] = val

		if err := tftypes.ValidateValue(objectType, vals); err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		return tftypes.NewValue(objectType, vals), nil
	case attr.ValueStateNull:
		return tftypes.NewValue(objectType, nil), nil
	case attr.ValueStateUnknown:
		return tftypes.NewValue(objectType, tftypes.UnknownValue), nil
	default:
		panic(fmt.Sprintf("unhandled Object state in ToTerraformValue: %s", v.state))
	}
}

func (v SetNestedAttributeAssocExtTypeValue) IsNull() bool {
	return v.state == attr.ValueStateNull
}

func (v SetNestedAttributeAssocExtTypeValue) IsUnknown() bool {
	return v.state == attr.ValueStateUnknown
}

func (v SetNestedAttributeAssocExtTypeValue) String() string {
	return "SetNestedAttributeAssocExtTypeValue"
}

func (v SetNestedAttributeAssocExtTypeValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) {
	var diags diag.Diagnostics

	attributeTypes := map[string]attr.Type{
		"bool_attribute":    basetypes.BoolType{},
		"float64_attribute": basetypes.Float64Type{},
		"int64_attribute":   basetypes.Int64Type{},
		"number_attribute":  basetypes.NumberType{},
		"string_attribute":  basetypes.StringType{},
	}

	if v.IsNull() {
		return types.ObjectNull(attributeTypes), diags
	}

	if v.IsUnknown() {
		return types.ObjectUnknown(attributeTypes), diags
	}

	objVal, diags := types.ObjectValue(
		attributeTypes,
		map[string]attr.Value{
			"bool_attribute":    v.BoolAttribute,
			"float64_attribute": v.Float64Attribute,
			"int64_attribute":   v.Int64Attribute,
			"number_attribute":  v.NumberAttribute,
			"string_attribute":  v.StringAttribute,
		})

	return objVal, diags
}

func (v SetNestedAttributeAssocExtTypeValue) Equal(o attr.Value) bool {
	other, ok := o.(SetNestedAttributeAssocExtTypeValue)

	if !ok {
		return false
	}

	if v.state != other.state {
		return false
	}

	if v.state != attr.ValueStateKnown {
		return true
	}

	if !v.BoolAttribute.Equal(other.BoolAttribute) {
		return false
	}

	if !v.Float64Attribute.Equal(other.Float64Attribute) {
		return false
	}

	if !v.Int64Attribute.Equal(other.Int64Attribute) {
		return false
	}

	if !v.NumberAttribute.Equal(other.NumberAttribute) {
		return false
	}

	if !v.StringAttribute.Equal(other.StringAttribute) {
		return false
	}

	return true
}

func (v SetNestedAttributeAssocExtTypeValue) Type(ctx context.Context) attr.Type {
	return SetNestedAttributeAssocExtTypeType{
		basetypes.ObjectType{
			AttrTypes: v.AttributeTypes(ctx),
		},
	}
}

func (v SetNestedAttributeAssocExtTypeValue) AttributeTypes(ctx context.Context) map[string]attr.Type {
	return map[string]attr.Type{
		"bool_attribute":    basetypes.BoolType{},
		"float64_attribute": basetypes.Float64Type{},
		"int64_attribute":   basetypes.Int64Type{},
		"number_attribute":  basetypes.NumberType{},
		"string_attribute":  basetypes.StringType{},
	}
}

var _ basetypes.ObjectTypable = SingleNestedAttributeAssocExtTypeType{}

type SingleNestedAttributeAssocExtTypeType struct {
	basetypes.ObjectType
}

func (t SingleNestedAttributeAssocExtTypeType) Equal(o attr.Type) bool {
	other, ok := o.(SingleNestedAttributeAssocExtTypeType)

	if !ok {
		return false
	}

	return t.ObjectType.Equal(other.ObjectType)
}

func (t SingleNestedAttributeAssocExtTypeType) String() string {
	return "SingleNestedAttributeAssocExtTypeType"
}

func (t SingleNestedAttributeAssocExtTypeType) ValueFromObject(ctx context.Context, in basetypes.ObjectValue) (basetypes.ObjectValuable, diag.Diagnostics) {
	var diags diag.Diagnostics

	attributes := in.Attributes()

	boolAttributeAttribute, ok := attributes["bool_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`bool_attribute is missing from object`)

		return nil, diags
	}

	boolAttributeVal, ok := boolAttributeAttribute.(basetypes.BoolValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`bool_attribute expected to be basetypes.BoolValue, was: %T`, boolAttributeAttribute))
	}

	float64AttributeAttribute, ok := attributes["float64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`float64_attribute is missing from object`)

		return nil, diags
	}

	float64AttributeVal, ok := float64AttributeAttribute.(basetypes.Float64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`float64_attribute expected to be basetypes.Float64Value, was: %T`, float64AttributeAttribute))
	}

	int64AttributeAttribute, ok := attributes["int64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`int64_attribute is missing from object`)

		return nil, diags
	}

	int64AttributeVal, ok := int64AttributeAttribute.(basetypes.Int64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`int64_attribute expected to be basetypes.Int64Value, was: %T`, int64AttributeAttribute))
	}

	numberAttributeAttribute, ok := attributes["number_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`number_attribute is missing from object`)

		return nil, diags
	}

	numberAttributeVal, ok := numberAttributeAttribute.(basetypes.NumberValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`number_attribute expected to be basetypes.NumberValue, was: %T`, numberAttributeAttribute))
	}

	stringAttributeAttribute, ok := attributes["string_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`string_attribute is missing from object`)

		return nil, diags
	}

	stringAttributeVal, ok := stringAttributeAttribute.(basetypes.StringValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`string_attribute expected to be basetypes.StringValue, was: %T`, stringAttributeAttribute))
	}

	if diags.HasError() {
		return nil, diags
	}

	return SingleNestedAttributeAssocExtTypeValue{
		BoolAttribute:    boolAttributeVal,
		Float64Attribute: float64AttributeVal,
		Int64Attribute:   int64AttributeVal,
		NumberAttribute:  numberAttributeVal,
		StringAttribute:  stringAttributeVal,
		state:            attr.ValueStateKnown,
	}, diags
}

func NewSingleNestedAttributeAssocExtTypeValueNull() SingleNestedAttributeAssocExtTypeValue {
	return SingleNestedAttributeAssocExtTypeValue{
		state: attr.ValueStateNull,
	}
}

func NewSingleNestedAttributeAssocExtTypeValueUnknown() SingleNestedAttributeAssocExtTypeValue {
	return SingleNestedAttributeAssocExtTypeValue{
		state: attr.ValueStateUnknown,
	}
}

func NewSingleNestedAttributeAssocExtTypeValue(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) (SingleNestedAttributeAssocExtTypeValue, diag.Diagnostics) {
	var diags diag.Diagnostics

	// Reference: https://github.com/hashicorp/terraform-plugin-framework/issues/521
	ctx := context.Background()

	for name, attributeType := range attributeTypes {
		attribute, ok := attributes[name]

		if !ok {
			diags.AddError(
				"Missing SingleNestedAttributeAssocExtTypeValue Attribute Value",
				"While creating a SingleNestedAttributeAssocExtTypeValue value, a missing attribute value was detected. "+
					"A SingleNestedAttributeAssocExtTypeValue must contain values for all attributes, even if null or unknown. "+
					"This is always an issue with the provider and should be reported to the provider developers.\n\n"+
					fmt.Sprintf("SingleNestedAttributeAssocExtTypeValue Attribute Name (%s) Expected Type: %s", name, attributeType.String()),
			)

			continue
		}

		if !attributeType.Equal(attribute.Type(ctx)) {
			diags.AddError(
				"Invalid SingleNestedAttributeAssocExtTypeValue Attribute Type",
				"While creating a SingleNestedAttributeAssocExtTypeValue value, an invalid attribute value was detected. "+
					"A SingleNestedAttributeAssocExtTypeValue must use a matching attribute type for the value. "+
					"This is always an issue with the provider and should be reported to the provider developers.\n\n"+
					fmt.Sprintf("SingleNestedAttributeAssocExtTypeValue Attribute Name (%s) Expected Type: %s\n", name, attributeType.String())+
					fmt.Sprintf("SingleNestedAttributeAssocExtTypeValue Attribute Name (%s) Given Type: %s", name, attribute.Type(ctx)),
			)
		}
	}

	for name := range attributes {
		_, ok := attributeTypes[name]

		if !ok {
			diags.AddError(
				"Extra SingleNestedAttributeAssocExtTypeValue Attribute Value",
				"While creating a SingleNestedAttributeAssocExtTypeValue value, an extra attribute value was detected. "+
					"A SingleNestedAttributeAssocExtTypeValue must not contain values beyond the expected attribute types. "+
					"This is always an issue with the provider and should be reported to the provider developers.\n\n"+
					fmt.Sprintf("Extra SingleNestedAttributeAssocExtTypeValue Attribute Name: %s", name),
			)
		}
	}

	if diags.HasError() {
		return NewSingleNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	boolAttributeAttribute, ok := attributes["bool_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`bool_attribute is missing from object`)

		return NewSingleNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	boolAttributeVal, ok := boolAttributeAttribute.(basetypes.BoolValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`bool_attribute expected to be basetypes.BoolValue, was: %T`, boolAttributeAttribute))
	}

	float64AttributeAttribute, ok := attributes["float64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`float64_attribute is missing from object`)

		return NewSingleNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	float64AttributeVal, ok := float64AttributeAttribute.(basetypes.Float64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`float64_attribute expected to be basetypes.Float64Value, was: %T`, float64AttributeAttribute))
	}

	int64AttributeAttribute, ok := attributes["int64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`int64_attribute is missing from object`)

		return NewSingleNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	int64AttributeVal, ok := int64AttributeAttribute.(basetypes.Int64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`int64_attribute expected to be basetypes.Int64Value, was: %T`, int64AttributeAttribute))
	}

	numberAttributeAttribute, ok := attributes["number_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`number_attribute is missing from object`)

		return NewSingleNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	numberAttributeVal, ok := numberAttributeAttribute.(basetypes.NumberValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`number_attribute expected to be basetypes.NumberValue, was: %T`, numberAttributeAttribute))
	}

	stringAttributeAttribute, ok := attributes["string_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`string_attribute is missing from object`)

		return NewSingleNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	stringAttributeVal, ok := stringAttributeAttribute.(basetypes.StringValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`string_attribute expected to be basetypes.StringValue, was: %T`, stringAttributeAttribute))
	}

	if diags.HasError() {
		return NewSingleNestedAttributeAssocExtTypeValueUnknown(), diags
	}

	return SingleNestedAttributeAssocExtTypeValue{
		BoolAttribute:    boolAttributeVal,
		Float64Attribute: float64AttributeVal,
		Int64Attribute:   int64AttributeVal,
		NumberAttribute:  numberAttributeVal,
		StringAttribute:  stringAttributeVal,
		state:            attr.ValueStateKnown,
	}, diags
}

func NewSingleNestedAttributeAssocExtTypeValueMust(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) SingleNestedAttributeAssocExtTypeValue {
	object, diags := NewSingleNestedAttributeAssocExtTypeValue(attributeTypes, attributes)

	if diags.HasError() {
		// This could potentially be added to the diag package.
		diagsStrings := make([]string, 0, len(diags))

		for _, diagnostic := range diags {
			diagsStrings = append(diagsStrings, fmt.Sprintf(
				"%s | %s | %s",
				diagnostic.Severity(),
				diagnostic.Summary(),
				diagnostic.Detail()))
		}

		panic("NewSingleNestedAttributeAssocExtTypeValueMust received error(s): " + strings.Join(diagsStrings, "\n"))
	}

	return object
}

func (t SingleNestedAttributeAssocExtTypeType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error) {
	if in.Type() == nil {
		return NewSingleNestedAttributeAssocExtTypeValueNull(), nil
	}

	if !in.Type().Equal(t.TerraformType(ctx)) {
		return nil, fmt.Errorf("expected %s, got %s", t.TerraformType(ctx), in.Type())
	}

	if !in.IsKnown() {
		return NewSingleNestedAttributeAssocExtTypeValueUnknown(), nil
	}

	if in.IsNull() {
		return NewSingleNestedAttributeAssocExtTypeValueNull(), nil
	}

	attributes := map[string]attr.Value{}

	val := map[string]tftypes.Value{}

	err := in.As(&val)

	if err != nil {
		return nil, err
	}

	for k, v := range val {
		a, err := t.AttrTypes[k].ValueFromTerraform(ctx, v)

		if err != nil {
			return nil, err
		}

		attributes[k] = a
	}

	return NewSingleNestedAttributeAssocExtTypeValueMust(SingleNestedAttributeAssocExtTypeValue{}.AttributeTypes(ctx), attributes), nil
}

func (t SingleNestedAttributeAssocExtTypeType) ValueType(ctx context.Context) attr.Value {
	return SingleNestedAttributeAssocExtTypeValue{}
}

var _ basetypes.ObjectValuable = SingleNestedAttributeAssocExtTypeValue{}

type SingleNestedAttributeAssocExtTypeValue struct {
	BoolAttribute    basetypes.BoolValue    `tfsdk:"bool_attribute"`
	Float64Attribute basetypes.Float64Value `tfsdk:"float64_attribute"`
	Int64Attribute   basetypes.Int64Value   `tfsdk:"int64_attribute"`
	NumberAttribute  basetypes.NumberValue  `tfsdk:"number_attribute"`
	StringAttribute  basetypes.StringValue  `tfsdk:"string_attribute"`
	state            attr.ValueState
}

func (v SingleNestedAttributeAssocExtTypeValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error) {
	attrTypes := make(map[string]tftypes.Type, 5)

	var val tftypes.Value
	var err error

	attrTypes["bool_attribute"] = basetypes.BoolType{}.TerraformType(ctx)
	attrTypes["float64_attribute"] = basetypes.Float64Type{}.TerraformType(ctx)
	attrTypes["int64_attribute"] = basetypes.Int64Type{}.TerraformType(ctx)
	attrTypes["number_attribute"] = basetypes.NumberType{}.TerraformType(ctx)
	attrTypes["string_attribute"] = basetypes.StringType{}.TerraformType(ctx)

	objectType := tftypes.Object{AttributeTypes: attrTypes}

	switch v.state {
	case attr.ValueStateKnown:
		vals := make(map[string]tftypes.Value, 5)

		val, err = v.BoolAttribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["bool_attribute"] = val

		val, err = v.Float64Attribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["float64_attribute"] = val

		val, err = v.Int64Attribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["int64_attribute"] = val

		val, err = v.NumberAttribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["number_attribute"] = val

		val, err = v.StringAttribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["string_attribute"] = val

		if err := tftypes.ValidateValue(objectType, vals); err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		return tftypes.NewValue(objectType, vals), nil
	case attr.ValueStateNull:
		return tftypes.NewValue(objectType, nil), nil
	case attr.ValueStateUnknown:
		return tftypes.NewValue(objectType, tftypes.UnknownValue), nil
	default:
		panic(fmt.Sprintf("unhandled Object state in ToTerraformValue: %s", v.state))
	}
}

func (v SingleNestedAttributeAssocExtTypeValue) IsNull() bool {
	return v.state == attr.ValueStateNull
}

func (v SingleNestedAttributeAssocExtTypeValue) IsUnknown() bool {
	return v.state == attr.ValueStateUnknown
}

func (v SingleNestedAttributeAssocExtTypeValue) String() string {
	return "SingleNestedAttributeAssocExtTypeValue"
}

func (v SingleNestedAttributeAssocExtTypeValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) {
	var diags diag.Diagnostics

	attributeTypes := map[string]attr.Type{
		"bool_attribute":    basetypes.BoolType{},
		"float64_attribute": basetypes.Float64Type{},
		"int64_attribute":   basetypes.Int64Type{},
		"number_attribute":  basetypes.NumberType{},
		"string_attribute":  basetypes.StringType{},
	}

	if v.IsNull() {
		return types.ObjectNull(attributeTypes), diags
	}

	if v.IsUnknown() {
		return types.ObjectUnknown(attributeTypes), diags
	}

	objVal, diags := types.ObjectValue(
		attributeTypes,
		map[string]attr.Value{
			"bool_attribute":    v.BoolAttribute,
			"float64_attribute": v.Float64Attribute,
			"int64_attribute":   v.Int64Attribute,
			"number_attribute":  v.NumberAttribute,
			"string_attribute":  v.StringAttribute,
		})

	return objVal, diags
}

func (v SingleNestedAttributeAssocExtTypeValue) Equal(o attr.Value) bool {
	other, ok := o.(SingleNestedAttributeAssocExtTypeValue)

	if !ok {
		return false
	}

	if v.state != other.state {
		return false
	}

	if v.state != attr.ValueStateKnown {
		return true
	}

	if !v.BoolAttribute.Equal(other.BoolAttribute) {
		return false
	}

	if !v.Float64Attribute.Equal(other.Float64Attribute) {
		return false
	}

	if !v.Int64Attribute.Equal(other.Int64Attribute) {
		return false
	}

	if !v.NumberAttribute.Equal(other.NumberAttribute) {
		return false
	}

	if !v.StringAttribute.Equal(other.StringAttribute) {
		return false
	}

	return true
}

func (v SingleNestedAttributeAssocExtTypeValue) Type(ctx context.Context) attr.Type {
	return SingleNestedAttributeAssocExtTypeType{
		basetypes.ObjectType{
			AttrTypes: v.AttributeTypes(ctx),
		},
	}
}

func (v SingleNestedAttributeAssocExtTypeValue) AttributeTypes(ctx context.Context) map[string]attr.Type {
	return map[string]attr.Type{
		"bool_attribute":    basetypes.BoolType{},
		"float64_attribute": basetypes.Float64Type{},
		"int64_attribute":   basetypes.Int64Type{},
		"number_attribute":  basetypes.NumberType{},
		"string_attribute":  basetypes.StringType{},
	}
}

var _ basetypes.ObjectTypable = ListNestedBlockAssocExtTypeType{}

type ListNestedBlockAssocExtTypeType struct {
	basetypes.ObjectType
}

func (t ListNestedBlockAssocExtTypeType) Equal(o attr.Type) bool {
	other, ok := o.(ListNestedBlockAssocExtTypeType)

	if !ok {
		return false
	}

	return t.ObjectType.Equal(other.ObjectType)
}

func (t ListNestedBlockAssocExtTypeType) String() string {
	return "ListNestedBlockAssocExtTypeType"
}

func (t ListNestedBlockAssocExtTypeType) ValueFromObject(ctx context.Context, in basetypes.ObjectValue) (basetypes.ObjectValuable, diag.Diagnostics) {
	var diags diag.Diagnostics

	attributes := in.Attributes()

	boolAttributeAttribute, ok := attributes["bool_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`bool_attribute is missing from object`)

		return nil, diags
	}

	boolAttributeVal, ok := boolAttributeAttribute.(basetypes.BoolValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`bool_attribute expected to be basetypes.BoolValue, was: %T`, boolAttributeAttribute))
	}

	float64AttributeAttribute, ok := attributes["float64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`float64_attribute is missing from object`)

		return nil, diags
	}

	float64AttributeVal, ok := float64AttributeAttribute.(basetypes.Float64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`float64_attribute expected to be basetypes.Float64Value, was: %T`, float64AttributeAttribute))
	}

	int64AttributeAttribute, ok := attributes["int64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`int64_attribute is missing from object`)

		return nil, diags
	}

	int64AttributeVal, ok := int64AttributeAttribute.(basetypes.Int64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`int64_attribute expected to be basetypes.Int64Value, was: %T`, int64AttributeAttribute))
	}

	numberAttributeAttribute, ok := attributes["number_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`number_attribute is missing from object`)

		return nil, diags
	}

	numberAttributeVal, ok := numberAttributeAttribute.(basetypes.NumberValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`number_attribute expected to be basetypes.NumberValue, was: %T`, numberAttributeAttribute))
	}

	stringAttributeAttribute, ok := attributes["string_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`string_attribute is missing from object`)

		return nil, diags
	}

	stringAttributeVal, ok := stringAttributeAttribute.(basetypes.StringValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`string_attribute expected to be basetypes.StringValue, was: %T`, stringAttributeAttribute))
	}

	if diags.HasError() {
		return nil, diags
	}

	return ListNestedBlockAssocExtTypeValue{
		BoolAttribute:    boolAttributeVal,
		Float64Attribute: float64AttributeVal,
		Int64Attribute:   int64AttributeVal,
		NumberAttribute:  numberAttributeVal,
		StringAttribute:  stringAttributeVal,
		state:            attr.ValueStateKnown,
	}, diags
}

func NewListNestedBlockAssocExtTypeValueNull() ListNestedBlockAssocExtTypeValue {
	return ListNestedBlockAssocExtTypeValue{
		state: attr.ValueStateNull,
	}
}

func NewListNestedBlockAssocExtTypeValueUnknown() ListNestedBlockAssocExtTypeValue {
	return ListNestedBlockAssocExtTypeValue{
		state: attr.ValueStateUnknown,
	}
}

func NewListNestedBlockAssocExtTypeValue(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) (ListNestedBlockAssocExtTypeValue, diag.Diagnostics) {
	var diags diag.Diagnostics

	// Reference: https://github.com/hashicorp/terraform-plugin-framework/issues/521
	ctx := context.Background()

	for name, attributeType := range attributeTypes {
		attribute, ok := attributes[name]

		if !ok {
			diags.AddError(
				"Missing ListNestedBlockAssocExtTypeValue Attribute Value",
				"While creating a ListNestedBlockAssocExtTypeValue value, a missing attribute value was detected. "+
					"A ListNestedBlockAssocExtTypeValue must contain values for all attributes, even if null or unknown. "+
					"This is always an issue with the provider and should be reported to the provider developers.\n\n"+
					fmt.Sprintf("ListNestedBlockAssocExtTypeValue Attribute Name (%s) Expected Type: %s", name, attributeType.String()),
			)

			continue
		}

		if !attributeType.Equal(attribute.Type(ctx)) {
			diags.AddError(
				"Invalid ListNestedBlockAssocExtTypeValue Attribute Type",
				"While creating a ListNestedBlockAssocExtTypeValue value, an invalid attribute value was detected. "+
					"A ListNestedBlockAssocExtTypeValue must use a matching attribute type for the value. "+
					"This is always an issue with the provider and should be reported to the provider developers.\n\n"+
					fmt.Sprintf("ListNestedBlockAssocExtTypeValue Attribute Name (%s) Expected Type: %s\n", name, attributeType.String())+
					fmt.Sprintf("ListNestedBlockAssocExtTypeValue Attribute Name (%s) Given Type: %s", name, attribute.Type(ctx)),
			)
		}
	}

	for name := range attributes {
		_, ok := attributeTypes[name]

		if !ok {
			diags.AddError(
				"Extra ListNestedBlockAssocExtTypeValue Attribute Value",
				"While creating a ListNestedBlockAssocExtTypeValue value, an extra attribute value was detected. "+
					"A ListNestedBlockAssocExtTypeValue must not contain values beyond the expected attribute types. "+
					"This is always an issue with the provider and should be reported to the provider developers.\n\n"+
					fmt.Sprintf("Extra ListNestedBlockAssocExtTypeValue Attribute Name: %s", name),
			)
		}
	}

	if diags.HasError() {
		return NewListNestedBlockAssocExtTypeValueUnknown(), diags
	}

	boolAttributeAttribute, ok := attributes["bool_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`bool_attribute is missing from object`)

		return NewListNestedBlockAssocExtTypeValueUnknown(), diags
	}

	boolAttributeVal, ok := boolAttributeAttribute.(basetypes.BoolValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`bool_attribute expected to be basetypes.BoolValue, was: %T`, boolAttributeAttribute))
	}

	float64AttributeAttribute, ok := attributes["float64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`float64_attribute is missing from object`)

		return NewListNestedBlockAssocExtTypeValueUnknown(), diags
	}

	float64AttributeVal, ok := float64AttributeAttribute.(basetypes.Float64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`float64_attribute expected to be basetypes.Float64Value, was: %T`, float64AttributeAttribute))
	}

	int64AttributeAttribute, ok := attributes["int64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`int64_attribute is missing from object`)

		return NewListNestedBlockAssocExtTypeValueUnknown(), diags
	}

	int64AttributeVal, ok := int64AttributeAttribute.(basetypes.Int64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`int64_attribute expected to be basetypes.Int64Value, was: %T`, int64AttributeAttribute))
	}

	numberAttributeAttribute, ok := attributes["number_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`number_attribute is missing from object`)

		return NewListNestedBlockAssocExtTypeValueUnknown(), diags
	}

	numberAttributeVal, ok := numberAttributeAttribute.(basetypes.NumberValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`number_attribute expected to be basetypes.NumberValue, was: %T`, numberAttributeAttribute))
	}

	stringAttributeAttribute, ok := attributes["string_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`string_attribute is missing from object`)

		return NewListNestedBlockAssocExtTypeValueUnknown(), diags
	}

	stringAttributeVal, ok := stringAttributeAttribute.(basetypes.StringValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`string_attribute expected to be basetypes.StringValue, was: %T`, stringAttributeAttribute))
	}

	if diags.HasError() {
		return NewListNestedBlockAssocExtTypeValueUnknown(), diags
	}

	return ListNestedBlockAssocExtTypeValue{
		BoolAttribute:    boolAttributeVal,
		Float64Attribute: float64AttributeVal,
		Int64Attribute:   int64AttributeVal,
		NumberAttribute:  numberAttributeVal,
		StringAttribute:  stringAttributeVal,
		state:            attr.ValueStateKnown,
	}, diags
}

func NewListNestedBlockAssocExtTypeValueMust(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) ListNestedBlockAssocExtTypeValue {
	object, diags := NewListNestedBlockAssocExtTypeValue(attributeTypes, attributes)

	if diags.HasError() {
		// This could potentially be added to the diag package.
		diagsStrings := make([]string, 0, len(diags))

		for _, diagnostic := range diags {
			diagsStrings = append(diagsStrings, fmt.Sprintf(
				"%s | %s | %s",
				diagnostic.Severity(),
				diagnostic.Summary(),
				diagnostic.Detail()))
		}

		panic("NewListNestedBlockAssocExtTypeValueMust received error(s): " + strings.Join(diagsStrings, "\n"))
	}

	return object
}

func (t ListNestedBlockAssocExtTypeType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error) {
	if in.Type() == nil {
		return NewListNestedBlockAssocExtTypeValueNull(), nil
	}

	if !in.Type().Equal(t.TerraformType(ctx)) {
		return nil, fmt.Errorf("expected %s, got %s", t.TerraformType(ctx), in.Type())
	}

	if !in.IsKnown() {
		return NewListNestedBlockAssocExtTypeValueUnknown(), nil
	}

	if in.IsNull() {
		return NewListNestedBlockAssocExtTypeValueNull(), nil
	}

	attributes := map[string]attr.Value{}

	val := map[string]tftypes.Value{}

	err := in.As(&val)

	if err != nil {
		return nil, err
	}

	for k, v := range val {
		a, err := t.AttrTypes[k].ValueFromTerraform(ctx, v)

		if err != nil {
			return nil, err
		}

		attributes[k] = a
	}

	return NewListNestedBlockAssocExtTypeValueMust(ListNestedBlockAssocExtTypeValue{}.AttributeTypes(ctx), attributes), nil
}

func (t ListNestedBlockAssocExtTypeType) ValueType(ctx context.Context) attr.Value {
	return ListNestedBlockAssocExtTypeValue{}
}

var _ basetypes.ObjectValuable = ListNestedBlockAssocExtTypeValue{}

type ListNestedBlockAssocExtTypeValue struct {
	BoolAttribute    basetypes.BoolValue    `tfsdk:"bool_attribute"`
	Float64Attribute basetypes.Float64Value `tfsdk:"float64_attribute"`
	Int64Attribute   basetypes.Int64Value   `tfsdk:"int64_attribute"`
	NumberAttribute  basetypes.NumberValue  `tfsdk:"number_attribute"`
	StringAttribute  basetypes.StringValue  `tfsdk:"string_attribute"`
	state            attr.ValueState
}

func (v ListNestedBlockAssocExtTypeValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error) {
	attrTypes := make(map[string]tftypes.Type, 5)

	var val tftypes.Value
	var err error

	attrTypes["bool_attribute"] = basetypes.BoolType{}.TerraformType(ctx)
	attrTypes["float64_attribute"] = basetypes.Float64Type{}.TerraformType(ctx)
	attrTypes["int64_attribute"] = basetypes.Int64Type{}.TerraformType(ctx)
	attrTypes["number_attribute"] = basetypes.NumberType{}.TerraformType(ctx)
	attrTypes["string_attribute"] = basetypes.StringType{}.TerraformType(ctx)

	objectType := tftypes.Object{AttributeTypes: attrTypes}

	switch v.state {
	case attr.ValueStateKnown:
		vals := make(map[string]tftypes.Value, 5)

		val, err = v.BoolAttribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["bool_attribute"] = val

		val, err = v.Float64Attribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["float64_attribute"] = val

		val, err = v.Int64Attribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["int64_attribute"] = val

		val, err = v.NumberAttribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["number_attribute"] = val

		val, err = v.StringAttribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["string_attribute"] = val

		if err := tftypes.ValidateValue(objectType, vals); err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		return tftypes.NewValue(objectType, vals), nil
	case attr.ValueStateNull:
		return tftypes.NewValue(objectType, nil), nil
	case attr.ValueStateUnknown:
		return tftypes.NewValue(objectType, tftypes.UnknownValue), nil
	default:
		panic(fmt.Sprintf("unhandled Object state in ToTerraformValue: %s", v.state))
	}
}

func (v ListNestedBlockAssocExtTypeValue) IsNull() bool {
	return v.state == attr.ValueStateNull
}

func (v ListNestedBlockAssocExtTypeValue) IsUnknown() bool {
	return v.state == attr.ValueStateUnknown
}

func (v ListNestedBlockAssocExtTypeValue) String() string {
	return "ListNestedBlockAssocExtTypeValue"
}

func (v ListNestedBlockAssocExtTypeValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) {
	var diags diag.Diagnostics

	attributeTypes := map[string]attr.Type{
		"bool_attribute":    basetypes.BoolType{},
		"float64_attribute": basetypes.Float64Type{},
		"int64_attribute":   basetypes.Int64Type{},
		"number_attribute":  basetypes.NumberType{},
		"string_attribute":  basetypes.StringType{},
	}

	if v.IsNull() {
		return types.ObjectNull(attributeTypes), diags
	}

	if v.IsUnknown() {
		return types.ObjectUnknown(attributeTypes), diags
	}

	objVal, diags := types.ObjectValue(
		attributeTypes,
		map[string]attr.Value{
			"bool_attribute":    v.BoolAttribute,
			"float64_attribute": v.Float64Attribute,
			"int64_attribute":   v.Int64Attribute,
			"number_attribute":  v.NumberAttribute,
			"string_attribute":  v.StringAttribute,
		})

	return objVal, diags
}

func (v ListNestedBlockAssocExtTypeValue) Equal(o attr.Value) bool {
	other, ok := o.(ListNestedBlockAssocExtTypeValue)

	if !ok {
		return false
	}

	if v.state != other.state {
		return false
	}

	if v.state != attr.ValueStateKnown {
		return true
	}

	if !v.BoolAttribute.Equal(other.BoolAttribute) {
		return false
	}

	if !v.Float64Attribute.Equal(other.Float64Attribute) {
		return false
	}

	if !v.Int64Attribute.Equal(other.Int64Attribute) {
		return false
	}

	if !v.NumberAttribute.Equal(other.NumberAttribute) {
		return false
	}

	if !v.StringAttribute.Equal(other.StringAttribute) {
		return false
	}

	return true
}

func (v ListNestedBlockAssocExtTypeValue) Type(ctx context.Context) attr.Type {
	return ListNestedBlockAssocExtTypeType{
		basetypes.ObjectType{
			AttrTypes: v.AttributeTypes(ctx),
		},
	}
}

func (v ListNestedBlockAssocExtTypeValue) AttributeTypes(ctx context.Context) map[string]attr.Type {
	return map[string]attr.Type{
		"bool_attribute":    basetypes.BoolType{},
		"float64_attribute": basetypes.Float64Type{},
		"int64_attribute":   basetypes.Int64Type{},
		"number_attribute":  basetypes.NumberType{},
		"string_attribute":  basetypes.StringType{},
	}
}

var _ basetypes.ObjectTypable = SetNestedBlockAssocExtTypeType{}

type SetNestedBlockAssocExtTypeType struct {
	basetypes.ObjectType
}

func (t SetNestedBlockAssocExtTypeType) Equal(o attr.Type) bool {
	other, ok := o.(SetNestedBlockAssocExtTypeType)

	if !ok {
		return false
	}

	return t.ObjectType.Equal(other.ObjectType)
}

func (t SetNestedBlockAssocExtTypeType) String() string {
	return "SetNestedBlockAssocExtTypeType"
}

func (t SetNestedBlockAssocExtTypeType) ValueFromObject(ctx context.Context, in basetypes.ObjectValue) (basetypes.ObjectValuable, diag.Diagnostics) {
	var diags diag.Diagnostics

	attributes := in.Attributes()

	boolAttributeAttribute, ok := attributes["bool_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`bool_attribute is missing from object`)

		return nil, diags
	}

	boolAttributeVal, ok := boolAttributeAttribute.(basetypes.BoolValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`bool_attribute expected to be basetypes.BoolValue, was: %T`, boolAttributeAttribute))
	}

	float64AttributeAttribute, ok := attributes["float64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`float64_attribute is missing from object`)

		return nil, diags
	}

	float64AttributeVal, ok := float64AttributeAttribute.(basetypes.Float64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`float64_attribute expected to be basetypes.Float64Value, was: %T`, float64AttributeAttribute))
	}

	int64AttributeAttribute, ok := attributes["int64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`int64_attribute is missing from object`)

		return nil, diags
	}

	int64AttributeVal, ok := int64AttributeAttribute.(basetypes.Int64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`int64_attribute expected to be basetypes.Int64Value, was: %T`, int64AttributeAttribute))
	}

	numberAttributeAttribute, ok := attributes["number_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`number_attribute is missing from object`)

		return nil, diags
	}

	numberAttributeVal, ok := numberAttributeAttribute.(basetypes.NumberValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`number_attribute expected to be basetypes.NumberValue, was: %T`, numberAttributeAttribute))
	}

	stringAttributeAttribute, ok := attributes["string_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`string_attribute is missing from object`)

		return nil, diags
	}

	stringAttributeVal, ok := stringAttributeAttribute.(basetypes.StringValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`string_attribute expected to be basetypes.StringValue, was: %T`, stringAttributeAttribute))
	}

	if diags.HasError() {
		return nil, diags
	}

	return SetNestedBlockAssocExtTypeValue{
		BoolAttribute:    boolAttributeVal,
		Float64Attribute: float64AttributeVal,
		Int64Attribute:   int64AttributeVal,
		NumberAttribute:  numberAttributeVal,
		StringAttribute:  stringAttributeVal,
		state:            attr.ValueStateKnown,
	}, diags
}

func NewSetNestedBlockAssocExtTypeValueNull() SetNestedBlockAssocExtTypeValue {
	return SetNestedBlockAssocExtTypeValue{
		state: attr.ValueStateNull,
	}
}

func NewSetNestedBlockAssocExtTypeValueUnknown() SetNestedBlockAssocExtTypeValue {
	return SetNestedBlockAssocExtTypeValue{
		state: attr.ValueStateUnknown,
	}
}

func NewSetNestedBlockAssocExtTypeValue(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) (SetNestedBlockAssocExtTypeValue, diag.Diagnostics) {
	var diags diag.Diagnostics

	// Reference: https://github.com/hashicorp/terraform-plugin-framework/issues/521
	ctx := context.Background()

	for name, attributeType := range attributeTypes {
		attribute, ok := attributes[name]

		if !ok {
			diags.AddError(
				"Missing SetNestedBlockAssocExtTypeValue Attribute Value",
				"While creating a SetNestedBlockAssocExtTypeValue value, a missing attribute value was detected. "+
					"A SetNestedBlockAssocExtTypeValue must contain values for all attributes, even if null or unknown. "+
					"This is always an issue with the provider and should be reported to the provider developers.\n\n"+
					fmt.Sprintf("SetNestedBlockAssocExtTypeValue Attribute Name (%s) Expected Type: %s", name, attributeType.String()),
			)

			continue
		}

		if !attributeType.Equal(attribute.Type(ctx)) {
			diags.AddError(
				"Invalid SetNestedBlockAssocExtTypeValue Attribute Type",
				"While creating a SetNestedBlockAssocExtTypeValue value, an invalid attribute value was detected. "+
					"A SetNestedBlockAssocExtTypeValue must use a matching attribute type for the value. "+
					"This is always an issue with the provider and should be reported to the provider developers.\n\n"+
					fmt.Sprintf("SetNestedBlockAssocExtTypeValue Attribute Name (%s) Expected Type: %s\n", name, attributeType.String())+
					fmt.Sprintf("SetNestedBlockAssocExtTypeValue Attribute Name (%s) Given Type: %s", name, attribute.Type(ctx)),
			)
		}
	}

	for name := range attributes {
		_, ok := attributeTypes[name]

		if !ok {
			diags.AddError(
				"Extra SetNestedBlockAssocExtTypeValue Attribute Value",
				"While creating a SetNestedBlockAssocExtTypeValue value, an extra attribute value was detected. "+
					"A SetNestedBlockAssocExtTypeValue must not contain values beyond the expected attribute types. "+
					"This is always an issue with the provider and should be reported to the provider developers.\n\n"+
					fmt.Sprintf("Extra SetNestedBlockAssocExtTypeValue Attribute Name: %s", name),
			)
		}
	}

	if diags.HasError() {
		return NewSetNestedBlockAssocExtTypeValueUnknown(), diags
	}

	boolAttributeAttribute, ok := attributes["bool_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`bool_attribute is missing from object`)

		return NewSetNestedBlockAssocExtTypeValueUnknown(), diags
	}

	boolAttributeVal, ok := boolAttributeAttribute.(basetypes.BoolValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`bool_attribute expected to be basetypes.BoolValue, was: %T`, boolAttributeAttribute))
	}

	float64AttributeAttribute, ok := attributes["float64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`float64_attribute is missing from object`)

		return NewSetNestedBlockAssocExtTypeValueUnknown(), diags
	}

	float64AttributeVal, ok := float64AttributeAttribute.(basetypes.Float64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`float64_attribute expected to be basetypes.Float64Value, was: %T`, float64AttributeAttribute))
	}

	int64AttributeAttribute, ok := attributes["int64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`int64_attribute is missing from object`)

		return NewSetNestedBlockAssocExtTypeValueUnknown(), diags
	}

	int64AttributeVal, ok := int64AttributeAttribute.(basetypes.Int64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`int64_attribute expected to be basetypes.Int64Value, was: %T`, int64AttributeAttribute))
	}

	numberAttributeAttribute, ok := attributes["number_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`number_attribute is missing from object`)

		return NewSetNestedBlockAssocExtTypeValueUnknown(), diags
	}

	numberAttributeVal, ok := numberAttributeAttribute.(basetypes.NumberValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`number_attribute expected to be basetypes.NumberValue, was: %T`, numberAttributeAttribute))
	}

	stringAttributeAttribute, ok := attributes["string_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`string_attribute is missing from object`)

		return NewSetNestedBlockAssocExtTypeValueUnknown(), diags
	}

	stringAttributeVal, ok := stringAttributeAttribute.(basetypes.StringValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`string_attribute expected to be basetypes.StringValue, was: %T`, stringAttributeAttribute))
	}

	if diags.HasError() {
		return NewSetNestedBlockAssocExtTypeValueUnknown(), diags
	}

	return SetNestedBlockAssocExtTypeValue{
		BoolAttribute:    boolAttributeVal,
		Float64Attribute: float64AttributeVal,
		Int64Attribute:   int64AttributeVal,
		NumberAttribute:  numberAttributeVal,
		StringAttribute:  stringAttributeVal,
		state:            attr.ValueStateKnown,
	}, diags
}

func NewSetNestedBlockAssocExtTypeValueMust(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) SetNestedBlockAssocExtTypeValue {
	object, diags := NewSetNestedBlockAssocExtTypeValue(attributeTypes, attributes)

	if diags.HasError() {
		// This could potentially be added to the diag package.
		diagsStrings := make([]string, 0, len(diags))

		for _, diagnostic := range diags {
			diagsStrings = append(diagsStrings, fmt.Sprintf(
				"%s | %s | %s",
				diagnostic.Severity(),
				diagnostic.Summary(),
				diagnostic.Detail()))
		}

		panic("NewSetNestedBlockAssocExtTypeValueMust received error(s): " + strings.Join(diagsStrings, "\n"))
	}

	return object
}

func (t SetNestedBlockAssocExtTypeType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error) {
	if in.Type() == nil {
		return NewSetNestedBlockAssocExtTypeValueNull(), nil
	}

	if !in.Type().Equal(t.TerraformType(ctx)) {
		return nil, fmt.Errorf("expected %s, got %s", t.TerraformType(ctx), in.Type())
	}

	if !in.IsKnown() {
		return NewSetNestedBlockAssocExtTypeValueUnknown(), nil
	}

	if in.IsNull() {
		return NewSetNestedBlockAssocExtTypeValueNull(), nil
	}

	attributes := map[string]attr.Value{}

	val := map[string]tftypes.Value{}

	err := in.As(&val)

	if err != nil {
		return nil, err
	}

	for k, v := range val {
		a, err := t.AttrTypes[k].ValueFromTerraform(ctx, v)

		if err != nil {
			return nil, err
		}

		attributes[k] = a
	}

	return NewSetNestedBlockAssocExtTypeValueMust(SetNestedBlockAssocExtTypeValue{}.AttributeTypes(ctx), attributes), nil
}

func (t SetNestedBlockAssocExtTypeType) ValueType(ctx context.Context) attr.Value {
	return SetNestedBlockAssocExtTypeValue{}
}

var _ basetypes.ObjectValuable = SetNestedBlockAssocExtTypeValue{}

type SetNestedBlockAssocExtTypeValue struct {
	BoolAttribute    basetypes.BoolValue    `tfsdk:"bool_attribute"`
	Float64Attribute basetypes.Float64Value `tfsdk:"float64_attribute"`
	Int64Attribute   basetypes.Int64Value   `tfsdk:"int64_attribute"`
	NumberAttribute  basetypes.NumberValue  `tfsdk:"number_attribute"`
	StringAttribute  basetypes.StringValue  `tfsdk:"string_attribute"`
	state            attr.ValueState
}

func (v SetNestedBlockAssocExtTypeValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error) {
	attrTypes := make(map[string]tftypes.Type, 5)

	var val tftypes.Value
	var err error

	attrTypes["bool_attribute"] = basetypes.BoolType{}.TerraformType(ctx)
	attrTypes["float64_attribute"] = basetypes.Float64Type{}.TerraformType(ctx)
	attrTypes["int64_attribute"] = basetypes.Int64Type{}.TerraformType(ctx)
	attrTypes["number_attribute"] = basetypes.NumberType{}.TerraformType(ctx)
	attrTypes["string_attribute"] = basetypes.StringType{}.TerraformType(ctx)

	objectType := tftypes.Object{AttributeTypes: attrTypes}

	switch v.state {
	case attr.ValueStateKnown:
		vals := make(map[string]tftypes.Value, 5)

		val, err = v.BoolAttribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["bool_attribute"] = val

		val, err = v.Float64Attribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["float64_attribute"] = val

		val, err = v.Int64Attribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["int64_attribute"] = val

		val, err = v.NumberAttribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["number_attribute"] = val

		val, err = v.StringAttribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["string_attribute"] = val

		if err := tftypes.ValidateValue(objectType, vals); err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		return tftypes.NewValue(objectType, vals), nil
	case attr.ValueStateNull:
		return tftypes.NewValue(objectType, nil), nil
	case attr.ValueStateUnknown:
		return tftypes.NewValue(objectType, tftypes.UnknownValue), nil
	default:
		panic(fmt.Sprintf("unhandled Object state in ToTerraformValue: %s", v.state))
	}
}

func (v SetNestedBlockAssocExtTypeValue) IsNull() bool {
	return v.state == attr.ValueStateNull
}

func (v SetNestedBlockAssocExtTypeValue) IsUnknown() bool {
	return v.state == attr.ValueStateUnknown
}

func (v SetNestedBlockAssocExtTypeValue) String() string {
	return "SetNestedBlockAssocExtTypeValue"
}

func (v SetNestedBlockAssocExtTypeValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) {
	var diags diag.Diagnostics

	attributeTypes := map[string]attr.Type{
		"bool_attribute":    basetypes.BoolType{},
		"float64_attribute": basetypes.Float64Type{},
		"int64_attribute":   basetypes.Int64Type{},
		"number_attribute":  basetypes.NumberType{},
		"string_attribute":  basetypes.StringType{},
	}

	if v.IsNull() {
		return types.ObjectNull(attributeTypes), diags
	}

	if v.IsUnknown() {
		return types.ObjectUnknown(attributeTypes), diags
	}

	objVal, diags := types.ObjectValue(
		attributeTypes,
		map[string]attr.Value{
			"bool_attribute":    v.BoolAttribute,
			"float64_attribute": v.Float64Attribute,
			"int64_attribute":   v.Int64Attribute,
			"number_attribute":  v.NumberAttribute,
			"string_attribute":  v.StringAttribute,
		})

	return objVal, diags
}

func (v SetNestedBlockAssocExtTypeValue) Equal(o attr.Value) bool {
	other, ok := o.(SetNestedBlockAssocExtTypeValue)

	if !ok {
		return false
	}

	if v.state != other.state {
		return false
	}

	if v.state != attr.ValueStateKnown {
		return true
	}

	if !v.BoolAttribute.Equal(other.BoolAttribute) {
		return false
	}

	if !v.Float64Attribute.Equal(other.Float64Attribute) {
		return false
	}

	if !v.Int64Attribute.Equal(other.Int64Attribute) {
		return false
	}

	if !v.NumberAttribute.Equal(other.NumberAttribute) {
		return false
	}

	if !v.StringAttribute.Equal(other.StringAttribute) {
		return false
	}

	return true
}

func (v SetNestedBlockAssocExtTypeValue) Type(ctx context.Context) attr.Type {
	return SetNestedBlockAssocExtTypeType{
		basetypes.ObjectType{
			AttrTypes: v.AttributeTypes(ctx),
		},
	}
}

func (v SetNestedBlockAssocExtTypeValue) AttributeTypes(ctx context.Context) map[string]attr.Type {
	return map[string]attr.Type{
		"bool_attribute":    basetypes.BoolType{},
		"float64_attribute": basetypes.Float64Type{},
		"int64_attribute":   basetypes.Int64Type{},
		"number_attribute":  basetypes.NumberType{},
		"string_attribute":  basetypes.StringType{},
	}
}

var _ basetypes.ObjectTypable = SingleNestedBlockAssocExtTypeType{}

type SingleNestedBlockAssocExtTypeType struct {
	basetypes.ObjectType
}

func (t SingleNestedBlockAssocExtTypeType) Equal(o attr.Type) bool {
	other, ok := o.(SingleNestedBlockAssocExtTypeType)

	if !ok {
		return false
	}

	return t.ObjectType.Equal(other.ObjectType)
}

func (t SingleNestedBlockAssocExtTypeType) String() string {
	return "SingleNestedBlockAssocExtTypeType"
}

func (t SingleNestedBlockAssocExtTypeType) ValueFromObject(ctx context.Context, in basetypes.ObjectValue) (basetypes.ObjectValuable, diag.Diagnostics) {
	var diags diag.Diagnostics

	attributes := in.Attributes()

	boolAttributeAttribute, ok := attributes["bool_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`bool_attribute is missing from object`)

		return nil, diags
	}

	boolAttributeVal, ok := boolAttributeAttribute.(basetypes.BoolValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`bool_attribute expected to be basetypes.BoolValue, was: %T`, boolAttributeAttribute))
	}

	float64AttributeAttribute, ok := attributes["float64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`float64_attribute is missing from object`)

		return nil, diags
	}

	float64AttributeVal, ok := float64AttributeAttribute.(basetypes.Float64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`float64_attribute expected to be basetypes.Float64Value, was: %T`, float64AttributeAttribute))
	}

	int64AttributeAttribute, ok := attributes["int64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`int64_attribute is missing from object`)

		return nil, diags
	}

	int64AttributeVal, ok := int64AttributeAttribute.(basetypes.Int64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`int64_attribute expected to be basetypes.Int64Value, was: %T`, int64AttributeAttribute))
	}

	numberAttributeAttribute, ok := attributes["number_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`number_attribute is missing from object`)

		return nil, diags
	}

	numberAttributeVal, ok := numberAttributeAttribute.(basetypes.NumberValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`number_attribute expected to be basetypes.NumberValue, was: %T`, numberAttributeAttribute))
	}

	stringAttributeAttribute, ok := attributes["string_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`string_attribute is missing from object`)

		return nil, diags
	}

	stringAttributeVal, ok := stringAttributeAttribute.(basetypes.StringValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`string_attribute expected to be basetypes.StringValue, was: %T`, stringAttributeAttribute))
	}

	if diags.HasError() {
		return nil, diags
	}

	return SingleNestedBlockAssocExtTypeValue{
		BoolAttribute:    boolAttributeVal,
		Float64Attribute: float64AttributeVal,
		Int64Attribute:   int64AttributeVal,
		NumberAttribute:  numberAttributeVal,
		StringAttribute:  stringAttributeVal,
		state:            attr.ValueStateKnown,
	}, diags
}

func NewSingleNestedBlockAssocExtTypeValueNull() SingleNestedBlockAssocExtTypeValue {
	return SingleNestedBlockAssocExtTypeValue{
		state: attr.ValueStateNull,
	}
}

func NewSingleNestedBlockAssocExtTypeValueUnknown() SingleNestedBlockAssocExtTypeValue {
	return SingleNestedBlockAssocExtTypeValue{
		state: attr.ValueStateUnknown,
	}
}

func NewSingleNestedBlockAssocExtTypeValue(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) (SingleNestedBlockAssocExtTypeValue, diag.Diagnostics) {
	var diags diag.Diagnostics

	// Reference: https://github.com/hashicorp/terraform-plugin-framework/issues/521
	ctx := context.Background()

	for name, attributeType := range attributeTypes {
		attribute, ok := attributes[name]

		if !ok {
			diags.AddError(
				"Missing SingleNestedBlockAssocExtTypeValue Attribute Value",
				"While creating a SingleNestedBlockAssocExtTypeValue value, a missing attribute value was detected. "+
					"A SingleNestedBlockAssocExtTypeValue must contain values for all attributes, even if null or unknown. "+
					"This is always an issue with the provider and should be reported to the provider developers.\n\n"+
					fmt.Sprintf("SingleNestedBlockAssocExtTypeValue Attribute Name (%s) Expected Type: %s", name, attributeType.String()),
			)

			continue
		}

		if !attributeType.Equal(attribute.Type(ctx)) {
			diags.AddError(
				"Invalid SingleNestedBlockAssocExtTypeValue Attribute Type",
				"While creating a SingleNestedBlockAssocExtTypeValue value, an invalid attribute value was detected. "+
					"A SingleNestedBlockAssocExtTypeValue must use a matching attribute type for the value. "+
					"This is always an issue with the provider and should be reported to the provider developers.\n\n"+
					fmt.Sprintf("SingleNestedBlockAssocExtTypeValue Attribute Name (%s) Expected Type: %s\n", name, attributeType.String())+
					fmt.Sprintf("SingleNestedBlockAssocExtTypeValue Attribute Name (%s) Given Type: %s", name, attribute.Type(ctx)),
			)
		}
	}

	for name := range attributes {
		_, ok := attributeTypes[name]

		if !ok {
			diags.AddError(
				"Extra SingleNestedBlockAssocExtTypeValue Attribute Value",
				"While creating a SingleNestedBlockAssocExtTypeValue value, an extra attribute value was detected. "+
					"A SingleNestedBlockAssocExtTypeValue must not contain values beyond the expected attribute types. "+
					"This is always an issue with the provider and should be reported to the provider developers.\n\n"+
					fmt.Sprintf("Extra SingleNestedBlockAssocExtTypeValue Attribute Name: %s", name),
			)
		}
	}

	if diags.HasError() {
		return NewSingleNestedBlockAssocExtTypeValueUnknown(), diags
	}

	boolAttributeAttribute, ok := attributes["bool_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`bool_attribute is missing from object`)

		return NewSingleNestedBlockAssocExtTypeValueUnknown(), diags
	}

	boolAttributeVal, ok := boolAttributeAttribute.(basetypes.BoolValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`bool_attribute expected to be basetypes.BoolValue, was: %T`, boolAttributeAttribute))
	}

	float64AttributeAttribute, ok := attributes["float64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`float64_attribute is missing from object`)

		return NewSingleNestedBlockAssocExtTypeValueUnknown(), diags
	}

	float64AttributeVal, ok := float64AttributeAttribute.(basetypes.Float64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`float64_attribute expected to be basetypes.Float64Value, was: %T`, float64AttributeAttribute))
	}

	int64AttributeAttribute, ok := attributes["int64_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`int64_attribute is missing from object`)

		return NewSingleNestedBlockAssocExtTypeValueUnknown(), diags
	}

	int64AttributeVal, ok := int64AttributeAttribute.(basetypes.Int64Value)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`int64_attribute expected to be basetypes.Int64Value, was: %T`, int64AttributeAttribute))
	}

	numberAttributeAttribute, ok := attributes["number_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`number_attribute is missing from object`)

		return NewSingleNestedBlockAssocExtTypeValueUnknown(), diags
	}

	numberAttributeVal, ok := numberAttributeAttribute.(basetypes.NumberValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`number_attribute expected to be basetypes.NumberValue, was: %T`, numberAttributeAttribute))
	}

	stringAttributeAttribute, ok := attributes["string_attribute"]

	if !ok {
		diags.AddError(
			"Attribute Missing",
			`string_attribute is missing from object`)

		return NewSingleNestedBlockAssocExtTypeValueUnknown(), diags
	}

	stringAttributeVal, ok := stringAttributeAttribute.(basetypes.StringValue)

	if !ok {
		diags.AddError(
			"Attribute Wrong Type",
			fmt.Sprintf(`string_attribute expected to be basetypes.StringValue, was: %T`, stringAttributeAttribute))
	}

	if diags.HasError() {
		return NewSingleNestedBlockAssocExtTypeValueUnknown(), diags
	}

	return SingleNestedBlockAssocExtTypeValue{
		BoolAttribute:    boolAttributeVal,
		Float64Attribute: float64AttributeVal,
		Int64Attribute:   int64AttributeVal,
		NumberAttribute:  numberAttributeVal,
		StringAttribute:  stringAttributeVal,
		state:            attr.ValueStateKnown,
	}, diags
}

func NewSingleNestedBlockAssocExtTypeValueMust(attributeTypes map[string]attr.Type, attributes map[string]attr.Value) SingleNestedBlockAssocExtTypeValue {
	object, diags := NewSingleNestedBlockAssocExtTypeValue(attributeTypes, attributes)

	if diags.HasError() {
		// This could potentially be added to the diag package.
		diagsStrings := make([]string, 0, len(diags))

		for _, diagnostic := range diags {
			diagsStrings = append(diagsStrings, fmt.Sprintf(
				"%s | %s | %s",
				diagnostic.Severity(),
				diagnostic.Summary(),
				diagnostic.Detail()))
		}

		panic("NewSingleNestedBlockAssocExtTypeValueMust received error(s): " + strings.Join(diagsStrings, "\n"))
	}

	return object
}

func (t SingleNestedBlockAssocExtTypeType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error) {
	if in.Type() == nil {
		return NewSingleNestedBlockAssocExtTypeValueNull(), nil
	}

	if !in.Type().Equal(t.TerraformType(ctx)) {
		return nil, fmt.Errorf("expected %s, got %s", t.TerraformType(ctx), in.Type())
	}

	if !in.IsKnown() {
		return NewSingleNestedBlockAssocExtTypeValueUnknown(), nil
	}

	if in.IsNull() {
		return NewSingleNestedBlockAssocExtTypeValueNull(), nil
	}

	attributes := map[string]attr.Value{}

	val := map[string]tftypes.Value{}

	err := in.As(&val)

	if err != nil {
		return nil, err
	}

	for k, v := range val {
		a, err := t.AttrTypes[k].ValueFromTerraform(ctx, v)

		if err != nil {
			return nil, err
		}

		attributes[k] = a
	}

	return NewSingleNestedBlockAssocExtTypeValueMust(SingleNestedBlockAssocExtTypeValue{}.AttributeTypes(ctx), attributes), nil
}

func (t SingleNestedBlockAssocExtTypeType) ValueType(ctx context.Context) attr.Value {
	return SingleNestedBlockAssocExtTypeValue{}
}

var _ basetypes.ObjectValuable = SingleNestedBlockAssocExtTypeValue{}

type SingleNestedBlockAssocExtTypeValue struct {
	BoolAttribute    basetypes.BoolValue    `tfsdk:"bool_attribute"`
	Float64Attribute basetypes.Float64Value `tfsdk:"float64_attribute"`
	Int64Attribute   basetypes.Int64Value   `tfsdk:"int64_attribute"`
	NumberAttribute  basetypes.NumberValue  `tfsdk:"number_attribute"`
	StringAttribute  basetypes.StringValue  `tfsdk:"string_attribute"`
	state            attr.ValueState
}

func (v SingleNestedBlockAssocExtTypeValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error) {
	attrTypes := make(map[string]tftypes.Type, 5)

	var val tftypes.Value
	var err error

	attrTypes["bool_attribute"] = basetypes.BoolType{}.TerraformType(ctx)
	attrTypes["float64_attribute"] = basetypes.Float64Type{}.TerraformType(ctx)
	attrTypes["int64_attribute"] = basetypes.Int64Type{}.TerraformType(ctx)
	attrTypes["number_attribute"] = basetypes.NumberType{}.TerraformType(ctx)
	attrTypes["string_attribute"] = basetypes.StringType{}.TerraformType(ctx)

	objectType := tftypes.Object{AttributeTypes: attrTypes}

	switch v.state {
	case attr.ValueStateKnown:
		vals := make(map[string]tftypes.Value, 5)

		val, err = v.BoolAttribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["bool_attribute"] = val

		val, err = v.Float64Attribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["float64_attribute"] = val

		val, err = v.Int64Attribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["int64_attribute"] = val

		val, err = v.NumberAttribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["number_attribute"] = val

		val, err = v.StringAttribute.ToTerraformValue(ctx)

		if err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		vals["string_attribute"] = val

		if err := tftypes.ValidateValue(objectType, vals); err != nil {
			return tftypes.NewValue(objectType, tftypes.UnknownValue), err
		}

		return tftypes.NewValue(objectType, vals), nil
	case attr.ValueStateNull:
		return tftypes.NewValue(objectType, nil), nil
	case attr.ValueStateUnknown:
		return tftypes.NewValue(objectType, tftypes.UnknownValue), nil
	default:
		panic(fmt.Sprintf("unhandled Object state in ToTerraformValue: %s", v.state))
	}
}

func (v SingleNestedBlockAssocExtTypeValue) IsNull() bool {
	return v.state == attr.ValueStateNull
}

func (v SingleNestedBlockAssocExtTypeValue) IsUnknown() bool {
	return v.state == attr.ValueStateUnknown
}

func (v SingleNestedBlockAssocExtTypeValue) String() string {
	return "SingleNestedBlockAssocExtTypeValue"
}

func (v SingleNestedBlockAssocExtTypeValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) {
	var diags diag.Diagnostics

	attributeTypes := map[string]attr.Type{
		"bool_attribute":    basetypes.BoolType{},
		"float64_attribute": basetypes.Float64Type{},
		"int64_attribute":   basetypes.Int64Type{},
		"number_attribute":  basetypes.NumberType{},
		"string_attribute":  basetypes.StringType{},
	}

	if v.IsNull() {
		return types.ObjectNull(attributeTypes), diags
	}

	if v.IsUnknown() {
		return types.ObjectUnknown(attributeTypes), diags
	}

	objVal, diags := types.ObjectValue(
		attributeTypes,
		map[string]attr.Value{
			"bool_attribute":    v.BoolAttribute,
			"float64_attribute": v.Float64Attribute,
			"int64_attribute":   v.Int64Attribute,
			"number_attribute":  v.NumberAttribute,
			"string_attribute":  v.StringAttribute,
		})

	return objVal, diags
}

func (v SingleNestedBlockAssocExtTypeValue) Equal(o attr.Value) bool {
	other, ok := o.(SingleNestedBlockAssocExtTypeValue)

	if !ok {
		return false
	}

	if v.state != other.state {
		return false
	}

	if v.state != attr.ValueStateKnown {
		return true
	}

	if !v.BoolAttribute.Equal(other.BoolAttribute) {
		return false
	}

	if !v.Float64Attribute.Equal(other.Float64Attribute) {
		return false
	}

	if !v.Int64Attribute.Equal(other.Int64Attribute) {
		return false
	}

	if !v.NumberAttribute.Equal(other.NumberAttribute) {
		return false
	}

	if !v.StringAttribute.Equal(other.StringAttribute) {
		return false
	}

	return true
}

func (v SingleNestedBlockAssocExtTypeValue) Type(ctx context.Context) attr.Type {
	return SingleNestedBlockAssocExtTypeType{
		basetypes.ObjectType{
			AttrTypes: v.AttributeTypes(ctx),
		},
	}
}

func (v SingleNestedBlockAssocExtTypeValue) AttributeTypes(ctx context.Context) map[string]attr.Type {
	return map[string]attr.Type{
		"bool_attribute":    basetypes.BoolType{},
		"float64_attribute": basetypes.Float64Type{},
		"int64_attribute":   basetypes.Int64Type{},
		"number_attribute":  basetypes.NumberType{},
		"string_attribute":  basetypes.StringType{},
	}
}

func (v ListNestedAttributeAssocExtTypeValue) ToApisdkType(ctx context.Context) (*apisdk.Type, diag.Diagnostics) {
	var diags diag.Diagnostics

	if v.IsNull() {
		return nil, diags
	}

	if v.IsUnknown() {
		diags.Append(diag.NewErrorDiagnostic(
			"ListNestedAttributeAssocExtTypeValue Value Is Unknown",
			`"ListNestedAttributeAssocExtTypeValue" is unknown.`,
		))

		return nil, diags
	}

	return &apisdk.Type{
		BoolAttribute:    v.BoolAttribute.ValueBoolPointer(),
		Float64Attribute: v.Float64Attribute.ValueFloat64Pointer(),
		Int64Attribute:   v.Int64Attribute.ValueInt64Pointer(),
		NumberAttribute:  v.NumberAttribute.ValueBigFloat(),
		StringAttribute:  v.StringAttribute.ValueStringPointer(),
	}, diags
}

func (v ListNestedAttributeAssocExtTypeValue) FromApisdkType(ctx context.Context, apiObject *apisdk.Type) (ListNestedAttributeAssocExtTypeValue, diag.Diagnostics) {
	var diags diag.Diagnostics

	if apiObject == nil {
		return NewListNestedAttributeAssocExtTypeValueNull(), diags
	}

	return ListNestedAttributeAssocExtTypeValue{
		BoolAttribute:    types.BoolPointerValue(apiObject.BoolAttribute),
		Float64Attribute: types.Float64PointerValue(apiObject.Float64Attribute),
		Int64Attribute:   types.Int64PointerValue(apiObject.Int64Attribute),
		NumberAttribute:  types.NumberValue(apiObject.NumberAttribute),
		StringAttribute:  types.StringPointerValue(apiObject.StringAttribute),
		state:            attr.ValueStateKnown,
	}, diags
}

func (v MapNestedAttributeAssocExtTypeValue) ToApisdkType(ctx context.Context) (*apisdk.Type, diag.Diagnostics) {
	var diags diag.Diagnostics

	if v.IsNull() {
		return nil, diags
	}

	if v.IsUnknown() {
		diags.Append(diag.NewErrorDiagnostic(
			"MapNestedAttributeAssocExtTypeValue Value Is Unknown",
			`"MapNestedAttributeAssocExtTypeValue" is unknown.`,
		))

		return nil, diags
	}

	return &apisdk.Type{
		BoolAttribute:    v.BoolAttribute.ValueBoolPointer(),
		Float64Attribute: v.Float64Attribute.ValueFloat64Pointer(),
		Int64Attribute:   v.Int64Attribute.ValueInt64Pointer(),
		NumberAttribute:  v.NumberAttribute.ValueBigFloat(),
		StringAttribute:  v.StringAttribute.ValueStringPointer(),
	}, diags
}

func (v MapNestedAttributeAssocExtTypeValue) FromApisdkType(ctx context.Context, apiObject *apisdk.Type) (MapNestedAttributeAssocExtTypeValue, diag.Diagnostics) {
	var diags diag.Diagnostics

	if apiObject == nil {
		return NewMapNestedAttributeAssocExtTypeValueNull(), diags
	}

	return MapNestedAttributeAssocExtTypeValue{
		BoolAttribute:    types.BoolPointerValue(apiObject.BoolAttribute),
		Float64Attribute: types.Float64PointerValue(apiObject.Float64Attribute),
		Int64Attribute:   types.Int64PointerValue(apiObject.Int64Attribute),
		NumberAttribute:  types.NumberValue(apiObject.NumberAttribute),
		StringAttribute:  types.StringPointerValue(apiObject.StringAttribute),
		state:            attr.ValueStateKnown,
	}, diags
}

func (v SetNestedAttributeAssocExtTypeValue) ToApisdkType(ctx context.Context) (*apisdk.Type, diag.Diagnostics) {
	var diags diag.Diagnostics

	if v.IsNull() {
		return nil, diags
	}

	if v.IsUnknown() {
		diags.Append(diag.NewErrorDiagnostic(
			"SetNestedAttributeAssocExtTypeValue Value Is Unknown",
			`"SetNestedAttributeAssocExtTypeValue" is unknown.`,
		))

		return nil, diags
	}

	return &apisdk.Type{
		BoolAttribute:    v.BoolAttribute.ValueBoolPointer(),
		Float64Attribute: v.Float64Attribute.ValueFloat64Pointer(),
		Int64Attribute:   v.Int64Attribute.ValueInt64Pointer(),
		NumberAttribute:  v.NumberAttribute.ValueBigFloat(),
		StringAttribute:  v.StringAttribute.ValueStringPointer(),
	}, diags
}

func (v SetNestedAttributeAssocExtTypeValue) FromApisdkType(ctx context.Context, apiObject *apisdk.Type) (SetNestedAttributeAssocExtTypeValue, diag.Diagnostics) {
	var diags diag.Diagnostics

	if apiObject == nil {
		return NewSetNestedAttributeAssocExtTypeValueNull(), diags
	}

	return SetNestedAttributeAssocExtTypeValue{
		BoolAttribute:    types.BoolPointerValue(apiObject.BoolAttribute),
		Float64Attribute: types.Float64PointerValue(apiObject.Float64Attribute),
		Int64Attribute:   types.Int64PointerValue(apiObject.Int64Attribute),
		NumberAttribute:  types.NumberValue(apiObject.NumberAttribute),
		StringAttribute:  types.StringPointerValue(apiObject.StringAttribute),
		state:            attr.ValueStateKnown,
	}, diags
}

func (v SingleNestedAttributeAssocExtTypeValue) ToApisdkType(ctx context.Context) (*apisdk.Type, diag.Diagnostics) {
	var diags diag.Diagnostics

	if v.IsNull() {
		return nil, diags
	}

	if v.IsUnknown() {
		diags.Append(diag.NewErrorDiagnostic(
			"SingleNestedAttributeAssocExtTypeValue Value Is Unknown",
			`"SingleNestedAttributeAssocExtTypeValue" is unknown.`,
		))

		return nil, diags
	}

	return &apisdk.Type{
		BoolAttribute:    v.BoolAttribute.ValueBoolPointer(),
		Float64Attribute: v.Float64Attribute.ValueFloat64Pointer(),
		Int64Attribute:   v.Int64Attribute.ValueInt64Pointer(),
		NumberAttribute:  v.NumberAttribute.ValueBigFloat(),
		StringAttribute:  v.StringAttribute.ValueStringPointer(),
	}, diags
}

func (v SingleNestedAttributeAssocExtTypeValue) FromApisdkType(ctx context.Context, apiObject *apisdk.Type) (SingleNestedAttributeAssocExtTypeValue, diag.Diagnostics) {
	var diags diag.Diagnostics

	if apiObject == nil {
		return NewSingleNestedAttributeAssocExtTypeValueNull(), diags
	}

	return SingleNestedAttributeAssocExtTypeValue{
		BoolAttribute:    types.BoolPointerValue(apiObject.BoolAttribute),
		Float64Attribute: types.Float64PointerValue(apiObject.Float64Attribute),
		Int64Attribute:   types.Int64PointerValue(apiObject.Int64Attribute),
		NumberAttribute:  types.NumberValue(apiObject.NumberAttribute),
		StringAttribute:  types.StringPointerValue(apiObject.StringAttribute),
		state:            attr.ValueStateKnown,
	}, diags
}

func (v ListNestedBlockAssocExtTypeValue) ToApisdkType(ctx context.Context) (*apisdk.Type, diag.Diagnostics) {
	var diags diag.Diagnostics

	if v.IsNull() {
		return nil, diags
	}

	if v.IsUnknown() {
		diags.Append(diag.NewErrorDiagnostic(
			"ListNestedBlockAssocExtTypeValue Value Is Unknown",
			`"ListNestedBlockAssocExtTypeValue" is unknown.`,
		))

		return nil, diags
	}

	return &apisdk.Type{
		BoolAttribute:    v.BoolAttribute.ValueBoolPointer(),
		Float64Attribute: v.Float64Attribute.ValueFloat64Pointer(),
		Int64Attribute:   v.Int64Attribute.ValueInt64Pointer(),
		NumberAttribute:  v.NumberAttribute.ValueBigFloat(),
		StringAttribute:  v.StringAttribute.ValueStringPointer(),
	}, diags
}

func (v ListNestedBlockAssocExtTypeValue) FromApisdkType(ctx context.Context, apiObject *apisdk.Type) (ListNestedBlockAssocExtTypeValue, diag.Diagnostics) {
	var diags diag.Diagnostics

	if apiObject == nil {
		return NewListNestedBlockAssocExtTypeValueNull(), diags
	}

	return ListNestedBlockAssocExtTypeValue{
		BoolAttribute:    types.BoolPointerValue(apiObject.BoolAttribute),
		Float64Attribute: types.Float64PointerValue(apiObject.Float64Attribute),
		Int64Attribute:   types.Int64PointerValue(apiObject.Int64Attribute),
		NumberAttribute:  types.NumberValue(apiObject.NumberAttribute),
		StringAttribute:  types.StringPointerValue(apiObject.StringAttribute),
		state:            attr.ValueStateKnown,
	}, diags
}

func (v SetNestedBlockAssocExtTypeValue) ToApisdkType(ctx context.Context) (*apisdk.Type, diag.Diagnostics) {
	var diags diag.Diagnostics

	if v.IsNull() {
		return nil, diags
	}

	if v.IsUnknown() {
		diags.Append(diag.NewErrorDiagnostic(
			"SetNestedBlockAssocExtTypeValue Value Is Unknown",
			`"SetNestedBlockAssocExtTypeValue" is unknown.`,
		))

		return nil, diags
	}

	return &apisdk.Type{
		BoolAttribute:    v.BoolAttribute.ValueBoolPointer(),
		Float64Attribute: v.Float64Attribute.ValueFloat64Pointer(),
		Int64Attribute:   v.Int64Attribute.ValueInt64Pointer(),
		NumberAttribute:  v.NumberAttribute.ValueBigFloat(),
		StringAttribute:  v.StringAttribute.ValueStringPointer(),
	}, diags
}

func (v SetNestedBlockAssocExtTypeValue) FromApisdkType(ctx context.Context, apiObject *apisdk.Type) (SetNestedBlockAssocExtTypeValue, diag.Diagnostics) {
	var diags diag.Diagnostics

	if apiObject == nil {
		return NewSetNestedBlockAssocExtTypeValueNull(), diags
	}

	return SetNestedBlockAssocExtTypeValue{
		BoolAttribute:    types.BoolPointerValue(apiObject.BoolAttribute),
		Float64Attribute: types.Float64PointerValue(apiObject.Float64Attribute),
		Int64Attribute:   types.Int64PointerValue(apiObject.Int64Attribute),
		NumberAttribute:  types.NumberValue(apiObject.NumberAttribute),
		StringAttribute:  types.StringPointerValue(apiObject.StringAttribute),
		state:            attr.ValueStateKnown,
	}, diags
}

func (v SingleNestedBlockAssocExtTypeValue) ToApisdkType(ctx context.Context) (*apisdk.Type, diag.Diagnostics) {
	var diags diag.Diagnostics

	if v.IsNull() {
		return nil, diags
	}

	if v.IsUnknown() {
		diags.Append(diag.NewErrorDiagnostic(
			"SingleNestedBlockAssocExtTypeValue Value Is Unknown",
			`"SingleNestedBlockAssocExtTypeValue" is unknown.`,
		))

		return nil, diags
	}

	return &apisdk.Type{
		BoolAttribute:    v.BoolAttribute.ValueBoolPointer(),
		Float64Attribute: v.Float64Attribute.ValueFloat64Pointer(),
		Int64Attribute:   v.Int64Attribute.ValueInt64Pointer(),
		NumberAttribute:  v.NumberAttribute.ValueBigFloat(),
		StringAttribute:  v.StringAttribute.ValueStringPointer(),
	}, diags
}

func (v SingleNestedBlockAssocExtTypeValue) FromApisdkType(ctx context.Context, apiObject *apisdk.Type) (SingleNestedBlockAssocExtTypeValue, diag.Diagnostics) {
	var diags diag.Diagnostics

	if apiObject == nil {
		return NewSingleNestedBlockAssocExtTypeValueNull(), diags
	}

	return SingleNestedBlockAssocExtTypeValue{
		BoolAttribute:    types.BoolPointerValue(apiObject.BoolAttribute),
		Float64Attribute: types.Float64PointerValue(apiObject.Float64Attribute),
		Int64Attribute:   types.Int64PointerValue(apiObject.Int64Attribute),
		NumberAttribute:  types.NumberValue(apiObject.NumberAttribute),
		StringAttribute:  types.StringPointerValue(apiObject.StringAttribute),
		state:            attr.ValueStateKnown,
	}, diags
}
