func (h *CreateServerTemplateHandlerImpl) Handle(params server_template.CreateServerTemplateParams, principal interface{}) middleware.Responder {
	t := ""
	v := int64(0)
	if params.TransactionID != nil {
		t = *params.TransactionID
	}
	if params.Version != nil {
		v = *params.Version
	}
	if t != "" && *params.ForceReload {
		msg := "Both force_reload and transaction specified, specify only one"
		c := misc.ErrHTTPBadRequest
		e := &models.Error{
			Message: &msg,
			Code:    &c,
		}
		return server_template.NewCreateServerTemplateDefault(int(*e.Code)).WithPayload(e)
	}
	err := h.Client.Configuration.CreateServerTemplate(params.Backend, params.Data, t, v)
	if err != nil {
		e := misc.HandleError(err)
		return server_template.NewCreateServerTemplateDefault(int(*e.Code)).WithPayload(e)
	}
	if params.TransactionID == nil {
		if *params.ForceReload {
			err := h.ReloadAgent.ForceReload()
			if err != nil {
				e := misc.HandleError(err)
				return server_template.NewCreateServerTemplateDefault(int(*e.Code)).WithPayload(e)
			}
			return server_template.NewCreateServerTemplateCreated().WithPayload(params.Data)
		}
		rID := h.ReloadAgent.Reload()
		return server_template.NewCreateServerTemplateAccepted().WithReloadID(rID).WithPayload(params.Data)
	}
	return server_template.NewCreateServerTemplateAccepted().WithPayload(params.Data)
}
Handle executing the request and returning a response
package handlers
import (
	"github.com/go-openapi/runtime/middleware"
	client_native "github.com/haproxytech/client-native/v2"
	"github.com/haproxytech/client-native/v2/models"
	"github.com/haproxytech/dataplaneapi/haproxy"
	"github.com/haproxytech/dataplaneapi/misc"
	"github.com/haproxytech/dataplaneapi/operations/server_template"
)
type CreateServerTemplateHandlerImpl struct {
	Client      *client_native.HAProxyClient
	ReloadAgent haproxy.IReloadAgent
}
type DeleteServerTemplateHandlerImpl struct {
	Client      *client_native.HAProxyClient
	ReloadAgent haproxy.IReloadAgent
}
type GetServerTemplateHandlerImpl struct {
	Client *client_native.HAProxyClient
}
type GetServerTemplatesHandlerImpl struct {
	Client *client_native.HAProxyClient
}
type ReplaceServerTemplateHandlerImpl struct {
	Client      *client_native.HAProxyClient
	ReloadAgent haproxy.IReloadAgent
}