-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathprovisioner.hcl2spec.go
37 lines (32 loc) · 1.66 KB
/
provisioner.hcl2spec.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Code generated by "mapstructure-to-hcl2 -type ProvisionerConfig"; DO NOT EDIT.
package main
import (
"github.com/hashicorp/hcl/v2/hcldec"
"github.com/zclconf/go-cty/cty"
)
// FlatProvisionerConfig is an auto-generated flat version of ProvisionerConfig.
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatProvisionerConfig struct {
Comment *string `mapstructure:"comment" cty:"comment" hcl:"comment"`
SendToUi *bool `mapstructure:"ui" cty:"ui" hcl:"ui"`
Bubble *bool `mapstructure:"bubble_text" cty:"bubble_text" hcl:"bubble_text"`
PackerSay *bool `mapstructure:"packer_say" cty:"packer_say" hcl:"packer_say"`
}
// FlatMapstructure returns a new FlatProvisionerConfig.
// FlatProvisionerConfig is an auto-generated flat version of ProvisionerConfig.
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*ProvisionerConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
return new(FlatProvisionerConfig)
}
// HCL2Spec returns the hcl spec of a ProvisionerConfig.
// This spec is used by HCL to read the fields of ProvisionerConfig.
// The decoded values from this spec will then be applied to a FlatProvisionerConfig.
func (*FlatProvisionerConfig) HCL2Spec() map[string]hcldec.Spec {
s := map[string]hcldec.Spec{
"comment": &hcldec.AttrSpec{Name: "comment", Type: cty.String, Required: false},
"ui": &hcldec.AttrSpec{Name: "ui", Type: cty.Bool, Required: false},
"bubble_text": &hcldec.AttrSpec{Name: "bubble_text", Type: cty.Bool, Required: false},
"packer_say": &hcldec.AttrSpec{Name: "packer_say", Type: cty.Bool, Required: false},
}
return s
}