// Generate the header, including package definition
504979
func (g *Generator) generateHeader() {
	g.P("// Code generated by protoc-gen-go. DO NOT EDIT.")
	if g.file.GetOptions().GetDeprecated() {
		g.P("// ", g.file.Name, " is a deprecated file.")
	} else {
		g.P("// source: ", g.file.Name)
	}
	g.P()
	g.PrintComments(strconv.Itoa(packagePath))
	g.P()
	g.P("package ", g.file.packageName)
	g.P()
}
798154
func (w *ResponseWriter) Header() http.Header {
	if w.header == nil {
		w.header = make(http.Header)
	}

	return w.header
}
106778
func (c *AppPackageDeleteCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
1309193
func (c *Call) Header(k string) string {
	return (*encoding.Call)(c).Header(k)
}
1353949
func (c *GetProjectConfigsCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
1142790
func (c *GetConfigCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
941815
func (c *AppGetCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
623471
func GenerateTypeDefinition(api *design.APIDefinition, ut *design.UserTypeDefinition) {
	if _, ok := Definitions[ut.TypeName]; ok {
		return
	}
	s := NewJSONSchema()
	s.Title = ut.TypeName
	Definitions[ut.TypeName] = s
	buildAttributeSchema(api, s, ut.AttributeDefinition)
}
1294878
func (s *SanicServer) Generate() error {
	if err := generateJSONSchema(s.APIDef, filepath.Join(s.targetDir, handlersDir)); err != nil {
		return err
	}
	if err := s.generateResources(s.targetDir); err != nil {
		return err
	}

	// security scheme
	if err := generateServerSecurity(s.APIDef.SecuritySchemes, s.Template, s.targetDir); err != nil {
		return err
	}

	// python classes and it's helper
	if err := commons.GenerateFile(nil, "./templates/python/client_support.tmpl",
		"client_support", filepath.Join(s.targetDir, "types", "client_support.py"), true); err != nil {
		return err
	}

	_, err := GenerateAllClasses(s.APIDef, filepath.Join(s.targetDir, typesDir), false)
	if err != nil {
		return err
	}

	if err := s.generateMain(s.targetDir); err != nil {
		return err
	}

	return generateEmptyInitPy(s.targetDir)
}
869337
func (c *GetProjectsCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
507195
func (c *AppInsertCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
1267617
func (c *GroupInsertCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
475589
func (c *GetConfigSetsCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
74728
func (c *GetRefsCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
1020628
func (c *GroupUpdateCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
432601
func generateMappings(appendCurrent bool) {
	hdr := "package main\n"

	initfn := `
	func init() {


	`
	t, err := bindgen.Parse(model, hdrfile)
	handleErr(err)

	var buf io.WriteCloser
	if appendCurrent {
		buf, err = os.OpenFile("mappings.go", os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0644)
	} else {
		buf, err = os.OpenFile("mappings.go", os.O_CREATE|os.O_WRONLY|os.O_TRUNC, 0644)
	}
	handleErr(err)
	defer buf.Close()

	if !appendCurrent {
		fmt.Fprintln(buf, hdr)
		bindgen.GenIgnored(buf, t, functions)
		fmt.Fprintln(buf, initfn)
		bindgen.GenNameMap(buf, t, "fnNameMap", processNameBasic, functions, true)
		bindgen.GenNameMap(buf, t, "enumMappings", processNameBasic, enums, true)

		generateCRUD(buf, t, "create")
		generateCRUD(buf, t, "set")
		generateCRUD(buf, t, "destroy")
		generateCRUD(buf, t, "methods")
		fmt.Fprintln(buf, "}\n")
	}
	generateAlphaBeta(buf, t)
	fmt.Fprintln(buf, initfn)
	fmt.Fprintln(buf, "}\n")
}
1013833
func (self *simplePBundle) Header(s string) (string, bool) {
	v, ok := self.h[strings.ToLower(s)]
	return v, ok
}