// 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 (
	"testing"

	"github.com/hashicorp/terraform-plugin-testing/helper/resource"
)

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

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

func TestAccDataSourceIosxeBFD(t *testing.T) {
	var checks []resource.TestCheckFunc
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv4_both_vrfs.0.dst_vrf", "dest_vrf1"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv4_both_vrfs.0.dest_ip", "1.2.3.4/4"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv4_both_vrfs.0.src_vrf", "src_vrf1"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv4_both_vrfs.0.src_ip", "11.22.33.44/12"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv4_both_vrfs.0.template_name", "template1"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv4_without_vrfs.0.dest_ip", "1.2.3.4/4"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv4_without_vrfs.0.src_ip", "11.22.33.44/12"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv4_without_vrfs.0.template_name", "template1"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv4_with_src_vrfs.0.dest_ip", "1.2.3.4/4"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv4_with_src_vrfs.0.src_vrf", "src_vrf1"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv4_with_src_vrfs.0.src_ip", "11.22.33.44/12"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv4_with_src_vrfs.0.template_name", "template1"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv4_with_dst_vrfs.0.dst_vrf", "dest_vrf1"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv4_with_dst_vrfs.0.dest_ip", "1.2.3.4/4"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv4_with_dst_vrfs.0.src_ip", "11.22.33.44/12"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv4_with_dst_vrfs.0.template_name", "template1"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv6_with_both_vrfs.0.dst_vrf", "dst_vrf1"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv6_with_both_vrfs.0.dest_ipv6", "2001:DB8:0:1::/64"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv6_with_both_vrfs.0.src_vrf", "src_vrf1"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv6_with_both_vrfs.0.src_ipv6", "2001:DB8:0:2::/64"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv6_with_both_vrfs.0.template_name", "template1"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv6_without_vrfs.0.dest_ipv6", "2001:DB8:0:1::/64"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv6_without_vrfs.0.src_ipv6", "2001:DB8:0:2::/64"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv6_without_vrfs.0.template_name", "template1"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv6_with_src_vrfs.0.dest_ipv6", "2001:DB8:0:1::/64"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv6_with_src_vrfs.0.src_vrf", "src_vrf1"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv6_with_src_vrfs.0.src_ipv6", "2001:DB8:0:2::/64"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv6_with_src_vrfs.0.template_name", "template1"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv6_with_dst_vrfs.0.dst_vrf", "dst_vrf1"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv6_with_dst_vrfs.0.dest_ipv6", "2001:DB8:0:1::/64"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv6_with_dst_vrfs.0.src_ipv6", "2001:DB8:0:2::/64"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "ipv6_with_dst_vrfs.0.template_name", "template1"))
	checks = append(checks, resource.TestCheckResourceAttr("data.iosxe_bfd.test", "slow_timers", "1000"))
	resource.Test(t, resource.TestCase{
		PreCheck:                 func() { testAccPreCheck(t) },
		ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
		Steps: []resource.TestStep{
			{
				Config: testAccDataSourceIosxeBFDConfig(),
				Check:  resource.ComposeTestCheckFunc(checks...),
			},
		},
	})
}

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

// Section below is generated&owned by "gen/generator.go". //template:begin testPrerequisites
// End of section. //template:end testPrerequisites

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

func testAccDataSourceIosxeBFDConfig() string {
	config := `resource "iosxe_bfd" "test" {` + "\n"
	config += `	delete_mode = "attributes"` + "\n"
	config += `	ipv4_both_vrfs = [{` + "\n"
	config += `		dst_vrf = "dest_vrf1"` + "\n"
	config += `		dest_ip = "1.2.3.4/4"` + "\n"
	config += `		src_vrf = "src_vrf1"` + "\n"
	config += `		src_ip = "11.22.33.44/12"` + "\n"
	config += `		template_name = "template1"` + "\n"
	config += `	}]` + "\n"
	config += `	ipv4_without_vrfs = [{` + "\n"
	config += `		dest_ip = "1.2.3.4/4"` + "\n"
	config += `		src_ip = "11.22.33.44/12"` + "\n"
	config += `		template_name = "template1"` + "\n"
	config += `	}]` + "\n"
	config += `	ipv4_with_src_vrfs = [{` + "\n"
	config += `		dest_ip = "1.2.3.4/4"` + "\n"
	config += `		src_vrf = "src_vrf1"` + "\n"
	config += `		src_ip = "11.22.33.44/12"` + "\n"
	config += `		template_name = "template1"` + "\n"
	config += `	}]` + "\n"
	config += `	ipv4_with_dst_vrfs = [{` + "\n"
	config += `		dst_vrf = "dest_vrf1"` + "\n"
	config += `		dest_ip = "1.2.3.4/4"` + "\n"
	config += `		src_ip = "11.22.33.44/12"` + "\n"
	config += `		template_name = "template1"` + "\n"
	config += `	}]` + "\n"
	config += `	ipv6_with_both_vrfs = [{` + "\n"
	config += `		dst_vrf = "dst_vrf1"` + "\n"
	config += `		dest_ipv6 = "2001:DB8:0:1::/64"` + "\n"
	config += `		src_vrf = "src_vrf1"` + "\n"
	config += `		src_ipv6 = "2001:DB8:0:2::/64"` + "\n"
	config += `		template_name = "template1"` + "\n"
	config += `	}]` + "\n"
	config += `	ipv6_without_vrfs = [{` + "\n"
	config += `		dest_ipv6 = "2001:DB8:0:1::/64"` + "\n"
	config += `		src_ipv6 = "2001:DB8:0:2::/64"` + "\n"
	config += `		template_name = "template1"` + "\n"
	config += `	}]` + "\n"
	config += `	ipv6_with_src_vrfs = [{` + "\n"
	config += `		dest_ipv6 = "2001:DB8:0:1::/64"` + "\n"
	config += `		src_vrf = "src_vrf1"` + "\n"
	config += `		src_ipv6 = "2001:DB8:0:2::/64"` + "\n"
	config += `		template_name = "template1"` + "\n"
	config += `	}]` + "\n"
	config += `	ipv6_with_dst_vrfs = [{` + "\n"
	config += `		dst_vrf = "dst_vrf1"` + "\n"
	config += `		dest_ipv6 = "2001:DB8:0:1::/64"` + "\n"
	config += `		src_ipv6 = "2001:DB8:0:2::/64"` + "\n"
	config += `		template_name = "template1"` + "\n"
	config += `	}]` + "\n"
	config += `	slow_timers = 1000` + "\n"
	config += `}` + "\n"

	config += `
		data "iosxe_bfd" "test" {
			depends_on = [iosxe_bfd.test]
		}
	`
	return config
}

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