2020-03-17 06:14:32 -04:00
|
|
|
// Code generated by "mapstructure-to-hcl2 -type NameValue,NameValues,KVFilter"; DO NOT EDIT.
|
2020-03-13 11:04:42 -04:00
|
|
|
package hcl2template
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/hashicorp/hcl/v2/hcldec"
|
|
|
|
"github.com/zclconf/go-cty/cty"
|
|
|
|
)
|
|
|
|
|
2020-03-16 10:21:29 -04:00
|
|
|
// FlatKVFilter is an auto-generated flat version of KVFilter.
|
|
|
|
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
type FlatKVFilter struct {
|
|
|
|
Filters map[string]string `cty:"filters"`
|
2020-03-17 06:14:32 -04:00
|
|
|
Filter []FlatNameValue `cty:"filter"`
|
2020-03-16 10:21:29 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// FlatMapstructure returns a new FlatKVFilter.
|
|
|
|
// FlatKVFilter is an auto-generated flat version of KVFilter.
|
|
|
|
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
|
|
|
|
func (*KVFilter) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
|
|
|
|
return new(FlatKVFilter)
|
|
|
|
}
|
|
|
|
|
|
|
|
// HCL2Spec returns the hcl spec of a KVFilter.
|
|
|
|
// This spec is used by HCL to read the fields of KVFilter.
|
|
|
|
// The decoded values from this spec will then be applied to a FlatKVFilter.
|
|
|
|
func (*FlatKVFilter) HCL2Spec() map[string]hcldec.Spec {
|
|
|
|
s := map[string]hcldec.Spec{
|
2020-04-14 10:05:13 -04:00
|
|
|
"filters": &hcldec.AttrSpec{Name: "filters", Type: cty.Map(cty.String), Required: false},
|
2020-03-17 06:14:32 -04:00
|
|
|
"filter": &hcldec.BlockListSpec{TypeName: "filter", Nested: hcldec.ObjectSpec((*FlatNameValue)(nil).HCL2Spec())},
|
2020-03-16 10:21:29 -04:00
|
|
|
}
|
|
|
|
return s
|
|
|
|
}
|
|
|
|
|
2020-03-17 06:14:32 -04:00
|
|
|
// FlatNameValue is an auto-generated flat version of NameValue.
|
2020-03-13 11:04:42 -04:00
|
|
|
// Where the contents of a field with a `mapstructure:,squash` tag are bubbled up.
|
2020-03-17 06:14:32 -04:00
|
|
|
type FlatNameValue struct {
|
|
|
|
Name *string `cty:"name"`
|
2020-03-13 11:04:42 -04:00
|
|
|
Value *string `cty:"value"`
|
|
|
|
}
|
|
|
|
|
2020-03-17 06:14:32 -04:00
|
|
|
// FlatMapstructure returns a new FlatNameValue.
|
|
|
|
// FlatNameValue is an auto-generated flat version of NameValue.
|
2020-03-13 11:04:42 -04:00
|
|
|
// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.
|
2020-03-17 06:14:32 -04:00
|
|
|
func (*NameValue) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {
|
|
|
|
return new(FlatNameValue)
|
2020-03-13 11:04:42 -04:00
|
|
|
}
|
|
|
|
|
2020-03-17 06:14:32 -04:00
|
|
|
// HCL2Spec returns the hcl spec of a NameValue.
|
|
|
|
// This spec is used by HCL to read the fields of NameValue.
|
|
|
|
// The decoded values from this spec will then be applied to a FlatNameValue.
|
|
|
|
func (*FlatNameValue) HCL2Spec() map[string]hcldec.Spec {
|
2020-03-13 11:04:42 -04:00
|
|
|
s := map[string]hcldec.Spec{
|
2020-03-17 06:14:32 -04:00
|
|
|
"name": &hcldec.AttrSpec{Name: "name", Type: cty.String, Required: false},
|
2020-03-13 11:04:42 -04:00
|
|
|
"value": &hcldec.AttrSpec{Name: "value", Type: cty.String, Required: false},
|
|
|
|
}
|
|
|
|
return s
|
|
|
|
}
|