// Convert_v1_TemplateList_To_template_TemplateList is an autogenerated conversion function.
334498
func Convert_v1_TemplateList_To_template_TemplateList(in *v1.TemplateList, out *template.TemplateList, s conversion.Scope) error {
	return autoConvert_v1_TemplateList_To_template_TemplateList(in, out, s)
}
748594
func Convert_v1_TemplateInstanceObject_To_template_TemplateInstanceObject(in *v1.TemplateInstanceObject, out *template.TemplateInstanceObject, s conversion.Scope) error {
	return autoConvert_v1_TemplateInstanceObject_To_template_TemplateInstanceObject(in, out, s)
}
752368
func Convert_image_ImageStreamList_To_v1_ImageStreamList(in *image.ImageStreamList, out *v1.ImageStreamList, s conversion.Scope) error {
	return autoConvert_image_ImageStreamList_To_v1_ImageStreamList(in, out, s)
}
313489
func Convert_route_RouteList_To_v1_RouteList(in *route.RouteList, out *v1.RouteList, s conversion.Scope) error {
	return autoConvert_route_RouteList_To_v1_RouteList(in, out, s)
}
888677
func Convert_template_Parameter_To_v1_Parameter(in *template.Parameter, out *v1.Parameter, s conversion.Scope) error {
	return autoConvert_template_Parameter_To_v1_Parameter(in, out, s)
}
1122652
func Convert_core_PodTemplate_To_v1_PodTemplate(in *core.PodTemplate, out *v1.PodTemplate, s conversion.Scope) error {
	return autoConvert_core_PodTemplate_To_v1_PodTemplate(in, out, s)
}
1265833
func (mg *MailgunImpl) ListTemplateVersions(templateName string, opts *ListOptions) *TemplateVersionsIterator {
	r := newHTTPRequest(generateApiUrl(mg, templatesEndpoint) + "/" + templateName + "/versions")
	r.setClient(mg.Client())
	r.setBasicAuth(basicAuthUser, mg.APIKey())
	if opts != nil {
		if opts.Limit != 0 {
			r.addParameter("limit", strconv.Itoa(opts.Limit))
		}
	}
	url, err := r.generateUrlWithParameters()
	return &TemplateVersionsIterator{
		mg:                      mg,
		templateVersionListResp: templateVersionListResp{Paging: Paging{Next: url, First: url}},
		err:                     err,
	}
}
851521
func (c *ServicedCli) cmdTemplateList(ctx *cli.Context) {
	if len(ctx.Args()) > 0 {
		templateID := ctx.Args()[0]
		if template, err := c.driver.GetServiceTemplate(templateID); err != nil {
			fmt.Fprintln(os.Stderr, err)
		} else if template == nil {
			fmt.Fprintln(os.Stderr, "template not found")
		} else if jsonTemplate, err := json.MarshalIndent(template, " ", "  "); err != nil {
			fmt.Fprintf(os.Stderr, "failed to marshal template: %s\n", err)
		} else {
			fmt.Println(string(jsonTemplate))
		}
		return
	}

	templates, err := c.driver.GetServiceTemplates()
	if err != nil {
		fmt.Fprintln(os.Stderr, err)
		return
	} else if templates == nil || len(templates) == 0 {
		fmt.Fprintln(os.Stderr, "no templates found")
		return
	}

	if ctx.Bool("verbose") {
		if jsonTemplate, err := json.MarshalIndent(templates, " ", "  "); err != nil {
			fmt.Fprintf(os.Stderr, "failed to marshal template list: %s\n", err)
		} else {
			fmt.Println(string(jsonTemplate))
		}
	} else {
		t := NewTable(ctx.String("show-fields"))
		t.Padding = 6
		for _, tmp := range templates {
			t.AddRow(map[string]interface{}{
				"TemplateID":  tmp.ID,
				"Name":        tmp.Name,
				"Description": tmp.Description,
			})
		}
		t.Print()
	}
}
1368964
func Convert_v1_TemplateInstanceSpec_To_template_TemplateInstanceSpec(in *v1.TemplateInstanceSpec, out *template.TemplateInstanceSpec, s conversion.Scope) error {
	return autoConvert_v1_TemplateInstanceSpec_To_template_TemplateInstanceSpec(in, out, s)
}
576171
func Convert_v1_ProjectList_To_project_ProjectList(in *v1.ProjectList, out *project.ProjectList, s conversion.Scope) error {
	return autoConvert_v1_ProjectList_To_project_ProjectList(in, out, s)
}
946137
func (s *Store) ListTemplates(ctx context.Context, prefix string) []string {
	lst, err := s.storage.List(ctx, "")
	if err != nil {
		out.Debug(ctx, "failed to list templates: %s", err)
		return nil
	}
	tpls := make(map[string]struct{}, len(lst))
	for _, path := range lst {
		if !strings.HasSuffix(path, TemplateFile) {
			continue
		}
		path = strings.TrimSuffix(path, sep+TemplateFile)
		if prefix != "" {
			path = prefix + sep + path
		}
		tpls[path] = struct{}{}
	}
	out := make([]string, 0, len(tpls))
	for k := range tpls {
		out = append(out, k)
	}
	sort.Strings(out)
	return out
}
398150
func Convert_v1_TemplateInstanceList_To_template_TemplateInstanceList(in *v1.TemplateInstanceList, out *template.TemplateInstanceList, s conversion.Scope) error {
	return autoConvert_v1_TemplateInstanceList_To_template_TemplateInstanceList(in, out, s)
}
1168747
func Convert_v1_ComponentStatusList_To_core_ComponentStatusList(in *v1.ComponentStatusList, out *core.ComponentStatusList, s conversion.Scope) error {
	return autoConvert_v1_ComponentStatusList_To_core_ComponentStatusList(in, out, s)
}
1027497
func Convert_example_PodList_To_v1_PodList(in *example.PodList, out *PodList, s conversion.Scope) error {
	return autoConvert_example_PodList_To_v1_PodList(in, out, s)
}
254487
func NewListTemplateResult(TemplateIds []string) *ListTemplateResult {
	s := new(ListTemplateResult)
	s.TemplateIds = TemplateIds
	return s
}
157660
func Convert_config_OAuthTemplates_To_v1_OAuthTemplates(in *config.OAuthTemplates, out *v1.OAuthTemplates, s conversion.Scope) error {
	return autoConvert_config_OAuthTemplates_To_v1_OAuthTemplates(in, out, s)
}
466460
func Convert_core_List_To_v1_List(in *core.List, out *v1.List, s conversion.Scope) error {
	return autoConvert_core_List_To_v1_List(in, out, s)
}