// Code generated by "packer-sdc mapstructure-to-hcl2"; DO NOT EDIT.

package lxdapi

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

// FlatConfig is an auto-generated flat version of Config.
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatConfig struct {
	Environment map[string]string `mapstructure:"environment" required:"false" cty:"environment" hcl:"environment"`
	Inline      []string          `mapstructure:"inline" required:"true" cty:"inline" hcl:"inline"`
}

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

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