github.com/hashicorp/packer@v1.14.3/datasource/hcp-packer-version/data.hcl2spec.go (about)

     1  // Code generated by "packer-sdc mapstructure-to-hcl2"; DO NOT EDIT.
     2  
     3  package hcp_packer_version
     4  
     5  import (
     6  	"github.com/hashicorp/hcl/v2/hcldec"
     7  	"github.com/zclconf/go-cty/cty"
     8  )
     9  
    10  // FlatConfig is an auto-generated flat version of Config.
    11  // Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
    12  type FlatConfig struct {
    13  	PackerBuildName     *string           `mapstructure:"packer_build_name" cty:"packer_build_name" hcl:"packer_build_name"`
    14  	PackerBuilderType   *string           `mapstructure:"packer_builder_type" cty:"packer_builder_type" hcl:"packer_builder_type"`
    15  	PackerCoreVersion   *string           `mapstructure:"packer_core_version" cty:"packer_core_version" hcl:"packer_core_version"`
    16  	PackerDebug         *bool             `mapstructure:"packer_debug" cty:"packer_debug" hcl:"packer_debug"`
    17  	PackerForce         *bool             `mapstructure:"packer_force" cty:"packer_force" hcl:"packer_force"`
    18  	PackerOnError       *string           `mapstructure:"packer_on_error" cty:"packer_on_error" hcl:"packer_on_error"`
    19  	PackerUserVars      map[string]string `mapstructure:"packer_user_variables" cty:"packer_user_variables" hcl:"packer_user_variables"`
    20  	PackerSensitiveVars []string          `mapstructure:"packer_sensitive_variables" cty:"packer_sensitive_variables" hcl:"packer_sensitive_variables"`
    21  	BucketName          *string           `mapstructure:"bucket_name" required:"true" cty:"bucket_name" hcl:"bucket_name"`
    22  	ChannelName         *string           `mapstructure:"channel_name" required:"true" cty:"channel_name" hcl:"channel_name"`
    23  }
    24  
    25  // FlatMapstructure returns a new FlatConfig.
    26  // FlatConfig is an auto-generated flat version of Config.
    27  // Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
    28  func (*Config) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
    29  	return new(FlatConfig)
    30  }
    31  
    32  // HCL2Spec returns the hcl spec of a Config.
    33  // This spec is used by HCL to read the fields of Config.
    34  // The decoded values from this spec will then be applied to a FlatConfig.
    35  func (*FlatConfig) HCL2Spec() map[string]hcldec.Spec {
    36  	s := map[string]hcldec.Spec{
    37  		"packer_build_name":          &hcldec.AttrSpec{Name: "packer_build_name", Type: cty.String, Required: false},
    38  		"packer_builder_type":        &hcldec.AttrSpec{Name: "packer_builder_type", Type: cty.String, Required: false},
    39  		"packer_core_version":        &hcldec.AttrSpec{Name: "packer_core_version", Type: cty.String, Required: false},
    40  		"packer_debug":               &hcldec.AttrSpec{Name: "packer_debug", Type: cty.Bool, Required: false},
    41  		"packer_force":               &hcldec.AttrSpec{Name: "packer_force", Type: cty.Bool, Required: false},
    42  		"packer_on_error":            &hcldec.AttrSpec{Name: "packer_on_error", Type: cty.String, Required: false},
    43  		"packer_user_variables":      &hcldec.AttrSpec{Name: "packer_user_variables", Type: cty.Map(cty.String), Required: false},
    44  		"packer_sensitive_variables": &hcldec.AttrSpec{Name: "packer_sensitive_variables", Type: cty.List(cty.String), Required: false},
    45  		"bucket_name":                &hcldec.AttrSpec{Name: "bucket_name", Type: cty.String, Required: false},
    46  		"channel_name":               &hcldec.AttrSpec{Name: "channel_name", Type: cty.String, Required: false},
    47  	}
    48  	return s
    49  }
    50  
    51  // FlatDatasourceOutput is an auto-generated flat version of DatasourceOutput.
    52  // Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
    53  type FlatDatasourceOutput struct {
    54  	AuthorID    *string `mapstructure:"author_id" cty:"author_id" hcl:"author_id"`
    55  	BucketName  *string `mapstructure:"bucket_name" cty:"bucket_name" hcl:"bucket_name"`
    56  	Status      *string `mapstructure:"status" cty:"status" hcl:"status"`
    57  	CreatedAt   *string `mapstructure:"created_at" cty:"created_at" hcl:"created_at"`
    58  	Fingerprint *string `mapstructure:"fingerprint" cty:"fingerprint" hcl:"fingerprint"`
    59  	ID          *string `mapstructure:"id" cty:"id" hcl:"id"`
    60  	Name        *string `mapstructure:"name" cty:"name" hcl:"name"`
    61  	UpdatedAt   *string `mapstructure:"updated_at" cty:"updated_at" hcl:"updated_at"`
    62  	ChannelID   *string `mapstructure:"channel_id" cty:"channel_id" hcl:"channel_id"`
    63  }
    64  
    65  // FlatMapstructure returns a new FlatDatasourceOutput.
    66  // FlatDatasourceOutput is an auto-generated flat version of DatasourceOutput.
    67  // Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
    68  func (*DatasourceOutput) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
    69  	return new(FlatDatasourceOutput)
    70  }
    71  
    72  // HCL2Spec returns the hcl spec of a DatasourceOutput.
    73  // This spec is used by HCL to read the fields of DatasourceOutput.
    74  // The decoded values from this spec will then be applied to a FlatDatasourceOutput.
    75  func (*FlatDatasourceOutput) HCL2Spec() map[string]hcldec.Spec {
    76  	s := map[string]hcldec.Spec{
    77  		"author_id":   &hcldec.AttrSpec{Name: "author_id", Type: cty.String, Required: false},
    78  		"bucket_name": &hcldec.AttrSpec{Name: "bucket_name", Type: cty.String, Required: false},
    79  		"status":      &hcldec.AttrSpec{Name: "status", Type: cty.String, Required: false},
    80  		"created_at":  &hcldec.AttrSpec{Name: "created_at", Type: cty.String, Required: false},
    81  		"fingerprint": &hcldec.AttrSpec{Name: "fingerprint", Type: cty.String, Required: false},
    82  		"id":          &hcldec.AttrSpec{Name: "id", Type: cty.String, Required: false},
    83  		"name":        &hcldec.AttrSpec{Name: "name", Type: cty.String, Required: false},
    84  		"updated_at":  &hcldec.AttrSpec{Name: "updated_at", Type: cty.String, Required: false},
    85  		"channel_id":  &hcldec.AttrSpec{Name: "channel_id", Type: cty.String, Required: false},
    86  	}
    87  	return s
    88  }