packer-cn/packer-plugin-sdk/packer/builder_mock.hcl2spec.go

51 lines
2.9 KiB
Go
Raw Normal View History

// Code generated by "mapstructure-to-hcl2 -type MockBuilder"; DO NOT EDIT.
package packer
import (
"github.com/hashicorp/hcl/v2/hcldec"
"github.com/zclconf/go-cty/cty"
)
// FlatMockBuilder is an auto-generated flat version of MockBuilder.
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatMockBuilder struct {
ArtifactId *string `cty:"artifact_id" hcl:"artifact_id"`
PrepareWarnings []string `cty:"prepare_warnings" hcl:"prepare_warnings"`
RunErrResult *bool `cty:"run_err_result" hcl:"run_err_result"`
RunNilResult *bool `cty:"run_nil_result" hcl:"run_nil_result"`
PrepareCalled *bool `cty:"prepare_called" hcl:"prepare_called"`
PrepareConfig []interface{} `cty:"prepare_config" hcl:"prepare_config"`
RunCalled *bool `cty:"run_called" hcl:"run_called"`
RunHook Hook `cty:"run_hook" hcl:"run_hook"`
RunUi Ui `cty:"run_ui" hcl:"run_ui"`
CancelCalled *bool `cty:"cancel_called" hcl:"cancel_called"`
GeneratedVars []string `cty:"generated_vars" hcl:"generated_vars"`
}
// FlatMapstructure returns a new FlatMockBuilder.
// FlatMockBuilder is an auto-generated flat version of MockBuilder.
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*MockBuilder) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
return new(FlatMockBuilder)
}
// HCL2Spec returns the hcl spec of a MockBuilder.
// This spec is used by HCL to read the fields of MockBuilder.
// The decoded values from this spec will then be applied to a FlatMockBuilder.
func (*FlatMockBuilder) HCL2Spec() map[string]hcldec.Spec {
s := map[string]hcldec.Spec{
"artifact_id": &hcldec.AttrSpec{Name: "artifact_id", Type: cty.String, Required: false},
"prepare_warnings": &hcldec.AttrSpec{Name: "prepare_warnings", Type: cty.List(cty.String), Required: false},
"run_err_result": &hcldec.AttrSpec{Name: "run_err_result", Type: cty.Bool, Required: false},
"run_nil_result": &hcldec.AttrSpec{Name: "run_nil_result", Type: cty.Bool, Required: false},
"prepare_called": &hcldec.AttrSpec{Name: "prepare_called", Type: cty.Bool, Required: false},
"prepare_config": &hcldec.AttrSpec{Name: "prepare_config", Type: cty.Bool, Required: false}, /* TODO(azr): could not find type */
"run_called": &hcldec.AttrSpec{Name: "run_called", Type: cty.Bool, Required: false},
"run_hook": &hcldec.AttrSpec{Name: "run_hook", Type: cty.Bool, Required: false}, /* TODO(azr): could not find type */
"run_ui": &hcldec.AttrSpec{Name: "run_ui", Type: cty.Bool, Required: false}, /* TODO(azr): could not find type */
"cancel_called": &hcldec.AttrSpec{Name: "cancel_called", Type: cty.Bool, Required: false},
"generated_vars": &hcldec.AttrSpec{Name: "generated_vars", Type: cty.List(cty.String), Required: false},
}
return s
}