// Code generated by go-bindata.
// sources:
// assets/aws.yaml
// assets/azure.yaml
// assets/gcp.yaml
// assets/openstack.yaml
// assets/vsphere.yaml
// DO NOT EDIT!

package generated

import (
	"bytes"
	"compress/gzip"
	"fmt"
	"io"
	"io/ioutil"
	"os"
	"path/filepath"
	"strings"
	"time"
)

func bindataRead(data []byte, name string) ([]byte, error) {
	gz, err := gzip.NewReader(bytes.NewBuffer(data))
	if err != nil {
		return nil, fmt.Errorf("Read %q: %v", name, err)
	}

	var buf bytes.Buffer
	_, err = io.Copy(&buf, gz)
	clErr := gz.Close()

	if err != nil {
		return nil, fmt.Errorf("Read %q: %v", name, err)
	}
	if clErr != nil {
		return nil, err
	}

	return buf.Bytes(), nil
}

type asset struct {
	bytes []byte
	info  os.FileInfo
}

type bindataFileInfo struct {
	name    string
	size    int64
	mode    os.FileMode
	modTime time.Time
}

func (fi bindataFileInfo) Name() string {
	return fi.name
}
func (fi bindataFileInfo) Size() int64 {
	return fi.size
}
func (fi bindataFileInfo) Mode() os.FileMode {
	return fi.mode
}
func (fi bindataFileInfo) ModTime() time.Time {
	return fi.modTime
}
func (fi bindataFileInfo) IsDir() bool {
	return false
}
func (fi bindataFileInfo) Sys() interface{} {
	return nil
}

var _assetsAwsYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x54\x90\xb1\x4e\xc3\x40\x0c\x86\xf7\x7b\x0a\xab\x7b\x83\x60\x42\x37\x52\xd1\x8d\x09\xa9\xcc\x6e\xcf\x44\x56\x72\xf6\xc9\xf6\xa5\xf4\xed\x51\x52\x51\x89\xd5\xbf\xff\xcf\x9f\x8c\x8d\x4f\x64\xce\x2a\x19\x3c\xd4\x70\xa4\x61\x7a\xf5\x81\xf5\x69\x79\x4e\x13\x4b\xc9\xf0\x79\x9f\x1f\x66\x74\x4f\x95\x02\x0b\x06\xe6\x04\x20\x58\x29\xc3\xd8\x5e\x12\x00\x8a\x68\x60\xb0\x8a\xaf\x11\xfc\xd1\x2e\x6b\x6b\x98\xfa\x99\x4c\x28\x68\x23\xb3\xef\x0b\x7d\x63\x9f\x63\xbf\xc5\x19\x76\x61\x9d\x76\xa9\x99\x2e\xbc\xca\x90\x65\xf8\xdf\xc1\xab\xef\xe9\xec\xa9\xa1\x61\xa5\x20\xdb\xce\xc4\xad\x3d\x0c\x48\x2e\x76\x6b\x41\xe5\x81\x5b\x74\xee\x95\xde\x58\x0a\xcb\xf8\xa1\x85\x32\x7c\x21\xc7\x51\xed\xc8\xe6\x71\x50\xf1\x5e\xc9\x12\xce\xb3\x5e\x4f\xdb\xf2\xfb\x4f\x43\xb9\xbf\x63\x65\xa4\xdf\x00\x00\x00\xff\xff\xfd\xef\xba\x20\x20\x01\x00\x00")

func assetsAwsYamlBytes() ([]byte, error) {
	return bindataRead(
		_assetsAwsYaml,
		"assets/aws.yaml",
	)
}

func assetsAwsYaml() (*asset, error) {
	bytes, err := assetsAwsYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "assets/aws.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _assetsAzureYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x54\x8f\x4f\x4b\xc4\x30\x10\xc5\xef\xf9\x14\xc3\xde\x5b\xf1\x26\x39\xba\xb8\x27\x17\xc4\x85\xf5\x28\x63\x33\x96\xa1\xcd\x4c\x98\x4c\xea\x9f\x4f\x2f\x6d\x51\xf0\x9a\xbc\x79\xef\xf7\xc3\xc2\x57\xb2\xca\x2a\x11\xaa\xab\xe1\x48\xfd\x74\x57\x7b\xd6\x9b\xe5\x36\x4c\x2c\x29\xc2\x65\x7f\x3f\xce\x58\x6b\xc8\xe4\x98\xd0\x31\x06\x00\xc1\x4c\x11\x32\x0a\x8e\x94\xba\x62\x94\xb9\xe5\x00\x80\x22\xea\xe8\xac\x52\xd7\x18\xfc\x36\x0f\x6b\x43\x3f\xb5\x37\x32\x21\xa7\x6d\x85\x6b\x97\xe8\x1d\xdb\xec\xdd\xf6\x1d\xe1\xe0\xd6\xe8\x10\x8a\xe9\xc2\x2b\x18\x59\x84\xff\x37\xf8\xdd\x8c\xba\xc4\x75\x0a\x8b\xce\x2d\xd3\x3d\x4b\x62\x19\xcf\x9a\x28\xc2\x0b\xb2\x9f\xd4\x4e\x6c\xd5\x8f\x2a\xb5\x65\xb2\x80\xf3\xac\x1f\xd7\x2d\xfc\xf0\x59\x50\x76\xe3\x75\x29\x14\x34\xcc\xe4\x64\x1b\xec\xae\x7c\xde\x9d\xc2\x1f\x3a\x0e\x83\x36\x71\xff\x2a\x14\xe1\x69\x37\x7d\x7d\x7c\xbe\x84\x9f\x00\x00\x00\xff\xff\x8e\x5a\x5a\x8d\x41\x01\x00\x00")

func assetsAzureYamlBytes() ([]byte, error) {
	return bindataRead(
		_assetsAzureYaml,
		"assets/azure.yaml",
	)
}

func assetsAzureYaml() (*asset, error) {
	bytes, err := assetsAzureYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "assets/azure.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _assetsGcpYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x54\x90\x31\x4f\xf4\x30\x0c\x86\xf7\xfc\x0a\xeb\xf6\xf6\xd3\xb7\xa1\x8c\x9c\xb8\x8d\x09\xe9\x98\x4d\x63\x2a\xab\xa9\x1d\x39\x4e\x81\x7f\x8f\x92\x0a\x09\x56\xbf\x7e\x5e\x3f\x32\x16\xbe\x93\x55\x56\x89\x50\x5d\x0d\x57\x9a\xb7\x87\x3a\xb3\xfe\x3b\xfe\x87\x8d\x25\x45\x78\x39\xe7\xd7\x8c\xb5\x86\x9d\x1c\x13\x3a\xc6\x00\x20\xb8\x53\xc7\x50\x12\x5a\x0a\x00\x28\xa2\x8e\xce\x2a\xb5\xe7\xf0\x53\xb9\x74\x74\xde\xda\x1b\x99\x90\xd3\xa8\xe7\x3a\x25\x7a\xc7\x96\x7d\x1a\x71\x84\x8b\x5b\xa3\x4b\x28\xa6\x07\x77\x23\xb2\x08\x7f\x99\x75\xa1\xa9\xa4\x50\xd0\x70\x27\x27\x1b\x57\xfc\xab\x50\x84\x92\xa6\x5f\x22\x46\x25\xf3\x32\x4c\xa6\x33\x17\x15\x0a\x87\xe6\xb6\xd3\x23\x4b\x62\x59\x9f\x35\x51\x84\x57\x64\xbf\xa9\xdd\xd8\xaa\x5f\x55\x6a\xdb\xc9\x02\xe6\xac\x1f\xf7\xb1\xfc\xf4\x59\x50\xce\xff\x74\xbd\xf0\x1d\x00\x00\xff\xff\x1e\xd1\x39\x9a\x31\x01\x00\x00")

func assetsGcpYamlBytes() ([]byte, error) {
	return bindataRead(
		_assetsGcpYaml,
		"assets/gcp.yaml",
	)
}

func assetsGcpYaml() (*asset, error) {
	bytes, err := assetsGcpYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "assets/gcp.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _assetsOpenstackYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x54\x8f\xb1\x4e\xc3\x40\x0c\x86\xf7\x7b\x0a\xab\x7b\x83\xd8\xd0\x8d\x54\x74\x63\x42\x2a\xb3\xa9\x4d\x65\xe5\x62\x47\xb6\x2f\xf0\xf8\xe8\x52\x31\x74\xf5\xef\xef\xb3\x7f\x5c\xe5\xc2\x1e\x62\x5a\x21\xd2\x1c\x6f\x3c\xcd\x2f\x31\x89\x3d\x6d\xcf\x65\x16\xa5\x0a\x1f\xf7\xf9\xa9\x61\x44\x59\x38\x91\x30\xb1\x16\x00\xc5\x85\x07\x86\x4a\xe8\x54\x00\x50\xd5\x12\x53\x4c\x63\xe4\xf0\xaf\xbc\x0e\x74\x9a\xfb\x17\xbb\x72\xf2\xae\x97\x38\x12\x7f\x63\x6f\x79\xdc\xe3\x0a\x87\xf4\xce\x87\xb2\xba\x6d\x32\x3e\x62\xaf\xf0\xc8\x5c\x45\x89\xbd\x6c\xd6\xfa\xc2\xaf\xa2\x24\x7a\x7b\x37\xe2\x0a\x9f\x28\x79\x36\x3f\x8b\x47\x9e\x4c\xa3\x2f\xec\x05\x5b\xb3\x9f\xcb\xbe\xfc\xf6\xbb\xa2\xde\x6b\x8e\x2b\xe5\x2f\x00\x00\xff\xff\x4c\x1d\x71\x3d\xf8\x00\x00\x00")

func assetsOpenstackYamlBytes() ([]byte, error) {
	return bindataRead(
		_assetsOpenstackYaml,
		"assets/openstack.yaml",
	)
}

func assetsOpenstackYaml() (*asset, error) {
	bytes, err := assetsOpenstackYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "assets/openstack.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

var _assetsVsphereYaml = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x54\x8e\x31\x4e\xc6\x30\x0c\x46\xf7\x9c\xc2\xea\xde\x22\x36\x94\x95\x23\x20\xb1\x1b\xe2\x52\x2b\x8d\x1d\xd9\x4e\xce\x8f\x5a\xf8\x87\x7f\xf5\xa7\xf7\xfc\xb0\xf3\x27\x99\xb3\x4a\x06\x0f\x35\xfc\xa1\xad\xbe\xf9\xc6\xfa\x32\x5f\x53\x65\x29\x19\x3e\xfe\xee\xef\x27\xba\xa7\x46\x81\x05\x03\x73\x02\x10\x6c\x94\x21\x0e\x96\x04\x80\x22\x1a\x18\xac\xe2\xd7\x06\x0f\xdd\xf7\x85\x6d\x75\x7c\x91\x09\x05\xdd\x6a\xf6\xb5\xd0\x8e\xe3\x8c\xf5\x9e\x33\x2c\x61\x83\x96\xd4\x4d\x27\x5f\x35\x64\x19\x9e\x99\xe9\xfd\x20\xa3\x75\xea\x39\x1a\xa5\x8e\x86\x8d\x82\xec\xfe\x56\xd8\xeb\xae\xd6\x30\xfe\x7b\x7e\x03\x00\x00\xff\xff\x22\x6d\x66\xbf\xd8\x00\x00\x00")

func assetsVsphereYamlBytes() ([]byte, error) {
	return bindataRead(
		_assetsVsphereYaml,
		"assets/vsphere.yaml",
	)
}

func assetsVsphereYaml() (*asset, error) {
	bytes, err := assetsVsphereYamlBytes()
	if err != nil {
		return nil, err
	}

	info := bindataFileInfo{name: "assets/vsphere.yaml", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
	a := &asset{bytes: bytes, info: info}
	return a, nil
}

// Asset loads and returns the asset for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
func Asset(name string) ([]byte, error) {
	cannonicalName := strings.Replace(name, "\\", "/", -1)
	if f, ok := _bindata[cannonicalName]; ok {
		a, err := f()
		if err != nil {
			return nil, fmt.Errorf("Asset %s can't read by error: %v", name, err)
		}
		return a.bytes, nil
	}
	return nil, fmt.Errorf("Asset %s not found", name)
}

// MustAsset is like Asset but panics when Asset would return an error.
// It simplifies safe initialization of global variables.
func MustAsset(name string) []byte {
	a, err := Asset(name)
	if err != nil {
		panic("asset: Asset(" + name + "): " + err.Error())
	}

	return a
}

// AssetInfo loads and returns the asset info for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
func AssetInfo(name string) (os.FileInfo, error) {
	cannonicalName := strings.Replace(name, "\\", "/", -1)
	if f, ok := _bindata[cannonicalName]; ok {
		a, err := f()
		if err != nil {
			return nil, fmt.Errorf("AssetInfo %s can't read by error: %v", name, err)
		}
		return a.info, nil
	}
	return nil, fmt.Errorf("AssetInfo %s not found", name)
}

// AssetNames returns the names of the assets.
func AssetNames() []string {
	names := make([]string, 0, len(_bindata))
	for name := range _bindata {
		names = append(names, name)
	}
	return names
}

// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string]func() (*asset, error){
	"assets/aws.yaml": assetsAwsYaml,
	"assets/azure.yaml": assetsAzureYaml,
	"assets/gcp.yaml": assetsGcpYaml,
	"assets/openstack.yaml": assetsOpenstackYaml,
	"assets/vsphere.yaml": assetsVsphereYaml,
}

// AssetDir returns the file names below a certain
// directory embedded in the file by go-bindata.
// For example if you run go-bindata on data/... and data contains the
// following hierarchy:
//     data/
//       foo.txt
//       img/
//         a.png
//         b.png
// then AssetDir("data") would return []string{"foo.txt", "img"}
// AssetDir("data/img") would return []string{"a.png", "b.png"}
// AssetDir("foo.txt") and AssetDir("notexist") would return an error
// AssetDir("") will return []string{"data"}.
func AssetDir(name string) ([]string, error) {
	node := _bintree
	if len(name) != 0 {
		cannonicalName := strings.Replace(name, "\\", "/", -1)
		pathList := strings.Split(cannonicalName, "/")
		for _, p := range pathList {
			node = node.Children[p]
			if node == nil {
				return nil, fmt.Errorf("Asset %s not found", name)
			}
		}
	}
	if node.Func != nil {
		return nil, fmt.Errorf("Asset %s not found", name)
	}
	rv := make([]string, 0, len(node.Children))
	for childName := range node.Children {
		rv = append(rv, childName)
	}
	return rv, nil
}

type bintree struct {
	Func     func() (*asset, error)
	Children map[string]*bintree
}
var _bintree = &bintree{nil, map[string]*bintree{
	"assets": &bintree{nil, map[string]*bintree{
		"aws.yaml": &bintree{assetsAwsYaml, map[string]*bintree{}},
		"azure.yaml": &bintree{assetsAzureYaml, map[string]*bintree{}},
		"gcp.yaml": &bintree{assetsGcpYaml, map[string]*bintree{}},
		"openstack.yaml": &bintree{assetsOpenstackYaml, map[string]*bintree{}},
		"vsphere.yaml": &bintree{assetsVsphereYaml, map[string]*bintree{}},
	}},
}}

// RestoreAsset restores an asset under the given directory
func RestoreAsset(dir, name string) error {
	data, err := Asset(name)
	if err != nil {
		return err
	}
	info, err := AssetInfo(name)
	if err != nil {
		return err
	}
	err = os.MkdirAll(_filePath(dir, filepath.Dir(name)), os.FileMode(0755))
	if err != nil {
		return err
	}
	err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode())
	if err != nil {
		return err
	}
	err = os.Chtimes(_filePath(dir, name), info.ModTime(), info.ModTime())
	if err != nil {
		return err
	}
	return nil
}

// RestoreAssets restores an asset under the given directory recursively
func RestoreAssets(dir, name string) error {
	children, err := AssetDir(name)
	// File
	if err != nil {
		return RestoreAsset(dir, name)
	}
	// Dir
	for _, child := range children {
		err = RestoreAssets(dir, filepath.Join(name, child))
		if err != nil {
			return err
		}
	}
	return nil
}

func _filePath(dir, name string) string {
	cannonicalName := strings.Replace(name, "\\", "/", -1)
	return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
}

