// Copyright © 2023 Cisco Systems, Inc. and its affiliates.
// All rights reserved.
//
// Licensed under the Mozilla Public License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://mozilla.org/MPL/2.0/
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// SPDX-License-Identifier: MPL-2.0

// Code generated by "gen/generator.go"; DO NOT EDIT.

package provider

// Section below is generated&owned by "gen/generator.go". //template:begin imports
import (
	"context"
	"fmt"

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

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

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

// Ensure the implementation satisfies the expected interfaces.
var (
	_ datasource.DataSource              = &SystemDataSource{}
	_ datasource.DataSourceWithConfigure = &SystemDataSource{}
)

func NewSystemDataSource() datasource.DataSource {
	return &SystemDataSource{}
}

type SystemDataSource struct {
	data *IosxeProviderData
}

func (d *SystemDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse) {
	resp.TypeName = req.ProviderTypeName + "_system"
}

func (d *SystemDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse) {
	resp.Schema = schema.Schema{
		// This description is used by the documentation generator and the language server.
		MarkdownDescription: "This data source can read the System configuration.",

		Attributes: map[string]schema.Attribute{
			"device": schema.StringAttribute{
				MarkdownDescription: "A device name from the provider configuration.",
				Optional:            true,
			},
			"id": schema.StringAttribute{
				MarkdownDescription: "The path of the retrieved object.",
				Computed:            true,
			},
			"hostname": schema.StringAttribute{
				MarkdownDescription: "Set system's network name",
				Computed:            true,
			},
			"ip_bgp_community_new_format": schema.BoolAttribute{
				MarkdownDescription: "select aa:nn format for BGP community",
				Computed:            true,
			},
			"ip_routing": schema.BoolAttribute{
				MarkdownDescription: "Enable or disable IP routing",
				Computed:            true,
			},
			"ipv6_unicast_routing": schema.BoolAttribute{
				MarkdownDescription: "Enable unicast routing",
				Computed:            true,
			},
			"mtu": schema.Int64Attribute{
				MarkdownDescription: "",
				Computed:            true,
			},
			"ip_source_route": schema.BoolAttribute{
				MarkdownDescription: "Process packets with source routing header options",
				Computed:            true,
			},
			"ip_domain_lookup": schema.BoolAttribute{
				MarkdownDescription: "Enable IP Domain Name System hostname translation",
				Computed:            true,
			},
			"ip_domain_name": schema.StringAttribute{
				MarkdownDescription: "Define the default domain name",
				Computed:            true,
			},
			"login_delay": schema.Int64Attribute{
				MarkdownDescription: "Set delay between successive fail login",
				Computed:            true,
			},
			"login_on_failure": schema.BoolAttribute{
				MarkdownDescription: "Set options for failed login attempt",
				Computed:            true,
			},
			"login_on_failure_log": schema.BoolAttribute{
				MarkdownDescription: "Generate syslogs on failure logins",
				Computed:            true,
			},
			"login_on_success": schema.BoolAttribute{
				MarkdownDescription: "Set options for successful login attempt",
				Computed:            true,
			},
			"login_on_success_log": schema.BoolAttribute{
				MarkdownDescription: "Generate syslogs on successful logins",
				Computed:            true,
			},
			"ip_multicast_routing": schema.BoolAttribute{
				MarkdownDescription: "Enable IP multicast forwarding",
				Computed:            true,
			},
			"multicast_routing_switch": schema.BoolAttribute{
				MarkdownDescription: "Enable IP multicast forwarding, some XE devices use this option instead of `multicast_routing`.",
				Computed:            true,
			},
			"ip_multicast_routing_distributed": schema.BoolAttribute{
				MarkdownDescription: "Distributed multicast switching",
				Computed:            true,
			},
			"multicast_routing_vrfs": schema.ListNestedAttribute{
				MarkdownDescription: "Select VPN Routing/Forwarding instance",
				Computed:            true,
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"vrf": schema.StringAttribute{
							MarkdownDescription: "",
							Computed:            true,
						},
						"distributed": schema.BoolAttribute{
							MarkdownDescription: "Distributed multicast switching",
							Computed:            true,
						},
					},
				},
			},
			"ip_http_access_class": schema.Int64Attribute{
				MarkdownDescription: "Restrict http server access by access-class",
				Computed:            true,
			},
			"ip_http_authentication_aaa": schema.BoolAttribute{
				MarkdownDescription: "Use AAA access control methods",
				Computed:            true,
			},
			"ip_http_authentication_aaa_exec_authorization": schema.StringAttribute{
				MarkdownDescription: "Set method list for exec authorization",
				Computed:            true,
			},
			"ip_http_authentication_aaa_login_authentication": schema.StringAttribute{
				MarkdownDescription: "Set method list for login authentication",
				Computed:            true,
			},
			"ip_http_authentication_aaa_command_authorization": schema.ListNestedAttribute{
				MarkdownDescription: "Set method list for command authorization",
				Computed:            true,
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"level": schema.Int64Attribute{
							MarkdownDescription: "Enable level",
							Computed:            true,
						},
						"name": schema.StringAttribute{
							MarkdownDescription: "Use an authorization list with this name",
							Computed:            true,
						},
					},
				},
			},
			"ip_http_authentication_local": schema.BoolAttribute{
				MarkdownDescription: "Use local username and passwords",
				Computed:            true,
			},
			"ip_http_server": schema.BoolAttribute{
				MarkdownDescription: "Enable http server",
				Computed:            true,
			},
			"ip_http_secure_server": schema.BoolAttribute{
				MarkdownDescription: "Enable HTTP secure server",
				Computed:            true,
			},
			"ip_http_secure_trustpoint": schema.StringAttribute{
				MarkdownDescription: "Set http secure server certificate trustpoint",
				Computed:            true,
			},
			"ip_http_tls_version": schema.StringAttribute{
				MarkdownDescription: "Set TLS version for HTTP secure server",
				Computed:            true,
			},
			"ip_http_client_secure_trustpoint": schema.StringAttribute{
				MarkdownDescription: "Set http client certificate secure trustpoint",
				Computed:            true,
			},
			"ip_http_client_source_interface": schema.StringAttribute{
				MarkdownDescription: "Specify interface for source address in all HTTP(S) client connections",
				Computed:            true,
			},
			"ip_http_secure_active_session_modules": schema.StringAttribute{
				MarkdownDescription: "Set secure active session modules",
				Computed:            true,
			},
			"ip_http_max_connections": schema.Int64Attribute{
				MarkdownDescription: "max http connections",
				Computed:            true,
			},
			"ip_http_active_session_modules": schema.StringAttribute{
				MarkdownDescription: "Set active session modules",
				Computed:            true,
			},
			"ip_name_servers": schema.ListAttribute{
				MarkdownDescription: "Domain server IPv4/IPv6 address (maximum of 6)",
				ElementType:         types.StringType,
				Computed:            true,
			},
			"ip_name_servers_vrf": schema.ListNestedAttribute{
				MarkdownDescription: "",
				Computed:            true,
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"vrf": schema.StringAttribute{
							MarkdownDescription: "Specify VRF Name",
							Computed:            true,
						},
						"servers": schema.ListAttribute{
							MarkdownDescription: "Domain server IPv4/IPv6 address (maximum of 6)",
							ElementType:         types.StringType,
							Computed:            true,
						},
					},
				},
			},
			"ip_domain_lookup_source_interface_loopback": schema.Int64Attribute{
				MarkdownDescription: "Loopback interface",
				Computed:            true,
			},
			"ip_domain_lookup_source_interface_vlan": schema.Int64Attribute{
				MarkdownDescription: "Iosxr Vlans",
				Computed:            true,
			},
			"ip_domain_lookup_source_interface_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "GigabitEthernet IEEE 802.3z",
				Computed:            true,
			},
			"ip_domain_lookup_source_interface_two_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Two GigabitEthernet ",
				Computed:            true,
			},
			"ip_domain_lookup_source_interface_five_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Five GigabitEthernet ",
				Computed:            true,
			},
			"ip_domain_lookup_source_interface_ten_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Ten Gigabit Ethernet",
				Computed:            true,
			},
			"ip_domain_lookup_source_interface_twenty_five_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Twenty Five GigabitEthernet ",
				Computed:            true,
			},
			"ip_domain_lookup_source_interface_forty_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Forty GigabitEthernet ",
				Computed:            true,
			},
			"ip_domain_lookup_source_interface_hundred_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Hundred GigabitEthernet",
				Computed:            true,
			},
			"cisp_enable": schema.BoolAttribute{
				MarkdownDescription: "Enable CISP",
				Computed:            true,
			},
			"epm_logging": schema.BoolAttribute{
				MarkdownDescription: "Enable EPM logging",
				Computed:            true,
			},
			"access_session_mac_move_deny": schema.BoolAttribute{
				MarkdownDescription: "Deny MAC moves (clears existing session)",
				Computed:            true,
			},
			"diagnostic_bootup_level": schema.StringAttribute{
				MarkdownDescription: "Select diagnostic level",
				Computed:            true,
			},
			"memory_free_low_watermark_processor": schema.Int64Attribute{
				MarkdownDescription: "low water mark of memory in KB",
				Computed:            true,
			},
			"archive_path": schema.StringAttribute{
				MarkdownDescription: "path for backups",
				Computed:            true,
			},
			"archive_maximum": schema.Int64Attribute{
				MarkdownDescription: "maximum number of backup copies",
				Computed:            true,
			},
			"archive_write_memory": schema.BoolAttribute{
				MarkdownDescription: "Enable automatic backup generation during write memory",
				Computed:            true,
			},
			"archive_time_period": schema.Int64Attribute{
				MarkdownDescription: "Period of time in minutes to automatically archive the running-config",
				Computed:            true,
			},
			"archive_log_config_logging_enable": schema.BoolAttribute{
				MarkdownDescription: "Enable the config logger",
				Computed:            true,
			},
			"archive_log_config_logging_size": schema.Int64Attribute{
				MarkdownDescription: "Maximum number of logged commands that will be kept by the config log",
				Computed:            true,
			},
			"redundancy": schema.BoolAttribute{
				MarkdownDescription: "Enter redundancy mode",
				Computed:            true,
			},
			"redundancy_mode": schema.StringAttribute{
				MarkdownDescription: "redundancy mode for this chassis",
				Computed:            true,
			},
			"transceiver_type_all_monitoring": schema.BoolAttribute{
				MarkdownDescription: "Enable/disable monitoring",
				Computed:            true,
			},
			"ip_forward_protocol_nd": schema.BoolAttribute{
				MarkdownDescription: "Sun's Network Disk protocol",
				Computed:            true,
			},
			"ip_scp_server_enable": schema.BoolAttribute{
				MarkdownDescription: "Enable server side of SCP",
				Computed:            true,
			},
			"ip_ssh_version": schema.StringAttribute{
				MarkdownDescription: "Specify protocol version supported",
				Computed:            true,
			},
			"ip_ssh_version_legacy": schema.Int64Attribute{
				MarkdownDescription: "Specify protocol version supported. DEPRECATED, Use ssh-version instead",
				Computed:            true,
			},
			"ip_ssh_time_out": schema.Int64Attribute{
				MarkdownDescription: "Specify SSH time-out interval",
				Computed:            true,
			},
			"ip_ssh_authentication_retries": schema.Int64Attribute{
				MarkdownDescription: "Specify number of authentication retries",
				Computed:            true,
			},
			"ip_ssh_source_interface_loopback": schema.Int64Attribute{
				MarkdownDescription: "Loopback interface",
				Computed:            true,
			},
			"ip_ssh_source_interface_vlan": schema.Int64Attribute{
				MarkdownDescription: "Iosxr Vlans",
				Computed:            true,
			},
			"ip_ssh_source_interface_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "GigabitEthernet IEEE 802.3z",
				Computed:            true,
			},
			"ip_ssh_source_interface_two_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Two GigabitEthernet ",
				Computed:            true,
			},
			"ip_ssh_source_interface_five_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Five GigabitEthernet ",
				Computed:            true,
			},
			"ip_ssh_source_interface_ten_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Ten Gigabit Ethernet",
				Computed:            true,
			},
			"ip_ssh_source_interface_twenty_five_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Twenty Five GigabitEthernet ",
				Computed:            true,
			},
			"ip_ssh_source_interface_forty_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Forty GigabitEthernet ",
				Computed:            true,
			},
			"ip_ssh_source_interface_hundred_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Hundred GigabitEthernet",
				Computed:            true,
			},
			"control_plane_service_policy_input": schema.StringAttribute{
				MarkdownDescription: "Assign policy-map to the input of an interface",
				Computed:            true,
			},
			"pnp_profiles": schema.ListNestedAttribute{
				MarkdownDescription: "PNP profile",
				Computed:            true,
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"name": schema.StringAttribute{
							MarkdownDescription: "",
							Computed:            true,
						},
						"transport_https_ipv4_ipv4_address": schema.StringAttribute{
							MarkdownDescription: "IPv4 address of the server",
							Computed:            true,
						},
						"transport_https_ipv4_port": schema.Int64Attribute{
							MarkdownDescription: "port number",
							Computed:            true,
						},
					},
				},
			},
			"ip_tacacs_source_interface_loopback": schema.Int64Attribute{
				MarkdownDescription: "Loopback interface",
				Computed:            true,
			},
			"ip_tacacs_source_interface_vlan": schema.Int64Attribute{
				MarkdownDescription: "Iosxr Vlans",
				Computed:            true,
			},
			"ip_tacacs_source_interface_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "GigabitEthernet IEEE 802.3z",
				Computed:            true,
			},
			"ip_tacacs_source_interface_two_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Two GigabitEthernet ",
				Computed:            true,
			},
			"ip_tacacs_source_interface_five_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Five GigabitEthernet ",
				Computed:            true,
			},
			"ip_tacacs_source_interface_ten_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Ten Gigabit Ethernet",
				Computed:            true,
			},
			"ip_tacacs_source_interface_twenty_five_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Twenty Five GigabitEthernet ",
				Computed:            true,
			},
			"ip_tacacs_source_interface_forty_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Forty GigabitEthernet ",
				Computed:            true,
			},
			"ip_tacacs_source_interface_hundred_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Hundred GigabitEthernet",
				Computed:            true,
			},
			"ip_tacacs_source_interface_vrf": schema.StringAttribute{
				MarkdownDescription: "VPN Routing/Forwarding parameters",
				Computed:            true,
			},
			"ip_radius_source_interface_loopback": schema.Int64Attribute{
				MarkdownDescription: "Loopback interface",
				Computed:            true,
			},
			"ip_radius_source_interface_vlan": schema.Int64Attribute{
				MarkdownDescription: "Iosxr Vlans",
				Computed:            true,
			},
			"ip_radius_source_interface_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "GigabitEthernet IEEE 802.3z",
				Computed:            true,
			},
			"ip_radius_source_interface_two_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Two GigabitEthernet ",
				Computed:            true,
			},
			"ip_radius_source_interface_five_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Five GigabitEthernet ",
				Computed:            true,
			},
			"ip_radius_source_interface_ten_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Ten Gigabit Ethernet",
				Computed:            true,
			},
			"ip_radius_source_interface_twenty_five_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Twenty Five GigabitEthernet ",
				Computed:            true,
			},
			"ip_radius_source_interface_forty_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Forty GigabitEthernet ",
				Computed:            true,
			},
			"ip_radius_source_interface_hundred_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "Hundred GigabitEthernet",
				Computed:            true,
			},
			"ip_radius_source_interface_vrf": schema.StringAttribute{
				MarkdownDescription: "VPN Routing/Forwarding parameters",
				Computed:            true,
			},
			"boot_system_flash_files": schema.ListNestedAttribute{
				MarkdownDescription: "",
				Computed:            true,
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"path": schema.StringAttribute{
							MarkdownDescription: "",
							Computed:            true,
						},
					},
				},
			},
			"boot_system_bootfiles": schema.ListNestedAttribute{
				MarkdownDescription: "",
				Computed:            true,
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"path": schema.StringAttribute{
							MarkdownDescription: "WORD - TFTP filename or URL",
							Computed:            true,
						},
					},
				},
			},
			"enable_secret": schema.StringAttribute{
				MarkdownDescription: "",
				Computed:            true,
				Sensitive:           true,
			},
			"enable_secret_type": schema.StringAttribute{
				MarkdownDescription: "",
				Computed:            true,
			},
			"enable_secret_level": schema.Int64Attribute{
				MarkdownDescription: "Set exec level password",
				Computed:            true,
			},
			"ip_hosts": schema.ListNestedAttribute{
				MarkdownDescription: "",
				Computed:            true,
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"name": schema.StringAttribute{
							MarkdownDescription: "Name of host",
							Computed:            true,
						},
						"ips": schema.ListAttribute{
							MarkdownDescription: "Host IP address",
							ElementType:         types.StringType,
							Computed:            true,
						},
					},
				},
			},
			"ip_hosts_vrf": schema.ListNestedAttribute{
				MarkdownDescription: "Specify VRF",
				Computed:            true,
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"vrf": schema.StringAttribute{
							MarkdownDescription: "VRF name",
							Computed:            true,
						},
						"hosts": schema.ListNestedAttribute{
							MarkdownDescription: "Name of host",
							Computed:            true,
							NestedObject: schema.NestedAttributeObject{
								Attributes: map[string]schema.Attribute{
									"name": schema.StringAttribute{
										MarkdownDescription: "Name of host",
										Computed:            true,
									},
									"ips": schema.ListAttribute{
										MarkdownDescription: "Host IP address",
										ElementType:         types.StringType,
										Computed:            true,
									},
								},
							},
						},
					},
				},
			},
			"diagnostic_event_log_size": schema.Int64Attribute{
				MarkdownDescription: "Configure event log size Number of entries <1-10000>",
				Computed:            true,
			},
			"subscriber_templating": schema.BoolAttribute{
				MarkdownDescription: "Configure subscriber templating",
				Computed:            true,
			},
			"call_home_contact_email": schema.StringAttribute{
				MarkdownDescription: "Use email address",
				Computed:            true,
			},
			"call_home_cisco_tac_1_profile_active": schema.BoolAttribute{
				MarkdownDescription: "Activate the current profile",
				Computed:            true,
			},
			"call_home_cisco_tac_1_destination_transport_method": schema.StringAttribute{
				MarkdownDescription: "To specify transport method for this profile",
				Computed:            true,
			},
			"ip_ftp_passive": schema.BoolAttribute{
				MarkdownDescription: "Connect using passive mode",
				Computed:            true,
			},
			"tftp_source_interface_gigabit_ethernet": schema.StringAttribute{
				MarkdownDescription: "GigabitEthernet IEEE 802.3z",
				Computed:            true,
			},
			"tftp_source_interface_loopback": schema.Int64Attribute{
				MarkdownDescription: "Loopback interface",
				Computed:            true,
			},
			"multilink_ppp_bundle_name": schema.StringAttribute{
				MarkdownDescription: "Select method for naming multilink bundles",
				Computed:            true,
			},
			"version": schema.StringAttribute{
				MarkdownDescription: "Version",
				Computed:            true,
			},
			"track_objects": schema.ListNestedAttribute{
				MarkdownDescription: "",
				Computed:            true,
				NestedObject: schema.NestedAttributeObject{
					Attributes: map[string]schema.Attribute{
						"number": schema.StringAttribute{
							MarkdownDescription: "Tracked object",
							Computed:            true,
						},
						"ip_sla_number": schema.Int64Attribute{
							MarkdownDescription: "Entry number",
							Computed:            true,
						},
						"ip_sla_reachability": schema.BoolAttribute{
							MarkdownDescription: "Reachability",
							Computed:            true,
						},
					},
				},
			},
			"ip_nbar_classification_dns_classify_by_domain": schema.BoolAttribute{
				MarkdownDescription: "dns classification by domain",
				Computed:            true,
			},
			"ip_multicast_route_limit": schema.Int64Attribute{
				MarkdownDescription: "Maximum number of multicast routes",
				Computed:            true,
			},
			"security_passwords_min_length": schema.Int64Attribute{
				MarkdownDescription: "Minimum length of passwords",
				Computed:            true,
			},
			"ip_domain_list_names": schema.ListAttribute{
				MarkdownDescription: "",
				ElementType:         types.StringType,
				Computed:            true,
			},
			"ip_domain_list_vrf_domain": schema.StringAttribute{
				MarkdownDescription: "",
				Computed:            true,
			},
			"ip_domain_list_vrf": schema.StringAttribute{
				MarkdownDescription: "",
				Computed:            true,
			},
			"ethernet_cfm_alarm_config_delay": schema.Int64Attribute{
				MarkdownDescription: "msec (default 2500 msec)",
				Computed:            true,
			},
			"ethernet_cfm_alarm_config_reset": schema.Int64Attribute{
				MarkdownDescription: "msec (default 10000 msec)",
				Computed:            true,
			},
			"standby_redirects": schema.BoolAttribute{
				MarkdownDescription: "",
				Computed:            true,
			},
			"standby_redirects_enable_disable": schema.StringAttribute{
				MarkdownDescription: "",
				Computed:            true,
			},
		},
	}
}

func (d *SystemDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, _ *datasource.ConfigureResponse) {
	if req.ProviderData == nil {
		return
	}

	d.data = req.ProviderData.(*IosxeProviderData)
}

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

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

func (d *SystemDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse) {
	var config SystemData

	// Read config
	diags := req.Config.Get(ctx, &config)
	resp.Diagnostics.Append(diags...)
	if resp.Diagnostics.HasError() {
		return
	}

	tflog.Debug(ctx, fmt.Sprintf("%s: Beginning Read", config.getPath()))

	device, ok := d.data.Devices[config.Device.ValueString()]
	if !ok {
		resp.Diagnostics.AddAttributeError(path.Root("device"), "Invalid device", fmt.Sprintf("Device '%s' does not exist in provider configuration.", config.Device.ValueString()))
		return
	}

	res, err := device.Client.GetData(config.getPath())
	if res.StatusCode == 404 {
		config = SystemData{Device: config.Device}
	} else {
		if err != nil {
			resp.Diagnostics.AddError("Client Error", fmt.Sprintf("Failed to retrieve object (%s), got error: %s", config.getPath(), err))
			return
		}

		config.fromBody(ctx, res.Res)
	}

	config.Id = types.StringValue(config.getPath())

	tflog.Debug(ctx, fmt.Sprintf("%s: Read finished successfully", config.getPath()))

	diags = resp.State.Set(ctx, &config)
	resp.Diagnostics.Append(diags...)
}

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