/
remote_file_config.hcl2spec.go
45 lines (40 loc) · 2.73 KB
/
remote_file_config.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
38
39
40
41
42
43
44
45
// Code generated by "packer-sdc mapstructure-to-hcl2"; DO NOT EDIT.
package config
import (
"github.com/hashicorp/hcl/v2/hcldec"
"github.com/zclconf/go-cty/cty"
)
// FlatRemoteFileConfig is an auto-generated flat version of RemoteFileConfig.
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
type FlatRemoteFileConfig struct {
FileChecksum *string `mapstructure:"file_checksum" required:"true" cty:"file_checksum" hcl:"file_checksum"`
FileChecksumURL *string `mapstructure:"file_checksum_url" cty:"file_checksum_url" hcl:"file_checksum_url"`
FileChecksumType *string `mapstructure:"file_checksum_type" cty:"file_checksum_type" hcl:"file_checksum_type"`
FileUrls []string `mapstructure:"file_urls" cty:"file_urls" hcl:"file_urls"`
FileUnarchiveCmd []string `mapstructure:"file_unarchive_cmd" cty:"file_unarchive_cmd" hcl:"file_unarchive_cmd"`
TargetPath *string `mapstructure:"file_target_path" cty:"file_target_path" hcl:"file_target_path"`
TargetExtension *string `mapstructure:"file_target_extension" cty:"file_target_extension" hcl:"file_target_extension"`
TmpDirLocation *string `mapstructure:"file_tmp_dir_location" cty:"file_tmp_dir_location" hcl:"file_tmp_dir_location"`
}
// FlatMapstructure returns a new FlatRemoteFileConfig.
// FlatRemoteFileConfig is an auto-generated flat version of RemoteFileConfig.
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
func (*RemoteFileConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
return new(FlatRemoteFileConfig)
}
// HCL2Spec returns the hcl spec of a RemoteFileConfig.
// This spec is used by HCL to read the fields of RemoteFileConfig.
// The decoded values from this spec will then be applied to a FlatRemoteFileConfig.
func (*FlatRemoteFileConfig) HCL2Spec() map[string]hcldec.Spec {
s := map[string]hcldec.Spec{
"file_checksum": &hcldec.AttrSpec{Name: "file_checksum", Type: cty.String, Required: false},
"file_checksum_url": &hcldec.AttrSpec{Name: "file_checksum_url", Type: cty.String, Required: false},
"file_checksum_type": &hcldec.AttrSpec{Name: "file_checksum_type", Type: cty.String, Required: false},
"file_urls": &hcldec.AttrSpec{Name: "file_urls", Type: cty.List(cty.String), Required: false},
"file_unarchive_cmd": &hcldec.AttrSpec{Name: "file_unarchive_cmd", Type: cty.List(cty.String), Required: false},
"file_target_path": &hcldec.AttrSpec{Name: "file_target_path", Type: cty.String, Required: false},
"file_target_extension": &hcldec.AttrSpec{Name: "file_target_extension", Type: cty.String, Required: false},
"file_tmp_dir_location": &hcldec.AttrSpec{Name: "file_tmp_dir_location", Type: cty.String, Required: false},
}
return s
}