2020-03-19 13:51:43 -04:00
|
|
|
// Code generated by "mapstructure-to-hcl2 -type ExportConfig"; DO NOT EDIT.
|
2020-12-11 19:04:43 -05:00
|
|
|
|
2020-03-19 13:51:43 -04:00
|
|
|
package common
|
|
|
|
|
|
|
|
import (
|
2020-08-02 02:02:31 -04:00
|
|
|
"os"
|
|
|
|
|
2020-03-19 13:51:43 -04:00
|
|
|
"github.com/hashicorp/hcl/v2/hcldec"
|
|
|
|
"github.com/zclconf/go-cty/cty"
|
|
|
|
)
|
|
|
|
|
|
|
|
// FlatExportConfig is an auto-generated flat version of ExportConfig.
|
|
|
|
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
type FlatExportConfig struct {
|
2020-08-02 02:02:31 -04:00
|
|
|
Name *string `mapstructure:"name" cty:"name" hcl:"name"`
|
|
|
|
Force *bool `mapstructure:"force" cty:"force" hcl:"force"`
|
|
|
|
Images *bool `mapstructure:"images" cty:"images" hcl:"images"`
|
|
|
|
Manifest *string `mapstructure:"manifest" cty:"manifest" hcl:"manifest"`
|
|
|
|
OutputDir *string `mapstructure:"output_directory" required:"false" cty:"output_directory" hcl:"output_directory"`
|
|
|
|
DirPerm *os.FileMode `mapstructure:"directory_permission" required:"false" cty:"directory_permission" hcl:"directory_permission"`
|
|
|
|
Options []string `mapstructure:"options" cty:"options" hcl:"options"`
|
2020-03-19 13:51:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// FlatMapstructure returns a new FlatExportConfig.
|
|
|
|
// FlatExportConfig is an auto-generated flat version of ExportConfig.
|
|
|
|
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
func (*ExportConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
|
|
|
|
return new(FlatExportConfig)
|
|
|
|
}
|
|
|
|
|
|
|
|
// HCL2Spec returns the hcl spec of a ExportConfig.
|
|
|
|
// This spec is used by HCL to read the fields of ExportConfig.
|
|
|
|
// The decoded values from this spec will then be applied to a FlatExportConfig.
|
|
|
|
func (*FlatExportConfig) HCL2Spec() map[string]hcldec.Spec {
|
|
|
|
s := map[string]hcldec.Spec{
|
2020-08-02 02:02:31 -04:00
|
|
|
"name": &hcldec.AttrSpec{Name: "name", Type: cty.String, Required: false},
|
|
|
|
"force": &hcldec.AttrSpec{Name: "force", Type: cty.Bool, Required: false},
|
|
|
|
"images": &hcldec.AttrSpec{Name: "images", Type: cty.Bool, Required: false},
|
|
|
|
"manifest": &hcldec.AttrSpec{Name: "manifest", Type: cty.String, Required: false},
|
|
|
|
"output_directory": &hcldec.AttrSpec{Name: "output_directory", Type: cty.String, Required: false},
|
|
|
|
"directory_permission": &hcldec.AttrSpec{Name: "directory_permission", Type: cty.Number, Required: false},
|
|
|
|
"options": &hcldec.AttrSpec{Name: "options", Type: cty.List(cty.String), Required: false},
|
2020-03-19 13:51:43 -04:00
|
|
|
}
|
|
|
|
return s
|
|
|
|
}
|