// Code generated by "mapstructure-to-hcl2 -type CustomizeConfig,LinuxOptions,NetworkInterfaces,NetworkInterface,GlobalDnsSettings,GlobalRoutingSettings"; DO NOT EDIT.
package clone

import (
	"github.com/hashicorp/hcl/v2/hcldec"
	"github.com/zclconf/go-cty/cty"
)

// FlatCustomizeConfig is an auto-generated flat version of CustomizeConfig.
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatCustomizeConfig struct {
	LinuxOptions       *FlatLinuxOptions      `mapstructure:"linux_options" cty:"linux_options" hcl:"linux_options"`
	WindowsSysPrepFile *string                `mapstructure:"windows_sysprep_file" cty:"windows_sysprep_file" hcl:"windows_sysprep_file"`
	NetworkInterfaces  []FlatNetworkInterface `mapstructure:"network_interface" cty:"network_interface" hcl:"network_interface"`
	Ipv4Gateway        *string                `mapstructure:"ipv4_gateway" cty:"ipv4_gateway" hcl:"ipv4_gateway"`
	Ipv6Gateway        *string                `mapstructure:"ipv6_gateway" cty:"ipv6_gateway" hcl:"ipv6_gateway"`
	DnsServerList      []string               `mapstructure:"dns_server_list" cty:"dns_server_list" hcl:"dns_server_list"`
	DnsSuffixList      []string               `mapstructure:"dns_suffix_list" cty:"dns_suffix_list" hcl:"dns_suffix_list"`
}

// FlatMapstructure returns a new FlatCustomizeConfig.
// FlatCustomizeConfig is an auto-generated flat version of CustomizeConfig.
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*CustomizeConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
	return new(FlatCustomizeConfig)
}

// HCL2Spec returns the hcl spec of a CustomizeConfig.
// This spec is used by HCL to read the fields of CustomizeConfig.
// The decoded values from this spec will then be applied to a FlatCustomizeConfig.
func (*FlatCustomizeConfig) HCL2Spec() map[string]hcldec.Spec {
	s := map[string]hcldec.Spec{
		"linux_options":        &hcldec.BlockSpec{TypeName: "linux_options", Nested: hcldec.ObjectSpec((*FlatLinuxOptions)(nil).HCL2Spec())},
		"windows_sysprep_file": &hcldec.AttrSpec{Name: "windows_sysprep_file", Type: cty.String, Required: false},
		"network_interface":    &hcldec.BlockListSpec{TypeName: "network_interface", Nested: hcldec.ObjectSpec((*FlatNetworkInterface)(nil).HCL2Spec())},
		"ipv4_gateway":         &hcldec.AttrSpec{Name: "ipv4_gateway", Type: cty.String, Required: false},
		"ipv6_gateway":         &hcldec.AttrSpec{Name: "ipv6_gateway", Type: cty.String, Required: false},
		"dns_server_list":      &hcldec.AttrSpec{Name: "dns_server_list", Type: cty.List(cty.String), Required: false},
		"dns_suffix_list":      &hcldec.AttrSpec{Name: "dns_suffix_list", Type: cty.List(cty.String), Required: false},
	}
	return s
}

// FlatGlobalDnsSettings is an auto-generated flat version of GlobalDnsSettings.
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatGlobalDnsSettings struct {
	DnsServerList []string `mapstructure:"dns_server_list" cty:"dns_server_list" hcl:"dns_server_list"`
	DnsSuffixList []string `mapstructure:"dns_suffix_list" cty:"dns_suffix_list" hcl:"dns_suffix_list"`
}

// FlatMapstructure returns a new FlatGlobalDnsSettings.
// FlatGlobalDnsSettings is an auto-generated flat version of GlobalDnsSettings.
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*GlobalDnsSettings) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
	return new(FlatGlobalDnsSettings)
}

// HCL2Spec returns the hcl spec of a GlobalDnsSettings.
// This spec is used by HCL to read the fields of GlobalDnsSettings.
// The decoded values from this spec will then be applied to a FlatGlobalDnsSettings.
func (*FlatGlobalDnsSettings) HCL2Spec() map[string]hcldec.Spec {
	s := map[string]hcldec.Spec{
		"dns_server_list": &hcldec.AttrSpec{Name: "dns_server_list", Type: cty.List(cty.String), Required: false},
		"dns_suffix_list": &hcldec.AttrSpec{Name: "dns_suffix_list", Type: cty.List(cty.String), Required: false},
	}
	return s
}

// FlatGlobalRoutingSettings is an auto-generated flat version of GlobalRoutingSettings.
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatGlobalRoutingSettings struct {
	Ipv4Gateway *string `mapstructure:"ipv4_gateway" cty:"ipv4_gateway" hcl:"ipv4_gateway"`
	Ipv6Gateway *string `mapstructure:"ipv6_gateway" cty:"ipv6_gateway" hcl:"ipv6_gateway"`
}

// FlatMapstructure returns a new FlatGlobalRoutingSettings.
// FlatGlobalRoutingSettings is an auto-generated flat version of GlobalRoutingSettings.
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*GlobalRoutingSettings) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
	return new(FlatGlobalRoutingSettings)
}

// HCL2Spec returns the hcl spec of a GlobalRoutingSettings.
// This spec is used by HCL to read the fields of GlobalRoutingSettings.
// The decoded values from this spec will then be applied to a FlatGlobalRoutingSettings.
func (*FlatGlobalRoutingSettings) HCL2Spec() map[string]hcldec.Spec {
	s := map[string]hcldec.Spec{
		"ipv4_gateway": &hcldec.AttrSpec{Name: "ipv4_gateway", Type: cty.String, Required: false},
		"ipv6_gateway": &hcldec.AttrSpec{Name: "ipv6_gateway", Type: cty.String, Required: false},
	}
	return s
}

// FlatLinuxOptions is an auto-generated flat version of LinuxOptions.
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatLinuxOptions struct {
	Domain     *string `mapstructure:"domain" cty:"domain" hcl:"domain"`
	Hostname   *string `mapstructure:"host_name" cty:"host_name" hcl:"host_name"`
	HWClockUTC *bool   `mapstructure:"hw_clock_utc" cty:"hw_clock_utc" hcl:"hw_clock_utc"`
	Timezone   *string `mapstructure:"time_zone" cty:"time_zone" hcl:"time_zone"`
}

// FlatMapstructure returns a new FlatLinuxOptions.
// FlatLinuxOptions is an auto-generated flat version of LinuxOptions.
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*LinuxOptions) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
	return new(FlatLinuxOptions)
}

// HCL2Spec returns the hcl spec of a LinuxOptions.
// This spec is used by HCL to read the fields of LinuxOptions.
// The decoded values from this spec will then be applied to a FlatLinuxOptions.
func (*FlatLinuxOptions) HCL2Spec() map[string]hcldec.Spec {
	s := map[string]hcldec.Spec{
		"domain":       &hcldec.AttrSpec{Name: "domain", Type: cty.String, Required: false},
		"host_name":    &hcldec.AttrSpec{Name: "host_name", Type: cty.String, Required: false},
		"hw_clock_utc": &hcldec.AttrSpec{Name: "hw_clock_utc", Type: cty.Bool, Required: false},
		"time_zone":    &hcldec.AttrSpec{Name: "time_zone", Type: cty.String, Required: false},
	}
	return s
}

// FlatNetworkInterface is an auto-generated flat version of NetworkInterface.
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatNetworkInterface struct {
	DnsServerList []string `mapstructure:"dns_server_list" cty:"dns_server_list" hcl:"dns_server_list"`
	DnsDomain     *string  `mapstructure:"dns_domain" cty:"dns_domain" hcl:"dns_domain"`
	Ipv4Address   *string  `mapstructure:"ipv4_address" cty:"ipv4_address" hcl:"ipv4_address"`
	Ipv4NetMask   *int     `mapstructure:"ipv4_netmask" cty:"ipv4_netmask" hcl:"ipv4_netmask"`
	Ipv6Address   *string  `mapstructure:"ipv6_address" cty:"ipv6_address" hcl:"ipv6_address"`
	Ipv6NetMask   *int     `mapstructure:"ipv6_netmask" cty:"ipv6_netmask" hcl:"ipv6_netmask"`
}

// FlatMapstructure returns a new FlatNetworkInterface.
// FlatNetworkInterface is an auto-generated flat version of NetworkInterface.
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*NetworkInterface) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
	return new(FlatNetworkInterface)
}

// HCL2Spec returns the hcl spec of a NetworkInterface.
// This spec is used by HCL to read the fields of NetworkInterface.
// The decoded values from this spec will then be applied to a FlatNetworkInterface.
func (*FlatNetworkInterface) HCL2Spec() map[string]hcldec.Spec {
	s := map[string]hcldec.Spec{
		"dns_server_list": &hcldec.AttrSpec{Name: "dns_server_list", Type: cty.List(cty.String), Required: false},
		"dns_domain":      &hcldec.AttrSpec{Name: "dns_domain", Type: cty.String, Required: false},
		"ipv4_address":    &hcldec.AttrSpec{Name: "ipv4_address", Type: cty.String, Required: false},
		"ipv4_netmask":    &hcldec.AttrSpec{Name: "ipv4_netmask", Type: cty.Number, Required: false},
		"ipv6_address":    &hcldec.AttrSpec{Name: "ipv6_address", Type: cty.String, Required: false},
		"ipv6_netmask":    &hcldec.AttrSpec{Name: "ipv6_netmask", Type: cty.Number, Required: false},
	}
	return s
}
