// Code generated by qtc from "enum.qtpl". DO NOT EDIT.
// See https://github.com/valyala/quicktemplate for details.

//line templates/golang/enum.qtpl:1
package golang

//line templates/golang/enum.qtpl:1
import "github.com/apibrew/apibrew/pkg/model"

//line templates/golang/enum.qtpl:3
import (
	qtio422016 "io"

	qt422016 "github.com/valyala/quicktemplate"
)

//line templates/golang/enum.qtpl:3
var (
	_ = qtio422016.Copy
	_ = qt422016.AcquireByteBuffer
)

//line templates/golang/enum.qtpl:3
func StreamGenerateEnumCode(qw422016 *qt422016.Writer, enumProperty *model.ResourceProperty) {
//line templates/golang/enum.qtpl:4
	typeName := GoName(enumProperty.Name)

//line templates/golang/enum.qtpl:4
	qw422016.N().S(`
type `)
//line templates/golang/enum.qtpl:6
	qw422016.E().S(enumProperty.Name)
//line templates/golang/enum.qtpl:6
	qw422016.N().S(` string

const (
`)
//line templates/golang/enum.qtpl:9
	for _, value := range enumProperty.EnumValues {
//line templates/golang/enum.qtpl:9
		qw422016.N().S(`    `)
//line templates/golang/enum.qtpl:10
		qw422016.E().S(typeName)
//line templates/golang/enum.qtpl:10
		qw422016.N().S(`_`)
//line templates/golang/enum.qtpl:10
		StreamGoName(qw422016, value)
//line templates/golang/enum.qtpl:10
		qw422016.N().S(` `)
//line templates/golang/enum.qtpl:10
		qw422016.E().S(typeName)
//line templates/golang/enum.qtpl:10
		qw422016.N().S(` = "`)
//line templates/golang/enum.qtpl:10
		qw422016.E().S(value)
//line templates/golang/enum.qtpl:10
		qw422016.N().S(`"
`)
//line templates/golang/enum.qtpl:11
	}
//line templates/golang/enum.qtpl:11
	qw422016.N().S(`)
`)
//line templates/golang/enum.qtpl:13
}

//line templates/golang/enum.qtpl:13
func WriteGenerateEnumCode(qq422016 qtio422016.Writer, enumProperty *model.ResourceProperty) {
//line templates/golang/enum.qtpl:13
	qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/golang/enum.qtpl:13
	StreamGenerateEnumCode(qw422016, enumProperty)
//line templates/golang/enum.qtpl:13
	qt422016.ReleaseWriter(qw422016)
//line templates/golang/enum.qtpl:13
}

//line templates/golang/enum.qtpl:13
func GenerateEnumCode(enumProperty *model.ResourceProperty) string {
//line templates/golang/enum.qtpl:13
	qb422016 := qt422016.AcquireByteBuffer()
//line templates/golang/enum.qtpl:13
	WriteGenerateEnumCode(qb422016, enumProperty)
//line templates/golang/enum.qtpl:13
	qs422016 := string(qb422016.B)
//line templates/golang/enum.qtpl:13
	qt422016.ReleaseByteBuffer(qb422016)
//line templates/golang/enum.qtpl:13
	return qs422016
//line templates/golang/enum.qtpl:13
}
