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

//line templates/golang/resource-def.qtpl:1
package golang

//line templates/golang/resource-def.qtpl:1
import "github.com/apibrew/apibrew/pkg/model"

//line templates/golang/resource-def.qtpl:2
import "strings"

//line templates/golang/resource-def.qtpl:3
import "google.golang.org/protobuf/types/known/structpb"

//line templates/golang/resource-def.qtpl:5
import (
	qtio422016 "io"

	qt422016 "github.com/valyala/quicktemplate"
)

//line templates/golang/resource-def.qtpl:5
var (
	_ = qtio422016.Copy
	_ = qt422016.AcquireByteBuffer
)

//line templates/golang/resource-def.qtpl:5
func StreamGenerateStructDef(qw422016 *qt422016.Writer, value *structpb.Value) {
//line templates/golang/resource-def.qtpl:7
	if value == nil {
//line templates/golang/resource-def.qtpl:7
		qw422016.N().S(`nil `)
//line templates/golang/resource-def.qtpl:9
	} else if value.GetStringValue() != "" {
//line templates/golang/resource-def.qtpl:9
		qw422016.N().S(`structpb.NewStringValue("`)
//line templates/golang/resource-def.qtpl:10
		qw422016.E().S(value.GetStringValue())
//line templates/golang/resource-def.qtpl:10
		qw422016.N().S(`") `)
//line templates/golang/resource-def.qtpl:11
	} else if value.GetNumberValue() != 0 {
//line templates/golang/resource-def.qtpl:11
		qw422016.N().S(`structpb.NewNumberValue(`)
//line templates/golang/resource-def.qtpl:12
		qw422016.N().F(value.GetNumberValue())
//line templates/golang/resource-def.qtpl:12
		qw422016.N().S(`) `)
//line templates/golang/resource-def.qtpl:13
	} else if value.GetBoolValue() != false {
//line templates/golang/resource-def.qtpl:13
		qw422016.N().S(`structpb.NewBoolValue(`)
//line templates/golang/resource-def.qtpl:14
		if value.GetBoolValue() {
//line templates/golang/resource-def.qtpl:14
			qw422016.N().S(`true`)
//line templates/golang/resource-def.qtpl:14
		} else {
//line templates/golang/resource-def.qtpl:14
			qw422016.N().S(`false`)
//line templates/golang/resource-def.qtpl:14
		}
//line templates/golang/resource-def.qtpl:14
		qw422016.N().S(`) `)
//line templates/golang/resource-def.qtpl:15
	} else if value.GetListValue() != nil {
//line templates/golang/resource-def.qtpl:15
		qw422016.N().S(`structpb.NewListValue(&structpb.ListValue{ Values: []*structpb.Value{ `)
//line templates/golang/resource-def.qtpl:18
		for _, item := range value.GetListValue().Values {
//line templates/golang/resource-def.qtpl:19
			StreamGenerateStructDef(qw422016, item)
//line templates/golang/resource-def.qtpl:19
			qw422016.N().S(`, `)
//line templates/golang/resource-def.qtpl:20
		}
//line templates/golang/resource-def.qtpl:20
		qw422016.N().S(`}, }) `)
//line templates/golang/resource-def.qtpl:23
	} else if value.GetStructValue() != nil {
//line templates/golang/resource-def.qtpl:23
		qw422016.N().S(`structpb.NewStructValue(&structpb.Struct{ Fields: map[string]*structpb.Value{ `)
//line templates/golang/resource-def.qtpl:26
		for key, item := range value.GetStructValue().Fields {
//line templates/golang/resource-def.qtpl:26
			qw422016.N().S(`"`)
//line templates/golang/resource-def.qtpl:27
			qw422016.E().S(key)
//line templates/golang/resource-def.qtpl:27
			qw422016.N().S(`":`)
//line templates/golang/resource-def.qtpl:27
			StreamGenerateStructDef(qw422016, item)
//line templates/golang/resource-def.qtpl:27
			qw422016.N().S(`, `)
//line templates/golang/resource-def.qtpl:28
		}
//line templates/golang/resource-def.qtpl:28
		qw422016.N().S(`}, }) `)
//line templates/golang/resource-def.qtpl:31
	} else if value.GetNullValue() != 0 {
//line templates/golang/resource-def.qtpl:31
		qw422016.N().S(`nil `)
//line templates/golang/resource-def.qtpl:33
	} else {
//line templates/golang/resource-def.qtpl:33
		qw422016.N().S(`nil `)
//line templates/golang/resource-def.qtpl:35
	}
//line templates/golang/resource-def.qtpl:37
}

//line templates/golang/resource-def.qtpl:37
func WriteGenerateStructDef(qq422016 qtio422016.Writer, value *structpb.Value) {
//line templates/golang/resource-def.qtpl:37
	qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/golang/resource-def.qtpl:37
	StreamGenerateStructDef(qw422016, value)
//line templates/golang/resource-def.qtpl:37
	qt422016.ReleaseWriter(qw422016)
//line templates/golang/resource-def.qtpl:37
}

//line templates/golang/resource-def.qtpl:37
func GenerateStructDef(value *structpb.Value) string {
//line templates/golang/resource-def.qtpl:37
	qb422016 := qt422016.AcquireByteBuffer()
//line templates/golang/resource-def.qtpl:37
	WriteGenerateStructDef(qb422016, value)
//line templates/golang/resource-def.qtpl:37
	qs422016 := string(qb422016.B)
//line templates/golang/resource-def.qtpl:37
	qt422016.ReleaseByteBuffer(qb422016)
//line templates/golang/resource-def.qtpl:37
	return qs422016
//line templates/golang/resource-def.qtpl:37
}

//line templates/golang/resource-def.qtpl:39
func StreamGeneratePropertyDef(qw422016 *qt422016.Writer, resource *model.Resource, property *model.ResourceProperty) {
//line templates/golang/resource-def.qtpl:39
	qw422016.N().S(`{
        Name:     "`)
//line templates/golang/resource-def.qtpl:40
	qw422016.E().S(property.Name)
//line templates/golang/resource-def.qtpl:40
	qw422016.N().S(`",
        Type:     model.ResourceProperty_`)
//line templates/golang/resource-def.qtpl:41
	qw422016.E().S(property.Type.String())
//line templates/golang/resource-def.qtpl:41
	qw422016.N().S(`,
`)
//line templates/golang/resource-def.qtpl:42
	if property.Length > 0 {
//line templates/golang/resource-def.qtpl:42
		qw422016.N().S(`Length:   `)
//line templates/golang/resource-def.qtpl:42
		qw422016.N().D(int(property.Length))
//line templates/golang/resource-def.qtpl:42
		qw422016.N().S(`,
        `)
//line templates/golang/resource-def.qtpl:43
	}
//line templates/golang/resource-def.qtpl:44
	if property.Primary {
//line templates/golang/resource-def.qtpl:44
		qw422016.N().S(`Primary: true,
        `)
//line templates/golang/resource-def.qtpl:45
	}
//line templates/golang/resource-def.qtpl:46
	if property.Required {
//line templates/golang/resource-def.qtpl:46
		qw422016.N().S(`Required: true,
        `)
//line templates/golang/resource-def.qtpl:47
	}
//line templates/golang/resource-def.qtpl:48
	if property.Unique {
//line templates/golang/resource-def.qtpl:48
		qw422016.N().S(`Unique: true,
        `)
//line templates/golang/resource-def.qtpl:49
	}
//line templates/golang/resource-def.qtpl:50
	if property.Immutable {
//line templates/golang/resource-def.qtpl:50
		qw422016.N().S(`Immutable: true,
        `)
//line templates/golang/resource-def.qtpl:51
	}
//line templates/golang/resource-def.qtpl:52
	if property.DefaultValue != nil {
//line templates/golang/resource-def.qtpl:52
		qw422016.N().S(`DefaultValue:`)
//line templates/golang/resource-def.qtpl:52
		StreamGenerateStructDef(qw422016, property.DefaultValue)
//line templates/golang/resource-def.qtpl:52
		qw422016.N().S(`,
        `)
//line templates/golang/resource-def.qtpl:53
	}
//line templates/golang/resource-def.qtpl:54
	if property.TypeRef != nil {
//line templates/golang/resource-def.qtpl:54
		qw422016.N().S(`TypeRef: util.Pointer("`)
//line templates/golang/resource-def.qtpl:54
		qw422016.E().S(*property.TypeRef)
//line templates/golang/resource-def.qtpl:54
		qw422016.N().S(`"),
        `)
//line templates/golang/resource-def.qtpl:55
	}
//line templates/golang/resource-def.qtpl:56
	if property.Reference != nil {
//line templates/golang/resource-def.qtpl:56
		qw422016.N().S(`Reference: &model.Reference{Resource: "`)
//line templates/golang/resource-def.qtpl:56
		qw422016.E().S(property.Reference.Resource)
//line templates/golang/resource-def.qtpl:56
		qw422016.N().S(`", Namespace: "`)
//line templates/golang/resource-def.qtpl:56
		qw422016.E().S(property.Reference.Namespace)
//line templates/golang/resource-def.qtpl:56
		qw422016.N().S(`"},
        `)
//line templates/golang/resource-def.qtpl:57
	}
//line templates/golang/resource-def.qtpl:58
	if property.Item != nil {
//line templates/golang/resource-def.qtpl:58
		qw422016.N().S(`Item: &model.ResourceProperty`)
//line templates/golang/resource-def.qtpl:58
		StreamGeneratePropertyDef(qw422016, resource, property.Item)
//line templates/golang/resource-def.qtpl:58
		qw422016.N().S(`,
        `)
//line templates/golang/resource-def.qtpl:59
	}
//line templates/golang/resource-def.qtpl:60
	if property.ExampleValue != nil {
//line templates/golang/resource-def.qtpl:60
		qw422016.N().S(`ExampleValue:`)
//line templates/golang/resource-def.qtpl:60
		StreamGenerateStructDef(qw422016, property.ExampleValue)
//line templates/golang/resource-def.qtpl:60
		qw422016.N().S(`,
        `)
//line templates/golang/resource-def.qtpl:61
	}
//line templates/golang/resource-def.qtpl:62
	if property.EnumValues != nil {
//line templates/golang/resource-def.qtpl:62
		qw422016.N().S(`EnumValues: []string{`)
//line templates/golang/resource-def.qtpl:62
		for _, item := range property.EnumValues {
//line templates/golang/resource-def.qtpl:62
			qw422016.N().S(`"`)
//line templates/golang/resource-def.qtpl:62
			qw422016.E().S(item)
//line templates/golang/resource-def.qtpl:62
			qw422016.N().S(`",`)
//line templates/golang/resource-def.qtpl:62
		}
//line templates/golang/resource-def.qtpl:62
		qw422016.N().S(`},
        `)
//line templates/golang/resource-def.qtpl:63
	}
//line templates/golang/resource-def.qtpl:63
	qw422016.N().S(`        `)
//line templates/golang/resource-def.qtpl:64
	StreamGenerateAnnotationsDef(qw422016, property.Annotations)
//line templates/golang/resource-def.qtpl:64
	qw422016.N().S(`
    }`)
//line templates/golang/resource-def.qtpl:65
}

//line templates/golang/resource-def.qtpl:65
func WriteGeneratePropertyDef(qq422016 qtio422016.Writer, resource *model.Resource, property *model.ResourceProperty) {
//line templates/golang/resource-def.qtpl:65
	qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/golang/resource-def.qtpl:65
	StreamGeneratePropertyDef(qw422016, resource, property)
//line templates/golang/resource-def.qtpl:65
	qt422016.ReleaseWriter(qw422016)
//line templates/golang/resource-def.qtpl:65
}

//line templates/golang/resource-def.qtpl:65
func GeneratePropertyDef(resource *model.Resource, property *model.ResourceProperty) string {
//line templates/golang/resource-def.qtpl:65
	qb422016 := qt422016.AcquireByteBuffer()
//line templates/golang/resource-def.qtpl:65
	WriteGeneratePropertyDef(qb422016, resource, property)
//line templates/golang/resource-def.qtpl:65
	qs422016 := string(qb422016.B)
//line templates/golang/resource-def.qtpl:65
	qt422016.ReleaseByteBuffer(qb422016)
//line templates/golang/resource-def.qtpl:65
	return qs422016
//line templates/golang/resource-def.qtpl:65
}

//line templates/golang/resource-def.qtpl:67
func StreamGenerateAnnotationsDef(qw422016 *qt422016.Writer, annotations map[string]string) {
//line templates/golang/resource-def.qtpl:67
	qw422016.N().S(`
`)
//line templates/golang/resource-def.qtpl:68
	if len(annotations) > 0 {
//line templates/golang/resource-def.qtpl:68
		qw422016.N().S(`        Annotations: map[string]string{
`)
//line templates/golang/resource-def.qtpl:70
		for key, value := range annotations {
//line templates/golang/resource-def.qtpl:70
			qw422016.N().S(`			"`)
//line templates/golang/resource-def.qtpl:71
			qw422016.E().S(key)
//line templates/golang/resource-def.qtpl:71
			qw422016.N().S(`": "`)
//line templates/golang/resource-def.qtpl:71
			qw422016.E().S(value)
//line templates/golang/resource-def.qtpl:71
			qw422016.N().S(`",
`)
//line templates/golang/resource-def.qtpl:72
		}
//line templates/golang/resource-def.qtpl:72
		qw422016.N().S(`	    },
	    `)
//line templates/golang/resource-def.qtpl:74
	}
//line templates/golang/resource-def.qtpl:74
	qw422016.N().S(`
`)
//line templates/golang/resource-def.qtpl:75
}

//line templates/golang/resource-def.qtpl:75
func WriteGenerateAnnotationsDef(qq422016 qtio422016.Writer, annotations map[string]string) {
//line templates/golang/resource-def.qtpl:75
	qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/golang/resource-def.qtpl:75
	StreamGenerateAnnotationsDef(qw422016, annotations)
//line templates/golang/resource-def.qtpl:75
	qt422016.ReleaseWriter(qw422016)
//line templates/golang/resource-def.qtpl:75
}

//line templates/golang/resource-def.qtpl:75
func GenerateAnnotationsDef(annotations map[string]string) string {
//line templates/golang/resource-def.qtpl:75
	qb422016 := qt422016.AcquireByteBuffer()
//line templates/golang/resource-def.qtpl:75
	WriteGenerateAnnotationsDef(qb422016, annotations)
//line templates/golang/resource-def.qtpl:75
	qs422016 := string(qb422016.B)
//line templates/golang/resource-def.qtpl:75
	qt422016.ReleaseByteBuffer(qb422016)
//line templates/golang/resource-def.qtpl:75
	return qs422016
//line templates/golang/resource-def.qtpl:75
}

//line templates/golang/resource-def.qtpl:77
func StreamGenerateResourceDefCode(qw422016 *qt422016.Writer, pkg string, resource *model.Resource) {
//line templates/golang/resource-def.qtpl:78
	pkgParts := strings.Split(pkg, "/")

//line templates/golang/resource-def.qtpl:79
	pkgName := pkgParts[len(pkgParts)-1]

//line templates/golang/resource-def.qtpl:79
	qw422016.N().S(`// Code generated by apbr generate. DO NOT EDIT.
// versions:
// 	apbr generate v1.2

//go:build !codeanalysis
package `)
//line templates/golang/resource-def.qtpl:85
	qw422016.E().S(pkgName)
//line templates/golang/resource-def.qtpl:85
	qw422016.N().S(`

import (
    `)
//line templates/golang/resource-def.qtpl:88
	for _, imp := range getImportsForResourceDef(resource) {
//line templates/golang/resource-def.qtpl:88
		qw422016.N().S(`    "`)
//line templates/golang/resource-def.qtpl:89
		qw422016.E().S(imp)
//line templates/golang/resource-def.qtpl:89
		qw422016.N().S(`"
    `)
//line templates/golang/resource-def.qtpl:90
	}
//line templates/golang/resource-def.qtpl:90
	qw422016.N().S(`)

var `)
//line templates/golang/resource-def.qtpl:93
	StreamGoName(qw422016, resource.Name)
//line templates/golang/resource-def.qtpl:93
	qw422016.N().S(`Resource = &model.Resource{
	Name:      "`)
//line templates/golang/resource-def.qtpl:94
	qw422016.E().S(resource.Name)
//line templates/golang/resource-def.qtpl:94
	qw422016.N().S(`",
	Namespace: "`)
//line templates/golang/resource-def.qtpl:95
	qw422016.E().S(resource.Namespace)
//line templates/golang/resource-def.qtpl:95
	qw422016.N().S(`",
`)
//line templates/golang/resource-def.qtpl:96
	if resource.Title != nil {
//line templates/golang/resource-def.qtpl:96
		qw422016.N().S(`Title: util.Pointer("`)
//line templates/golang/resource-def.qtpl:96
		qw422016.E().S(*resource.Title)
//line templates/golang/resource-def.qtpl:96
		qw422016.N().S(`"),
    `)
//line templates/golang/resource-def.qtpl:97
	}
//line templates/golang/resource-def.qtpl:98
	if resource.SourceConfig != nil {
//line templates/golang/resource-def.qtpl:98
		qw422016.N().S(`SourceConfig: &model.ResourceSourceConfig{
            Entity: "`)
//line templates/golang/resource-def.qtpl:99
		qw422016.E().S(resource.SourceConfig.Entity)
//line templates/golang/resource-def.qtpl:99
		qw422016.N().S(`",
            Catalog: "`)
//line templates/golang/resource-def.qtpl:100
		qw422016.E().S(resource.SourceConfig.Catalog)
//line templates/golang/resource-def.qtpl:100
		qw422016.N().S(`",
    },
    `)
//line templates/golang/resource-def.qtpl:102
	}
//line templates/golang/resource-def.qtpl:103
	if resource.Description != nil {
//line templates/golang/resource-def.qtpl:103
		qw422016.N().S(`Description: util.Pointer("`)
//line templates/golang/resource-def.qtpl:103
		qw422016.E().S(*resource.Description)
//line templates/golang/resource-def.qtpl:103
		qw422016.N().S(`"),
    `)
//line templates/golang/resource-def.qtpl:104
	}
//line templates/golang/resource-def.qtpl:105
	if len(resource.Types) > 0 {
//line templates/golang/resource-def.qtpl:105
		qw422016.N().S(`	Types: []*model.ResourceSubType{
`)
//line templates/golang/resource-def.qtpl:107
		for _, typ := range resource.Types {
//line templates/golang/resource-def.qtpl:107
			qw422016.N().S(`		{
		    Name: "`)
//line templates/golang/resource-def.qtpl:109
			qw422016.E().S(typ.Name)
//line templates/golang/resource-def.qtpl:109
			qw422016.N().S(`",
`)
//line templates/golang/resource-def.qtpl:110
			if typ.Title != "" {
//line templates/golang/resource-def.qtpl:110
				qw422016.N().S(`Title: "`)
//line templates/golang/resource-def.qtpl:110
				qw422016.E().S(typ.Title)
//line templates/golang/resource-def.qtpl:110
				qw422016.N().S(`",
		    `)
//line templates/golang/resource-def.qtpl:111
			}
//line templates/golang/resource-def.qtpl:112
			if typ.Description != "" {
//line templates/golang/resource-def.qtpl:112
				qw422016.N().S(`Description: "`)
//line templates/golang/resource-def.qtpl:112
				qw422016.E().S(typ.Description)
//line templates/golang/resource-def.qtpl:112
				qw422016.N().S(`",
		    `)
//line templates/golang/resource-def.qtpl:113
			}
//line templates/golang/resource-def.qtpl:113
			qw422016.N().S(`		    Properties: []*model.ResourceProperty{
`)
//line templates/golang/resource-def.qtpl:115
			for _, property := range typ.Properties {
//line templates/golang/resource-def.qtpl:115
				qw422016.N().S(`		        `)
//line templates/golang/resource-def.qtpl:116
				StreamGeneratePropertyDef(qw422016, resource, property)
//line templates/golang/resource-def.qtpl:116
				qw422016.N().S(`,
`)
//line templates/golang/resource-def.qtpl:117
			}
//line templates/golang/resource-def.qtpl:117
			qw422016.N().S(`		    },
`)
//line templates/golang/resource-def.qtpl:119
			StreamGenerateAnnotationsDef(qw422016, resource.Annotations)
//line templates/golang/resource-def.qtpl:119
			qw422016.N().S(`		},
`)
//line templates/golang/resource-def.qtpl:121
		}
//line templates/golang/resource-def.qtpl:121
		qw422016.N().S(`	},
`)
//line templates/golang/resource-def.qtpl:123
	}
//line templates/golang/resource-def.qtpl:123
	qw422016.N().S(`	Properties: []*model.ResourceProperty{
`)
//line templates/golang/resource-def.qtpl:125
	for _, property := range resource.Properties {
//line templates/golang/resource-def.qtpl:125
		qw422016.N().S(`		`)
//line templates/golang/resource-def.qtpl:126
		StreamGeneratePropertyDef(qw422016, resource, property)
//line templates/golang/resource-def.qtpl:126
		qw422016.N().S(`,
`)
//line templates/golang/resource-def.qtpl:127
	}
//line templates/golang/resource-def.qtpl:127
	qw422016.N().S(`	},
`)
//line templates/golang/resource-def.qtpl:129
	if len(resource.Indexes) > 0 {
//line templates/golang/resource-def.qtpl:129
		qw422016.N().S(`	Indexes: []*model.ResourceIndex{
`)
//line templates/golang/resource-def.qtpl:131
		for _, index := range resource.Indexes {
//line templates/golang/resource-def.qtpl:131
			qw422016.N().S(`        {
            Properties: []*model.ResourceIndexProperty{
`)
//line templates/golang/resource-def.qtpl:134
			for _, property := range index.Properties {
//line templates/golang/resource-def.qtpl:134
				qw422016.N().S(`                {
                    Name: "`)
//line templates/golang/resource-def.qtpl:136
				qw422016.E().S(property.Name)
//line templates/golang/resource-def.qtpl:136
				qw422016.N().S(`",
                    Order: model.Order_`)
//line templates/golang/resource-def.qtpl:137
				qw422016.E().S(property.Order.String())
//line templates/golang/resource-def.qtpl:137
				qw422016.N().S(`,
                },
`)
//line templates/golang/resource-def.qtpl:139
			}
//line templates/golang/resource-def.qtpl:139
			qw422016.N().S(`            },
            IndexType: model.ResourceIndexType_`)
//line templates/golang/resource-def.qtpl:141
			qw422016.E().S(index.IndexType.String())
//line templates/golang/resource-def.qtpl:141
			qw422016.N().S(`,
`)
//line templates/golang/resource-def.qtpl:142
			if index.Unique {
//line templates/golang/resource-def.qtpl:142
				qw422016.N().S(`Unique: true,
            `)
//line templates/golang/resource-def.qtpl:143
			}
//line templates/golang/resource-def.qtpl:143
			qw422016.N().S(`            `)
//line templates/golang/resource-def.qtpl:144
			StreamGenerateAnnotationsDef(qw422016, index.Annotations)
//line templates/golang/resource-def.qtpl:144
			qw422016.N().S(`
        },
`)
//line templates/golang/resource-def.qtpl:146
		}
//line templates/golang/resource-def.qtpl:146
		qw422016.N().S(`    },
`)
//line templates/golang/resource-def.qtpl:148
	}
//line templates/golang/resource-def.qtpl:149
	if resource.Virtual {
//line templates/golang/resource-def.qtpl:149
		qw422016.N().S(`Virtual: true,
    `)
//line templates/golang/resource-def.qtpl:150
	}
//line templates/golang/resource-def.qtpl:151
	if resource.Immutable {
//line templates/golang/resource-def.qtpl:151
		qw422016.N().S(`Immutable: true,
    `)
//line templates/golang/resource-def.qtpl:152
	}
//line templates/golang/resource-def.qtpl:153
	if resource.Abstract {
//line templates/golang/resource-def.qtpl:153
		qw422016.N().S(`Abstract: true,
    `)
//line templates/golang/resource-def.qtpl:154
	}
//line templates/golang/resource-def.qtpl:155
	if resource.CheckReferences {
//line templates/golang/resource-def.qtpl:155
		qw422016.N().S(`CheckReferences: true,
    `)
//line templates/golang/resource-def.qtpl:156
	}
//line templates/golang/resource-def.qtpl:157
	StreamGenerateAnnotationsDef(qw422016, resource.Annotations)
//line templates/golang/resource-def.qtpl:157
	qw422016.N().S(`}
`)
//line templates/golang/resource-def.qtpl:159
}

//line templates/golang/resource-def.qtpl:159
func WriteGenerateResourceDefCode(qq422016 qtio422016.Writer, pkg string, resource *model.Resource) {
//line templates/golang/resource-def.qtpl:159
	qw422016 := qt422016.AcquireWriter(qq422016)
//line templates/golang/resource-def.qtpl:159
	StreamGenerateResourceDefCode(qw422016, pkg, resource)
//line templates/golang/resource-def.qtpl:159
	qt422016.ReleaseWriter(qw422016)
//line templates/golang/resource-def.qtpl:159
}

//line templates/golang/resource-def.qtpl:159
func GenerateResourceDefCode(pkg string, resource *model.Resource) string {
//line templates/golang/resource-def.qtpl:159
	qb422016 := qt422016.AcquireByteBuffer()
//line templates/golang/resource-def.qtpl:159
	WriteGenerateResourceDefCode(qb422016, pkg, resource)
//line templates/golang/resource-def.qtpl:159
	qs422016 := string(qb422016.B)
//line templates/golang/resource-def.qtpl:159
	qt422016.ReleaseByteBuffer(qb422016)
//line templates/golang/resource-def.qtpl:159
	return qs422016
//line templates/golang/resource-def.qtpl:159
}
