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

// Tags generates response for /tags/<tag_name> handlerSee https://graphite.readthedocs.io/en/stable/tags.html#exploring-tags

//line app/vmselect/graphite/tag_values_response.qtpl:5
package graphite

//line app/vmselect/graphite/tag_values_response.qtpl:5
import (
	qtio422016 "io"

	qt422016 "github.com/valyala/quicktemplate"
)

//line app/vmselect/graphite/tag_values_response.qtpl:5
var (
	_ = qtio422016.Copy
	_ = qt422016.AcquireByteBuffer
)

//line app/vmselect/graphite/tag_values_response.qtpl:5
func StreamTagValuesResponse(qw422016 *qt422016.Writer, isPartial bool, tagName string, tagValues []string) {
//line app/vmselect/graphite/tag_values_response.qtpl:5
	qw422016.N().S(`{"tag":`)
//line app/vmselect/graphite/tag_values_response.qtpl:7
	qw422016.N().Q(tagName)
//line app/vmselect/graphite/tag_values_response.qtpl:7
	qw422016.N().S(`,`)
//line app/vmselect/graphite/tag_values_response.qtpl:8
	if isPartial {
//line app/vmselect/graphite/tag_values_response.qtpl:8
		qw422016.N().S(`"is_partial":true,`)
//line app/vmselect/graphite/tag_values_response.qtpl:8
	}
//line app/vmselect/graphite/tag_values_response.qtpl:8
	qw422016.N().S(`"values":[`)
//line app/vmselect/graphite/tag_values_response.qtpl:10
	for i, value := range tagValues {
//line app/vmselect/graphite/tag_values_response.qtpl:10
		qw422016.N().S(`{"count":1,"value":`)
//line app/vmselect/graphite/tag_values_response.qtpl:13
		qw422016.N().Q(value)
//line app/vmselect/graphite/tag_values_response.qtpl:13
		qw422016.N().S(`}`)
//line app/vmselect/graphite/tag_values_response.qtpl:15
		if i+1 < len(tagValues) {
//line app/vmselect/graphite/tag_values_response.qtpl:15
			qw422016.N().S(`,`)
//line app/vmselect/graphite/tag_values_response.qtpl:15
		}
//line app/vmselect/graphite/tag_values_response.qtpl:16
	}
//line app/vmselect/graphite/tag_values_response.qtpl:16
	qw422016.N().S(`]}`)
//line app/vmselect/graphite/tag_values_response.qtpl:19
}

//line app/vmselect/graphite/tag_values_response.qtpl:19
func WriteTagValuesResponse(qq422016 qtio422016.Writer, isPartial bool, tagName string, tagValues []string) {
//line app/vmselect/graphite/tag_values_response.qtpl:19
	qw422016 := qt422016.AcquireWriter(qq422016)
//line app/vmselect/graphite/tag_values_response.qtpl:19
	StreamTagValuesResponse(qw422016, isPartial, tagName, tagValues)
//line app/vmselect/graphite/tag_values_response.qtpl:19
	qt422016.ReleaseWriter(qw422016)
//line app/vmselect/graphite/tag_values_response.qtpl:19
}

//line app/vmselect/graphite/tag_values_response.qtpl:19
func TagValuesResponse(isPartial bool, tagName string, tagValues []string) string {
//line app/vmselect/graphite/tag_values_response.qtpl:19
	qb422016 := qt422016.AcquireByteBuffer()
//line app/vmselect/graphite/tag_values_response.qtpl:19
	WriteTagValuesResponse(qb422016, isPartial, tagName, tagValues)
//line app/vmselect/graphite/tag_values_response.qtpl:19
	qs422016 := string(qb422016.B)
//line app/vmselect/graphite/tag_values_response.qtpl:19
	qt422016.ReleaseByteBuffer(qb422016)
//line app/vmselect/graphite/tag_values_response.qtpl:19
	return qs422016
//line app/vmselect/graphite/tag_values_response.qtpl:19
}
