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

package provider

import (
	"context"
	"fmt"

	"github.com/ciscoecosystem/aci-go-client/v2/client"

	"github.com/hashicorp/terraform-plugin-framework/datasource"
	"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
	"github.com/hashicorp/terraform-plugin-framework/types"
	"github.com/hashicorp/terraform-plugin-log/tflog"
)

// Ensure provider defined types fully satisfy framework interfaces.
var _ datasource.DataSource = &FvCtxDataSource{}

func NewFvCtxDataSource() datasource.DataSource {
	return &FvCtxDataSource{}
}

// FvCtxDataSource defines the data source implementation.
type FvCtxDataSource struct {
	client *client.Client
}

func (d *FvCtxDataSource) Metadata(ctx context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
	tflog.Debug(ctx, "Start metadata of datasource: aci_vrf")
	resp.TypeName = req.ProviderTypeName + "_vrf"
	tflog.Debug(ctx, "End metadata of datasource: aci_vrf")
}

func (d *FvCtxDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) {
	tflog.Debug(ctx, "Start schema of datasource: aci_vrf")
	resp.Schema = schema.Schema{
		// This description is used by the documentation generator and the language server.
		MarkdownDescription: "The vrf datasource for the 'fvCtx' class",

		Attributes: map[string]schema.Attribute{
			// Deprecated attributes
			"bd_enforced_enable": schema.StringAttribute{
				Computed:           true,
				DeprecationMessage: "Attribute 'bd_enforced_enable' is deprecated, please refer to 'bd_enforcement' instead. The attribute will be removed in the next major version of the provider.",
			},
			"tenant_dn": schema.StringAttribute{
				Computed:           true,
				DeprecationMessage: "Attribute 'tenant_dn' is deprecated, please refer to 'parent_dn' instead. The attribute will be removed in the next major version of the provider.",
			},
			"pc_enf_dir": schema.StringAttribute{
				Computed:           true,
				DeprecationMessage: "Attribute 'pc_enf_dir' is deprecated, please refer to 'policy_control_enforcement_direction' instead. The attribute will be removed in the next major version of the provider.",
			},
			"pc_enf_pref": schema.StringAttribute{
				Computed:           true,
				DeprecationMessage: "Attribute 'pc_enf_pref' is deprecated, please refer to 'policy_control_enforcement_mode' instead. The attribute will be removed in the next major version of the provider.",
			},
			"knw_mcast_act": schema.StringAttribute{
				Computed:           true,
				DeprecationMessage: "Attribute `knw_mcast_act` is deprecated. The attribute will be removed in the next major version of the provider.",
			},
			"relation_fv_rs_ctx_to_ep_ret": schema.StringAttribute{
				Computed:           true,
				DeprecationMessage: "Attribute 'relation_fv_rs_ctx_to_ep_ret' is deprecated, please refer to 'relation_to_end_point_retention_policy' instead. The attribute will be removed in the next major version of the provider.",
			},
			"relation_fv_rs_ctx_to_ext_route_tag_pol": schema.StringAttribute{
				Computed:           true,
				DeprecationMessage: "Attribute 'relation_fv_rs_ctx_to_ext_route_tag_pol' is deprecated, please refer to 'relation_to_l3out_route_tag_policy' instead. The attribute will be removed in the next major version of the provider.",
			},
			"relation_fv_rs_ctx_mon_pol": schema.StringAttribute{
				Computed:           true,
				DeprecationMessage: "Attribute 'relation_fv_rs_ctx_mon_pol' is deprecated, please refer to 'relation_to_monitoring_policy' instead. The attribute will be removed in the next major version of the provider.",
			},
			"relation_fv_rs_ctx_mcast_to": schema.SetAttribute{
				Computed:           true,
				ElementType:        types.StringType,
				DeprecationMessage: "Attribute `relation_fv_rs_ctx_mcast_to` is deprecated. The attribute will be removed in the next major version of the provider.",
			},
			"relation_fv_rs_vrf_validation_pol": schema.StringAttribute{
				Computed:           true,
				DeprecationMessage: "Attribute `relation_fv_rs_vrf_validation_pol` is deprecated. The attribute will be removed in the next major version of the provider.",
			},
			"relation_fv_rs_bgp_ctx_pol": schema.StringAttribute{
				Computed:           true,
				DeprecationMessage: "Attribute 'relation_fv_rs_bgp_ctx_pol' is deprecated, please refer to 'relation_to_bgp_timers' instead. The attribute will be removed in the next major version of the provider.",
			},
			"relation_fv_rs_ospf_ctx_pol": schema.StringAttribute{
				Computed:           true,
				DeprecationMessage: "Attribute 'relation_fv_rs_ospf_ctx_pol' is deprecated, please refer to 'relation_to_ospf_timers' instead. The attribute will be removed in the next major version of the provider.",
			},
			// End of deprecated attributes
			"id": schema.StringAttribute{
				Computed:            true,
				MarkdownDescription: "The distinguished name (DN) of the VRF object.",
			},
			"parent_dn": schema.StringAttribute{
				Required:            true,
				MarkdownDescription: "The distinguished name (DN) of the parent object.",
			},
			"annotation": schema.StringAttribute{
				Computed:            true,
				MarkdownDescription: `The annotation of the VRF object.`,
			},
			"bd_enforcement": schema.StringAttribute{
				Computed:            true,
				MarkdownDescription: `The Bridge Domain (BD) enforcement status of the VRF. BD enforcement will restrict a host from sending ping requests to subnets outside the Bridge Domain (BD). The feature blocks ICMP, TCP and UDP traffic between BDs.`,
			},
			"description": schema.StringAttribute{
				Computed:            true,
				MarkdownDescription: `The description of the VRF object.`,
			},
			"ip_data_plane_learning": schema.StringAttribute{
				Computed:            true,
				MarkdownDescription: `The IP data plane status of the VRF object. The process known as IP data plane learning involves acquiring the endpoint's IPv4 or IPv6 address through data plane routing of traffic from the endpoint.`,
			},
			"name": schema.StringAttribute{
				Required:            true,
				MarkdownDescription: `The name of the VRF object.`,
			},
			"name_alias": schema.StringAttribute{
				Computed:            true,
				MarkdownDescription: `The name alias of the VRF object.`,
			},
			"owner_key": schema.StringAttribute{
				Computed:            true,
				MarkdownDescription: `The key for enabling clients to own their data for entity correlation.`,
			},
			"owner_tag": schema.StringAttribute{
				Computed:            true,
				MarkdownDescription: `A tag for enabling clients to add their own data. For example, to indicate who created this object.`,
			},
			"policy_control_enforcement_direction": schema.StringAttribute{
				Computed:            true,
				MarkdownDescription: `The policy control enforcement direction of the VRF object. VRF ingress policy enforcement involves ACL filtering on the leaf switch where the endpoint is located, reducing the policy CAM usage on the border leaf switch by confining the filtering to 'compute' leaf switches. VRF egress policy enforcement extends ACL filtering to the border leaf switch, increasing its policy CAM usage. The border leaf switch handles filtering for traffic from L3Out to EPG after the endpoint is learned, unless the endpoint-to-destination class mapping is unknown, in which case the compute leaf switch handles the filtering.`,
			},
			"policy_control_enforcement_mode": schema.StringAttribute{
				Computed:            true,
				MarkdownDescription: `The policy control enforcement mode of the VRF object. VRFs in unenforced mode do not restrict traffic between EPGs that are member of the VRF. VRFs in enforced mode restrict traffic not allowed by contracts between EPGs that are member of the VRF. The policy control enforcement direction is used to determine the preferred enforcement method.`,
			},
			"pc_tag": schema.StringAttribute{
				Computed:            true,
				MarkdownDescription: `The classification tag used for policy enforcement and zoning.`,
			},
			"scope": schema.StringAttribute{
				Computed:            true,
				MarkdownDescription: `The scope ID (L3-VNI) of the VRF object.`,
			},
			"relation_to_bgp_timers": schema.SingleNestedAttribute{
				MarkdownDescription: `A source relation to the BGP timer policy. This is an internal object.`,
				Computed:            true,
				Attributes: map[string]schema.Attribute{
					"annotation": schema.StringAttribute{
						Computed:            true,
						MarkdownDescription: `The annotation of the Relation To BGP Timers object.`,
					},
					"bgp_timers_name": schema.StringAttribute{
						Computed:            true,
						MarkdownDescription: `The name of the BGP timers policy associated with this context.`,
					},
					"annotations": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Computed:            true,
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
					"tags": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Computed:            true,
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
				},
			},
			"relation_to_monitoring_policy": schema.SingleNestedAttribute{
				MarkdownDescription: `A source relation to the monitoring policy model for the endpoint group semantic scope. This is an internal object.`,
				Computed:            true,
				Attributes: map[string]schema.Attribute{
					"annotation": schema.StringAttribute{
						Computed:            true,
						MarkdownDescription: `The annotation of the Relation From VRF To Monitoring Policy object.`,
					},
					"monitoring_policy_name": schema.StringAttribute{
						Computed:            true,
						MarkdownDescription: `The name of the monitoring policy associated with this context.`,
					},
					"annotations": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Computed:            true,
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
					"tags": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Computed:            true,
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
				},
			},
			"relation_to_bgp_address_family_contexts": schema.SetNestedAttribute{
				MarkdownDescription: `A source relation to the BGP address family context policy.`,
				Computed:            true,
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"address_family": schema.StringAttribute{
							Computed:            true,
							MarkdownDescription: `The type of address family for the Relation From VRF To BGP Address Family Context.`,
						},
						"annotation": schema.StringAttribute{
							Computed:            true,
							MarkdownDescription: `The annotation of the Relation From VRF To BGP Address Family Context object.`,
						},
						"bgp_address_family_context_name": schema.StringAttribute{
							Computed:            true,
							MarkdownDescription: `The name of the BGP Address Family Context.`,
						},
						"annotations": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Computed:            true,
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Computed:            true,
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Computed:            true,
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
						"tags": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Computed:            true,
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Computed:            true,
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Computed:            true,
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
					},
				},
			},
			"relation_to_eigrp_address_family_contexts": schema.SetNestedAttribute{
				MarkdownDescription: `A source relation to the per-address family EIGRP context policy.`,
				Computed:            true,
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"address_family": schema.StringAttribute{
							Computed:            true,
							MarkdownDescription: `The type of address family for the Relation From VRF To EIGRP Address Family Context.`,
						},
						"annotation": schema.StringAttribute{
							Computed:            true,
							MarkdownDescription: `The annotation of the Relation From VRF To EIGRP Address Family Context object.`,
						},
						"eigrp_address_family_context_name": schema.StringAttribute{
							Computed:            true,
							MarkdownDescription: `The name of the EIGRP Address Family Context.`,
						},
						"annotations": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Computed:            true,
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Computed:            true,
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Computed:            true,
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
						"tags": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Computed:            true,
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Computed:            true,
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Computed:            true,
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
					},
				},
			},
			"relation_to_end_point_retention_policy": schema.SingleNestedAttribute{
				MarkdownDescription: `Name of the endpoint retention policy associated with this context.`,
				Computed:            true,
				Attributes: map[string]schema.Attribute{
					"annotation": schema.StringAttribute{
						Computed:            true,
						MarkdownDescription: `The annotation of the Relation From VRF To End Point Retention Policy object.`,
					},
					"end_point_retention_policy_name": schema.StringAttribute{
						Computed:            true,
						MarkdownDescription: `The end point retention policy name.`,
					},
					"annotations": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Computed:            true,
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
					"tags": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Computed:            true,
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
				},
			},
			"relation_to_l3out_route_tag_policy": schema.SingleNestedAttribute{
				MarkdownDescription: ``,
				Computed:            true,
				Attributes: map[string]schema.Attribute{
					"annotation": schema.StringAttribute{
						Computed:            true,
						MarkdownDescription: `The annotation of the Relation From VRF To L3Out Route Tag Policy object.`,
					},
					"l3out_route_tag_policy_name": schema.StringAttribute{
						Computed:            true,
						MarkdownDescription: `The name of the External Route Tag policy associated with this context.`,
					},
					"annotations": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Computed:            true,
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
					"tags": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Computed:            true,
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
				},
			},
			"relation_to_address_family_ospf_timers": schema.SetNestedAttribute{
				MarkdownDescription: `A source relation to the per-address family OSPF context policy.`,
				Computed:            true,
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"address_family": schema.StringAttribute{
							Computed:            true,
							MarkdownDescription: `The type of address family for the Relation From VRF To Address Family OSPF Timers.`,
						},
						"annotation": schema.StringAttribute{
							Computed:            true,
							MarkdownDescription: `The annotation of the Relation From VRF To Address Family OSPF Timers object.`,
						},
						"ospf_timers_name": schema.StringAttribute{
							Computed:            true,
							MarkdownDescription: `The name of the OSPF timers policy associated with this object.`,
						},
						"annotations": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Computed:            true,
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Computed:            true,
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Computed:            true,
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
						"tags": schema.SetNestedAttribute{
							MarkdownDescription: ``,
							Computed:            true,
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"key": schema.StringAttribute{
										Computed:            true,
										MarkdownDescription: `The key used to uniquely identify this configuration object.`,
									},
									"value": schema.StringAttribute{
										Computed:            true,
										MarkdownDescription: `The value of the property.`,
									},
								},
							},
						},
					},
				},
			},
			"relation_to_wan_vpn": schema.SingleNestedAttribute{
				MarkdownDescription: `Relationship to WAN VPNs`,
				Computed:            true,
				Attributes: map[string]schema.Attribute{
					"annotation": schema.StringAttribute{
						Computed:            true,
						MarkdownDescription: `The annotation of the Relation From VRF To WAN VPN object.`,
					},
					"target_dn": schema.StringAttribute{
						Computed:            true,
						MarkdownDescription: `The distinguished name of the target.`,
					},
					"annotations": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Computed:            true,
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
					"tags": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Computed:            true,
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
				},
			},
			"relation_to_ospf_timers": schema.SingleNestedAttribute{
				MarkdownDescription: `A source relation to the context-level OSPF timer policy. This is an internal object.`,
				Computed:            true,
				Attributes: map[string]schema.Attribute{
					"annotation": schema.StringAttribute{
						Computed:            true,
						MarkdownDescription: `The annotation of the Relation To OSPF Timers object.`,
					},
					"ospf_timers_name": schema.StringAttribute{
						Computed:            true,
						MarkdownDescription: `The name of the OSPF timers policy associated with this context.`,
					},
					"annotations": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Computed:            true,
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
					"tags": schema.SetNestedAttribute{
						MarkdownDescription: ``,
						Computed:            true,
						NestedObject: schema.NestedAttributeObject{
							Attributes: map[string]schema.Attribute{
								"key": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The key used to uniquely identify this configuration object.`,
								},
								"value": schema.StringAttribute{
									Computed:            true,
									MarkdownDescription: `The value of the property.`,
								},
							},
						},
					},
				},
			},
			"annotations": schema.SetNestedAttribute{
				MarkdownDescription: ``,
				Computed:            true,
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"key": schema.StringAttribute{
							Computed:            true,
							MarkdownDescription: `The key used to uniquely identify this configuration object.`,
						},
						"value": schema.StringAttribute{
							Computed:            true,
							MarkdownDescription: `The value of the property.`,
						},
					},
				},
			},
			"tags": schema.SetNestedAttribute{
				MarkdownDescription: ``,
				Computed:            true,
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"key": schema.StringAttribute{
							Computed:            true,
							MarkdownDescription: `The key used to uniquely identify this configuration object.`,
						},
						"value": schema.StringAttribute{
							Computed:            true,
							MarkdownDescription: `The value of the property.`,
						},
					},
				},
			},
		},
		Blocks: map[string]schema.Block{
			"relation_fv_rs_ctx_to_bgp_ctx_af_pol": schema.SetNestedBlock{
				NestedObject: schema.NestedBlockObject{
					Attributes: map[string]schema.Attribute{
						"af": schema.StringAttribute{
							Computed:           true,
							DeprecationMessage: "Attribute 'af' will be deprecated soon, please refer to 'relation_from_vrf_to_bgp_address_family_context.address_family' instead",
						},
						"tn_bgp_ctx_af_pol_name": schema.StringAttribute{
							Computed:           true,
							DeprecationMessage: "Attribute 'tn_bgp_ctx_af_pol_name' will be deprecated soon, please refer to 'relation_from_vrf_to_bgp_address_family_context.bgp_address_family_context_name' instead",
						},
					},
				},
			},
			"relation_fv_rs_ctx_to_eigrp_ctx_af_pol": schema.SetNestedBlock{
				NestedObject: schema.NestedBlockObject{
					Attributes: map[string]schema.Attribute{
						"af": schema.StringAttribute{
							Computed:           true,
							DeprecationMessage: "Attribute 'af' will be deprecated soon, please refer to 'relation_from_vrf_to_eigrp_address_family_context.address_family' instead",
						},
						"tn_eigrp_ctx_af_pol_name": schema.StringAttribute{
							Computed:           true,
							DeprecationMessage: "Attribute 'tn_eigrp_ctx_af_pol_name' will be deprecated soon, please refer to 'relation_from_vrf_to_eigrp_address_family_context.eigrp_address_family_context_name' instead",
						},
					},
				},
			},
			"relation_fv_rs_ctx_to_ospf_ctx_pol": schema.SetNestedBlock{
				NestedObject: schema.NestedBlockObject{
					Attributes: map[string]schema.Attribute{
						"af": schema.StringAttribute{
							Computed:           true,
							DeprecationMessage: "Attribute 'af' will be deprecated soon, please refer to 'relation_from_vrf_to_address_family_ospf_timers.address_family' instead",
						},
						"tn_ospf_ctx_pol_name": schema.StringAttribute{
							Computed:           true,
							DeprecationMessage: "Attribute 'tn_ospf_ctx_pol_name' will be deprecated soon, please refer to 'relation_from_vrf_to_address_family_ospf_timers.ospf_timers_name' instead",
						},
					},
				},
			},
		},
	}
	tflog.Debug(ctx, "End schema of datasource: aci_vrf")
}

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

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

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

		return
	}

	d.client = client
	tflog.Debug(ctx, "End configure of datasource: aci_vrf")
}

func (d *FvCtxDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) {
	tflog.Debug(ctx, "Start read of datasource: aci_vrf")
	var data *FvCtxResourceModel

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

	if resp.Diagnostics.HasError() {
		return
	}

	setFvCtxId(ctx, data)

	// Create a copy of the Id for when not found during getAndSetFvCtxAttributes
	cachedId := data.Id.ValueString()

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

	getAndSetFvCtxAttributes(ctx, &resp.Diagnostics, d.client, data)

	if data.Id.IsNull() {
		resp.Diagnostics.AddError(
			"Failed to read aci_vrf data source",
			fmt.Sprintf("The aci_vrf data source with id '%s' has not been found", cachedId),
		)
		return
	}

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