github.com/hashicorp/packer@v1.14.3/packer/post_processor_mock.hcl2spec.go (about)

     1  // Code generated by "packer-sdc mapstructure-to-hcl2"; DO NOT EDIT.
     2  
     3  package packer
     4  
     5  import (
     6  	"github.com/hashicorp/hcl/v2/hcldec"
     7  	"github.com/hashicorp/packer-plugin-sdk/packer"
     8  	"github.com/zclconf/go-cty/cty"
     9  )
    10  
    11  // FlatMockPostProcessor is an auto-generated flat version of MockPostProcessor.
    12  // Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
    13  type FlatMockPostProcessor struct {
    14  	ArtifactId          *string         `cty:"artifact_id" hcl:"artifact_id"`
    15  	Keep                *bool           `cty:"keep" hcl:"keep"`
    16  	ForceOverride       *bool           `cty:"force_override" hcl:"force_override"`
    17  	Error               error           `cty:"error" hcl:"error"`
    18  	ConfigureCalled     *bool           `cty:"configure_called" hcl:"configure_called"`
    19  	ConfigureConfigs    []interface{}   `cty:"configure_configs" hcl:"configure_configs"`
    20  	ConfigureError      error           `cty:"configure_error" hcl:"configure_error"`
    21  	PostProcessCalled   *bool           `cty:"post_process_called" hcl:"post_process_called"`
    22  	PostProcessArtifact packer.Artifact `cty:"post_process_artifact" hcl:"post_process_artifact"`
    23  	PostProcessUi       packer.Ui       `cty:"post_process_ui" hcl:"post_process_ui"`
    24  }
    25  
    26  // FlatMapstructure returns a new FlatMockPostProcessor.
    27  // FlatMockPostProcessor is an auto-generated flat version of MockPostProcessor.
    28  // Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
    29  func (*MockPostProcessor) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
    30  	return new(FlatMockPostProcessor)
    31  }
    32  
    33  // HCL2Spec returns the hcl spec of a MockPostProcessor.
    34  // This spec is used by HCL to read the fields of MockPostProcessor.
    35  // The decoded values from this spec will then be applied to a FlatMockPostProcessor.
    36  func (*FlatMockPostProcessor) HCL2Spec() map[string]hcldec.Spec {
    37  	s := map[string]hcldec.Spec{
    38  		"artifact_id":           &hcldec.AttrSpec{Name: "artifact_id", Type: cty.String, Required: false},
    39  		"keep":                  &hcldec.AttrSpec{Name: "keep", Type: cty.Bool, Required: false},
    40  		"force_override":        &hcldec.AttrSpec{Name: "force_override", Type: cty.Bool, Required: false},
    41  		"error":                 &hcldec.AttrSpec{Name: "error", Type: cty.Bool, Required: false}, /* TODO(azr): could not find type */
    42  		"configure_called":      &hcldec.AttrSpec{Name: "configure_called", Type: cty.Bool, Required: false},
    43  		"configure_configs":     &hcldec.AttrSpec{Name: "configure_configs", Type: cty.Bool, Required: false}, /* TODO(azr): could not find type */
    44  		"configure_error":       &hcldec.AttrSpec{Name: "configure_error", Type: cty.Bool, Required: false},   /* TODO(azr): could not find type */
    45  		"post_process_called":   &hcldec.AttrSpec{Name: "post_process_called", Type: cty.Bool, Required: false},
    46  		"post_process_artifact": &hcldec.AttrSpec{Name: "post_process_artifact", Type: cty.Bool, Required: false}, /* TODO(azr): could not find type */
    47  		"post_process_ui":       &hcldec.AttrSpec{Name: "post_process_ui", Type: cty.Bool, Required: false},       /* TODO(azr): could not find type */
    48  	}
    49  	return s
    50  }