2020-02-20 04:51:34 -05:00
|
|
|
// Code generated by "mapstructure-to-hcl2 -type MockConfig,NestedMockConfig,MockTag"; DO NOT EDIT.
|
2019-12-17 05:25:56 -05:00
|
|
|
package hcl2template
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/hashicorp/hcl/v2/hcldec"
|
|
|
|
"github.com/zclconf/go-cty/cty"
|
|
|
|
)
|
|
|
|
|
|
|
|
// FlatMockConfig is an auto-generated flat version of MockConfig.
|
|
|
|
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
type FlatMockConfig struct {
|
Hcl2 input variables, local variables and functions (#8588)
Mainly redefine or reused what Terraform did.
* allow to used `variables`, `variable` and `local` blocks
* import the following functions and their docs from Terraform: abs, abspath, basename, base64decode, base64encode, bcrypt, can, ceil, chomp, chunklist, cidrhost, cidrnetmask, cidrsubnet, cidrsubnets, coalesce, coalescelist, compact, concat, contains, convert, csvdecode, dirname, distinct, element, file, fileexists, fileset, flatten, floor, format, formatdate, formatlist, indent, index, join, jsondecode, jsonencode, keys, length, log, lookup, lower, max, md5, merge, min, parseint, pathexpand, pow, range, reverse, rsadecrypt, setintersection, setproduct, setunion, sha1, sha256, sha512, signum, slice, sort, split, strrev, substr, timestamp, timeadd, title, trim, trimprefix, trimspace, trimsuffix, try, upper, urlencode, uuidv4, uuidv5, values, yamldecode, yamlencode, zipmap.
2020-02-06 05:49:21 -05:00
|
|
|
NotSquashed *string `mapstructure:"not_squashed" cty:"not_squashed"`
|
2020-01-07 06:46:27 -05:00
|
|
|
String *string `mapstructure:"string" cty:"string"`
|
|
|
|
Int *int `mapstructure:"int" cty:"int"`
|
|
|
|
Int64 *int64 `mapstructure:"int64" cty:"int64"`
|
|
|
|
Bool *bool `mapstructure:"bool" cty:"bool"`
|
|
|
|
Trilean *bool `mapstructure:"trilean" cty:"trilean"`
|
|
|
|
Duration *string `mapstructure:"duration" cty:"duration"`
|
|
|
|
MapStringString map[string]string `mapstructure:"map_string_string" cty:"map_string_string"`
|
|
|
|
SliceString []string `mapstructure:"slice_string" cty:"slice_string"`
|
2020-02-03 11:03:28 -05:00
|
|
|
SliceSliceString [][]string `mapstructure:"slice_slice_string" cty:"slice_slice_string"`
|
2020-01-07 06:46:27 -05:00
|
|
|
NamedMapStringString NamedMapStringString `mapstructure:"named_map_string_string" cty:"named_map_string_string"`
|
|
|
|
NamedString *NamedString `mapstructure:"named_string" cty:"named_string"`
|
2020-02-20 04:51:34 -05:00
|
|
|
Tags []FlatMockTag `mapstructure:"tag" cty:"tag"`
|
2020-01-07 06:46:27 -05:00
|
|
|
Nested *FlatNestedMockConfig `mapstructure:"nested" cty:"nested"`
|
|
|
|
NestedSlice []FlatNestedMockConfig `mapstructure:"nested_slice" cty:"nested_slice"`
|
2019-12-17 05:25:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// FlatMapstructure returns a new FlatMockConfig.
|
|
|
|
// FlatMockConfig is an auto-generated flat version of MockConfig.
|
|
|
|
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
func (*MockConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
|
|
|
|
return new(FlatMockConfig)
|
|
|
|
}
|
|
|
|
|
|
|
|
// HCL2Spec returns the hcl spec of a MockConfig.
|
|
|
|
// This spec is used by HCL to read the fields of MockConfig.
|
|
|
|
// The decoded values from this spec will then be applied to a FlatMockConfig.
|
|
|
|
func (*FlatMockConfig) HCL2Spec() map[string]hcldec.Spec {
|
|
|
|
s := map[string]hcldec.Spec{
|
Hcl2 input variables, local variables and functions (#8588)
Mainly redefine or reused what Terraform did.
* allow to used `variables`, `variable` and `local` blocks
* import the following functions and their docs from Terraform: abs, abspath, basename, base64decode, base64encode, bcrypt, can, ceil, chomp, chunklist, cidrhost, cidrnetmask, cidrsubnet, cidrsubnets, coalesce, coalescelist, compact, concat, contains, convert, csvdecode, dirname, distinct, element, file, fileexists, fileset, flatten, floor, format, formatdate, formatlist, indent, index, join, jsondecode, jsonencode, keys, length, log, lookup, lower, max, md5, merge, min, parseint, pathexpand, pow, range, reverse, rsadecrypt, setintersection, setproduct, setunion, sha1, sha256, sha512, signum, slice, sort, split, strrev, substr, timestamp, timeadd, title, trim, trimprefix, trimspace, trimsuffix, try, upper, urlencode, uuidv4, uuidv5, values, yamldecode, yamlencode, zipmap.
2020-02-06 05:49:21 -05:00
|
|
|
"not_squashed": &hcldec.AttrSpec{Name: "not_squashed", Type: cty.String, Required: false},
|
2020-01-07 06:46:27 -05:00
|
|
|
"string": &hcldec.AttrSpec{Name: "string", Type: cty.String, Required: false},
|
|
|
|
"int": &hcldec.AttrSpec{Name: "int", Type: cty.Number, Required: false},
|
|
|
|
"int64": &hcldec.AttrSpec{Name: "int64", Type: cty.Number, Required: false},
|
|
|
|
"bool": &hcldec.AttrSpec{Name: "bool", Type: cty.Bool, Required: false},
|
|
|
|
"trilean": &hcldec.AttrSpec{Name: "trilean", Type: cty.Bool, Required: false},
|
|
|
|
"duration": &hcldec.AttrSpec{Name: "duration", Type: cty.String, Required: false},
|
|
|
|
"map_string_string": &hcldec.BlockAttrsSpec{TypeName: "map_string_string", ElementType: cty.String, Required: false},
|
|
|
|
"slice_string": &hcldec.AttrSpec{Name: "slice_string", Type: cty.List(cty.String), Required: false},
|
2020-02-03 11:03:28 -05:00
|
|
|
"slice_slice_string": &hcldec.AttrSpec{Name: "slice_slice_string", Type: cty.List(cty.List(cty.String)), Required: false},
|
2020-01-07 06:46:27 -05:00
|
|
|
"named_map_string_string": &hcldec.BlockAttrsSpec{TypeName: "named_map_string_string", ElementType: cty.String, Required: false},
|
|
|
|
"named_string": &hcldec.AttrSpec{Name: "named_string", Type: cty.String, Required: false},
|
2020-02-20 04:51:34 -05:00
|
|
|
"tag": &hcldec.BlockListSpec{TypeName: "tag", Nested: hcldec.ObjectSpec((*FlatMockTag)(nil).HCL2Spec())},
|
2020-01-07 06:46:27 -05:00
|
|
|
"nested": &hcldec.BlockSpec{TypeName: "nested", Nested: hcldec.ObjectSpec((*FlatNestedMockConfig)(nil).HCL2Spec())},
|
|
|
|
"nested_slice": &hcldec.BlockListSpec{TypeName: "nested_slice", Nested: hcldec.ObjectSpec((*FlatNestedMockConfig)(nil).HCL2Spec())},
|
2019-12-17 05:25:56 -05:00
|
|
|
}
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2020-02-20 04:51:34 -05:00
|
|
|
// FlatMockTag is an auto-generated flat version of MockTag.
|
|
|
|
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
type FlatMockTag struct {
|
|
|
|
Key *string `mapstructure:"key" cty:"key"`
|
|
|
|
Value *string `mapstructure:"value" cty:"value"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// FlatMapstructure returns a new FlatMockTag.
|
|
|
|
// FlatMockTag is an auto-generated flat version of MockTag.
|
|
|
|
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
func (*MockTag) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
|
|
|
|
return new(FlatMockTag)
|
|
|
|
}
|
|
|
|
|
|
|
|
// HCL2Spec returns the hcl spec of a MockTag.
|
|
|
|
// This spec is used by HCL to read the fields of MockTag.
|
|
|
|
// The decoded values from this spec will then be applied to a FlatMockTag.
|
|
|
|
func (*FlatMockTag) HCL2Spec() map[string]hcldec.Spec {
|
|
|
|
s := map[string]hcldec.Spec{
|
|
|
|
"key": &hcldec.AttrSpec{Name: "key", Type: cty.String, Required: false},
|
|
|
|
"value": &hcldec.AttrSpec{Name: "value", Type: cty.String, Required: false},
|
|
|
|
}
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2019-12-17 05:25:56 -05:00
|
|
|
// FlatNestedMockConfig is an auto-generated flat version of NestedMockConfig.
|
|
|
|
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
type FlatNestedMockConfig struct {
|
2020-01-07 06:46:27 -05:00
|
|
|
String *string `mapstructure:"string" cty:"string"`
|
|
|
|
Int *int `mapstructure:"int" cty:"int"`
|
|
|
|
Int64 *int64 `mapstructure:"int64" cty:"int64"`
|
|
|
|
Bool *bool `mapstructure:"bool" cty:"bool"`
|
|
|
|
Trilean *bool `mapstructure:"trilean" cty:"trilean"`
|
|
|
|
Duration *string `mapstructure:"duration" cty:"duration"`
|
|
|
|
MapStringString map[string]string `mapstructure:"map_string_string" cty:"map_string_string"`
|
|
|
|
SliceString []string `mapstructure:"slice_string" cty:"slice_string"`
|
2020-02-03 11:03:28 -05:00
|
|
|
SliceSliceString [][]string `mapstructure:"slice_slice_string" cty:"slice_slice_string"`
|
2020-01-07 06:46:27 -05:00
|
|
|
NamedMapStringString NamedMapStringString `mapstructure:"named_map_string_string" cty:"named_map_string_string"`
|
|
|
|
NamedString *NamedString `mapstructure:"named_string" cty:"named_string"`
|
2020-02-20 04:51:34 -05:00
|
|
|
Tags []FlatMockTag `mapstructure:"tag" cty:"tag"`
|
2019-12-17 05:25:56 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// FlatMapstructure returns a new FlatNestedMockConfig.
|
|
|
|
// FlatNestedMockConfig is an auto-generated flat version of NestedMockConfig.
|
|
|
|
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
func (*NestedMockConfig) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
|
|
|
|
return new(FlatNestedMockConfig)
|
|
|
|
}
|
|
|
|
|
|
|
|
// HCL2Spec returns the hcl spec of a NestedMockConfig.
|
|
|
|
// This spec is used by HCL to read the fields of NestedMockConfig.
|
|
|
|
// The decoded values from this spec will then be applied to a FlatNestedMockConfig.
|
|
|
|
func (*FlatNestedMockConfig) HCL2Spec() map[string]hcldec.Spec {
|
|
|
|
s := map[string]hcldec.Spec{
|
2020-01-07 06:46:27 -05:00
|
|
|
"string": &hcldec.AttrSpec{Name: "string", Type: cty.String, Required: false},
|
|
|
|
"int": &hcldec.AttrSpec{Name: "int", Type: cty.Number, Required: false},
|
|
|
|
"int64": &hcldec.AttrSpec{Name: "int64", Type: cty.Number, Required: false},
|
|
|
|
"bool": &hcldec.AttrSpec{Name: "bool", Type: cty.Bool, Required: false},
|
|
|
|
"trilean": &hcldec.AttrSpec{Name: "trilean", Type: cty.Bool, Required: false},
|
|
|
|
"duration": &hcldec.AttrSpec{Name: "duration", Type: cty.String, Required: false},
|
|
|
|
"map_string_string": &hcldec.BlockAttrsSpec{TypeName: "map_string_string", ElementType: cty.String, Required: false},
|
|
|
|
"slice_string": &hcldec.AttrSpec{Name: "slice_string", Type: cty.List(cty.String), Required: false},
|
2020-02-03 11:03:28 -05:00
|
|
|
"slice_slice_string": &hcldec.AttrSpec{Name: "slice_slice_string", Type: cty.List(cty.List(cty.String)), Required: false},
|
2020-01-07 06:46:27 -05:00
|
|
|
"named_map_string_string": &hcldec.BlockAttrsSpec{TypeName: "named_map_string_string", ElementType: cty.String, Required: false},
|
|
|
|
"named_string": &hcldec.AttrSpec{Name: "named_string", Type: cty.String, Required: false},
|
2020-02-20 04:51:34 -05:00
|
|
|
"tag": &hcldec.BlockListSpec{TypeName: "tag", Nested: hcldec.ObjectSpec((*FlatMockTag)(nil).HCL2Spec())},
|
2019-12-17 05:25:56 -05:00
|
|
|
}
|
|
|
|
return s
|
|
|
|
}
|