// Package openapi provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.4.1 DO NOT EDIT.
package openapi

import (
	"context"
	"encoding/json"
	"fmt"
	"io"
	"net/http"
	"time"

	"github.com/go-chi/chi/v5"
	"github.com/oapi-codegen/runtime"
	strictnethttp "github.com/oapi-codegen/runtime/strictmiddleware/nethttp"
)

const (
	OAuth2Scopes = "OAuth2.Scopes"
)

// Comment defines model for Comment.
type Comment struct {
	Author  string    `json:"author"`
	Created time.Time `json:"created"`
	Id      string    `json:"id"`
	Message string    `json:"message"`
	Ticket  string    `json:"ticket"`
	Updated time.Time `json:"updated"`
}

// CommentUpdate defines model for CommentUpdate.
type CommentUpdate struct {
	Author  *string `json:"author,omitempty"`
	Message *string `json:"message,omitempty"`
}

// Config defines model for Config.
type Config struct {
	Flags       []string `json:"flags"`
	Permissions []string `json:"permissions"`
	Tables      []Table  `json:"tables"`
}

// DashboardCounts defines model for DashboardCounts.
type DashboardCounts struct {
	Count int    `json:"count"`
	Id    string `json:"id"`
}

// EmailTemplate defines model for EmailTemplate.
type EmailTemplate struct {
	Body    string `json:"body"`
	Subject string `json:"subject"`
}

// Error defines model for Error.
type Error struct {
	Error   string `json:"error"`
	Message string `json:"message"`
	Status  int    `json:"status"`
}

// ExtendedComment defines model for ExtendedComment.
type ExtendedComment struct {
	Author     string    `json:"author"`
	AuthorName string    `json:"author_name"`
	Created    time.Time `json:"created"`
	Id         string    `json:"id"`
	Message    string    `json:"message"`
	Ticket     string    `json:"ticket"`
	Updated    time.Time `json:"updated"`
}

// ExtendedTask defines model for ExtendedTask.
type ExtendedTask struct {
	Created    time.Time `json:"created"`
	Id         string    `json:"id"`
	Name       string    `json:"name"`
	Open       bool      `json:"open"`
	Owner      *string   `json:"owner,omitempty"`
	OwnerName  *string   `json:"owner_name,omitempty"`
	Ticket     string    `json:"ticket"`
	TicketName string    `json:"ticket_name"`
	TicketType string    `json:"ticket_type"`
	Updated    time.Time `json:"updated"`
}

// ExtendedTicket defines model for ExtendedTicket.
type ExtendedTicket struct {
	Created      time.Time              `json:"created"`
	Description  string                 `json:"description"`
	Id           string                 `json:"id"`
	Name         string                 `json:"name"`
	Open         bool                   `json:"open"`
	Owner        *string                `json:"owner,omitempty"`
	OwnerName    *string                `json:"owner_name,omitempty"`
	Resolution   *string                `json:"resolution,omitempty"`
	Schema       map[string]interface{} `json:"schema"`
	State        map[string]interface{} `json:"state"`
	Type         string                 `json:"type"`
	TypePlural   string                 `json:"type_plural"`
	TypeSingular string                 `json:"type_singular"`
	Updated      time.Time              `json:"updated"`
}

// Feature defines model for Feature.
type Feature struct {
	Created time.Time `json:"created"`
	Id      string    `json:"id"`
	Name    string    `json:"name"`
	Updated time.Time `json:"updated"`
}

// File defines model for File.
type File struct {
	Created time.Time `json:"created"`
	Id      string    `json:"id"`
	Name    string    `json:"name"`
	Size    float64   `json:"size"`
	Ticket  string    `json:"ticket"`
	Updated time.Time `json:"updated"`
}

// FileUpdate defines model for FileUpdate.
type FileUpdate struct {
	Name *string `json:"name,omitempty"`
}

// Group defines model for Group.
type Group struct {
	Created     time.Time `json:"created"`
	Id          string    `json:"id"`
	Name        string    `json:"name"`
	Permissions []string  `json:"permissions"`
	Updated     time.Time `json:"updated"`
}

// GroupRelation defines model for GroupRelation.
type GroupRelation struct {
	GroupId string `json:"group_id"`
}

// GroupUpdate defines model for GroupUpdate.
type GroupUpdate struct {
	Name        *string   `json:"name,omitempty"`
	Permissions *[]string `json:"permissions,omitempty"`
}

// GroupUser defines model for GroupUser.
type GroupUser struct {
	Active                 bool       `json:"active"`
	Avatar                 *string    `json:"avatar,omitempty"`
	Created                time.Time  `json:"created"`
	Email                  *string    `json:"email,omitempty"`
	Id                     string     `json:"id"`
	LastResetSentAt        *time.Time `json:"lastResetSentAt,omitempty"`
	LastVerificationSentAt *time.Time `json:"lastVerificationSentAt,omitempty"`
	Name                   *string    `json:"name,omitempty"`
	Type                   string     `json:"type"`
	Updated                time.Time  `json:"updated"`
	Username               string     `json:"username"`
}

// Link defines model for Link.
type Link struct {
	Created time.Time `json:"created"`
	Id      string    `json:"id"`
	Name    string    `json:"name"`
	Ticket  string    `json:"ticket"`
	Updated time.Time `json:"updated"`
	Url     string    `json:"url"`
}

// LinkUpdate defines model for LinkUpdate.
type LinkUpdate struct {
	Name *string `json:"name,omitempty"`
	Url  *string `json:"url,omitempty"`
}

// NewComment defines model for NewComment.
type NewComment struct {
	Author  string `json:"author"`
	Message string `json:"message"`
	Ticket  string `json:"ticket"`
}

// NewFeature defines model for NewFeature.
type NewFeature struct {
	Name string `json:"name"`
}

// NewFile defines model for NewFile.
type NewFile struct {
	Blob   string `json:"blob"`
	Name   string `json:"name"`
	Ticket string `json:"ticket"`
}

// NewGroup defines model for NewGroup.
type NewGroup struct {
	Name        string   `json:"name"`
	Permissions []string `json:"permissions"`
}

// NewLink defines model for NewLink.
type NewLink struct {
	Name   string `json:"name"`
	Ticket string `json:"ticket"`
	Url    string `json:"url"`
}

// NewReaction defines model for NewReaction.
type NewReaction struct {
	Action      string                 `json:"action"`
	Actiondata  map[string]interface{} `json:"actiondata"`
	Name        string                 `json:"name"`
	Trigger     string                 `json:"trigger"`
	Triggerdata map[string]interface{} `json:"triggerdata"`
}

// NewTask defines model for NewTask.
type NewTask struct {
	Name   string  `json:"name"`
	Open   bool    `json:"open"`
	Owner  *string `json:"owner,omitempty"`
	Ticket string  `json:"ticket"`
}

// NewTicket defines model for NewTicket.
type NewTicket struct {
	Description string                 `json:"description"`
	Name        string                 `json:"name"`
	Open        bool                   `json:"open"`
	Owner       *string                `json:"owner,omitempty"`
	Resolution  *string                `json:"resolution,omitempty"`
	Schema      map[string]interface{} `json:"schema"`
	State       map[string]interface{} `json:"state"`
	Type        string                 `json:"type"`
}

// NewTimelineEntry defines model for NewTimelineEntry.
type NewTimelineEntry struct {
	Message string    `json:"message"`
	Ticket  string    `json:"ticket"`
	Time    time.Time `json:"time"`
}

// NewType defines model for NewType.
type NewType struct {
	Icon     *string                `json:"icon,omitempty"`
	Plural   string                 `json:"plural"`
	Schema   map[string]interface{} `json:"schema"`
	Singular string                 `json:"singular"`
}

// NewUser defines model for NewUser.
type NewUser struct {
	Active   bool    `json:"active"`
	Avatar   *string `json:"avatar,omitempty"`
	Email    *string `json:"email,omitempty"`
	Name     *string `json:"name,omitempty"`
	Username string  `json:"username"`
}

// NewWebhook defines model for NewWebhook.
type NewWebhook struct {
	Collection  string `json:"collection"`
	Destination string `json:"destination"`
	Name        string `json:"name"`
}

// Reaction defines model for Reaction.
type Reaction struct {
	Action      string                 `json:"action"`
	Actiondata  map[string]interface{} `json:"actiondata"`
	Created     time.Time              `json:"created"`
	Id          string                 `json:"id"`
	Name        string                 `json:"name"`
	Trigger     string                 `json:"trigger"`
	Triggerdata map[string]interface{} `json:"triggerdata"`
	Updated     time.Time              `json:"updated"`
}

// ReactionUpdate defines model for ReactionUpdate.
type ReactionUpdate struct {
	Action      *string                 `json:"action,omitempty"`
	Actiondata  *map[string]interface{} `json:"actiondata,omitempty"`
	Name        *string                 `json:"name,omitempty"`
	Trigger     *string                 `json:"trigger,omitempty"`
	Triggerdata *map[string]interface{} `json:"triggerdata,omitempty"`
}

// Settings defines model for Settings.
type Settings struct {
	Meta SettingsMeta `json:"meta"`
	Smtp SettingsSmtp `json:"smtp"`
}

// SettingsMeta defines model for SettingsMeta.
type SettingsMeta struct {
	AppName               string        `json:"app_name"`
	AppUrl                string        `json:"app_url"`
	ResetPasswordTemplate EmailTemplate `json:"reset_password_template"`
	SenderAddress         string        `json:"sender_address"`
	SenderName            string        `json:"sender_name"`
}

// SettingsSmtp defines model for SettingsSmtp.
type SettingsSmtp struct {
	AuthMethod string `json:"auth_method"`
	Enabled    bool   `json:"enabled"`
	Host       string `json:"host"`
	LocalName  string `json:"local_name"`
	Password   string `json:"password"`
	Port       int    `json:"port"`
	Tls        bool   `json:"tls"`
	Username   string `json:"username"`
}

// Sidebar defines model for Sidebar.
type Sidebar struct {
	Count    int     `json:"count"`
	Icon     *string `json:"icon,omitempty"`
	Id       string  `json:"id"`
	Plural   string  `json:"plural"`
	Singular string  `json:"singular"`
}

// Table defines model for Table.
type Table struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

// Task defines model for Task.
type Task struct {
	Created time.Time `json:"created"`
	Id      string    `json:"id"`
	Name    string    `json:"name"`
	Open    bool      `json:"open"`
	Owner   *string   `json:"owner,omitempty"`
	Ticket  string    `json:"ticket"`
	Updated time.Time `json:"updated"`
}

// TaskUpdate defines model for TaskUpdate.
type TaskUpdate struct {
	Name  *string `json:"name,omitempty"`
	Open  *bool   `json:"open,omitempty"`
	Owner *string `json:"owner,omitempty"`
}

// Ticket defines model for Ticket.
type Ticket struct {
	Created     time.Time              `json:"created"`
	Description string                 `json:"description"`
	Id          string                 `json:"id"`
	Name        string                 `json:"name"`
	Open        bool                   `json:"open"`
	Owner       *string                `json:"owner,omitempty"`
	Resolution  *string                `json:"resolution,omitempty"`
	Schema      map[string]interface{} `json:"schema"`
	State       map[string]interface{} `json:"state"`
	Type        string                 `json:"type"`
	Updated     time.Time              `json:"updated"`
}

// TicketSearch defines model for TicketSearch.
type TicketSearch struct {
	Created     time.Time              `json:"created"`
	Description string                 `json:"description"`
	Id          string                 `json:"id"`
	Name        string                 `json:"name"`
	Open        bool                   `json:"open"`
	OwnerName   string                 `json:"owner_name"`
	State       map[string]interface{} `json:"state"`
	Type        string                 `json:"type"`
}

// TicketUpdate defines model for TicketUpdate.
type TicketUpdate struct {
	Description *string                 `json:"description,omitempty"`
	Name        *string                 `json:"name,omitempty"`
	Open        *bool                   `json:"open,omitempty"`
	Owner       *string                 `json:"owner,omitempty"`
	Resolution  *string                 `json:"resolution,omitempty"`
	Schema      *map[string]interface{} `json:"schema,omitempty"`
	State       *map[string]interface{} `json:"state,omitempty"`
	Type        *string                 `json:"type,omitempty"`
}

// TimelineEntry defines model for TimelineEntry.
type TimelineEntry struct {
	Created time.Time `json:"created"`
	Id      string    `json:"id"`
	Message string    `json:"message"`
	Ticket  string    `json:"ticket"`
	Time    time.Time `json:"time"`
	Updated time.Time `json:"updated"`
}

// TimelineEntryUpdate defines model for TimelineEntryUpdate.
type TimelineEntryUpdate struct {
	Message *string    `json:"message,omitempty"`
	Time    *time.Time `json:"time,omitempty"`
}

// Type defines model for Type.
type Type struct {
	Created  time.Time              `json:"created"`
	Icon     *string                `json:"icon,omitempty"`
	Id       string                 `json:"id"`
	Plural   string                 `json:"plural"`
	Schema   map[string]interface{} `json:"schema"`
	Singular string                 `json:"singular"`
	Updated  time.Time              `json:"updated"`
}

// TypeUpdate defines model for TypeUpdate.
type TypeUpdate struct {
	Icon     *string                 `json:"icon,omitempty"`
	Plural   *string                 `json:"plural,omitempty"`
	Schema   *map[string]interface{} `json:"schema,omitempty"`
	Singular *string                 `json:"singular,omitempty"`
}

// User defines model for User.
type User struct {
	Active                 bool       `json:"active"`
	Avatar                 *string    `json:"avatar,omitempty"`
	Created                time.Time  `json:"created"`
	Email                  *string    `json:"email,omitempty"`
	Id                     string     `json:"id"`
	LastResetSentAt        *time.Time `json:"lastResetSentAt,omitempty"`
	LastVerificationSentAt *time.Time `json:"lastVerificationSentAt,omitempty"`
	Name                   *string    `json:"name,omitempty"`
	Updated                time.Time  `json:"updated"`
	Username               string     `json:"username"`
}

// UserGroup defines model for UserGroup.
type UserGroup struct {
	Created     time.Time `json:"created"`
	Id          string    `json:"id"`
	Name        string    `json:"name"`
	Permissions []string  `json:"permissions"`
	Type        string    `json:"type"`
	Updated     time.Time `json:"updated"`
}

// UserUpdate defines model for UserUpdate.
type UserUpdate struct {
	Active          *bool   `json:"active,omitempty"`
	Avatar          *string `json:"avatar,omitempty"`
	Email           *string `json:"email,omitempty"`
	Name            *string `json:"name,omitempty"`
	Password        *string `json:"password,omitempty"`
	PasswordConfirm *string `json:"passwordConfirm,omitempty"`
	Username        *string `json:"username,omitempty"`
}

// Webhook defines model for Webhook.
type Webhook struct {
	Collection  string    `json:"collection"`
	Created     time.Time `json:"created"`
	Destination string    `json:"destination"`
	Id          string    `json:"id"`
	Name        string    `json:"name"`
	Updated     time.Time `json:"updated"`
}

// WebhookUpdate defines model for WebhookUpdate.
type WebhookUpdate struct {
	Collection  *string `json:"collection,omitempty"`
	Destination *string `json:"destination,omitempty"`
	Name        *string `json:"name,omitempty"`
}

// ListCommentsParams defines parameters for ListComments.
type ListCommentsParams struct {
	Ticket *string `form:"ticket,omitempty" json:"ticket,omitempty"`
	Offset *int    `form:"offset,omitempty" json:"offset,omitempty"`
	Limit  *int    `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListFilesParams defines parameters for ListFiles.
type ListFilesParams struct {
	Ticket *string `form:"ticket,omitempty" json:"ticket,omitempty"`
	Offset *int    `form:"offset,omitempty" json:"offset,omitempty"`
	Limit  *int    `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListGroupsParams defines parameters for ListGroups.
type ListGroupsParams struct {
	Offset *int `form:"offset,omitempty" json:"offset,omitempty"`
	Limit  *int `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListLinksParams defines parameters for ListLinks.
type ListLinksParams struct {
	Ticket *string `form:"ticket,omitempty" json:"ticket,omitempty"`
	Offset *int    `form:"offset,omitempty" json:"offset,omitempty"`
	Limit  *int    `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListReactionsParams defines parameters for ListReactions.
type ListReactionsParams struct {
	Offset *int `form:"offset,omitempty" json:"offset,omitempty"`
	Limit  *int `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListTasksParams defines parameters for ListTasks.
type ListTasksParams struct {
	Ticket *string `form:"ticket,omitempty" json:"ticket,omitempty"`
	Offset *int    `form:"offset,omitempty" json:"offset,omitempty"`
	Limit  *int    `form:"limit,omitempty" json:"limit,omitempty"`
}

// SearchTicketsParams defines parameters for SearchTickets.
type SearchTicketsParams struct {
	Query  *string `form:"query,omitempty" json:"query,omitempty"`
	Type   *string `form:"type,omitempty" json:"type,omitempty"`
	Open   *bool   `form:"open,omitempty" json:"open,omitempty"`
	Offset *int    `form:"offset,omitempty" json:"offset,omitempty"`
	Limit  *int    `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListTicketsParams defines parameters for ListTickets.
type ListTicketsParams struct {
	Offset *int `form:"offset,omitempty" json:"offset,omitempty"`
	Limit  *int `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListTimelineParams defines parameters for ListTimeline.
type ListTimelineParams struct {
	Ticket *string `form:"ticket,omitempty" json:"ticket,omitempty"`
	Offset *int    `form:"offset,omitempty" json:"offset,omitempty"`
	Limit  *int    `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListTypesParams defines parameters for ListTypes.
type ListTypesParams struct {
	Offset *int `form:"offset,omitempty" json:"offset,omitempty"`
	Limit  *int `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListUsersParams defines parameters for ListUsers.
type ListUsersParams struct {
	Offset *int `form:"offset,omitempty" json:"offset,omitempty"`
	Limit  *int `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListWebhooksParams defines parameters for ListWebhooks.
type ListWebhooksParams struct {
	Offset *int `form:"offset,omitempty" json:"offset,omitempty"`
	Limit  *int `form:"limit,omitempty" json:"limit,omitempty"`
}

// CreateCommentJSONRequestBody defines body for CreateComment for application/json ContentType.
type CreateCommentJSONRequestBody = NewComment

// UpdateCommentJSONRequestBody defines body for UpdateComment for application/json ContentType.
type UpdateCommentJSONRequestBody = CommentUpdate

// CreateFileJSONRequestBody defines body for CreateFile for application/json ContentType.
type CreateFileJSONRequestBody = NewFile

// CreateGroupJSONRequestBody defines body for CreateGroup for application/json ContentType.
type CreateGroupJSONRequestBody = NewGroup

// UpdateGroupJSONRequestBody defines body for UpdateGroup for application/json ContentType.
type UpdateGroupJSONRequestBody = GroupUpdate

// AddGroupParentJSONRequestBody defines body for AddGroupParent for application/json ContentType.
type AddGroupParentJSONRequestBody = GroupRelation

// CreateLinkJSONRequestBody defines body for CreateLink for application/json ContentType.
type CreateLinkJSONRequestBody = NewLink

// UpdateLinkJSONRequestBody defines body for UpdateLink for application/json ContentType.
type UpdateLinkJSONRequestBody = LinkUpdate

// CreateReactionJSONRequestBody defines body for CreateReaction for application/json ContentType.
type CreateReactionJSONRequestBody = NewReaction

// UpdateReactionJSONRequestBody defines body for UpdateReaction for application/json ContentType.
type UpdateReactionJSONRequestBody = ReactionUpdate

// UpdateSettingsJSONRequestBody defines body for UpdateSettings for application/json ContentType.
type UpdateSettingsJSONRequestBody = Settings

// CreateTaskJSONRequestBody defines body for CreateTask for application/json ContentType.
type CreateTaskJSONRequestBody = NewTask

// UpdateTaskJSONRequestBody defines body for UpdateTask for application/json ContentType.
type UpdateTaskJSONRequestBody = TaskUpdate

// CreateTicketJSONRequestBody defines body for CreateTicket for application/json ContentType.
type CreateTicketJSONRequestBody = NewTicket

// UpdateTicketJSONRequestBody defines body for UpdateTicket for application/json ContentType.
type UpdateTicketJSONRequestBody = TicketUpdate

// CreateTimelineJSONRequestBody defines body for CreateTimeline for application/json ContentType.
type CreateTimelineJSONRequestBody = NewTimelineEntry

// UpdateTimelineJSONRequestBody defines body for UpdateTimeline for application/json ContentType.
type UpdateTimelineJSONRequestBody = TimelineEntryUpdate

// CreateTypeJSONRequestBody defines body for CreateType for application/json ContentType.
type CreateTypeJSONRequestBody = NewType

// UpdateTypeJSONRequestBody defines body for UpdateType for application/json ContentType.
type UpdateTypeJSONRequestBody = TypeUpdate

// CreateUserJSONRequestBody defines body for CreateUser for application/json ContentType.
type CreateUserJSONRequestBody = NewUser

// UpdateUserJSONRequestBody defines body for UpdateUser for application/json ContentType.
type UpdateUserJSONRequestBody = UserUpdate

// AddUserGroupJSONRequestBody defines body for AddUserGroup for application/json ContentType.
type AddUserGroupJSONRequestBody = GroupRelation

// CreateWebhookJSONRequestBody defines body for CreateWebhook for application/json ContentType.
type CreateWebhookJSONRequestBody = NewWebhook

// UpdateWebhookJSONRequestBody defines body for UpdateWebhook for application/json ContentType.
type UpdateWebhookJSONRequestBody = WebhookUpdate

// ServerInterface represents all server handlers.
type ServerInterface interface {
	// List all comments
	// (GET /comments)
	ListComments(w http.ResponseWriter, r *http.Request, params ListCommentsParams)
	// Create a new comment
	// (POST /comments)
	CreateComment(w http.ResponseWriter, r *http.Request)
	// Delete a comment by ID
	// (DELETE /comments/{id})
	DeleteComment(w http.ResponseWriter, r *http.Request, id string)
	// Get a single comment by ID
	// (GET /comments/{id})
	GetComment(w http.ResponseWriter, r *http.Request, id string)
	// Update a comment by ID
	// (PATCH /comments/{id})
	UpdateComment(w http.ResponseWriter, r *http.Request, id string)
	// Get the configuration
	// (GET /config)
	GetConfig(w http.ResponseWriter, r *http.Request)
	// Get dashboard summary counts
	// (GET /dashboard_counts)
	GetDashboardCounts(w http.ResponseWriter, r *http.Request)
	// List all files
	// (GET /files)
	ListFiles(w http.ResponseWriter, r *http.Request, params ListFilesParams)
	// Create a new file
	// (POST /files)
	CreateFile(w http.ResponseWriter, r *http.Request)
	// Delete a file by ID
	// (DELETE /files/{id})
	DeleteFile(w http.ResponseWriter, r *http.Request, id string)
	// Get a single file by ID
	// (GET /files/{id})
	GetFile(w http.ResponseWriter, r *http.Request, id string)
	// Download a file by ID
	// (GET /files/{id}/download)
	DownloadFile(w http.ResponseWriter, r *http.Request, id string)
	// List all groups
	// (GET /groups)
	ListGroups(w http.ResponseWriter, r *http.Request, params ListGroupsParams)
	// Create a new group
	// (POST /groups)
	CreateGroup(w http.ResponseWriter, r *http.Request)
	// Delete a group by ID
	// (DELETE /groups/{id})
	DeleteGroup(w http.ResponseWriter, r *http.Request, id string)
	// Get a single group by ID
	// (GET /groups/{id})
	GetGroup(w http.ResponseWriter, r *http.Request, id string)
	// Update a group by ID
	// (PATCH /groups/{id})
	UpdateGroup(w http.ResponseWriter, r *http.Request, id string)
	// List all child groups for a group
	// (GET /groups/{id}/children)
	ListChildGroups(w http.ResponseWriter, r *http.Request, id string)
	// Remove a parent group from another group
	// (DELETE /groups/{id}/groups/{parentGroupId})
	RemoveGroupParent(w http.ResponseWriter, r *http.Request, id string, parentGroupId string)
	// List all parent groups for a group
	// (GET /groups/{id}/parents)
	ListParentGroups(w http.ResponseWriter, r *http.Request, id string)
	// Add a parent group to another group
	// (POST /groups/{id}/parents)
	AddGroupParent(w http.ResponseWriter, r *http.Request, id string)
	// List all permissions for a group
	// (GET /groups/{id}/permissions)
	ListParentPermissions(w http.ResponseWriter, r *http.Request, id string)
	// List all users for a group
	// (GET /groups/{id}/users)
	ListGroupUsers(w http.ResponseWriter, r *http.Request, id string)
	// List all links
	// (GET /links)
	ListLinks(w http.ResponseWriter, r *http.Request, params ListLinksParams)
	// Create a new link
	// (POST /links)
	CreateLink(w http.ResponseWriter, r *http.Request)
	// Delete a link by ID
	// (DELETE /links/{id})
	DeleteLink(w http.ResponseWriter, r *http.Request, id string)
	// Get a single link by ID
	// (GET /links/{id})
	GetLink(w http.ResponseWriter, r *http.Request, id string)
	// Update a link by ID
	// (PATCH /links/{id})
	UpdateLink(w http.ResponseWriter, r *http.Request, id string)
	// List all reactions
	// (GET /reactions)
	ListReactions(w http.ResponseWriter, r *http.Request, params ListReactionsParams)
	// Create a new reaction
	// (POST /reactions)
	CreateReaction(w http.ResponseWriter, r *http.Request)
	// Delete a reaction by ID
	// (DELETE /reactions/{id})
	DeleteReaction(w http.ResponseWriter, r *http.Request, id string)
	// Get a single reaction by ID
	// (GET /reactions/{id})
	GetReaction(w http.ResponseWriter, r *http.Request, id string)
	// Update a reaction by ID
	// (PATCH /reactions/{id})
	UpdateReaction(w http.ResponseWriter, r *http.Request, id string)
	// Get system settings
	// (GET /settings)
	GetSettings(w http.ResponseWriter, r *http.Request)
	// Update system settings
	// (POST /settings)
	UpdateSettings(w http.ResponseWriter, r *http.Request)
	// Get sidebar data
	// (GET /sidebar)
	GetSidebar(w http.ResponseWriter, r *http.Request)
	// List all tasks
	// (GET /tasks)
	ListTasks(w http.ResponseWriter, r *http.Request, params ListTasksParams)
	// Create a new task
	// (POST /tasks)
	CreateTask(w http.ResponseWriter, r *http.Request)
	// Delete a task by ID
	// (DELETE /tasks/{id})
	DeleteTask(w http.ResponseWriter, r *http.Request, id string)
	// Get a single task by ID
	// (GET /tasks/{id})
	GetTask(w http.ResponseWriter, r *http.Request, id string)
	// Update a task by ID
	// (PATCH /tasks/{id})
	UpdateTask(w http.ResponseWriter, r *http.Request, id string)
	// Search tickets with full join data
	// (GET /ticket_search)
	SearchTickets(w http.ResponseWriter, r *http.Request, params SearchTicketsParams)
	// List all tickets
	// (GET /tickets)
	ListTickets(w http.ResponseWriter, r *http.Request, params ListTicketsParams)
	// Create a new ticket
	// (POST /tickets)
	CreateTicket(w http.ResponseWriter, r *http.Request)
	// Delete a ticket by ID
	// (DELETE /tickets/{id})
	DeleteTicket(w http.ResponseWriter, r *http.Request, id string)
	// Get a single ticket by ID
	// (GET /tickets/{id})
	GetTicket(w http.ResponseWriter, r *http.Request, id string)
	// Update a ticket by ID
	// (PATCH /tickets/{id})
	UpdateTicket(w http.ResponseWriter, r *http.Request, id string)
	// List all timeline items
	// (GET /timeline)
	ListTimeline(w http.ResponseWriter, r *http.Request, params ListTimelineParams)
	// Create a new timeline item
	// (POST /timeline)
	CreateTimeline(w http.ResponseWriter, r *http.Request)
	// Delete a timeline item by ID
	// (DELETE /timeline/{id})
	DeleteTimeline(w http.ResponseWriter, r *http.Request, id string)
	// Get a single timeline item by ID
	// (GET /timeline/{id})
	GetTimeline(w http.ResponseWriter, r *http.Request, id string)
	// Update a timeline item by ID
	// (PATCH /timeline/{id})
	UpdateTimeline(w http.ResponseWriter, r *http.Request, id string)
	// List all types
	// (GET /types)
	ListTypes(w http.ResponseWriter, r *http.Request, params ListTypesParams)
	// Create a new type
	// (POST /types)
	CreateType(w http.ResponseWriter, r *http.Request)
	// Delete a type by ID
	// (DELETE /types/{id})
	DeleteType(w http.ResponseWriter, r *http.Request, id string)
	// Get a single type by ID
	// (GET /types/{id})
	GetType(w http.ResponseWriter, r *http.Request, id string)
	// Update a type by ID
	// (PATCH /types/{id})
	UpdateType(w http.ResponseWriter, r *http.Request, id string)
	// List all users
	// (GET /users)
	ListUsers(w http.ResponseWriter, r *http.Request, params ListUsersParams)
	// Create a new user
	// (POST /users)
	CreateUser(w http.ResponseWriter, r *http.Request)
	// Delete a user by ID
	// (DELETE /users/{id})
	DeleteUser(w http.ResponseWriter, r *http.Request, id string)
	// Get a single user by ID
	// (GET /users/{id})
	GetUser(w http.ResponseWriter, r *http.Request, id string)
	// Update a user by ID
	// (PATCH /users/{id})
	UpdateUser(w http.ResponseWriter, r *http.Request, id string)
	// List all groups for a user
	// (GET /users/{id}/groups)
	ListUserGroups(w http.ResponseWriter, r *http.Request, id string)
	// Add a group to a user
	// (POST /users/{id}/groups)
	AddUserGroup(w http.ResponseWriter, r *http.Request, id string)
	// Remove a group from a user
	// (DELETE /users/{id}/groups/{groupId})
	RemoveUserGroup(w http.ResponseWriter, r *http.Request, id string, groupId string)
	// List all permissions for a user
	// (GET /users/{id}/permissions)
	ListUserPermissions(w http.ResponseWriter, r *http.Request, id string)
	// List all webhooks
	// (GET /webhooks)
	ListWebhooks(w http.ResponseWriter, r *http.Request, params ListWebhooksParams)
	// Create a new webhook
	// (POST /webhooks)
	CreateWebhook(w http.ResponseWriter, r *http.Request)
	// Delete a webhook by ID
	// (DELETE /webhooks/{id})
	DeleteWebhook(w http.ResponseWriter, r *http.Request, id string)
	// Get a single webhook by ID
	// (GET /webhooks/{id})
	GetWebhook(w http.ResponseWriter, r *http.Request, id string)
	// Update a webhook by ID
	// (PATCH /webhooks/{id})
	UpdateWebhook(w http.ResponseWriter, r *http.Request, id string)
}

// Unimplemented server implementation that returns http.StatusNotImplemented for each endpoint.

type Unimplemented struct{}

// List all comments
// (GET /comments)
func (_ Unimplemented) ListComments(w http.ResponseWriter, r *http.Request, params ListCommentsParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Create a new comment
// (POST /comments)
func (_ Unimplemented) CreateComment(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Delete a comment by ID
// (DELETE /comments/{id})
func (_ Unimplemented) DeleteComment(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Get a single comment by ID
// (GET /comments/{id})
func (_ Unimplemented) GetComment(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Update a comment by ID
// (PATCH /comments/{id})
func (_ Unimplemented) UpdateComment(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Get the configuration
// (GET /config)
func (_ Unimplemented) GetConfig(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Get dashboard summary counts
// (GET /dashboard_counts)
func (_ Unimplemented) GetDashboardCounts(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List all files
// (GET /files)
func (_ Unimplemented) ListFiles(w http.ResponseWriter, r *http.Request, params ListFilesParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Create a new file
// (POST /files)
func (_ Unimplemented) CreateFile(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Delete a file by ID
// (DELETE /files/{id})
func (_ Unimplemented) DeleteFile(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Get a single file by ID
// (GET /files/{id})
func (_ Unimplemented) GetFile(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Download a file by ID
// (GET /files/{id}/download)
func (_ Unimplemented) DownloadFile(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List all groups
// (GET /groups)
func (_ Unimplemented) ListGroups(w http.ResponseWriter, r *http.Request, params ListGroupsParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Create a new group
// (POST /groups)
func (_ Unimplemented) CreateGroup(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Delete a group by ID
// (DELETE /groups/{id})
func (_ Unimplemented) DeleteGroup(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Get a single group by ID
// (GET /groups/{id})
func (_ Unimplemented) GetGroup(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Update a group by ID
// (PATCH /groups/{id})
func (_ Unimplemented) UpdateGroup(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List all child groups for a group
// (GET /groups/{id}/children)
func (_ Unimplemented) ListChildGroups(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Remove a parent group from another group
// (DELETE /groups/{id}/groups/{parentGroupId})
func (_ Unimplemented) RemoveGroupParent(w http.ResponseWriter, r *http.Request, id string, parentGroupId string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List all parent groups for a group
// (GET /groups/{id}/parents)
func (_ Unimplemented) ListParentGroups(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Add a parent group to another group
// (POST /groups/{id}/parents)
func (_ Unimplemented) AddGroupParent(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List all permissions for a group
// (GET /groups/{id}/permissions)
func (_ Unimplemented) ListParentPermissions(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List all users for a group
// (GET /groups/{id}/users)
func (_ Unimplemented) ListGroupUsers(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List all links
// (GET /links)
func (_ Unimplemented) ListLinks(w http.ResponseWriter, r *http.Request, params ListLinksParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Create a new link
// (POST /links)
func (_ Unimplemented) CreateLink(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Delete a link by ID
// (DELETE /links/{id})
func (_ Unimplemented) DeleteLink(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Get a single link by ID
// (GET /links/{id})
func (_ Unimplemented) GetLink(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Update a link by ID
// (PATCH /links/{id})
func (_ Unimplemented) UpdateLink(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List all reactions
// (GET /reactions)
func (_ Unimplemented) ListReactions(w http.ResponseWriter, r *http.Request, params ListReactionsParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Create a new reaction
// (POST /reactions)
func (_ Unimplemented) CreateReaction(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Delete a reaction by ID
// (DELETE /reactions/{id})
func (_ Unimplemented) DeleteReaction(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Get a single reaction by ID
// (GET /reactions/{id})
func (_ Unimplemented) GetReaction(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Update a reaction by ID
// (PATCH /reactions/{id})
func (_ Unimplemented) UpdateReaction(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Get system settings
// (GET /settings)
func (_ Unimplemented) GetSettings(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Update system settings
// (POST /settings)
func (_ Unimplemented) UpdateSettings(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Get sidebar data
// (GET /sidebar)
func (_ Unimplemented) GetSidebar(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List all tasks
// (GET /tasks)
func (_ Unimplemented) ListTasks(w http.ResponseWriter, r *http.Request, params ListTasksParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Create a new task
// (POST /tasks)
func (_ Unimplemented) CreateTask(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Delete a task by ID
// (DELETE /tasks/{id})
func (_ Unimplemented) DeleteTask(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Get a single task by ID
// (GET /tasks/{id})
func (_ Unimplemented) GetTask(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Update a task by ID
// (PATCH /tasks/{id})
func (_ Unimplemented) UpdateTask(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Search tickets with full join data
// (GET /ticket_search)
func (_ Unimplemented) SearchTickets(w http.ResponseWriter, r *http.Request, params SearchTicketsParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List all tickets
// (GET /tickets)
func (_ Unimplemented) ListTickets(w http.ResponseWriter, r *http.Request, params ListTicketsParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Create a new ticket
// (POST /tickets)
func (_ Unimplemented) CreateTicket(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Delete a ticket by ID
// (DELETE /tickets/{id})
func (_ Unimplemented) DeleteTicket(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Get a single ticket by ID
// (GET /tickets/{id})
func (_ Unimplemented) GetTicket(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Update a ticket by ID
// (PATCH /tickets/{id})
func (_ Unimplemented) UpdateTicket(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List all timeline items
// (GET /timeline)
func (_ Unimplemented) ListTimeline(w http.ResponseWriter, r *http.Request, params ListTimelineParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Create a new timeline item
// (POST /timeline)
func (_ Unimplemented) CreateTimeline(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Delete a timeline item by ID
// (DELETE /timeline/{id})
func (_ Unimplemented) DeleteTimeline(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Get a single timeline item by ID
// (GET /timeline/{id})
func (_ Unimplemented) GetTimeline(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Update a timeline item by ID
// (PATCH /timeline/{id})
func (_ Unimplemented) UpdateTimeline(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List all types
// (GET /types)
func (_ Unimplemented) ListTypes(w http.ResponseWriter, r *http.Request, params ListTypesParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Create a new type
// (POST /types)
func (_ Unimplemented) CreateType(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Delete a type by ID
// (DELETE /types/{id})
func (_ Unimplemented) DeleteType(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Get a single type by ID
// (GET /types/{id})
func (_ Unimplemented) GetType(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Update a type by ID
// (PATCH /types/{id})
func (_ Unimplemented) UpdateType(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List all users
// (GET /users)
func (_ Unimplemented) ListUsers(w http.ResponseWriter, r *http.Request, params ListUsersParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Create a new user
// (POST /users)
func (_ Unimplemented) CreateUser(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Delete a user by ID
// (DELETE /users/{id})
func (_ Unimplemented) DeleteUser(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Get a single user by ID
// (GET /users/{id})
func (_ Unimplemented) GetUser(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Update a user by ID
// (PATCH /users/{id})
func (_ Unimplemented) UpdateUser(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List all groups for a user
// (GET /users/{id}/groups)
func (_ Unimplemented) ListUserGroups(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Add a group to a user
// (POST /users/{id}/groups)
func (_ Unimplemented) AddUserGroup(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Remove a group from a user
// (DELETE /users/{id}/groups/{groupId})
func (_ Unimplemented) RemoveUserGroup(w http.ResponseWriter, r *http.Request, id string, groupId string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List all permissions for a user
// (GET /users/{id}/permissions)
func (_ Unimplemented) ListUserPermissions(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List all webhooks
// (GET /webhooks)
func (_ Unimplemented) ListWebhooks(w http.ResponseWriter, r *http.Request, params ListWebhooksParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Create a new webhook
// (POST /webhooks)
func (_ Unimplemented) CreateWebhook(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Delete a webhook by ID
// (DELETE /webhooks/{id})
func (_ Unimplemented) DeleteWebhook(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Get a single webhook by ID
// (GET /webhooks/{id})
func (_ Unimplemented) GetWebhook(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Update a webhook by ID
// (PATCH /webhooks/{id})
func (_ Unimplemented) UpdateWebhook(w http.ResponseWriter, r *http.Request, id string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// ServerInterfaceWrapper converts contexts to parameters.
type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

type MiddlewareFunc func(http.Handler) http.Handler

// ListComments operation middleware
func (siw *ServerInterfaceWrapper) ListComments(w http.ResponseWriter, r *http.Request) {

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:read"})

	r = r.WithContext(ctx)

	// Parameter object where we will unmarshal all parameters from the context
	var params ListCommentsParams

	// ------------- Optional query parameter "ticket" -------------

	err = runtime.BindQueryParameter("form", true, false, "ticket", r.URL.Query(), &params.Ticket)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "ticket", Err: err})
		return
	}

	// ------------- Optional query parameter "offset" -------------

	err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), &params.Offset)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err})
		return
	}

	// ------------- Optional query parameter "limit" -------------

	err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), &params.Limit)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
		return
	}

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.ListComments(w, r, params)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// CreateComment operation middleware
func (siw *ServerInterfaceWrapper) CreateComment(w http.ResponseWriter, r *http.Request) {

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.CreateComment(w, r)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// DeleteComment operation middleware
func (siw *ServerInterfaceWrapper) DeleteComment(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.DeleteComment(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// GetComment operation middleware
func (siw *ServerInterfaceWrapper) GetComment(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:read"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.GetComment(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// UpdateComment operation middleware
func (siw *ServerInterfaceWrapper) UpdateComment(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.UpdateComment(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// GetConfig operation middleware
func (siw *ServerInterfaceWrapper) GetConfig(w http.ResponseWriter, r *http.Request) {

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.GetConfig(w, r)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// GetDashboardCounts operation middleware
func (siw *ServerInterfaceWrapper) GetDashboardCounts(w http.ResponseWriter, r *http.Request) {

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:read"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.GetDashboardCounts(w, r)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// ListFiles operation middleware
func (siw *ServerInterfaceWrapper) ListFiles(w http.ResponseWriter, r *http.Request) {

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"file:read"})

	r = r.WithContext(ctx)

	// Parameter object where we will unmarshal all parameters from the context
	var params ListFilesParams

	// ------------- Optional query parameter "ticket" -------------

	err = runtime.BindQueryParameter("form", true, false, "ticket", r.URL.Query(), &params.Ticket)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "ticket", Err: err})
		return
	}

	// ------------- Optional query parameter "offset" -------------

	err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), &params.Offset)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err})
		return
	}

	// ------------- Optional query parameter "limit" -------------

	err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), &params.Limit)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
		return
	}

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.ListFiles(w, r, params)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// CreateFile operation middleware
func (siw *ServerInterfaceWrapper) CreateFile(w http.ResponseWriter, r *http.Request) {

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"file:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.CreateFile(w, r)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// DeleteFile operation middleware
func (siw *ServerInterfaceWrapper) DeleteFile(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"file:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.DeleteFile(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// GetFile operation middleware
func (siw *ServerInterfaceWrapper) GetFile(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"file:read"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.GetFile(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// DownloadFile operation middleware
func (siw *ServerInterfaceWrapper) DownloadFile(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"file:read"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.DownloadFile(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// ListGroups operation middleware
func (siw *ServerInterfaceWrapper) ListGroups(w http.ResponseWriter, r *http.Request) {

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"group:read"})

	r = r.WithContext(ctx)

	// Parameter object where we will unmarshal all parameters from the context
	var params ListGroupsParams

	// ------------- Optional query parameter "offset" -------------

	err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), &params.Offset)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err})
		return
	}

	// ------------- Optional query parameter "limit" -------------

	err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), &params.Limit)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
		return
	}

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.ListGroups(w, r, params)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// CreateGroup operation middleware
func (siw *ServerInterfaceWrapper) CreateGroup(w http.ResponseWriter, r *http.Request) {

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"group:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.CreateGroup(w, r)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// DeleteGroup operation middleware
func (siw *ServerInterfaceWrapper) DeleteGroup(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"group:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.DeleteGroup(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// GetGroup operation middleware
func (siw *ServerInterfaceWrapper) GetGroup(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"group:read"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.GetGroup(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// UpdateGroup operation middleware
func (siw *ServerInterfaceWrapper) UpdateGroup(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"group:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.UpdateGroup(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// ListChildGroups operation middleware
func (siw *ServerInterfaceWrapper) ListChildGroups(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"group:read"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.ListChildGroups(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// RemoveGroupParent operation middleware
func (siw *ServerInterfaceWrapper) RemoveGroupParent(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	// ------------- Path parameter "parentGroupId" -------------
	var parentGroupId string

	err = runtime.BindStyledParameterWithOptions("simple", "parentGroupId", chi.URLParam(r, "parentGroupId"), &parentGroupId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "parentGroupId", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"group:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.RemoveGroupParent(w, r, id, parentGroupId)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// ListParentGroups operation middleware
func (siw *ServerInterfaceWrapper) ListParentGroups(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"group:read"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.ListParentGroups(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// AddGroupParent operation middleware
func (siw *ServerInterfaceWrapper) AddGroupParent(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"group:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.AddGroupParent(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// ListParentPermissions operation middleware
func (siw *ServerInterfaceWrapper) ListParentPermissions(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"group:read"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.ListParentPermissions(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// ListGroupUsers operation middleware
func (siw *ServerInterfaceWrapper) ListGroupUsers(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"group:read"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.ListGroupUsers(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// ListLinks operation middleware
func (siw *ServerInterfaceWrapper) ListLinks(w http.ResponseWriter, r *http.Request) {

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:read"})

	r = r.WithContext(ctx)

	// Parameter object where we will unmarshal all parameters from the context
	var params ListLinksParams

	// ------------- Optional query parameter "ticket" -------------

	err = runtime.BindQueryParameter("form", true, false, "ticket", r.URL.Query(), &params.Ticket)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "ticket", Err: err})
		return
	}

	// ------------- Optional query parameter "offset" -------------

	err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), &params.Offset)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err})
		return
	}

	// ------------- Optional query parameter "limit" -------------

	err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), &params.Limit)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
		return
	}

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.ListLinks(w, r, params)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// CreateLink operation middleware
func (siw *ServerInterfaceWrapper) CreateLink(w http.ResponseWriter, r *http.Request) {

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.CreateLink(w, r)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// DeleteLink operation middleware
func (siw *ServerInterfaceWrapper) DeleteLink(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.DeleteLink(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// GetLink operation middleware
func (siw *ServerInterfaceWrapper) GetLink(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:read"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.GetLink(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// UpdateLink operation middleware
func (siw *ServerInterfaceWrapper) UpdateLink(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.UpdateLink(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// ListReactions operation middleware
func (siw *ServerInterfaceWrapper) ListReactions(w http.ResponseWriter, r *http.Request) {

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"reaction:read"})

	r = r.WithContext(ctx)

	// Parameter object where we will unmarshal all parameters from the context
	var params ListReactionsParams

	// ------------- Optional query parameter "offset" -------------

	err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), &params.Offset)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err})
		return
	}

	// ------------- Optional query parameter "limit" -------------

	err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), &params.Limit)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
		return
	}

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.ListReactions(w, r, params)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// CreateReaction operation middleware
func (siw *ServerInterfaceWrapper) CreateReaction(w http.ResponseWriter, r *http.Request) {

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"reaction:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.CreateReaction(w, r)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// DeleteReaction operation middleware
func (siw *ServerInterfaceWrapper) DeleteReaction(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"reaction:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.DeleteReaction(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// GetReaction operation middleware
func (siw *ServerInterfaceWrapper) GetReaction(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"reaction:read"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.GetReaction(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// UpdateReaction operation middleware
func (siw *ServerInterfaceWrapper) UpdateReaction(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"reaction:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.UpdateReaction(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// GetSettings operation middleware
func (siw *ServerInterfaceWrapper) GetSettings(w http.ResponseWriter, r *http.Request) {

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"settings:read"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.GetSettings(w, r)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// UpdateSettings operation middleware
func (siw *ServerInterfaceWrapper) UpdateSettings(w http.ResponseWriter, r *http.Request) {

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"settings:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.UpdateSettings(w, r)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// GetSidebar operation middleware
func (siw *ServerInterfaceWrapper) GetSidebar(w http.ResponseWriter, r *http.Request) {

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:read"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.GetSidebar(w, r)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// ListTasks operation middleware
func (siw *ServerInterfaceWrapper) ListTasks(w http.ResponseWriter, r *http.Request) {

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:read"})

	r = r.WithContext(ctx)

	// Parameter object where we will unmarshal all parameters from the context
	var params ListTasksParams

	// ------------- Optional query parameter "ticket" -------------

	err = runtime.BindQueryParameter("form", true, false, "ticket", r.URL.Query(), &params.Ticket)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "ticket", Err: err})
		return
	}

	// ------------- Optional query parameter "offset" -------------

	err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), &params.Offset)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err})
		return
	}

	// ------------- Optional query parameter "limit" -------------

	err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), &params.Limit)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
		return
	}

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.ListTasks(w, r, params)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// CreateTask operation middleware
func (siw *ServerInterfaceWrapper) CreateTask(w http.ResponseWriter, r *http.Request) {

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.CreateTask(w, r)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// DeleteTask operation middleware
func (siw *ServerInterfaceWrapper) DeleteTask(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.DeleteTask(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// GetTask operation middleware
func (siw *ServerInterfaceWrapper) GetTask(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:read"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.GetTask(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// UpdateTask operation middleware
func (siw *ServerInterfaceWrapper) UpdateTask(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.UpdateTask(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// SearchTickets operation middleware
func (siw *ServerInterfaceWrapper) SearchTickets(w http.ResponseWriter, r *http.Request) {

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:read"})

	r = r.WithContext(ctx)

	// Parameter object where we will unmarshal all parameters from the context
	var params SearchTicketsParams

	// ------------- Optional query parameter "query" -------------

	err = runtime.BindQueryParameter("form", true, false, "query", r.URL.Query(), &params.Query)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "query", Err: err})
		return
	}

	// ------------- Optional query parameter "type" -------------

	err = runtime.BindQueryParameter("form", true, false, "type", r.URL.Query(), &params.Type)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "type", Err: err})
		return
	}

	// ------------- Optional query parameter "open" -------------

	err = runtime.BindQueryParameter("form", true, false, "open", r.URL.Query(), &params.Open)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "open", Err: err})
		return
	}

	// ------------- Optional query parameter "offset" -------------

	err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), &params.Offset)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err})
		return
	}

	// ------------- Optional query parameter "limit" -------------

	err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), &params.Limit)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
		return
	}

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.SearchTickets(w, r, params)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// ListTickets operation middleware
func (siw *ServerInterfaceWrapper) ListTickets(w http.ResponseWriter, r *http.Request) {

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:read"})

	r = r.WithContext(ctx)

	// Parameter object where we will unmarshal all parameters from the context
	var params ListTicketsParams

	// ------------- Optional query parameter "offset" -------------

	err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), &params.Offset)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err})
		return
	}

	// ------------- Optional query parameter "limit" -------------

	err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), &params.Limit)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
		return
	}

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.ListTickets(w, r, params)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// CreateTicket operation middleware
func (siw *ServerInterfaceWrapper) CreateTicket(w http.ResponseWriter, r *http.Request) {

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.CreateTicket(w, r)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// DeleteTicket operation middleware
func (siw *ServerInterfaceWrapper) DeleteTicket(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.DeleteTicket(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// GetTicket operation middleware
func (siw *ServerInterfaceWrapper) GetTicket(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:read"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.GetTicket(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// UpdateTicket operation middleware
func (siw *ServerInterfaceWrapper) UpdateTicket(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.UpdateTicket(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// ListTimeline operation middleware
func (siw *ServerInterfaceWrapper) ListTimeline(w http.ResponseWriter, r *http.Request) {

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:read"})

	r = r.WithContext(ctx)

	// Parameter object where we will unmarshal all parameters from the context
	var params ListTimelineParams

	// ------------- Optional query parameter "ticket" -------------

	err = runtime.BindQueryParameter("form", true, false, "ticket", r.URL.Query(), &params.Ticket)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "ticket", Err: err})
		return
	}

	// ------------- Optional query parameter "offset" -------------

	err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), &params.Offset)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err})
		return
	}

	// ------------- Optional query parameter "limit" -------------

	err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), &params.Limit)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
		return
	}

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.ListTimeline(w, r, params)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// CreateTimeline operation middleware
func (siw *ServerInterfaceWrapper) CreateTimeline(w http.ResponseWriter, r *http.Request) {

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.CreateTimeline(w, r)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// DeleteTimeline operation middleware
func (siw *ServerInterfaceWrapper) DeleteTimeline(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.DeleteTimeline(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// GetTimeline operation middleware
func (siw *ServerInterfaceWrapper) GetTimeline(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:read"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.GetTimeline(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// UpdateTimeline operation middleware
func (siw *ServerInterfaceWrapper) UpdateTimeline(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"ticket:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.UpdateTimeline(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// ListTypes operation middleware
func (siw *ServerInterfaceWrapper) ListTypes(w http.ResponseWriter, r *http.Request) {

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"type:read"})

	r = r.WithContext(ctx)

	// Parameter object where we will unmarshal all parameters from the context
	var params ListTypesParams

	// ------------- Optional query parameter "offset" -------------

	err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), &params.Offset)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err})
		return
	}

	// ------------- Optional query parameter "limit" -------------

	err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), &params.Limit)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
		return
	}

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.ListTypes(w, r, params)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// CreateType operation middleware
func (siw *ServerInterfaceWrapper) CreateType(w http.ResponseWriter, r *http.Request) {

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"type:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.CreateType(w, r)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// DeleteType operation middleware
func (siw *ServerInterfaceWrapper) DeleteType(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"type:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.DeleteType(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// GetType operation middleware
func (siw *ServerInterfaceWrapper) GetType(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"type:read"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.GetType(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// UpdateType operation middleware
func (siw *ServerInterfaceWrapper) UpdateType(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"type:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.UpdateType(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// ListUsers operation middleware
func (siw *ServerInterfaceWrapper) ListUsers(w http.ResponseWriter, r *http.Request) {

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"user:read"})

	r = r.WithContext(ctx)

	// Parameter object where we will unmarshal all parameters from the context
	var params ListUsersParams

	// ------------- Optional query parameter "offset" -------------

	err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), &params.Offset)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err})
		return
	}

	// ------------- Optional query parameter "limit" -------------

	err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), &params.Limit)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
		return
	}

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.ListUsers(w, r, params)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// CreateUser operation middleware
func (siw *ServerInterfaceWrapper) CreateUser(w http.ResponseWriter, r *http.Request) {

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"user:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.CreateUser(w, r)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// DeleteUser operation middleware
func (siw *ServerInterfaceWrapper) DeleteUser(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"user:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.DeleteUser(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// GetUser operation middleware
func (siw *ServerInterfaceWrapper) GetUser(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"user:read"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.GetUser(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// UpdateUser operation middleware
func (siw *ServerInterfaceWrapper) UpdateUser(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"user:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.UpdateUser(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// ListUserGroups operation middleware
func (siw *ServerInterfaceWrapper) ListUserGroups(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"user:read"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.ListUserGroups(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// AddUserGroup operation middleware
func (siw *ServerInterfaceWrapper) AddUserGroup(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"user:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.AddUserGroup(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// RemoveUserGroup operation middleware
func (siw *ServerInterfaceWrapper) RemoveUserGroup(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	// ------------- Path parameter "groupId" -------------
	var groupId string

	err = runtime.BindStyledParameterWithOptions("simple", "groupId", chi.URLParam(r, "groupId"), &groupId, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "groupId", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"user:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.RemoveUserGroup(w, r, id, groupId)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// ListUserPermissions operation middleware
func (siw *ServerInterfaceWrapper) ListUserPermissions(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"user:read"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.ListUserPermissions(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// ListWebhooks operation middleware
func (siw *ServerInterfaceWrapper) ListWebhooks(w http.ResponseWriter, r *http.Request) {

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"webhook:read"})

	r = r.WithContext(ctx)

	// Parameter object where we will unmarshal all parameters from the context
	var params ListWebhooksParams

	// ------------- Optional query parameter "offset" -------------

	err = runtime.BindQueryParameter("form", true, false, "offset", r.URL.Query(), &params.Offset)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "offset", Err: err})
		return
	}

	// ------------- Optional query parameter "limit" -------------

	err = runtime.BindQueryParameter("form", true, false, "limit", r.URL.Query(), &params.Limit)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "limit", Err: err})
		return
	}

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.ListWebhooks(w, r, params)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// CreateWebhook operation middleware
func (siw *ServerInterfaceWrapper) CreateWebhook(w http.ResponseWriter, r *http.Request) {

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"webhook:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.CreateWebhook(w, r)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// DeleteWebhook operation middleware
func (siw *ServerInterfaceWrapper) DeleteWebhook(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"webhook:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.DeleteWebhook(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// GetWebhook operation middleware
func (siw *ServerInterfaceWrapper) GetWebhook(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"webhook:read"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.GetWebhook(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

// UpdateWebhook operation middleware
func (siw *ServerInterfaceWrapper) UpdateWebhook(w http.ResponseWriter, r *http.Request) {

	var err error

	// ------------- Path parameter "id" -------------
	var id string

	err = runtime.BindStyledParameterWithOptions("simple", "id", chi.URLParam(r, "id"), &id, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationPath, Explode: false, Required: true})
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "id", Err: err})
		return
	}

	ctx := r.Context()

	ctx = context.WithValue(ctx, OAuth2Scopes, []string{"webhook:write"})

	r = r.WithContext(ctx)

	handler := http.Handler(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		siw.Handler.UpdateWebhook(w, r, id)
	}))

	for _, middleware := range siw.HandlerMiddlewares {
		handler = middleware(handler)
	}

	handler.ServeHTTP(w, r)
}

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (e *UnescapedCookieParamError) Error() string {
	return fmt.Sprintf("error unescaping cookie parameter '%s'", e.ParamName)
}

func (e *UnescapedCookieParamError) Unwrap() error {
	return e.Err
}

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (e *UnmarshalingParamError) Error() string {
	return fmt.Sprintf("Error unmarshaling parameter %s as JSON: %s", e.ParamName, e.Err.Error())
}

func (e *UnmarshalingParamError) Unwrap() error {
	return e.Err
}

type RequiredParamError struct {
	ParamName string
}

func (e *RequiredParamError) Error() string {
	return fmt.Sprintf("Query argument %s is required, but not found", e.ParamName)
}

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (e *RequiredHeaderError) Error() string {
	return fmt.Sprintf("Header parameter %s is required, but not found", e.ParamName)
}

func (e *RequiredHeaderError) Unwrap() error {
	return e.Err
}

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (e *InvalidParamFormatError) Error() string {
	return fmt.Sprintf("Invalid format for parameter %s: %s", e.ParamName, e.Err.Error())
}

func (e *InvalidParamFormatError) Unwrap() error {
	return e.Err
}

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (e *TooManyValuesForParamError) Error() string {
	return fmt.Sprintf("Expected one value for %s, got %d", e.ParamName, e.Count)
}

// Handler creates http.Handler with routing matching OpenAPI spec.
func Handler(si ServerInterface) http.Handler {
	return HandlerWithOptions(si, ChiServerOptions{})
}

type ChiServerOptions struct {
	BaseURL          string
	BaseRouter       chi.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

// HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler {
	return HandlerWithOptions(si, ChiServerOptions{
		BaseRouter: r,
	})
}

func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler {
	return HandlerWithOptions(si, ChiServerOptions{
		BaseURL:    baseURL,
		BaseRouter: r,
	})
}

// HandlerWithOptions creates http.Handler with additional options
func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler {
	r := options.BaseRouter

	if r == nil {
		r = chi.NewRouter()
	}
	if options.ErrorHandlerFunc == nil {
		options.ErrorHandlerFunc = func(w http.ResponseWriter, r *http.Request, err error) {
			http.Error(w, err.Error(), http.StatusBadRequest)
		}
	}
	wrapper := ServerInterfaceWrapper{
		Handler:            si,
		HandlerMiddlewares: options.Middlewares,
		ErrorHandlerFunc:   options.ErrorHandlerFunc,
	}

	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/comments", wrapper.ListComments)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/comments", wrapper.CreateComment)
	})
	r.Group(func(r chi.Router) {
		r.Delete(options.BaseURL+"/comments/{id}", wrapper.DeleteComment)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/comments/{id}", wrapper.GetComment)
	})
	r.Group(func(r chi.Router) {
		r.Patch(options.BaseURL+"/comments/{id}", wrapper.UpdateComment)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/config", wrapper.GetConfig)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/dashboard_counts", wrapper.GetDashboardCounts)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/files", wrapper.ListFiles)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/files", wrapper.CreateFile)
	})
	r.Group(func(r chi.Router) {
		r.Delete(options.BaseURL+"/files/{id}", wrapper.DeleteFile)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/files/{id}", wrapper.GetFile)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/files/{id}/download", wrapper.DownloadFile)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/groups", wrapper.ListGroups)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/groups", wrapper.CreateGroup)
	})
	r.Group(func(r chi.Router) {
		r.Delete(options.BaseURL+"/groups/{id}", wrapper.DeleteGroup)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/groups/{id}", wrapper.GetGroup)
	})
	r.Group(func(r chi.Router) {
		r.Patch(options.BaseURL+"/groups/{id}", wrapper.UpdateGroup)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/groups/{id}/children", wrapper.ListChildGroups)
	})
	r.Group(func(r chi.Router) {
		r.Delete(options.BaseURL+"/groups/{id}/groups/{parentGroupId}", wrapper.RemoveGroupParent)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/groups/{id}/parents", wrapper.ListParentGroups)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/groups/{id}/parents", wrapper.AddGroupParent)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/groups/{id}/permissions", wrapper.ListParentPermissions)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/groups/{id}/users", wrapper.ListGroupUsers)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/links", wrapper.ListLinks)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/links", wrapper.CreateLink)
	})
	r.Group(func(r chi.Router) {
		r.Delete(options.BaseURL+"/links/{id}", wrapper.DeleteLink)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/links/{id}", wrapper.GetLink)
	})
	r.Group(func(r chi.Router) {
		r.Patch(options.BaseURL+"/links/{id}", wrapper.UpdateLink)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/reactions", wrapper.ListReactions)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/reactions", wrapper.CreateReaction)
	})
	r.Group(func(r chi.Router) {
		r.Delete(options.BaseURL+"/reactions/{id}", wrapper.DeleteReaction)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/reactions/{id}", wrapper.GetReaction)
	})
	r.Group(func(r chi.Router) {
		r.Patch(options.BaseURL+"/reactions/{id}", wrapper.UpdateReaction)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/settings", wrapper.GetSettings)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/settings", wrapper.UpdateSettings)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/sidebar", wrapper.GetSidebar)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/tasks", wrapper.ListTasks)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/tasks", wrapper.CreateTask)
	})
	r.Group(func(r chi.Router) {
		r.Delete(options.BaseURL+"/tasks/{id}", wrapper.DeleteTask)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/tasks/{id}", wrapper.GetTask)
	})
	r.Group(func(r chi.Router) {
		r.Patch(options.BaseURL+"/tasks/{id}", wrapper.UpdateTask)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/ticket_search", wrapper.SearchTickets)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/tickets", wrapper.ListTickets)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/tickets", wrapper.CreateTicket)
	})
	r.Group(func(r chi.Router) {
		r.Delete(options.BaseURL+"/tickets/{id}", wrapper.DeleteTicket)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/tickets/{id}", wrapper.GetTicket)
	})
	r.Group(func(r chi.Router) {
		r.Patch(options.BaseURL+"/tickets/{id}", wrapper.UpdateTicket)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/timeline", wrapper.ListTimeline)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/timeline", wrapper.CreateTimeline)
	})
	r.Group(func(r chi.Router) {
		r.Delete(options.BaseURL+"/timeline/{id}", wrapper.DeleteTimeline)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/timeline/{id}", wrapper.GetTimeline)
	})
	r.Group(func(r chi.Router) {
		r.Patch(options.BaseURL+"/timeline/{id}", wrapper.UpdateTimeline)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/types", wrapper.ListTypes)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/types", wrapper.CreateType)
	})
	r.Group(func(r chi.Router) {
		r.Delete(options.BaseURL+"/types/{id}", wrapper.DeleteType)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/types/{id}", wrapper.GetType)
	})
	r.Group(func(r chi.Router) {
		r.Patch(options.BaseURL+"/types/{id}", wrapper.UpdateType)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/users", wrapper.ListUsers)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/users", wrapper.CreateUser)
	})
	r.Group(func(r chi.Router) {
		r.Delete(options.BaseURL+"/users/{id}", wrapper.DeleteUser)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/users/{id}", wrapper.GetUser)
	})
	r.Group(func(r chi.Router) {
		r.Patch(options.BaseURL+"/users/{id}", wrapper.UpdateUser)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/users/{id}/groups", wrapper.ListUserGroups)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/users/{id}/groups", wrapper.AddUserGroup)
	})
	r.Group(func(r chi.Router) {
		r.Delete(options.BaseURL+"/users/{id}/groups/{groupId}", wrapper.RemoveUserGroup)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/users/{id}/permissions", wrapper.ListUserPermissions)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/webhooks", wrapper.ListWebhooks)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/webhooks", wrapper.CreateWebhook)
	})
	r.Group(func(r chi.Router) {
		r.Delete(options.BaseURL+"/webhooks/{id}", wrapper.DeleteWebhook)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/webhooks/{id}", wrapper.GetWebhook)
	})
	r.Group(func(r chi.Router) {
		r.Patch(options.BaseURL+"/webhooks/{id}", wrapper.UpdateWebhook)
	})

	return r
}

type ListCommentsRequestObject struct {
	Params ListCommentsParams
}

type ListCommentsResponseObject interface {
	VisitListCommentsResponse(w http.ResponseWriter) error
}

type ListComments200ResponseHeaders struct {
	XTotalCount int
}

type ListComments200JSONResponse struct {
	Body    []ExtendedComment
	Headers ListComments200ResponseHeaders
}

func (response ListComments200JSONResponse) VisitListCommentsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.Header().Set("X-Total-Count", fmt.Sprint(response.Headers.XTotalCount))
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response.Body)
}

type CreateCommentRequestObject struct {
	Body *CreateCommentJSONRequestBody
}

type CreateCommentResponseObject interface {
	VisitCreateCommentResponse(w http.ResponseWriter) error
}

type CreateComment200JSONResponse Comment

func (response CreateComment200JSONResponse) VisitCreateCommentResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type DeleteCommentRequestObject struct {
	Id string `json:"id"`
}

type DeleteCommentResponseObject interface {
	VisitDeleteCommentResponse(w http.ResponseWriter) error
}

type DeleteComment204Response struct {
}

func (response DeleteComment204Response) VisitDeleteCommentResponse(w http.ResponseWriter) error {
	w.WriteHeader(204)
	return nil
}

type GetCommentRequestObject struct {
	Id string `json:"id"`
}

type GetCommentResponseObject interface {
	VisitGetCommentResponse(w http.ResponseWriter) error
}

type GetComment200JSONResponse ExtendedComment

func (response GetComment200JSONResponse) VisitGetCommentResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type UpdateCommentRequestObject struct {
	Id   string `json:"id"`
	Body *UpdateCommentJSONRequestBody
}

type UpdateCommentResponseObject interface {
	VisitUpdateCommentResponse(w http.ResponseWriter) error
}

type UpdateComment200JSONResponse Comment

func (response UpdateComment200JSONResponse) VisitUpdateCommentResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type GetConfigRequestObject struct {
}

type GetConfigResponseObject interface {
	VisitGetConfigResponse(w http.ResponseWriter) error
}

type GetConfig200JSONResponse Config

func (response GetConfig200JSONResponse) VisitGetConfigResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type GetDashboardCountsRequestObject struct {
}

type GetDashboardCountsResponseObject interface {
	VisitGetDashboardCountsResponse(w http.ResponseWriter) error
}

type GetDashboardCounts200JSONResponse []DashboardCounts

func (response GetDashboardCounts200JSONResponse) VisitGetDashboardCountsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type ListFilesRequestObject struct {
	Params ListFilesParams
}

type ListFilesResponseObject interface {
	VisitListFilesResponse(w http.ResponseWriter) error
}

type ListFiles200ResponseHeaders struct {
	XTotalCount int
}

type ListFiles200JSONResponse struct {
	Body    []File
	Headers ListFiles200ResponseHeaders
}

func (response ListFiles200JSONResponse) VisitListFilesResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.Header().Set("X-Total-Count", fmt.Sprint(response.Headers.XTotalCount))
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response.Body)
}

type CreateFileRequestObject struct {
	Body *CreateFileJSONRequestBody
}

type CreateFileResponseObject interface {
	VisitCreateFileResponse(w http.ResponseWriter) error
}

type CreateFile200JSONResponse File

func (response CreateFile200JSONResponse) VisitCreateFileResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type DeleteFileRequestObject struct {
	Id string `json:"id"`
}

type DeleteFileResponseObject interface {
	VisitDeleteFileResponse(w http.ResponseWriter) error
}

type DeleteFile204Response struct {
}

func (response DeleteFile204Response) VisitDeleteFileResponse(w http.ResponseWriter) error {
	w.WriteHeader(204)
	return nil
}

type GetFileRequestObject struct {
	Id string `json:"id"`
}

type GetFileResponseObject interface {
	VisitGetFileResponse(w http.ResponseWriter) error
}

type GetFile200JSONResponse File

func (response GetFile200JSONResponse) VisitGetFileResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type DownloadFileRequestObject struct {
	Id string `json:"id"`
}

type DownloadFileResponseObject interface {
	VisitDownloadFileResponse(w http.ResponseWriter) error
}

type DownloadFile200ResponseHeaders struct {
	ContentDisposition string
	ContentType        string
}

type DownloadFile200ApplicationoctetStreamResponse struct {
	Body          io.Reader
	Headers       DownloadFile200ResponseHeaders
	ContentLength int64
}

func (response DownloadFile200ApplicationoctetStreamResponse) VisitDownloadFileResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/octet-stream")
	if response.ContentLength != 0 {
		w.Header().Set("Content-Length", fmt.Sprint(response.ContentLength))
	}
	w.Header().Set("Content-Disposition", fmt.Sprint(response.Headers.ContentDisposition))
	w.Header().Set("Content-Type", fmt.Sprint(response.Headers.ContentType))
	w.WriteHeader(200)

	if closer, ok := response.Body.(io.ReadCloser); ok {
		defer closer.Close()
	}
	_, err := io.Copy(w, response.Body)
	return err
}

type ListGroupsRequestObject struct {
	Params ListGroupsParams
}

type ListGroupsResponseObject interface {
	VisitListGroupsResponse(w http.ResponseWriter) error
}

type ListGroups200ResponseHeaders struct {
	XTotalCount int
}

type ListGroups200JSONResponse struct {
	Body    []Group
	Headers ListGroups200ResponseHeaders
}

func (response ListGroups200JSONResponse) VisitListGroupsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.Header().Set("X-Total-Count", fmt.Sprint(response.Headers.XTotalCount))
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response.Body)
}

type CreateGroupRequestObject struct {
	Body *CreateGroupJSONRequestBody
}

type CreateGroupResponseObject interface {
	VisitCreateGroupResponse(w http.ResponseWriter) error
}

type CreateGroup200JSONResponse Group

func (response CreateGroup200JSONResponse) VisitCreateGroupResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type DeleteGroupRequestObject struct {
	Id string `json:"id"`
}

type DeleteGroupResponseObject interface {
	VisitDeleteGroupResponse(w http.ResponseWriter) error
}

type DeleteGroup204Response struct {
}

func (response DeleteGroup204Response) VisitDeleteGroupResponse(w http.ResponseWriter) error {
	w.WriteHeader(204)
	return nil
}

type GetGroupRequestObject struct {
	Id string `json:"id"`
}

type GetGroupResponseObject interface {
	VisitGetGroupResponse(w http.ResponseWriter) error
}

type GetGroup200JSONResponse Group

func (response GetGroup200JSONResponse) VisitGetGroupResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type UpdateGroupRequestObject struct {
	Id   string `json:"id"`
	Body *UpdateGroupJSONRequestBody
}

type UpdateGroupResponseObject interface {
	VisitUpdateGroupResponse(w http.ResponseWriter) error
}

type UpdateGroup200JSONResponse Group

func (response UpdateGroup200JSONResponse) VisitUpdateGroupResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type ListChildGroupsRequestObject struct {
	Id string `json:"id"`
}

type ListChildGroupsResponseObject interface {
	VisitListChildGroupsResponse(w http.ResponseWriter) error
}

type ListChildGroups200JSONResponse []UserGroup

func (response ListChildGroups200JSONResponse) VisitListChildGroupsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type RemoveGroupParentRequestObject struct {
	Id            string `json:"id"`
	ParentGroupId string `json:"parentGroupId"`
}

type RemoveGroupParentResponseObject interface {
	VisitRemoveGroupParentResponse(w http.ResponseWriter) error
}

type RemoveGroupParent204Response struct {
}

func (response RemoveGroupParent204Response) VisitRemoveGroupParentResponse(w http.ResponseWriter) error {
	w.WriteHeader(204)
	return nil
}

type ListParentGroupsRequestObject struct {
	Id string `json:"id"`
}

type ListParentGroupsResponseObject interface {
	VisitListParentGroupsResponse(w http.ResponseWriter) error
}

type ListParentGroups200JSONResponse []UserGroup

func (response ListParentGroups200JSONResponse) VisitListParentGroupsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type AddGroupParentRequestObject struct {
	Id   string `json:"id"`
	Body *AddGroupParentJSONRequestBody
}

type AddGroupParentResponseObject interface {
	VisitAddGroupParentResponse(w http.ResponseWriter) error
}

type AddGroupParent201Response struct {
}

func (response AddGroupParent201Response) VisitAddGroupParentResponse(w http.ResponseWriter) error {
	w.WriteHeader(201)
	return nil
}

type ListParentPermissionsRequestObject struct {
	Id string `json:"id"`
}

type ListParentPermissionsResponseObject interface {
	VisitListParentPermissionsResponse(w http.ResponseWriter) error
}

type ListParentPermissions200JSONResponse []string

func (response ListParentPermissions200JSONResponse) VisitListParentPermissionsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type ListGroupUsersRequestObject struct {
	Id string `json:"id"`
}

type ListGroupUsersResponseObject interface {
	VisitListGroupUsersResponse(w http.ResponseWriter) error
}

type ListGroupUsers200JSONResponse []GroupUser

func (response ListGroupUsers200JSONResponse) VisitListGroupUsersResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type ListLinksRequestObject struct {
	Params ListLinksParams
}

type ListLinksResponseObject interface {
	VisitListLinksResponse(w http.ResponseWriter) error
}

type ListLinks200ResponseHeaders struct {
	XTotalCount int
}

type ListLinks200JSONResponse struct {
	Body    []Link
	Headers ListLinks200ResponseHeaders
}

func (response ListLinks200JSONResponse) VisitListLinksResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.Header().Set("X-Total-Count", fmt.Sprint(response.Headers.XTotalCount))
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response.Body)
}

type CreateLinkRequestObject struct {
	Body *CreateLinkJSONRequestBody
}

type CreateLinkResponseObject interface {
	VisitCreateLinkResponse(w http.ResponseWriter) error
}

type CreateLink200JSONResponse Link

func (response CreateLink200JSONResponse) VisitCreateLinkResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type DeleteLinkRequestObject struct {
	Id string `json:"id"`
}

type DeleteLinkResponseObject interface {
	VisitDeleteLinkResponse(w http.ResponseWriter) error
}

type DeleteLink204Response struct {
}

func (response DeleteLink204Response) VisitDeleteLinkResponse(w http.ResponseWriter) error {
	w.WriteHeader(204)
	return nil
}

type GetLinkRequestObject struct {
	Id string `json:"id"`
}

type GetLinkResponseObject interface {
	VisitGetLinkResponse(w http.ResponseWriter) error
}

type GetLink200JSONResponse Link

func (response GetLink200JSONResponse) VisitGetLinkResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type UpdateLinkRequestObject struct {
	Id   string `json:"id"`
	Body *UpdateLinkJSONRequestBody
}

type UpdateLinkResponseObject interface {
	VisitUpdateLinkResponse(w http.ResponseWriter) error
}

type UpdateLink200JSONResponse Link

func (response UpdateLink200JSONResponse) VisitUpdateLinkResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type ListReactionsRequestObject struct {
	Params ListReactionsParams
}

type ListReactionsResponseObject interface {
	VisitListReactionsResponse(w http.ResponseWriter) error
}

type ListReactions200ResponseHeaders struct {
	XTotalCount int
}

type ListReactions200JSONResponse struct {
	Body    []Reaction
	Headers ListReactions200ResponseHeaders
}

func (response ListReactions200JSONResponse) VisitListReactionsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.Header().Set("X-Total-Count", fmt.Sprint(response.Headers.XTotalCount))
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response.Body)
}

type CreateReactionRequestObject struct {
	Body *CreateReactionJSONRequestBody
}

type CreateReactionResponseObject interface {
	VisitCreateReactionResponse(w http.ResponseWriter) error
}

type CreateReaction200JSONResponse Reaction

func (response CreateReaction200JSONResponse) VisitCreateReactionResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type DeleteReactionRequestObject struct {
	Id string `json:"id"`
}

type DeleteReactionResponseObject interface {
	VisitDeleteReactionResponse(w http.ResponseWriter) error
}

type DeleteReaction204Response struct {
}

func (response DeleteReaction204Response) VisitDeleteReactionResponse(w http.ResponseWriter) error {
	w.WriteHeader(204)
	return nil
}

type GetReactionRequestObject struct {
	Id string `json:"id"`
}

type GetReactionResponseObject interface {
	VisitGetReactionResponse(w http.ResponseWriter) error
}

type GetReaction200JSONResponse Reaction

func (response GetReaction200JSONResponse) VisitGetReactionResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type UpdateReactionRequestObject struct {
	Id   string `json:"id"`
	Body *UpdateReactionJSONRequestBody
}

type UpdateReactionResponseObject interface {
	VisitUpdateReactionResponse(w http.ResponseWriter) error
}

type UpdateReaction200JSONResponse Reaction

func (response UpdateReaction200JSONResponse) VisitUpdateReactionResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type GetSettingsRequestObject struct {
}

type GetSettingsResponseObject interface {
	VisitGetSettingsResponse(w http.ResponseWriter) error
}

type GetSettings200JSONResponse Settings

func (response GetSettings200JSONResponse) VisitGetSettingsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type UpdateSettingsRequestObject struct {
	Body *UpdateSettingsJSONRequestBody
}

type UpdateSettingsResponseObject interface {
	VisitUpdateSettingsResponse(w http.ResponseWriter) error
}

type UpdateSettings200JSONResponse Settings

func (response UpdateSettings200JSONResponse) VisitUpdateSettingsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type GetSidebarRequestObject struct {
}

type GetSidebarResponseObject interface {
	VisitGetSidebarResponse(w http.ResponseWriter) error
}

type GetSidebar200JSONResponse []Sidebar

func (response GetSidebar200JSONResponse) VisitGetSidebarResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type ListTasksRequestObject struct {
	Params ListTasksParams
}

type ListTasksResponseObject interface {
	VisitListTasksResponse(w http.ResponseWriter) error
}

type ListTasks200ResponseHeaders struct {
	XTotalCount int
}

type ListTasks200JSONResponse struct {
	Body    []ExtendedTask
	Headers ListTasks200ResponseHeaders
}

func (response ListTasks200JSONResponse) VisitListTasksResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.Header().Set("X-Total-Count", fmt.Sprint(response.Headers.XTotalCount))
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response.Body)
}

type CreateTaskRequestObject struct {
	Body *CreateTaskJSONRequestBody
}

type CreateTaskResponseObject interface {
	VisitCreateTaskResponse(w http.ResponseWriter) error
}

type CreateTask200JSONResponse Task

func (response CreateTask200JSONResponse) VisitCreateTaskResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type DeleteTaskRequestObject struct {
	Id string `json:"id"`
}

type DeleteTaskResponseObject interface {
	VisitDeleteTaskResponse(w http.ResponseWriter) error
}

type DeleteTask204Response struct {
}

func (response DeleteTask204Response) VisitDeleteTaskResponse(w http.ResponseWriter) error {
	w.WriteHeader(204)
	return nil
}

type GetTaskRequestObject struct {
	Id string `json:"id"`
}

type GetTaskResponseObject interface {
	VisitGetTaskResponse(w http.ResponseWriter) error
}

type GetTask200JSONResponse ExtendedTask

func (response GetTask200JSONResponse) VisitGetTaskResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type UpdateTaskRequestObject struct {
	Id   string `json:"id"`
	Body *UpdateTaskJSONRequestBody
}

type UpdateTaskResponseObject interface {
	VisitUpdateTaskResponse(w http.ResponseWriter) error
}

type UpdateTask200JSONResponse Task

func (response UpdateTask200JSONResponse) VisitUpdateTaskResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type SearchTicketsRequestObject struct {
	Params SearchTicketsParams
}

type SearchTicketsResponseObject interface {
	VisitSearchTicketsResponse(w http.ResponseWriter) error
}

type SearchTickets200ResponseHeaders struct {
	XTotalCount int
}

type SearchTickets200JSONResponse struct {
	Body    []TicketSearch
	Headers SearchTickets200ResponseHeaders
}

func (response SearchTickets200JSONResponse) VisitSearchTicketsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.Header().Set("X-Total-Count", fmt.Sprint(response.Headers.XTotalCount))
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response.Body)
}

type ListTicketsRequestObject struct {
	Params ListTicketsParams
}

type ListTicketsResponseObject interface {
	VisitListTicketsResponse(w http.ResponseWriter) error
}

type ListTickets200ResponseHeaders struct {
	XTotalCount int
}

type ListTickets200JSONResponse struct {
	Body    []ExtendedTicket
	Headers ListTickets200ResponseHeaders
}

func (response ListTickets200JSONResponse) VisitListTicketsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.Header().Set("X-Total-Count", fmt.Sprint(response.Headers.XTotalCount))
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response.Body)
}

type CreateTicketRequestObject struct {
	Body *CreateTicketJSONRequestBody
}

type CreateTicketResponseObject interface {
	VisitCreateTicketResponse(w http.ResponseWriter) error
}

type CreateTicket200JSONResponse Ticket

func (response CreateTicket200JSONResponse) VisitCreateTicketResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type DeleteTicketRequestObject struct {
	Id string `json:"id"`
}

type DeleteTicketResponseObject interface {
	VisitDeleteTicketResponse(w http.ResponseWriter) error
}

type DeleteTicket204Response struct {
}

func (response DeleteTicket204Response) VisitDeleteTicketResponse(w http.ResponseWriter) error {
	w.WriteHeader(204)
	return nil
}

type GetTicketRequestObject struct {
	Id string `json:"id"`
}

type GetTicketResponseObject interface {
	VisitGetTicketResponse(w http.ResponseWriter) error
}

type GetTicket200JSONResponse ExtendedTicket

func (response GetTicket200JSONResponse) VisitGetTicketResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type UpdateTicketRequestObject struct {
	Id   string `json:"id"`
	Body *UpdateTicketJSONRequestBody
}

type UpdateTicketResponseObject interface {
	VisitUpdateTicketResponse(w http.ResponseWriter) error
}

type UpdateTicket200JSONResponse Ticket

func (response UpdateTicket200JSONResponse) VisitUpdateTicketResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type ListTimelineRequestObject struct {
	Params ListTimelineParams
}

type ListTimelineResponseObject interface {
	VisitListTimelineResponse(w http.ResponseWriter) error
}

type ListTimeline200ResponseHeaders struct {
	XTotalCount int
}

type ListTimeline200JSONResponse struct {
	Body    []TimelineEntry
	Headers ListTimeline200ResponseHeaders
}

func (response ListTimeline200JSONResponse) VisitListTimelineResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.Header().Set("X-Total-Count", fmt.Sprint(response.Headers.XTotalCount))
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response.Body)
}

type CreateTimelineRequestObject struct {
	Body *CreateTimelineJSONRequestBody
}

type CreateTimelineResponseObject interface {
	VisitCreateTimelineResponse(w http.ResponseWriter) error
}

type CreateTimeline200JSONResponse TimelineEntry

func (response CreateTimeline200JSONResponse) VisitCreateTimelineResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type DeleteTimelineRequestObject struct {
	Id string `json:"id"`
}

type DeleteTimelineResponseObject interface {
	VisitDeleteTimelineResponse(w http.ResponseWriter) error
}

type DeleteTimeline204Response struct {
}

func (response DeleteTimeline204Response) VisitDeleteTimelineResponse(w http.ResponseWriter) error {
	w.WriteHeader(204)
	return nil
}

type GetTimelineRequestObject struct {
	Id string `json:"id"`
}

type GetTimelineResponseObject interface {
	VisitGetTimelineResponse(w http.ResponseWriter) error
}

type GetTimeline200JSONResponse TimelineEntry

func (response GetTimeline200JSONResponse) VisitGetTimelineResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type UpdateTimelineRequestObject struct {
	Id   string `json:"id"`
	Body *UpdateTimelineJSONRequestBody
}

type UpdateTimelineResponseObject interface {
	VisitUpdateTimelineResponse(w http.ResponseWriter) error
}

type UpdateTimeline200JSONResponse TimelineEntry

func (response UpdateTimeline200JSONResponse) VisitUpdateTimelineResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type ListTypesRequestObject struct {
	Params ListTypesParams
}

type ListTypesResponseObject interface {
	VisitListTypesResponse(w http.ResponseWriter) error
}

type ListTypes200ResponseHeaders struct {
	XTotalCount int
}

type ListTypes200JSONResponse struct {
	Body    []Type
	Headers ListTypes200ResponseHeaders
}

func (response ListTypes200JSONResponse) VisitListTypesResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.Header().Set("X-Total-Count", fmt.Sprint(response.Headers.XTotalCount))
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response.Body)
}

type CreateTypeRequestObject struct {
	Body *CreateTypeJSONRequestBody
}

type CreateTypeResponseObject interface {
	VisitCreateTypeResponse(w http.ResponseWriter) error
}

type CreateType200JSONResponse Type

func (response CreateType200JSONResponse) VisitCreateTypeResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type DeleteTypeRequestObject struct {
	Id string `json:"id"`
}

type DeleteTypeResponseObject interface {
	VisitDeleteTypeResponse(w http.ResponseWriter) error
}

type DeleteType204Response struct {
}

func (response DeleteType204Response) VisitDeleteTypeResponse(w http.ResponseWriter) error {
	w.WriteHeader(204)
	return nil
}

type GetTypeRequestObject struct {
	Id string `json:"id"`
}

type GetTypeResponseObject interface {
	VisitGetTypeResponse(w http.ResponseWriter) error
}

type GetType200JSONResponse Type

func (response GetType200JSONResponse) VisitGetTypeResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type UpdateTypeRequestObject struct {
	Id   string `json:"id"`
	Body *UpdateTypeJSONRequestBody
}

type UpdateTypeResponseObject interface {
	VisitUpdateTypeResponse(w http.ResponseWriter) error
}

type UpdateType200JSONResponse Type

func (response UpdateType200JSONResponse) VisitUpdateTypeResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type ListUsersRequestObject struct {
	Params ListUsersParams
}

type ListUsersResponseObject interface {
	VisitListUsersResponse(w http.ResponseWriter) error
}

type ListUsers200ResponseHeaders struct {
	XTotalCount int
}

type ListUsers200JSONResponse struct {
	Body    []User
	Headers ListUsers200ResponseHeaders
}

func (response ListUsers200JSONResponse) VisitListUsersResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.Header().Set("X-Total-Count", fmt.Sprint(response.Headers.XTotalCount))
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response.Body)
}

type CreateUserRequestObject struct {
	Body *CreateUserJSONRequestBody
}

type CreateUserResponseObject interface {
	VisitCreateUserResponse(w http.ResponseWriter) error
}

type CreateUser200JSONResponse User

func (response CreateUser200JSONResponse) VisitCreateUserResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type DeleteUserRequestObject struct {
	Id string `json:"id"`
}

type DeleteUserResponseObject interface {
	VisitDeleteUserResponse(w http.ResponseWriter) error
}

type DeleteUser204Response struct {
}

func (response DeleteUser204Response) VisitDeleteUserResponse(w http.ResponseWriter) error {
	w.WriteHeader(204)
	return nil
}

type GetUserRequestObject struct {
	Id string `json:"id"`
}

type GetUserResponseObject interface {
	VisitGetUserResponse(w http.ResponseWriter) error
}

type GetUser200JSONResponse User

func (response GetUser200JSONResponse) VisitGetUserResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type UpdateUserRequestObject struct {
	Id   string `json:"id"`
	Body *UpdateUserJSONRequestBody
}

type UpdateUserResponseObject interface {
	VisitUpdateUserResponse(w http.ResponseWriter) error
}

type UpdateUser200JSONResponse User

func (response UpdateUser200JSONResponse) VisitUpdateUserResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type ListUserGroupsRequestObject struct {
	Id string `json:"id"`
}

type ListUserGroupsResponseObject interface {
	VisitListUserGroupsResponse(w http.ResponseWriter) error
}

type ListUserGroups200JSONResponse []UserGroup

func (response ListUserGroups200JSONResponse) VisitListUserGroupsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type AddUserGroupRequestObject struct {
	Id   string `json:"id"`
	Body *AddUserGroupJSONRequestBody
}

type AddUserGroupResponseObject interface {
	VisitAddUserGroupResponse(w http.ResponseWriter) error
}

type AddUserGroup201Response struct {
}

func (response AddUserGroup201Response) VisitAddUserGroupResponse(w http.ResponseWriter) error {
	w.WriteHeader(201)
	return nil
}

type RemoveUserGroupRequestObject struct {
	Id      string `json:"id"`
	GroupId string `json:"groupId"`
}

type RemoveUserGroupResponseObject interface {
	VisitRemoveUserGroupResponse(w http.ResponseWriter) error
}

type RemoveUserGroup204Response struct {
}

func (response RemoveUserGroup204Response) VisitRemoveUserGroupResponse(w http.ResponseWriter) error {
	w.WriteHeader(204)
	return nil
}

type ListUserPermissionsRequestObject struct {
	Id string `json:"id"`
}

type ListUserPermissionsResponseObject interface {
	VisitListUserPermissionsResponse(w http.ResponseWriter) error
}

type ListUserPermissions200JSONResponse []string

func (response ListUserPermissions200JSONResponse) VisitListUserPermissionsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type ListWebhooksRequestObject struct {
	Params ListWebhooksParams
}

type ListWebhooksResponseObject interface {
	VisitListWebhooksResponse(w http.ResponseWriter) error
}

type ListWebhooks200ResponseHeaders struct {
	XTotalCount int
}

type ListWebhooks200JSONResponse struct {
	Body    []Webhook
	Headers ListWebhooks200ResponseHeaders
}

func (response ListWebhooks200JSONResponse) VisitListWebhooksResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.Header().Set("X-Total-Count", fmt.Sprint(response.Headers.XTotalCount))
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response.Body)
}

type CreateWebhookRequestObject struct {
	Body *CreateWebhookJSONRequestBody
}

type CreateWebhookResponseObject interface {
	VisitCreateWebhookResponse(w http.ResponseWriter) error
}

type CreateWebhook200JSONResponse Webhook

func (response CreateWebhook200JSONResponse) VisitCreateWebhookResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type DeleteWebhookRequestObject struct {
	Id string `json:"id"`
}

type DeleteWebhookResponseObject interface {
	VisitDeleteWebhookResponse(w http.ResponseWriter) error
}

type DeleteWebhook204Response struct {
}

func (response DeleteWebhook204Response) VisitDeleteWebhookResponse(w http.ResponseWriter) error {
	w.WriteHeader(204)
	return nil
}

type GetWebhookRequestObject struct {
	Id string `json:"id"`
}

type GetWebhookResponseObject interface {
	VisitGetWebhookResponse(w http.ResponseWriter) error
}

type GetWebhook200JSONResponse Webhook

func (response GetWebhook200JSONResponse) VisitGetWebhookResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

type UpdateWebhookRequestObject struct {
	Id   string `json:"id"`
	Body *UpdateWebhookJSONRequestBody
}

type UpdateWebhookResponseObject interface {
	VisitUpdateWebhookResponse(w http.ResponseWriter) error
}

type UpdateWebhook200JSONResponse Webhook

func (response UpdateWebhook200JSONResponse) VisitUpdateWebhookResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(200)

	return json.NewEncoder(w).Encode(response)
}

// StrictServerInterface represents all server handlers.
type StrictServerInterface interface {
	// List all comments
	// (GET /comments)
	ListComments(ctx context.Context, request ListCommentsRequestObject) (ListCommentsResponseObject, error)
	// Create a new comment
	// (POST /comments)
	CreateComment(ctx context.Context, request CreateCommentRequestObject) (CreateCommentResponseObject, error)
	// Delete a comment by ID
	// (DELETE /comments/{id})
	DeleteComment(ctx context.Context, request DeleteCommentRequestObject) (DeleteCommentResponseObject, error)
	// Get a single comment by ID
	// (GET /comments/{id})
	GetComment(ctx context.Context, request GetCommentRequestObject) (GetCommentResponseObject, error)
	// Update a comment by ID
	// (PATCH /comments/{id})
	UpdateComment(ctx context.Context, request UpdateCommentRequestObject) (UpdateCommentResponseObject, error)
	// Get the configuration
	// (GET /config)
	GetConfig(ctx context.Context, request GetConfigRequestObject) (GetConfigResponseObject, error)
	// Get dashboard summary counts
	// (GET /dashboard_counts)
	GetDashboardCounts(ctx context.Context, request GetDashboardCountsRequestObject) (GetDashboardCountsResponseObject, error)
	// List all files
	// (GET /files)
	ListFiles(ctx context.Context, request ListFilesRequestObject) (ListFilesResponseObject, error)
	// Create a new file
	// (POST /files)
	CreateFile(ctx context.Context, request CreateFileRequestObject) (CreateFileResponseObject, error)
	// Delete a file by ID
	// (DELETE /files/{id})
	DeleteFile(ctx context.Context, request DeleteFileRequestObject) (DeleteFileResponseObject, error)
	// Get a single file by ID
	// (GET /files/{id})
	GetFile(ctx context.Context, request GetFileRequestObject) (GetFileResponseObject, error)
	// Download a file by ID
	// (GET /files/{id}/download)
	DownloadFile(ctx context.Context, request DownloadFileRequestObject) (DownloadFileResponseObject, error)
	// List all groups
	// (GET /groups)
	ListGroups(ctx context.Context, request ListGroupsRequestObject) (ListGroupsResponseObject, error)
	// Create a new group
	// (POST /groups)
	CreateGroup(ctx context.Context, request CreateGroupRequestObject) (CreateGroupResponseObject, error)
	// Delete a group by ID
	// (DELETE /groups/{id})
	DeleteGroup(ctx context.Context, request DeleteGroupRequestObject) (DeleteGroupResponseObject, error)
	// Get a single group by ID
	// (GET /groups/{id})
	GetGroup(ctx context.Context, request GetGroupRequestObject) (GetGroupResponseObject, error)
	// Update a group by ID
	// (PATCH /groups/{id})
	UpdateGroup(ctx context.Context, request UpdateGroupRequestObject) (UpdateGroupResponseObject, error)
	// List all child groups for a group
	// (GET /groups/{id}/children)
	ListChildGroups(ctx context.Context, request ListChildGroupsRequestObject) (ListChildGroupsResponseObject, error)
	// Remove a parent group from another group
	// (DELETE /groups/{id}/groups/{parentGroupId})
	RemoveGroupParent(ctx context.Context, request RemoveGroupParentRequestObject) (RemoveGroupParentResponseObject, error)
	// List all parent groups for a group
	// (GET /groups/{id}/parents)
	ListParentGroups(ctx context.Context, request ListParentGroupsRequestObject) (ListParentGroupsResponseObject, error)
	// Add a parent group to another group
	// (POST /groups/{id}/parents)
	AddGroupParent(ctx context.Context, request AddGroupParentRequestObject) (AddGroupParentResponseObject, error)
	// List all permissions for a group
	// (GET /groups/{id}/permissions)
	ListParentPermissions(ctx context.Context, request ListParentPermissionsRequestObject) (ListParentPermissionsResponseObject, error)
	// List all users for a group
	// (GET /groups/{id}/users)
	ListGroupUsers(ctx context.Context, request ListGroupUsersRequestObject) (ListGroupUsersResponseObject, error)
	// List all links
	// (GET /links)
	ListLinks(ctx context.Context, request ListLinksRequestObject) (ListLinksResponseObject, error)
	// Create a new link
	// (POST /links)
	CreateLink(ctx context.Context, request CreateLinkRequestObject) (CreateLinkResponseObject, error)
	// Delete a link by ID
	// (DELETE /links/{id})
	DeleteLink(ctx context.Context, request DeleteLinkRequestObject) (DeleteLinkResponseObject, error)
	// Get a single link by ID
	// (GET /links/{id})
	GetLink(ctx context.Context, request GetLinkRequestObject) (GetLinkResponseObject, error)
	// Update a link by ID
	// (PATCH /links/{id})
	UpdateLink(ctx context.Context, request UpdateLinkRequestObject) (UpdateLinkResponseObject, error)
	// List all reactions
	// (GET /reactions)
	ListReactions(ctx context.Context, request ListReactionsRequestObject) (ListReactionsResponseObject, error)
	// Create a new reaction
	// (POST /reactions)
	CreateReaction(ctx context.Context, request CreateReactionRequestObject) (CreateReactionResponseObject, error)
	// Delete a reaction by ID
	// (DELETE /reactions/{id})
	DeleteReaction(ctx context.Context, request DeleteReactionRequestObject) (DeleteReactionResponseObject, error)
	// Get a single reaction by ID
	// (GET /reactions/{id})
	GetReaction(ctx context.Context, request GetReactionRequestObject) (GetReactionResponseObject, error)
	// Update a reaction by ID
	// (PATCH /reactions/{id})
	UpdateReaction(ctx context.Context, request UpdateReactionRequestObject) (UpdateReactionResponseObject, error)
	// Get system settings
	// (GET /settings)
	GetSettings(ctx context.Context, request GetSettingsRequestObject) (GetSettingsResponseObject, error)
	// Update system settings
	// (POST /settings)
	UpdateSettings(ctx context.Context, request UpdateSettingsRequestObject) (UpdateSettingsResponseObject, error)
	// Get sidebar data
	// (GET /sidebar)
	GetSidebar(ctx context.Context, request GetSidebarRequestObject) (GetSidebarResponseObject, error)
	// List all tasks
	// (GET /tasks)
	ListTasks(ctx context.Context, request ListTasksRequestObject) (ListTasksResponseObject, error)
	// Create a new task
	// (POST /tasks)
	CreateTask(ctx context.Context, request CreateTaskRequestObject) (CreateTaskResponseObject, error)
	// Delete a task by ID
	// (DELETE /tasks/{id})
	DeleteTask(ctx context.Context, request DeleteTaskRequestObject) (DeleteTaskResponseObject, error)
	// Get a single task by ID
	// (GET /tasks/{id})
	GetTask(ctx context.Context, request GetTaskRequestObject) (GetTaskResponseObject, error)
	// Update a task by ID
	// (PATCH /tasks/{id})
	UpdateTask(ctx context.Context, request UpdateTaskRequestObject) (UpdateTaskResponseObject, error)
	// Search tickets with full join data
	// (GET /ticket_search)
	SearchTickets(ctx context.Context, request SearchTicketsRequestObject) (SearchTicketsResponseObject, error)
	// List all tickets
	// (GET /tickets)
	ListTickets(ctx context.Context, request ListTicketsRequestObject) (ListTicketsResponseObject, error)
	// Create a new ticket
	// (POST /tickets)
	CreateTicket(ctx context.Context, request CreateTicketRequestObject) (CreateTicketResponseObject, error)
	// Delete a ticket by ID
	// (DELETE /tickets/{id})
	DeleteTicket(ctx context.Context, request DeleteTicketRequestObject) (DeleteTicketResponseObject, error)
	// Get a single ticket by ID
	// (GET /tickets/{id})
	GetTicket(ctx context.Context, request GetTicketRequestObject) (GetTicketResponseObject, error)
	// Update a ticket by ID
	// (PATCH /tickets/{id})
	UpdateTicket(ctx context.Context, request UpdateTicketRequestObject) (UpdateTicketResponseObject, error)
	// List all timeline items
	// (GET /timeline)
	ListTimeline(ctx context.Context, request ListTimelineRequestObject) (ListTimelineResponseObject, error)
	// Create a new timeline item
	// (POST /timeline)
	CreateTimeline(ctx context.Context, request CreateTimelineRequestObject) (CreateTimelineResponseObject, error)
	// Delete a timeline item by ID
	// (DELETE /timeline/{id})
	DeleteTimeline(ctx context.Context, request DeleteTimelineRequestObject) (DeleteTimelineResponseObject, error)
	// Get a single timeline item by ID
	// (GET /timeline/{id})
	GetTimeline(ctx context.Context, request GetTimelineRequestObject) (GetTimelineResponseObject, error)
	// Update a timeline item by ID
	// (PATCH /timeline/{id})
	UpdateTimeline(ctx context.Context, request UpdateTimelineRequestObject) (UpdateTimelineResponseObject, error)
	// List all types
	// (GET /types)
	ListTypes(ctx context.Context, request ListTypesRequestObject) (ListTypesResponseObject, error)
	// Create a new type
	// (POST /types)
	CreateType(ctx context.Context, request CreateTypeRequestObject) (CreateTypeResponseObject, error)
	// Delete a type by ID
	// (DELETE /types/{id})
	DeleteType(ctx context.Context, request DeleteTypeRequestObject) (DeleteTypeResponseObject, error)
	// Get a single type by ID
	// (GET /types/{id})
	GetType(ctx context.Context, request GetTypeRequestObject) (GetTypeResponseObject, error)
	// Update a type by ID
	// (PATCH /types/{id})
	UpdateType(ctx context.Context, request UpdateTypeRequestObject) (UpdateTypeResponseObject, error)
	// List all users
	// (GET /users)
	ListUsers(ctx context.Context, request ListUsersRequestObject) (ListUsersResponseObject, error)
	// Create a new user
	// (POST /users)
	CreateUser(ctx context.Context, request CreateUserRequestObject) (CreateUserResponseObject, error)
	// Delete a user by ID
	// (DELETE /users/{id})
	DeleteUser(ctx context.Context, request DeleteUserRequestObject) (DeleteUserResponseObject, error)
	// Get a single user by ID
	// (GET /users/{id})
	GetUser(ctx context.Context, request GetUserRequestObject) (GetUserResponseObject, error)
	// Update a user by ID
	// (PATCH /users/{id})
	UpdateUser(ctx context.Context, request UpdateUserRequestObject) (UpdateUserResponseObject, error)
	// List all groups for a user
	// (GET /users/{id}/groups)
	ListUserGroups(ctx context.Context, request ListUserGroupsRequestObject) (ListUserGroupsResponseObject, error)
	// Add a group to a user
	// (POST /users/{id}/groups)
	AddUserGroup(ctx context.Context, request AddUserGroupRequestObject) (AddUserGroupResponseObject, error)
	// Remove a group from a user
	// (DELETE /users/{id}/groups/{groupId})
	RemoveUserGroup(ctx context.Context, request RemoveUserGroupRequestObject) (RemoveUserGroupResponseObject, error)
	// List all permissions for a user
	// (GET /users/{id}/permissions)
	ListUserPermissions(ctx context.Context, request ListUserPermissionsRequestObject) (ListUserPermissionsResponseObject, error)
	// List all webhooks
	// (GET /webhooks)
	ListWebhooks(ctx context.Context, request ListWebhooksRequestObject) (ListWebhooksResponseObject, error)
	// Create a new webhook
	// (POST /webhooks)
	CreateWebhook(ctx context.Context, request CreateWebhookRequestObject) (CreateWebhookResponseObject, error)
	// Delete a webhook by ID
	// (DELETE /webhooks/{id})
	DeleteWebhook(ctx context.Context, request DeleteWebhookRequestObject) (DeleteWebhookResponseObject, error)
	// Get a single webhook by ID
	// (GET /webhooks/{id})
	GetWebhook(ctx context.Context, request GetWebhookRequestObject) (GetWebhookResponseObject, error)
	// Update a webhook by ID
	// (PATCH /webhooks/{id})
	UpdateWebhook(ctx context.Context, request UpdateWebhookRequestObject) (UpdateWebhookResponseObject, error)
}

type StrictHandlerFunc = strictnethttp.StrictHTTPHandlerFunc
type StrictMiddlewareFunc = strictnethttp.StrictHTTPMiddlewareFunc

type StrictHTTPServerOptions struct {
	RequestErrorHandlerFunc  func(w http.ResponseWriter, r *http.Request, err error)
	ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface {
	return &strictHandler{ssi: ssi, middlewares: middlewares, options: StrictHTTPServerOptions{
		RequestErrorHandlerFunc: func(w http.ResponseWriter, r *http.Request, err error) {
			http.Error(w, err.Error(), http.StatusBadRequest)
		},
		ResponseErrorHandlerFunc: func(w http.ResponseWriter, r *http.Request, err error) {
			http.Error(w, err.Error(), http.StatusInternalServerError)
		},
	}}
}

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface {
	return &strictHandler{ssi: ssi, middlewares: middlewares, options: options}
}

type strictHandler struct {
	ssi         StrictServerInterface
	middlewares []StrictMiddlewareFunc
	options     StrictHTTPServerOptions
}

// ListComments operation middleware
func (sh *strictHandler) ListComments(w http.ResponseWriter, r *http.Request, params ListCommentsParams) {
	var request ListCommentsRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListComments(ctx, request.(ListCommentsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListComments")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListCommentsResponseObject); ok {
		if err := validResponse.VisitListCommentsResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// CreateComment operation middleware
func (sh *strictHandler) CreateComment(w http.ResponseWriter, r *http.Request) {
	var request CreateCommentRequestObject

	var body CreateCommentJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.CreateComment(ctx, request.(CreateCommentRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "CreateComment")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(CreateCommentResponseObject); ok {
		if err := validResponse.VisitCreateCommentResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// DeleteComment operation middleware
func (sh *strictHandler) DeleteComment(w http.ResponseWriter, r *http.Request, id string) {
	var request DeleteCommentRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.DeleteComment(ctx, request.(DeleteCommentRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "DeleteComment")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(DeleteCommentResponseObject); ok {
		if err := validResponse.VisitDeleteCommentResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// GetComment operation middleware
func (sh *strictHandler) GetComment(w http.ResponseWriter, r *http.Request, id string) {
	var request GetCommentRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetComment(ctx, request.(GetCommentRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetComment")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetCommentResponseObject); ok {
		if err := validResponse.VisitGetCommentResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// UpdateComment operation middleware
func (sh *strictHandler) UpdateComment(w http.ResponseWriter, r *http.Request, id string) {
	var request UpdateCommentRequestObject

	request.Id = id

	var body UpdateCommentJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.UpdateComment(ctx, request.(UpdateCommentRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "UpdateComment")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(UpdateCommentResponseObject); ok {
		if err := validResponse.VisitUpdateCommentResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// GetConfig operation middleware
func (sh *strictHandler) GetConfig(w http.ResponseWriter, r *http.Request) {
	var request GetConfigRequestObject

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetConfig(ctx, request.(GetConfigRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetConfig")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetConfigResponseObject); ok {
		if err := validResponse.VisitGetConfigResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// GetDashboardCounts operation middleware
func (sh *strictHandler) GetDashboardCounts(w http.ResponseWriter, r *http.Request) {
	var request GetDashboardCountsRequestObject

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetDashboardCounts(ctx, request.(GetDashboardCountsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetDashboardCounts")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetDashboardCountsResponseObject); ok {
		if err := validResponse.VisitGetDashboardCountsResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// ListFiles operation middleware
func (sh *strictHandler) ListFiles(w http.ResponseWriter, r *http.Request, params ListFilesParams) {
	var request ListFilesRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListFiles(ctx, request.(ListFilesRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListFiles")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListFilesResponseObject); ok {
		if err := validResponse.VisitListFilesResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// CreateFile operation middleware
func (sh *strictHandler) CreateFile(w http.ResponseWriter, r *http.Request) {
	var request CreateFileRequestObject

	var body CreateFileJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.CreateFile(ctx, request.(CreateFileRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "CreateFile")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(CreateFileResponseObject); ok {
		if err := validResponse.VisitCreateFileResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// DeleteFile operation middleware
func (sh *strictHandler) DeleteFile(w http.ResponseWriter, r *http.Request, id string) {
	var request DeleteFileRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.DeleteFile(ctx, request.(DeleteFileRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "DeleteFile")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(DeleteFileResponseObject); ok {
		if err := validResponse.VisitDeleteFileResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// GetFile operation middleware
func (sh *strictHandler) GetFile(w http.ResponseWriter, r *http.Request, id string) {
	var request GetFileRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetFile(ctx, request.(GetFileRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetFile")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetFileResponseObject); ok {
		if err := validResponse.VisitGetFileResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// DownloadFile operation middleware
func (sh *strictHandler) DownloadFile(w http.ResponseWriter, r *http.Request, id string) {
	var request DownloadFileRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.DownloadFile(ctx, request.(DownloadFileRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "DownloadFile")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(DownloadFileResponseObject); ok {
		if err := validResponse.VisitDownloadFileResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// ListGroups operation middleware
func (sh *strictHandler) ListGroups(w http.ResponseWriter, r *http.Request, params ListGroupsParams) {
	var request ListGroupsRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListGroups(ctx, request.(ListGroupsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListGroups")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListGroupsResponseObject); ok {
		if err := validResponse.VisitListGroupsResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// CreateGroup operation middleware
func (sh *strictHandler) CreateGroup(w http.ResponseWriter, r *http.Request) {
	var request CreateGroupRequestObject

	var body CreateGroupJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.CreateGroup(ctx, request.(CreateGroupRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "CreateGroup")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(CreateGroupResponseObject); ok {
		if err := validResponse.VisitCreateGroupResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// DeleteGroup operation middleware
func (sh *strictHandler) DeleteGroup(w http.ResponseWriter, r *http.Request, id string) {
	var request DeleteGroupRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.DeleteGroup(ctx, request.(DeleteGroupRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "DeleteGroup")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(DeleteGroupResponseObject); ok {
		if err := validResponse.VisitDeleteGroupResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// GetGroup operation middleware
func (sh *strictHandler) GetGroup(w http.ResponseWriter, r *http.Request, id string) {
	var request GetGroupRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetGroup(ctx, request.(GetGroupRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetGroup")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetGroupResponseObject); ok {
		if err := validResponse.VisitGetGroupResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// UpdateGroup operation middleware
func (sh *strictHandler) UpdateGroup(w http.ResponseWriter, r *http.Request, id string) {
	var request UpdateGroupRequestObject

	request.Id = id

	var body UpdateGroupJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.UpdateGroup(ctx, request.(UpdateGroupRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "UpdateGroup")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(UpdateGroupResponseObject); ok {
		if err := validResponse.VisitUpdateGroupResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// ListChildGroups operation middleware
func (sh *strictHandler) ListChildGroups(w http.ResponseWriter, r *http.Request, id string) {
	var request ListChildGroupsRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListChildGroups(ctx, request.(ListChildGroupsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListChildGroups")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListChildGroupsResponseObject); ok {
		if err := validResponse.VisitListChildGroupsResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// RemoveGroupParent operation middleware
func (sh *strictHandler) RemoveGroupParent(w http.ResponseWriter, r *http.Request, id string, parentGroupId string) {
	var request RemoveGroupParentRequestObject

	request.Id = id
	request.ParentGroupId = parentGroupId

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.RemoveGroupParent(ctx, request.(RemoveGroupParentRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "RemoveGroupParent")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(RemoveGroupParentResponseObject); ok {
		if err := validResponse.VisitRemoveGroupParentResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// ListParentGroups operation middleware
func (sh *strictHandler) ListParentGroups(w http.ResponseWriter, r *http.Request, id string) {
	var request ListParentGroupsRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListParentGroups(ctx, request.(ListParentGroupsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListParentGroups")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListParentGroupsResponseObject); ok {
		if err := validResponse.VisitListParentGroupsResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// AddGroupParent operation middleware
func (sh *strictHandler) AddGroupParent(w http.ResponseWriter, r *http.Request, id string) {
	var request AddGroupParentRequestObject

	request.Id = id

	var body AddGroupParentJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.AddGroupParent(ctx, request.(AddGroupParentRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "AddGroupParent")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(AddGroupParentResponseObject); ok {
		if err := validResponse.VisitAddGroupParentResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// ListParentPermissions operation middleware
func (sh *strictHandler) ListParentPermissions(w http.ResponseWriter, r *http.Request, id string) {
	var request ListParentPermissionsRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListParentPermissions(ctx, request.(ListParentPermissionsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListParentPermissions")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListParentPermissionsResponseObject); ok {
		if err := validResponse.VisitListParentPermissionsResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// ListGroupUsers operation middleware
func (sh *strictHandler) ListGroupUsers(w http.ResponseWriter, r *http.Request, id string) {
	var request ListGroupUsersRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListGroupUsers(ctx, request.(ListGroupUsersRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListGroupUsers")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListGroupUsersResponseObject); ok {
		if err := validResponse.VisitListGroupUsersResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// ListLinks operation middleware
func (sh *strictHandler) ListLinks(w http.ResponseWriter, r *http.Request, params ListLinksParams) {
	var request ListLinksRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListLinks(ctx, request.(ListLinksRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListLinks")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListLinksResponseObject); ok {
		if err := validResponse.VisitListLinksResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// CreateLink operation middleware
func (sh *strictHandler) CreateLink(w http.ResponseWriter, r *http.Request) {
	var request CreateLinkRequestObject

	var body CreateLinkJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.CreateLink(ctx, request.(CreateLinkRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "CreateLink")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(CreateLinkResponseObject); ok {
		if err := validResponse.VisitCreateLinkResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// DeleteLink operation middleware
func (sh *strictHandler) DeleteLink(w http.ResponseWriter, r *http.Request, id string) {
	var request DeleteLinkRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.DeleteLink(ctx, request.(DeleteLinkRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "DeleteLink")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(DeleteLinkResponseObject); ok {
		if err := validResponse.VisitDeleteLinkResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// GetLink operation middleware
func (sh *strictHandler) GetLink(w http.ResponseWriter, r *http.Request, id string) {
	var request GetLinkRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetLink(ctx, request.(GetLinkRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetLink")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetLinkResponseObject); ok {
		if err := validResponse.VisitGetLinkResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// UpdateLink operation middleware
func (sh *strictHandler) UpdateLink(w http.ResponseWriter, r *http.Request, id string) {
	var request UpdateLinkRequestObject

	request.Id = id

	var body UpdateLinkJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.UpdateLink(ctx, request.(UpdateLinkRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "UpdateLink")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(UpdateLinkResponseObject); ok {
		if err := validResponse.VisitUpdateLinkResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// ListReactions operation middleware
func (sh *strictHandler) ListReactions(w http.ResponseWriter, r *http.Request, params ListReactionsParams) {
	var request ListReactionsRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListReactions(ctx, request.(ListReactionsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListReactions")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListReactionsResponseObject); ok {
		if err := validResponse.VisitListReactionsResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// CreateReaction operation middleware
func (sh *strictHandler) CreateReaction(w http.ResponseWriter, r *http.Request) {
	var request CreateReactionRequestObject

	var body CreateReactionJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.CreateReaction(ctx, request.(CreateReactionRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "CreateReaction")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(CreateReactionResponseObject); ok {
		if err := validResponse.VisitCreateReactionResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// DeleteReaction operation middleware
func (sh *strictHandler) DeleteReaction(w http.ResponseWriter, r *http.Request, id string) {
	var request DeleteReactionRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.DeleteReaction(ctx, request.(DeleteReactionRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "DeleteReaction")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(DeleteReactionResponseObject); ok {
		if err := validResponse.VisitDeleteReactionResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// GetReaction operation middleware
func (sh *strictHandler) GetReaction(w http.ResponseWriter, r *http.Request, id string) {
	var request GetReactionRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetReaction(ctx, request.(GetReactionRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetReaction")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetReactionResponseObject); ok {
		if err := validResponse.VisitGetReactionResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// UpdateReaction operation middleware
func (sh *strictHandler) UpdateReaction(w http.ResponseWriter, r *http.Request, id string) {
	var request UpdateReactionRequestObject

	request.Id = id

	var body UpdateReactionJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.UpdateReaction(ctx, request.(UpdateReactionRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "UpdateReaction")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(UpdateReactionResponseObject); ok {
		if err := validResponse.VisitUpdateReactionResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// GetSettings operation middleware
func (sh *strictHandler) GetSettings(w http.ResponseWriter, r *http.Request) {
	var request GetSettingsRequestObject

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetSettings(ctx, request.(GetSettingsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetSettings")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetSettingsResponseObject); ok {
		if err := validResponse.VisitGetSettingsResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// UpdateSettings operation middleware
func (sh *strictHandler) UpdateSettings(w http.ResponseWriter, r *http.Request) {
	var request UpdateSettingsRequestObject

	var body UpdateSettingsJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.UpdateSettings(ctx, request.(UpdateSettingsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "UpdateSettings")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(UpdateSettingsResponseObject); ok {
		if err := validResponse.VisitUpdateSettingsResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// GetSidebar operation middleware
func (sh *strictHandler) GetSidebar(w http.ResponseWriter, r *http.Request) {
	var request GetSidebarRequestObject

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetSidebar(ctx, request.(GetSidebarRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetSidebar")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetSidebarResponseObject); ok {
		if err := validResponse.VisitGetSidebarResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// ListTasks operation middleware
func (sh *strictHandler) ListTasks(w http.ResponseWriter, r *http.Request, params ListTasksParams) {
	var request ListTasksRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListTasks(ctx, request.(ListTasksRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListTasks")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListTasksResponseObject); ok {
		if err := validResponse.VisitListTasksResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// CreateTask operation middleware
func (sh *strictHandler) CreateTask(w http.ResponseWriter, r *http.Request) {
	var request CreateTaskRequestObject

	var body CreateTaskJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.CreateTask(ctx, request.(CreateTaskRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "CreateTask")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(CreateTaskResponseObject); ok {
		if err := validResponse.VisitCreateTaskResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// DeleteTask operation middleware
func (sh *strictHandler) DeleteTask(w http.ResponseWriter, r *http.Request, id string) {
	var request DeleteTaskRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.DeleteTask(ctx, request.(DeleteTaskRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "DeleteTask")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(DeleteTaskResponseObject); ok {
		if err := validResponse.VisitDeleteTaskResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// GetTask operation middleware
func (sh *strictHandler) GetTask(w http.ResponseWriter, r *http.Request, id string) {
	var request GetTaskRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetTask(ctx, request.(GetTaskRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetTask")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetTaskResponseObject); ok {
		if err := validResponse.VisitGetTaskResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// UpdateTask operation middleware
func (sh *strictHandler) UpdateTask(w http.ResponseWriter, r *http.Request, id string) {
	var request UpdateTaskRequestObject

	request.Id = id

	var body UpdateTaskJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.UpdateTask(ctx, request.(UpdateTaskRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "UpdateTask")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(UpdateTaskResponseObject); ok {
		if err := validResponse.VisitUpdateTaskResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// SearchTickets operation middleware
func (sh *strictHandler) SearchTickets(w http.ResponseWriter, r *http.Request, params SearchTicketsParams) {
	var request SearchTicketsRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.SearchTickets(ctx, request.(SearchTicketsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "SearchTickets")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(SearchTicketsResponseObject); ok {
		if err := validResponse.VisitSearchTicketsResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// ListTickets operation middleware
func (sh *strictHandler) ListTickets(w http.ResponseWriter, r *http.Request, params ListTicketsParams) {
	var request ListTicketsRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListTickets(ctx, request.(ListTicketsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListTickets")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListTicketsResponseObject); ok {
		if err := validResponse.VisitListTicketsResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// CreateTicket operation middleware
func (sh *strictHandler) CreateTicket(w http.ResponseWriter, r *http.Request) {
	var request CreateTicketRequestObject

	var body CreateTicketJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.CreateTicket(ctx, request.(CreateTicketRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "CreateTicket")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(CreateTicketResponseObject); ok {
		if err := validResponse.VisitCreateTicketResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// DeleteTicket operation middleware
func (sh *strictHandler) DeleteTicket(w http.ResponseWriter, r *http.Request, id string) {
	var request DeleteTicketRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.DeleteTicket(ctx, request.(DeleteTicketRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "DeleteTicket")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(DeleteTicketResponseObject); ok {
		if err := validResponse.VisitDeleteTicketResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// GetTicket operation middleware
func (sh *strictHandler) GetTicket(w http.ResponseWriter, r *http.Request, id string) {
	var request GetTicketRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetTicket(ctx, request.(GetTicketRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetTicket")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetTicketResponseObject); ok {
		if err := validResponse.VisitGetTicketResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// UpdateTicket operation middleware
func (sh *strictHandler) UpdateTicket(w http.ResponseWriter, r *http.Request, id string) {
	var request UpdateTicketRequestObject

	request.Id = id

	var body UpdateTicketJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.UpdateTicket(ctx, request.(UpdateTicketRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "UpdateTicket")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(UpdateTicketResponseObject); ok {
		if err := validResponse.VisitUpdateTicketResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// ListTimeline operation middleware
func (sh *strictHandler) ListTimeline(w http.ResponseWriter, r *http.Request, params ListTimelineParams) {
	var request ListTimelineRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListTimeline(ctx, request.(ListTimelineRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListTimeline")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListTimelineResponseObject); ok {
		if err := validResponse.VisitListTimelineResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// CreateTimeline operation middleware
func (sh *strictHandler) CreateTimeline(w http.ResponseWriter, r *http.Request) {
	var request CreateTimelineRequestObject

	var body CreateTimelineJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.CreateTimeline(ctx, request.(CreateTimelineRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "CreateTimeline")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(CreateTimelineResponseObject); ok {
		if err := validResponse.VisitCreateTimelineResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// DeleteTimeline operation middleware
func (sh *strictHandler) DeleteTimeline(w http.ResponseWriter, r *http.Request, id string) {
	var request DeleteTimelineRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.DeleteTimeline(ctx, request.(DeleteTimelineRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "DeleteTimeline")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(DeleteTimelineResponseObject); ok {
		if err := validResponse.VisitDeleteTimelineResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// GetTimeline operation middleware
func (sh *strictHandler) GetTimeline(w http.ResponseWriter, r *http.Request, id string) {
	var request GetTimelineRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetTimeline(ctx, request.(GetTimelineRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetTimeline")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetTimelineResponseObject); ok {
		if err := validResponse.VisitGetTimelineResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// UpdateTimeline operation middleware
func (sh *strictHandler) UpdateTimeline(w http.ResponseWriter, r *http.Request, id string) {
	var request UpdateTimelineRequestObject

	request.Id = id

	var body UpdateTimelineJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.UpdateTimeline(ctx, request.(UpdateTimelineRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "UpdateTimeline")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(UpdateTimelineResponseObject); ok {
		if err := validResponse.VisitUpdateTimelineResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// ListTypes operation middleware
func (sh *strictHandler) ListTypes(w http.ResponseWriter, r *http.Request, params ListTypesParams) {
	var request ListTypesRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListTypes(ctx, request.(ListTypesRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListTypes")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListTypesResponseObject); ok {
		if err := validResponse.VisitListTypesResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// CreateType operation middleware
func (sh *strictHandler) CreateType(w http.ResponseWriter, r *http.Request) {
	var request CreateTypeRequestObject

	var body CreateTypeJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.CreateType(ctx, request.(CreateTypeRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "CreateType")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(CreateTypeResponseObject); ok {
		if err := validResponse.VisitCreateTypeResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// DeleteType operation middleware
func (sh *strictHandler) DeleteType(w http.ResponseWriter, r *http.Request, id string) {
	var request DeleteTypeRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.DeleteType(ctx, request.(DeleteTypeRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "DeleteType")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(DeleteTypeResponseObject); ok {
		if err := validResponse.VisitDeleteTypeResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// GetType operation middleware
func (sh *strictHandler) GetType(w http.ResponseWriter, r *http.Request, id string) {
	var request GetTypeRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetType(ctx, request.(GetTypeRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetType")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetTypeResponseObject); ok {
		if err := validResponse.VisitGetTypeResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// UpdateType operation middleware
func (sh *strictHandler) UpdateType(w http.ResponseWriter, r *http.Request, id string) {
	var request UpdateTypeRequestObject

	request.Id = id

	var body UpdateTypeJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.UpdateType(ctx, request.(UpdateTypeRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "UpdateType")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(UpdateTypeResponseObject); ok {
		if err := validResponse.VisitUpdateTypeResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// ListUsers operation middleware
func (sh *strictHandler) ListUsers(w http.ResponseWriter, r *http.Request, params ListUsersParams) {
	var request ListUsersRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListUsers(ctx, request.(ListUsersRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListUsers")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListUsersResponseObject); ok {
		if err := validResponse.VisitListUsersResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// CreateUser operation middleware
func (sh *strictHandler) CreateUser(w http.ResponseWriter, r *http.Request) {
	var request CreateUserRequestObject

	var body CreateUserJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.CreateUser(ctx, request.(CreateUserRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "CreateUser")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(CreateUserResponseObject); ok {
		if err := validResponse.VisitCreateUserResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// DeleteUser operation middleware
func (sh *strictHandler) DeleteUser(w http.ResponseWriter, r *http.Request, id string) {
	var request DeleteUserRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.DeleteUser(ctx, request.(DeleteUserRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "DeleteUser")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(DeleteUserResponseObject); ok {
		if err := validResponse.VisitDeleteUserResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// GetUser operation middleware
func (sh *strictHandler) GetUser(w http.ResponseWriter, r *http.Request, id string) {
	var request GetUserRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetUser(ctx, request.(GetUserRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetUser")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetUserResponseObject); ok {
		if err := validResponse.VisitGetUserResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// UpdateUser operation middleware
func (sh *strictHandler) UpdateUser(w http.ResponseWriter, r *http.Request, id string) {
	var request UpdateUserRequestObject

	request.Id = id

	var body UpdateUserJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.UpdateUser(ctx, request.(UpdateUserRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "UpdateUser")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(UpdateUserResponseObject); ok {
		if err := validResponse.VisitUpdateUserResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// ListUserGroups operation middleware
func (sh *strictHandler) ListUserGroups(w http.ResponseWriter, r *http.Request, id string) {
	var request ListUserGroupsRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListUserGroups(ctx, request.(ListUserGroupsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListUserGroups")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListUserGroupsResponseObject); ok {
		if err := validResponse.VisitListUserGroupsResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// AddUserGroup operation middleware
func (sh *strictHandler) AddUserGroup(w http.ResponseWriter, r *http.Request, id string) {
	var request AddUserGroupRequestObject

	request.Id = id

	var body AddUserGroupJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.AddUserGroup(ctx, request.(AddUserGroupRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "AddUserGroup")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(AddUserGroupResponseObject); ok {
		if err := validResponse.VisitAddUserGroupResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// RemoveUserGroup operation middleware
func (sh *strictHandler) RemoveUserGroup(w http.ResponseWriter, r *http.Request, id string, groupId string) {
	var request RemoveUserGroupRequestObject

	request.Id = id
	request.GroupId = groupId

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.RemoveUserGroup(ctx, request.(RemoveUserGroupRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "RemoveUserGroup")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(RemoveUserGroupResponseObject); ok {
		if err := validResponse.VisitRemoveUserGroupResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// ListUserPermissions operation middleware
func (sh *strictHandler) ListUserPermissions(w http.ResponseWriter, r *http.Request, id string) {
	var request ListUserPermissionsRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListUserPermissions(ctx, request.(ListUserPermissionsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListUserPermissions")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListUserPermissionsResponseObject); ok {
		if err := validResponse.VisitListUserPermissionsResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// ListWebhooks operation middleware
func (sh *strictHandler) ListWebhooks(w http.ResponseWriter, r *http.Request, params ListWebhooksParams) {
	var request ListWebhooksRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListWebhooks(ctx, request.(ListWebhooksRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListWebhooks")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListWebhooksResponseObject); ok {
		if err := validResponse.VisitListWebhooksResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// CreateWebhook operation middleware
func (sh *strictHandler) CreateWebhook(w http.ResponseWriter, r *http.Request) {
	var request CreateWebhookRequestObject

	var body CreateWebhookJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.CreateWebhook(ctx, request.(CreateWebhookRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "CreateWebhook")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(CreateWebhookResponseObject); ok {
		if err := validResponse.VisitCreateWebhookResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// DeleteWebhook operation middleware
func (sh *strictHandler) DeleteWebhook(w http.ResponseWriter, r *http.Request, id string) {
	var request DeleteWebhookRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.DeleteWebhook(ctx, request.(DeleteWebhookRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "DeleteWebhook")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(DeleteWebhookResponseObject); ok {
		if err := validResponse.VisitDeleteWebhookResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// GetWebhook operation middleware
func (sh *strictHandler) GetWebhook(w http.ResponseWriter, r *http.Request, id string) {
	var request GetWebhookRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetWebhook(ctx, request.(GetWebhookRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetWebhook")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetWebhookResponseObject); ok {
		if err := validResponse.VisitGetWebhookResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}

// UpdateWebhook operation middleware
func (sh *strictHandler) UpdateWebhook(w http.ResponseWriter, r *http.Request, id string) {
	var request UpdateWebhookRequestObject

	request.Id = id

	var body UpdateWebhookJSONRequestBody
	if err := json.NewDecoder(r.Body).Decode(&body); err != nil {
		sh.options.RequestErrorHandlerFunc(w, r, fmt.Errorf("can't decode JSON body: %w", err))
		return
	}
	request.Body = &body

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.UpdateWebhook(ctx, request.(UpdateWebhookRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "UpdateWebhook")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(UpdateWebhookResponseObject); ok {
		if err := validResponse.VisitUpdateWebhookResponse(w); err != nil {
			sh.options.ResponseErrorHandlerFunc(w, r, err)
		}
	} else if response != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, fmt.Errorf("unexpected response type: %T", response))
	}
}
