// Package gen 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 gen

import (
	"bytes"
	"compress/gzip"
	"context"
	"encoding/base64"
	"encoding/json"
	"fmt"
	"io"
	"net/http"
	"net/url"
	"path"
	"strings"
	"time"

	"github.com/getkin/kin-openapi/openapi3"
	"github.com/go-chi/chi/v5"
	"github.com/oapi-codegen/runtime"
	strictnethttp "github.com/oapi-codegen/runtime/strictmiddleware/nethttp"
	openapi_types "github.com/oapi-codegen/runtime/types"
)

const (
	BearerAuthScopes = "bearerAuth.Scopes"
)

// Defines values for AgentActivityActivityType.
const (
	Decision   AgentActivityActivityType = "decision"
	Escalation AgentActivityActivityType = "escalation"
	McpQuery   AgentActivityActivityType = "mcp_query"
	Reasoning  AgentActivityActivityType = "reasoning"
	ToolCall   AgentActivityActivityType = "tool_call"
)

// Defines values for ApprovalKind.
const (
	ApprovalKindExecution         ApprovalKind = "execution"
	ApprovalKindPatternActivation ApprovalKind = "pattern-activation"
	ApprovalKindPolicyChange      ApprovalKind = "policy-change"
)

// Defines values for ApprovalStatus.
const (
	ApprovalStatusApproved ApprovalStatus = "approved"
	ApprovalStatusDenied   ApprovalStatus = "denied"
	ApprovalStatusExpired  ApprovalStatus = "expired"
	ApprovalStatusPending  ApprovalStatus = "pending"
	ApprovalStatusRevoked  ApprovalStatus = "revoked"
)

// Defines values for ApprovalRuleAutonomyLevel.
const (
	ApprovalRuleAutonomyLevelAuto     ApprovalRuleAutonomyLevel = "auto"
	ApprovalRuleAutonomyLevelEscalate ApprovalRuleAutonomyLevel = "escalate"
	ApprovalRuleAutonomyLevelNever    ApprovalRuleAutonomyLevel = "never"
)

// Defines values for ApprovalRuleCreateAutonomyLevel.
const (
	ApprovalRuleCreateAutonomyLevelAuto     ApprovalRuleCreateAutonomyLevel = "auto"
	ApprovalRuleCreateAutonomyLevelEscalate ApprovalRuleCreateAutonomyLevel = "escalate"
	ApprovalRuleCreateAutonomyLevelNever    ApprovalRuleCreateAutonomyLevel = "never"
)

// Defines values for AuditEntryActorType.
const (
	AuditEntryActorTypeAgent     AuditEntryActorType = "agent"
	AuditEntryActorTypeOperator  AuditEntryActorType = "operator"
	AuditEntryActorTypeScheduler AuditEntryActorType = "scheduler"
	AuditEntryActorTypeSystem    AuditEntryActorType = "system"
)

// Defines values for CheckKind.
const (
	CheckKindCertExpiry CheckKind = "cert-expiry"
	CheckKindDisk       CheckKind = "disk"
	CheckKindDrift      CheckKind = "drift"
	CheckKindHttp       CheckKind = "http"
	CheckKindPing       CheckKind = "ping"
	CheckKindSshScript  CheckKind = "ssh-script"
	CheckKindTcp        CheckKind = "tcp"
)

// Defines values for CheckLastHealth.
const (
	CheckLastHealthDegraded CheckLastHealth = "degraded"
	CheckLastHealthDown     CheckLastHealth = "down"
	CheckLastHealthHealthy  CheckLastHealth = "healthy"
	CheckLastHealthUnknown  CheckLastHealth = "unknown"
)

// Defines values for CheckCreateKind.
const (
	CheckCreateKindCertExpiry CheckCreateKind = "cert-expiry"
	CheckCreateKindDisk       CheckCreateKind = "disk"
	CheckCreateKindDrift      CheckCreateKind = "drift"
	CheckCreateKindHttp       CheckCreateKind = "http"
	CheckCreateKindPing       CheckCreateKind = "ping"
	CheckCreateKindSshScript  CheckCreateKind = "ssh-script"
	CheckCreateKindTcp        CheckCreateKind = "tcp"
)

// Defines values for ClassificationRoute.
const (
	ClassificationRouteAutoAct  ClassificationRoute = "auto-act"
	ClassificationRouteEscalate ClassificationRoute = "escalate"
	ClassificationRouteHold     ClassificationRoute = "hold"
)

// Defines values for EntityHealth.
const (
	EntityHealthDegraded EntityHealth = "degraded"
	EntityHealthDown     EntityHealth = "down"
	EntityHealthHealthy  EntityHealth = "healthy"
	EntityHealthStale    EntityHealth = "stale"
	EntityHealthUnknown  EntityHealth = "unknown"
)

// Defines values for EntityTypeLayer.
const (
	EntityTypeLayerCognition      EntityTypeLayer = "cognition"
	EntityTypeLayerGovernance     EntityTypeLayer = "governance"
	EntityTypeLayerInfrastructure EntityTypeLayer = "infrastructure"
	EntityTypeLayerMeta           EntityTypeLayer = "meta"
)

// Defines values for EntityTypeStatus.
const (
	EntityTypeStatusActive     EntityTypeStatus = "active"
	EntityTypeStatusDeprecated EntityTypeStatus = "deprecated"
)

// Defines values for EntityTypeCreateLayer.
const (
	EntityTypeCreateLayerCognition      EntityTypeCreateLayer = "cognition"
	EntityTypeCreateLayerGovernance     EntityTypeCreateLayer = "governance"
	EntityTypeCreateLayerInfrastructure EntityTypeCreateLayer = "infrastructure"
)

// Defines values for EntityTypePatchStatus.
const (
	EntityTypePatchStatusActive     EntityTypePatchStatus = "active"
	EntityTypePatchStatusDeprecated EntityTypePatchStatus = "deprecated"
)

// Defines values for EventSeverity.
const (
	EventSeverityCritical EventSeverity = "critical"
	EventSeverityInfo     EventSeverity = "info"
	EventSeverityWarning  EventSeverity = "warning"
)

// Defines values for ExecutionStatus.
const (
	ExecutionStatusApproved       ExecutionStatus = "approved"
	ExecutionStatusAutoApproved   ExecutionStatus = "auto_approved"
	ExecutionStatusCancelled      ExecutionStatus = "cancelled"
	ExecutionStatusDenied         ExecutionStatus = "denied"
	ExecutionStatusExecuting      ExecutionStatus = "executing"
	ExecutionStatusExpired        ExecutionStatus = "expired"
	ExecutionStatusFailed         ExecutionStatus = "failed"
	ExecutionStatusProposed       ExecutionStatus = "proposed"
	ExecutionStatusRollbackFailed ExecutionStatus = "rollback_failed"
	ExecutionStatusRolledBack     ExecutionStatus = "rolled_back"
	ExecutionStatusTimedOut       ExecutionStatus = "timed_out"
	ExecutionStatusVerified       ExecutionStatus = "verified"
	ExecutionStatusVerifying      ExecutionStatus = "verifying"
)

// Defines values for GraphViewHealth.
const (
	GraphViewHealthDegraded GraphViewHealth = "degraded"
	GraphViewHealthDown     GraphViewHealth = "down"
	GraphViewHealthHealthy  GraphViewHealth = "healthy"
	GraphViewHealthStale    GraphViewHealth = "stale"
	GraphViewHealthUnknown  GraphViewHealth = "unknown"
)

// Defines values for HealthSummaryEntitiesHealth.
const (
	HealthSummaryEntitiesHealthDegraded HealthSummaryEntitiesHealth = "degraded"
	HealthSummaryEntitiesHealthDown     HealthSummaryEntitiesHealth = "down"
	HealthSummaryEntitiesHealthHealthy  HealthSummaryEntitiesHealth = "healthy"
	HealthSummaryEntitiesHealthStale    HealthSummaryEntitiesHealth = "stale"
	HealthSummaryEntitiesHealthUnknown  HealthSummaryEntitiesHealth = "unknown"
)

// Defines values for HealthSummaryEntitiesTrend.
const (
	HealthSummaryEntitiesTrendDegrading HealthSummaryEntitiesTrend = "degrading"
	HealthSummaryEntitiesTrendImproving HealthSummaryEntitiesTrend = "improving"
	HealthSummaryEntitiesTrendStable    HealthSummaryEntitiesTrend = "stable"
	HealthSummaryEntitiesTrendUnknown   HealthSummaryEntitiesTrend = "unknown"
)

// Defines values for KnowledgeHitType.
const (
	Document      KnowledgeHitType = "document"
	Investigation KnowledgeHitType = "investigation"
	Runbook       KnowledgeHitType = "runbook"
)

// Defines values for MetricSeriesRollup.
const (
	MetricSeriesRollupN1d MetricSeriesRollup = "1d"
	MetricSeriesRollupN1h MetricSeriesRollup = "1h"
	MetricSeriesRollupRaw MetricSeriesRollup = "raw"
)

// Defines values for PatternStatus.
const (
	PatternStatusActive       PatternStatus = "active"
	PatternStatusDeprecated   PatternStatus = "deprecated"
	PatternStatusHypothesized PatternStatus = "hypothesized"
	PatternStatusInvalidated  PatternStatus = "invalidated"
	PatternStatusValidated    PatternStatus = "validated"
)

// Defines values for ProvisionStatusStepsStatus.
const (
	ProvisionStatusStepsStatusFailed  ProvisionStatusStepsStatus = "failed"
	ProvisionStatusStepsStatusOk      ProvisionStatusStepsStatus = "ok"
	ProvisionStatusStepsStatusPending ProvisionStatusStepsStatus = "pending"
	ProvisionStatusStepsStatusRunning ProvisionStatusStepsStatus = "running"
	ProvisionStatusStepsStatusSkipped ProvisionStatusStepsStatus = "skipped"
)

// Defines values for RelationshipTypeCardinality.
const (
	ManyToMany RelationshipTypeCardinality = "many-to-many"
	ManyToOne  RelationshipTypeCardinality = "many-to-one"
	OneToMany  RelationshipTypeCardinality = "one-to-many"
	OneToOne   RelationshipTypeCardinality = "one-to-one"
)

// Defines values for RiskClassApprovalRequired.
const (
	RiskClassApprovalRequiredNone              RiskClassApprovalRequired = "none"
	RiskClassApprovalRequiredOperator          RiskClassApprovalRequired = "operator"
	RiskClassApprovalRequiredOperatorConfirmed RiskClassApprovalRequired = "operator_confirmed"
)

// Defines values for SignalSeverity.
const (
	SignalSeverityCritical SignalSeverity = "critical"
	SignalSeverityInfo     SignalSeverity = "info"
	SignalSeverityWarning  SignalSeverity = "warning"
)

// Defines values for SignalState.
const (
	SignalStateAcknowledged SignalState = "acknowledged"
	SignalStateActing       SignalState = "acting"
	SignalStateFailed       SignalState = "failed"
	SignalStateMuted        SignalState = "muted"
	SignalStateRaised       SignalState = "raised"
	SignalStateResolved     SignalState = "resolved"
)

// Defines values for SkillStatus.
const (
	SkillStatusActive     SkillStatus = "active"
	SkillStatusDeprecated SkillStatus = "deprecated"
	SkillStatusDrafted    SkillStatus = "drafted"
	SkillStatusFailed     SkillStatus = "failed"
	SkillStatusRefined    SkillStatus = "refined"
	SkillStatusTested     SkillStatus = "tested"
)

// Defines values for SkillStepRunner.
const (
	Http     SkillStepRunner = "http"
	Internal SkillStepRunner = "internal"
	Ssh      SkillStepRunner = "ssh"
)

// Defines values for TrendDirection.
const (
	TrendDirectionDegrading TrendDirection = "degrading"
	TrendDirectionImproving TrendDirection = "improving"
	TrendDirectionStable    TrendDirection = "stable"
	TrendDirectionUnknown   TrendDirection = "unknown"
)

// Defines values for ListApprovalsParamsStatus.
const (
	Approved ListApprovalsParamsStatus = "approved"
	Denied   ListApprovalsParamsStatus = "denied"
	Expired  ListApprovalsParamsStatus = "expired"
	Pending  ListApprovalsParamsStatus = "pending"
	Revoked  ListApprovalsParamsStatus = "revoked"
)

// Defines values for ListApprovalsParamsKind.
const (
	ListApprovalsParamsKindExecution         ListApprovalsParamsKind = "execution"
	ListApprovalsParamsKindPatternActivation ListApprovalsParamsKind = "pattern-activation"
	ListApprovalsParamsKindPolicyChange      ListApprovalsParamsKind = "policy-change"
)

// Defines values for DecideApprovalJSONBodyDecision.
const (
	Approve DecideApprovalJSONBodyDecision = "approve"
	Deny    DecideApprovalJSONBodyDecision = "deny"
	Revoke  DecideApprovalJSONBodyDecision = "revoke"
)

// Defines values for ListClassificationsParamsRoute.
const (
	ListClassificationsParamsRouteAutoAct  ListClassificationsParamsRoute = "auto-act"
	ListClassificationsParamsRouteEscalate ListClassificationsParamsRoute = "escalate"
	ListClassificationsParamsRouteHold     ListClassificationsParamsRoute = "hold"
)

// Defines values for GetEntityRelationsParamsDirection.
const (
	Both GetEntityRelationsParamsDirection = "both"
	In   GetEntityRelationsParamsDirection = "in"
	Out  GetEntityRelationsParamsDirection = "out"
)

// Defines values for GetGraphParamsInclude.
const (
	Status GetGraphParamsInclude = "status"
)

// Defines values for QueryMetricsParamsRollup.
const (
	QueryMetricsParamsRollupAuto QueryMetricsParamsRollup = "auto"
	QueryMetricsParamsRollupN1d  QueryMetricsParamsRollup = "1d"
	QueryMetricsParamsRollupN1h  QueryMetricsParamsRollup = "1h"
	QueryMetricsParamsRollupRaw  QueryMetricsParamsRollup = "raw"
)

// Defines values for PatchPatternJSONBodyStatus.
const (
	PatchPatternJSONBodyStatusActive      PatchPatternJSONBodyStatus = "active"
	PatchPatternJSONBodyStatusDeprecated  PatchPatternJSONBodyStatus = "deprecated"
	PatchPatternJSONBodyStatusInvalidated PatchPatternJSONBodyStatus = "invalidated"
	PatchPatternJSONBodyStatusValidated   PatchPatternJSONBodyStatus = "validated"
)

// Defines values for ListSignalsParamsSeverity.
const (
	Critical ListSignalsParamsSeverity = "critical"
	Info     ListSignalsParamsSeverity = "info"
	Warning  ListSignalsParamsSeverity = "warning"
)

// Defines values for PatchSkillJSONBodyStatus.
const (
	PatchSkillJSONBodyStatusActive     PatchSkillJSONBodyStatus = "active"
	PatchSkillJSONBodyStatusDeprecated PatchSkillJSONBodyStatus = "deprecated"
	PatchSkillJSONBodyStatusTested     PatchSkillJSONBodyStatus = "tested"
)

// AgentActivity defines model for AgentActivity.
type AgentActivity struct {
	ActivityType  AgentActivityActivityType `json:"activity_type"`
	AgentId       string                    `json:"agent_id"`
	CorrelationId *string                   `json:"correlation_id"`
	DurationMs    *int                      `json:"duration_ms"`
	EntityId      *string                   `json:"entity_id"`
	Id            int                       `json:"id"`
	InputSummary  *string                   `json:"input_summary"`
	OutputSummary *string                   `json:"output_summary"`
	SessionId     *string                   `json:"session_id"`
	Success       *bool                     `json:"success"`
	TokenCount    *int                      `json:"token_count"`
	ToolName      *string                   `json:"tool_name"`
	Ts            time.Time                 `json:"ts"`
}

// AgentActivityActivityType defines model for AgentActivity.ActivityType.
type AgentActivityActivityType string

// Approval defines model for Approval.
type Approval struct {
	Action    string             `json:"action"`
	CreatedAt time.Time          `json:"created_at"`
	DecidedAt *time.Time         `json:"decided_at"`
	DecidedBy *string            `json:"decided_by"`
	ExpiresAt time.Time          `json:"expires_at"`
	Id        openapi_types.UUID `json:"id"`
	Kind      ApprovalKind       `json:"kind"`

	// Payload e.g. proposed policy diff
	Payload   *map[string]interface{} `json:"payload"`
	RiskClass string                  `json:"risk_class"`
	Slug      string                  `json:"slug"`
	Status    ApprovalStatus          `json:"status"`

	// Subject Entity slug the approval concerns
	Subject *string `json:"subject"`
}

// ApprovalKind defines model for Approval.Kind.
type ApprovalKind string

// ApprovalStatus defines model for Approval.Status.
type ApprovalStatus string

// ApprovalRule defines model for ApprovalRule.
type ApprovalRule struct {
	Action        string                    `json:"action"`
	AutonomyLevel ApprovalRuleAutonomyLevel `json:"autonomy_level"`

	// EntityType May be abstract (inherits down)
	EntityType *string            `json:"entity_type"`
	Id         openapi_types.UUID `json:"id"`
	RiskClass  string             `json:"risk_class"`

	// ScopeEntity Entity slug for per-entity overrides
	ScopeEntity *string `json:"scope_entity"`
	Version     int     `json:"version"`
}

// ApprovalRuleAutonomyLevel defines model for ApprovalRule.AutonomyLevel.
type ApprovalRuleAutonomyLevel string

// ApprovalRuleCreate defines model for ApprovalRuleCreate.
type ApprovalRuleCreate struct {
	Action        string                          `json:"action"`
	AutonomyLevel ApprovalRuleCreateAutonomyLevel `json:"autonomy_level"`
	EntityType    *string                         `json:"entity_type,omitempty"`
	RiskClass     string                          `json:"risk_class"`
	ScopeEntity   *string                         `json:"scope_entity,omitempty"`
}

// ApprovalRuleCreateAutonomyLevel defines model for ApprovalRuleCreate.AutonomyLevel.
type ApprovalRuleCreateAutonomyLevel string

// AuditEntry defines model for AuditEntry.
type AuditEntry struct {
	Action        string                  `json:"action"`
	ActorId       *string                 `json:"actor_id"`
	ActorType     AuditEntryActorType     `json:"actor_type"`
	CorrelationId *string                 `json:"correlation_id"`
	Detail        *map[string]interface{} `json:"detail,omitempty"`
	EntityId      *string                 `json:"entity_id"`
	Id            int                     `json:"id"`
	Method        *string                 `json:"method"`
	Path          *string                 `json:"path"`
	SourceIp      *string                 `json:"source_ip"`
	StatusCode    *int                    `json:"status_code"`
	Ts            time.Time               `json:"ts"`
}

// AuditEntryActorType defines model for AuditEntry.ActorType.
type AuditEntryActorType string

// AutonomySetting defines model for AutonomySetting.
type AutonomySetting struct {
	Key       string     `json:"key"`
	UpdatedAt *time.Time `json:"updated_at,omitempty"`
	Value     string     `json:"value"`
	Version   int        `json:"version"`
}

// Check defines model for Check.
type Check struct {
	// Config Validated per-kind
	Config    *map[string]interface{} `json:"config,omitempty"`
	Enabled   bool                    `json:"enabled"`
	Id        openapi_types.UUID      `json:"id"`
	IntervalS int                     `json:"interval_s"`
	Kind      CheckKind               `json:"kind"`

	// LastHealth This check's own most recent verdict. An entity's health is the worst of these across its enabled checks, so this is what explains *why* an entity is degraded. Null until the check first runs.
	LastHealth *CheckLastHealth `json:"last_health"`

	// LastRunAt When this check last executed. Null = never run.
	LastRunAt *time.Time `json:"last_run_at"`
	Slug      string     `json:"slug"`

	// Target Entity slug (instance-scoped)
	Target *string `json:"target"`

	// TargetType Entity type (type-scoped)
	TargetType *string `json:"target_type"`
	TimeoutS   int     `json:"timeout_s"`
	Version    int     `json:"version"`
	Zone       *string `json:"zone"`
}

// CheckKind defines model for Check.Kind.
type CheckKind string

// CheckLastHealth This check's own most recent verdict. An entity's health is the worst of these across its enabled checks, so this is what explains *why* an entity is degraded. Null until the check first runs.
type CheckLastHealth string

// CheckCreate defines model for CheckCreate.
type CheckCreate struct {
	Config     *map[string]interface{} `json:"config,omitempty"`
	Enabled    *bool                   `json:"enabled,omitempty"`
	IntervalS  *int                    `json:"interval_s,omitempty"`
	Kind       CheckCreateKind         `json:"kind"`
	Slug       string                  `json:"slug"`
	Target     *string                 `json:"target,omitempty"`
	TargetType *string                 `json:"target_type,omitempty"`
	TimeoutS   *int                    `json:"timeout_s,omitempty"`
	Zone       *string                 `json:"zone,omitempty"`
}

// CheckCreateKind defines model for CheckCreate.Kind.
type CheckCreateKind string

// CheckPatch defines model for CheckPatch.
type CheckPatch struct {
	Config    *map[string]interface{} `json:"config,omitempty"`
	Enabled   *bool                   `json:"enabled,omitempty"`
	IntervalS *int                    `json:"interval_s,omitempty"`
	TimeoutS  *int                    `json:"timeout_s,omitempty"`
}

// Classification defines model for Classification.
type Classification struct {
	Action            string                  `json:"action"`
	AutonomyCheck     *string                 `json:"autonomy_check,omitempty"`
	BlastRadius       *[]string               `json:"blast_radius,omitempty"`
	CorrelationId     string                  `json:"correlation_id"`
	CreatedAt         time.Time               `json:"created_at"`
	Id                openapi_types.UUID      `json:"id"`
	PatternConfidence *float32                `json:"pattern_confidence"`
	Reasoning         map[string]interface{}  `json:"reasoning"`
	RecommendedAction *map[string]interface{} `json:"recommended_action"`
	RiskClass         string                  `json:"risk_class"`
	Route             ClassificationRoute     `json:"route"`
	SignalId          *string                 `json:"signal_id"`
	SkillId           *string                 `json:"skill_id"`
	Target            *string                 `json:"target"`
}

// ClassificationRoute defines model for Classification.Route.
type ClassificationRoute string

// ClientContext defines model for ClientContext.
type ClientContext struct {
	// AgentFilesChanged Paths of agent instruction files that changed
	AgentFilesChanged *[]string `json:"agent_files_changed,omitempty"`

	// Since Timestamp for the next poll request
	Since *time.Time `json:"since,omitempty"`

	// SopsConfigChanged True if .sops.yaml recipients changed
	SopsConfigChanged *bool `json:"sops_config_changed,omitempty"`

	// ToolsChanged Paths of tools/*.setup.sh that changed
	ToolsChanged *[]string `json:"tools_changed,omitempty"`

	// Version Monotonic context version number
	Version int `json:"version"`
}

// ClientSecrets defines model for ClientSecrets.
type ClientSecrets struct {
	// Keys Infisical secret keys accessible to this client
	Keys []string `json:"keys"`
}

// DashboardSummary defines model for DashboardSummary.
type DashboardSummary struct {
	ApprovalsPending int `json:"approvals_pending"`

	// EntitiesByState entity counts keyed by state
	EntitiesByState map[string]int `json:"entities_by_state"`

	// EntitiesByType entity counts keyed by type
	EntitiesByType map[string]int `json:"entities_by_type"`

	// EventRate event counts bucketed by 5-minute interval, most recent last
	EventRate []struct {
		Bucket time.Time `json:"bucket"`
		Count  int       `json:"count"`
	} `json:"event_rate"`

	// ExecutionsByState execution counts keyed by state, last 24h
	ExecutionsByState map[string]int `json:"executions_by_state"`
	Health            struct {
		Degraded int `json:"degraded"`
		Down     int `json:"down"`
		Healthy  int `json:"healthy"`

		// Stale last observation older than the check's expected cadence
		Stale   *int `json:"stale,omitempty"`
		Unknown int  `json:"unknown"`
	} `json:"health"`

	// SignalsBySeverity open (non-resolved) signal counts keyed by severity
	SignalsBySeverity map[string]int `json:"signals_by_severity"`
}

// EnrollRequest defines model for EnrollRequest.
type EnrollRequest struct {
	// Hostname Actual hostname of the enrolling machine
	Hostname *string `json:"hostname,omitempty"`

	// MeshIp Source mesh IP for identity validation
	MeshIp *string `json:"mesh_ip,omitempty"`

	// Slug Entity slug (e.g. ws:new-laptop)
	Slug string `json:"slug"`
}

// EnrollResponse defines model for EnrollResponse.
type EnrollResponse struct {
	// AgePrivateKey AGE-SECRET-KEY-... for local decryption
	AgePrivateKey string `json:"age_private_key"`

	// AgePublicKey age1... public key for SOPS recipients
	AgePublicKey string `json:"age_public_key"`

	// InfisicalClientId Infisical UniversalAuth client ID
	InfisicalClientId *string `json:"infisical_client_id,omitempty"`

	// InfisicalClientSecret Infisical UniversalAuth client secret
	InfisicalClientSecret *string `json:"infisical_client_secret,omitempty"`
}

// Entity defines model for Entity.
type Entity struct {
	Attributes *map[string]interface{} `json:"attributes,omitempty"`
	CreatedAt  time.Time               `json:"created_at"`

	// Health last observed health, when the entity is monitored
	Health *EntityHealth      `json:"health"`
	Id     openapi_types.UUID `json:"id"`

	// LastCheckAt when health was last observed
	LastCheckAt      *time.Time `json:"last_check_at"`
	MaintenanceUntil *time.Time `json:"maintenance_until"`
	Name             string     `json:"name"`
	Slug             string     `json:"slug"`
	State            *string    `json:"state"`
	Type             string     `json:"type"`
	UpdatedAt        time.Time  `json:"updated_at"`
	Version          int        `json:"version"`
}

// EntityHealth last observed health, when the entity is monitored
type EntityHealth string

// EntityCreate defines model for EntityCreate.
type EntityCreate struct {
	// Attributes Validated against the type's attribute_schema
	Attributes *map[string]interface{} `json:"attributes,omitempty"`
	Name       string                  `json:"name"`
	Slug       string                  `json:"slug"`

	// State Defaults to the lifecycle's default_state
	State *string `json:"state,omitempty"`

	// Type Must be a non-abstract entity type
	Type string `json:"type"`
}

// EntityPatch At least one of the fields must be present.
type EntityPatch struct {
	// Attributes Merged; validated against attribute_schema
	Attributes       *map[string]interface{} `json:"attributes,omitempty"`
	MaintenanceUntil *time.Time              `json:"maintenance_until"`
	Name             *string                 `json:"name,omitempty"`

	// State Target lifecycle state (transition validated)
	State *string `json:"state,omitempty"`
}

// EntityType defines model for EntityType.
type EntityType struct {
	// AttributeSchema JSON Schema
	AttributeSchema *map[string]interface{} `json:"attribute_schema"`
	Description     *string                 `json:"description,omitempty"`
	Domain          string                  `json:"domain"`
	IsAbstract      bool                    `json:"is_abstract"`
	Layer           EntityTypeLayer         `json:"layer"`
	LifecycleId     *string                 `json:"lifecycle_id"`
	Name            string                  `json:"name"`
	ParentType      *string                 `json:"parent_type"`
	SchemaVersion   *int                    `json:"schema_version,omitempty"`
	Status          EntityTypeStatus        `json:"status"`
	Version         *int                    `json:"version,omitempty"`
}

// EntityTypeLayer defines model for EntityType.Layer.
type EntityTypeLayer string

// EntityTypeStatus defines model for EntityType.Status.
type EntityTypeStatus string

// EntityTypeCreate defines model for EntityTypeCreate.
type EntityTypeCreate struct {
	AttributeSchema *map[string]interface{} `json:"attribute_schema,omitempty"`
	Description     *string                 `json:"description,omitempty"`
	Domain          string                  `json:"domain"`
	IsAbstract      *bool                   `json:"is_abstract,omitempty"`
	Layer           EntityTypeCreateLayer   `json:"layer"`
	LifecycleId     *string                 `json:"lifecycle_id,omitempty"`
	Name            string                  `json:"name"`
	ParentType      *string                 `json:"parent_type,omitempty"`
}

// EntityTypeCreateLayer defines model for EntityTypeCreate.Layer.
type EntityTypeCreateLayer string

// EntityTypePatch defines model for EntityTypePatch.
type EntityTypePatch struct {
	AttributeSchema *map[string]interface{} `json:"attribute_schema,omitempty"`
	Description     *string                 `json:"description,omitempty"`
	Status          *EntityTypePatchStatus  `json:"status,omitempty"`
}

// EntityTypePatchStatus defines model for EntityTypePatch.Status.
type EntityTypePatchStatus string

// Event defines model for Event.
type Event struct {
	CorrelationId *string                 `json:"correlation_id"`
	Data          *map[string]interface{} `json:"data,omitempty"`
	EntityId      *string                 `json:"entity_id"`
	Id            int                     `json:"id"`
	Severity      EventSeverity           `json:"severity"`
	Source        string                  `json:"source"`
	Ts            time.Time               `json:"ts"`
	Type          string                  `json:"type"`
}

// EventSeverity defines model for Event.Severity.
type EventSeverity string

// Execution defines model for Execution.
type Execution struct {
	Action           string             `json:"action"`
	AgentId          *string            `json:"agent_id"`
	ApprovalId       *string            `json:"approval_id"`
	ClassificationId *string            `json:"classification_id"`
	CompletedAt      *time.Time         `json:"completed_at"`
	CorrelationId    string             `json:"correlation_id"`
	CreatedAt        time.Time          `json:"created_at"`
	DurationMs       *int               `json:"duration_ms"`
	Id               openapi_types.UUID `json:"id"`

	// Params Skill params (validated against params_schema)
	Params       *map[string]interface{} `json:"params,omitempty"`
	Result       *map[string]interface{} `json:"result"`
	RiskClass    string                  `json:"risk_class"`
	SignalId     *string                 `json:"signal_id"`
	SkillId      *string                 `json:"skill_id"`
	SkillVersion *int                    `json:"skill_version"`
	Slug         string                  `json:"slug"`
	StartedAt    *time.Time              `json:"started_at"`
	Status       ExecutionStatus         `json:"status"`
	Target       *string                 `json:"target"`
	Verified     *bool                   `json:"verified,omitempty"`
}

// ExecutionStatus defines model for Execution.Status.
type ExecutionStatus string

// ExecutionRequest defines model for ExecutionRequest.
type ExecutionRequest struct {
	Action string                  `json:"action"`
	Params *map[string]interface{} `json:"params,omitempty"`
	Reason *string                 `json:"reason,omitempty"`

	// SignalId Signal that motivated this (optional)
	SignalId *string `json:"signal_id,omitempty"`

	// Target Entity UUID or slug
	Target string `json:"target"`
}

// GraphView defines model for GraphView.
type GraphView struct {
	Edges []Relationship `json:"edges"`

	// Health entity id -> health, present when include=status was requested
	Health *map[string]GraphViewHealth `json:"health,omitempty"`
	Nodes  []Entity                    `json:"nodes"`

	// Truncated True if node cap was hit
	Truncated *bool `json:"truncated,omitempty"`
}

// GraphViewHealth defines model for GraphView.Health.
type GraphViewHealth string

// HealthSummary defines model for HealthSummary.
type HealthSummary struct {
	Entities []struct {
		Health      HealthSummaryEntitiesHealth `json:"health"`
		LastCheckAt *time.Time                  `json:"last_check_at"`
		Slug        string                      `json:"slug"`
		Trend       *HealthSummaryEntitiesTrend `json:"trend"`
		Type        string                      `json:"type"`
	} `json:"entities"`
	Summary struct {
		Degraded int `json:"degraded"`
		Down     int `json:"down"`
		Healthy  int `json:"healthy"`

		// Stale last observation older than the check's expected cadence
		Stale   *int `json:"stale,omitempty"`
		Unknown int  `json:"unknown"`
	} `json:"summary"`
}

// HealthSummaryEntitiesHealth defines model for HealthSummary.Entities.Health.
type HealthSummaryEntitiesHealth string

// HealthSummaryEntitiesTrend defines model for HealthSummary.Entities.Trend.
type HealthSummaryEntitiesTrend string

// KnowledgeHit defines model for KnowledgeHit.
type KnowledgeHit struct {
	Id             openapi_types.UUID `json:"id"`
	LinkedEntities *[]string          `json:"linked_entities,omitempty"`
	Rank           *float32           `json:"rank"`
	Slug           string             `json:"slug"`

	// Snippet Highlighted match context
	Snippet    *string          `json:"snippet"`
	SourcePath *string          `json:"source_path"`
	Title      string           `json:"title"`
	Type       KnowledgeHitType `json:"type"`
}

// KnowledgeHitType defines model for KnowledgeHit.Type.
type KnowledgeHitType string

// LifecycleDef defines model for LifecycleDef.
type LifecycleDef struct {
	DefaultState   string    `json:"default_state"`
	Id             string    `json:"id"`
	States         []string  `json:"states"`
	TerminalStates *[]string `json:"terminal_states,omitempty"`

	// Transitions {from: {to: {requires: [named-check, ...]}}}
	Transitions map[string]interface{} `json:"transitions"`
}

// MetricSeries defines model for MetricSeries.
type MetricSeries struct {
	EntityId string             `json:"entity_id"`
	Metric   string             `json:"metric"`
	Rollup   MetricSeriesRollup `json:"rollup"`
	Samples  []struct {
		Avg   *float32  `json:"avg"`
		Count *int      `json:"count"`
		Max   *float32  `json:"max"`
		Min   *float32  `json:"min"`
		Ts    time.Time `json:"ts"`

		// Value Raw sample value
		Value *float32 `json:"value"`
	} `json:"samples"`
	Trend *Trend `json:"trend,omitempty"`
}

// MetricSeriesRollup defines model for MetricSeries.Rollup.
type MetricSeriesRollup string

// Pattern defines model for Pattern.
type Pattern struct {
	Action      string `json:"action"`
	AppliesType string `json:"applies_type"`

	// Confidence Wilson lower bound, capped by evidence_count/5
	Confidence      float32            `json:"confidence"`
	EvidenceCount   int                `json:"evidence_count"`
	FailureCount    *int               `json:"failure_count,omitempty"`
	Id              openapi_types.UUID `json:"id"`
	LastValidatedAt *time.Time         `json:"last_validated_at"`
	Pattern         string             `json:"pattern"`
	Quarantined     *bool              `json:"quarantined,omitempty"`
	Slug            string             `json:"slug"`
	Status          PatternStatus      `json:"status"`
	SuccessCount    *int               `json:"success_count,omitempty"`
	Version         int                `json:"version"`
}

// PatternStatus defines model for Pattern.Status.
type PatternStatus string

// Problem defines model for Problem.
type Problem struct {
	Detail *string `json:"detail,omitempty"`

	// Errors Field-level validation errors (422)
	Errors *[]struct {
		Field  string `json:"field"`
		Reason string `json:"reason"`
	} `json:"errors,omitempty"`
	Instance *string `json:"instance,omitempty"`
	Status   int     `json:"status"`
	Title    string  `json:"title"`
	Type     *string `json:"type,omitempty"`
}

// ProvisionRequest defines model for ProvisionRequest.
type ProvisionRequest struct {
	// Attributes VMID, cores, ram_mb, disk_gb, ip, template, mounts, services
	Attributes *map[string]interface{} `json:"attributes,omitempty"`

	// Host Slug of the Proxmox host (e.g. host:hubris)
	Host string `json:"host"`

	// Name Human-readable name
	Name string `json:"name"`

	// Slug e.g. lxc:jellyfin
	Slug string `json:"slug"`

	// Type Must be lxc, vm, or docker-container
	Type string `json:"type"`
}

// ProvisionResponse defines model for ProvisionResponse.
type ProvisionResponse struct {
	Entity Entity `json:"entity"`

	// ExecutionId Execution ID to track provisioning progress
	ExecutionId openapi_types.UUID `json:"execution_id"`
}

// ProvisionStatus defines model for ProvisionStatus.
type ProvisionStatus struct {
	// Error Overall error if provisioning failed
	Error *string `json:"error"`
	Slug  string  `json:"slug"`

	// State Current entity state
	State string `json:"state"`
	Steps []struct {
		ErrorMessage *string                    `json:"error_message"`
		FinishedAt   *time.Time                 `json:"finished_at"`
		StartedAt    *time.Time                 `json:"started_at"`
		Status       ProvisionStatusStepsStatus `json:"status"`
		Step         string                     `json:"step"`
	} `json:"steps"`
}

// ProvisionStatusStepsStatus defines model for ProvisionStatus.Steps.Status.
type ProvisionStatusStepsStatus string

// Relationship defines model for Relationship.
type Relationship struct {
	Attributes *map[string]interface{} `json:"attributes"`

	// Source Slug of source entity
	Source string `json:"source"`

	// Target Slug of target entity
	Target    string     `json:"target"`
	Type      string     `json:"type"`
	ValidFrom time.Time  `json:"valid_from"`
	ValidTo   *time.Time `json:"valid_to"`
}

// RelationshipCreate defines model for RelationshipCreate.
type RelationshipCreate struct {
	Attributes *map[string]interface{} `json:"attributes,omitempty"`

	// Source UUID or slug
	Source string `json:"source"`

	// Target UUID or slug
	Target string `json:"target"`
	Type   string `json:"type"`
}

// RelationshipType defines model for RelationshipType.
type RelationshipType struct {
	Cardinality RelationshipTypeCardinality `json:"cardinality"`
	Description *string                     `json:"description,omitempty"`
	Inverse     *string                     `json:"inverse"`
	Name        string                      `json:"name"`

	// SourceType May be abstract
	SourceType string `json:"source_type"`

	// TargetType May be abstract
	TargetType string `json:"target_type"`
}

// RelationshipTypeCardinality defines model for RelationshipType.Cardinality.
type RelationshipTypeCardinality string

// RiskClass defines model for RiskClass.
type RiskClass struct {
	ApprovalRequired RiskClassApprovalRequired `json:"approval_required"`
	AutonomyAllowed  bool                      `json:"autonomy_allowed"`
	Description      *string                   `json:"description,omitempty"`
	Name             string                    `json:"name"`
}

// RiskClassApprovalRequired defines model for RiskClass.ApprovalRequired.
type RiskClassApprovalRequired string

// Signal defines model for Signal.
type Signal struct {
	CheckId         *string            `json:"check_id"`
	Evidence        *string            `json:"evidence"`
	FirstSeenAt     time.Time          `json:"first_seen_at"`
	FlapCount       *int               `json:"flap_count,omitempty"`
	HoldDownUntil   *time.Time         `json:"hold_down_until"`
	Id              openapi_types.UUID `json:"id"`
	Kind            string             `json:"kind"`
	LastSeenAt      time.Time          `json:"last_seen_at"`
	LikelyCause     *string            `json:"likely_cause"`
	MuteUntil       *time.Time         `json:"mute_until"`
	OccurrenceCount int                `json:"occurrence_count"`
	Severity        SignalSeverity     `json:"severity"`
	Slug            string             `json:"slug"`
	State           SignalState        `json:"state"`

	// Target Slug of the entity this concerns
	Target *string `json:"target"`
}

// SignalSeverity defines model for Signal.Severity.
type SignalSeverity string

// SignalState defines model for Signal.State.
type SignalState string

// Skill defines model for Skill.
type Skill struct {
	Action       string             `json:"action"`
	AppliesType  *string            `json:"applies_type"`
	ChangeReason *string            `json:"change_reason"`
	ChangedBy    *string            `json:"changed_by"`
	Id           openapi_types.UUID `json:"id"`
	LastUsedAt   *time.Time         `json:"last_used_at"`
	Name         string             `json:"name"`
	PatternIds   *[]string          `json:"pattern_ids,omitempty"`

	// Procedure Structured steps/verify/rollback/params (plan R3-9)
	Procedure struct {
		ExpectedDurationS *int                    `json:"expected_duration_s,omitempty"`
		KnownFailureModes *[]string               `json:"known_failure_modes,omitempty"`
		ParamsSchema      *map[string]interface{} `json:"params_schema,omitempty"`
		Rollback          *[]SkillStep            `json:"rollback,omitempty"`
		Steps             []SkillStep             `json:"steps"`
		Verify            []SkillStep             `json:"verify"`
	} `json:"procedure"`
	Slug        string      `json:"slug"`
	Status      SkillStatus `json:"status"`
	SuccessRate *float32    `json:"success_rate"`
	Version     int         `json:"version"`
}

// SkillStatus defines model for Skill.Status.
type SkillStatus string

// SkillStep defines model for SkillStep.
type SkillStep struct {
	// Command Go template over params
	Command string `json:"command"`
	Expect  *struct {
		ExitCode       *int    `json:"exit_code,omitempty"`
		StdoutContains *string `json:"stdout_contains,omitempty"`
	} `json:"expect,omitempty"`
	Name  *string `json:"name,omitempty"`
	Retry *struct {
		Attempts *int `json:"attempts,omitempty"`
		DelayS   *int `json:"delay_s,omitempty"`
	} `json:"retry,omitempty"`
	Runner SkillStepRunner `json:"runner"`

	// Target Go template over params
	Target   *string `json:"target,omitempty"`
	TimeoutS *int    `json:"timeout_s,omitempty"`
}

// SkillStepRunner defines model for SkillStep.Runner.
type SkillStepRunner string

// Trend defines model for Trend.
type Trend struct {
	Anomaly   *bool          `json:"anomaly,omitempty"`
	Direction TrendDirection `json:"direction"`

	// Forecast Simple linear projection, 7d out
	Forecast *float32 `json:"forecast"`
	Metric   string   `json:"metric"`

	// Slope Linear fit per day
	Slope *float32 `json:"slope"`
}

// TrendDirection defines model for Trend.Direction.
type TrendDirection string

// Cursor defines model for Cursor.
type Cursor = string

// EntityId defines model for EntityId.
type EntityId = string

// EntitySlug defines model for EntitySlug.
type EntitySlug = string

// FromTime defines model for FromTime.
type FromTime = time.Time

// IdempotencyKey defines model for IdempotencyKey.
type IdempotencyKey = string

// IfMatch defines model for IfMatch.
type IfMatch = string

// Limit defines model for Limit.
type Limit = int

// ToTime defines model for ToTime.
type ToTime = time.Time

// PendingApproval defines model for PendingApproval.
type PendingApproval = Approval

// SignalUpdated defines model for SignalUpdated.
type SignalUpdated = Signal

// QueryAgentActivityParams defines parameters for QueryAgentActivity.
type QueryAgentActivityParams struct {
	AgentId      *string   `form:"agent_id,omitempty" json:"agent_id,omitempty"`
	ActivityType *string   `form:"activity_type,omitempty" json:"activity_type,omitempty"`
	EntityId     *string   `form:"entity_id,omitempty" json:"entity_id,omitempty"`
	From         *FromTime `form:"from,omitempty" json:"from,omitempty"`
	To           *ToTime   `form:"to,omitempty" json:"to,omitempty"`

	// Cursor Opaque cursor from a previous response's next_cursor
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListApprovalsParams defines parameters for ListApprovals.
type ListApprovalsParams struct {
	Status *ListApprovalsParamsStatus `form:"status,omitempty" json:"status,omitempty"`
	Kind   *ListApprovalsParamsKind   `form:"kind,omitempty" json:"kind,omitempty"`

	// Cursor Opaque cursor from a previous response's next_cursor
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListApprovalsParamsStatus defines parameters for ListApprovals.
type ListApprovalsParamsStatus string

// ListApprovalsParamsKind defines parameters for ListApprovals.
type ListApprovalsParamsKind string

// DecideApprovalJSONBody defines parameters for DecideApproval.
type DecideApprovalJSONBody struct {
	Decision DecideApprovalJSONBodyDecision `json:"decision"`
	Note     *string                        `json:"note,omitempty"`

	// Token HMAC approval token (single-use, verified server-side)
	Token *string `json:"token,omitempty"`
}

// DecideApprovalParams defines parameters for DecideApproval.
type DecideApprovalParams struct {
	// IdempotencyKey Client-generated key; replays within 24h return the original response
	IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
}

// DecideApprovalJSONBodyDecision defines parameters for DecideApproval.
type DecideApprovalJSONBodyDecision string

// QueryAuditParams defines parameters for QueryAudit.
type QueryAuditParams struct {
	ActorType     *string   `form:"actor_type,omitempty" json:"actor_type,omitempty"`
	ActorId       *string   `form:"actor_id,omitempty" json:"actor_id,omitempty"`
	EntityId      *string   `form:"entity_id,omitempty" json:"entity_id,omitempty"`
	Action        *string   `form:"action,omitempty" json:"action,omitempty"`
	CorrelationId *string   `form:"correlation_id,omitempty" json:"correlation_id,omitempty"`
	From          *FromTime `form:"from,omitempty" json:"from,omitempty"`
	To            *ToTime   `form:"to,omitempty" json:"to,omitempty"`

	// Cursor Opaque cursor from a previous response's next_cursor
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListChecksParams defines parameters for ListChecks.
type ListChecksParams struct {
	Kind    *string `form:"kind,omitempty" json:"kind,omitempty"`
	Target  *string `form:"target,omitempty" json:"target,omitempty"`
	Enabled *bool   `form:"enabled,omitempty" json:"enabled,omitempty"`

	// Cursor Opaque cursor from a previous response's next_cursor
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// CreateCheckParams defines parameters for CreateCheck.
type CreateCheckParams struct {
	// IdempotencyKey Client-generated key; replays within 24h return the original response
	IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
}

// PatchCheckParams defines parameters for PatchCheck.
type PatchCheckParams struct {
	// IfMatch ETag from a prior GET; 412 on version mismatch
	IfMatch IfMatch `json:"If-Match"`
}

// ListClassificationsParams defines parameters for ListClassifications.
type ListClassificationsParams struct {
	SignalId *string                         `form:"signal_id,omitempty" json:"signal_id,omitempty"`
	EntityId *string                         `form:"entity_id,omitempty" json:"entity_id,omitempty"`
	Route    *ListClassificationsParamsRoute `form:"route,omitempty" json:"route,omitempty"`

	// Cursor Opaque cursor from a previous response's next_cursor
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListClassificationsParamsRoute defines parameters for ListClassifications.
type ListClassificationsParamsRoute string

// GetClientContextParams defines parameters for GetClientContext.
type GetClientContextParams struct {
	// Since Return only changes since this timestamp (RFC 3339)
	Since *time.Time `form:"since,omitempty" json:"since,omitempty"`
}

// ListEntitiesParams defines parameters for ListEntities.
type ListEntitiesParams struct {
	// Type Filter by entity type (includes descendants)
	Type   *string `form:"type,omitempty" json:"type,omitempty"`
	State  *string `form:"state,omitempty" json:"state,omitempty"`
	Domain *string `form:"domain,omitempty" json:"domain,omitempty"`
	Layer  *string `form:"layer,omitempty" json:"layer,omitempty"`

	// Q Substring match on slug/name
	Q *string `form:"q,omitempty" json:"q,omitempty"`

	// Cursor Opaque cursor from a previous response's next_cursor
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// CreateEntityParams defines parameters for CreateEntity.
type CreateEntityParams struct {
	// IdempotencyKey Client-generated key; replays within 24h return the original response
	IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
}

// ProvisionEntityParams defines parameters for ProvisionEntity.
type ProvisionEntityParams struct {
	// IdempotencyKey Client-generated key; replays within 24h return the original response
	IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
}

// PatchEntityParams defines parameters for PatchEntity.
type PatchEntityParams struct {
	// IfMatch ETag from a prior GET; 412 on version mismatch
	IfMatch IfMatch `json:"If-Match"`
}

// GetBlastRadiusParams defines parameters for GetBlastRadius.
type GetBlastRadiusParams struct {
	Depth *int `form:"depth,omitempty" json:"depth,omitempty"`
}

// GetEntityRelationsParams defines parameters for GetEntityRelations.
type GetEntityRelationsParams struct {
	RelType   *string                            `form:"rel_type,omitempty" json:"rel_type,omitempty"`
	Direction *GetEntityRelationsParamsDirection `form:"direction,omitempty" json:"direction,omitempty"`
}

// GetEntityRelationsParamsDirection defines parameters for GetEntityRelations.
type GetEntityRelationsParamsDirection string

// QueryEventsParams defines parameters for QueryEvents.
type QueryEventsParams struct {
	Type          *string   `form:"type,omitempty" json:"type,omitempty"`
	EntityId      *string   `form:"entity_id,omitempty" json:"entity_id,omitempty"`
	Severity      *string   `form:"severity,omitempty" json:"severity,omitempty"`
	CorrelationId *string   `form:"correlation_id,omitempty" json:"correlation_id,omitempty"`
	From          *FromTime `form:"from,omitempty" json:"from,omitempty"`
	To            *ToTime   `form:"to,omitempty" json:"to,omitempty"`

	// Cursor Opaque cursor from a previous response's next_cursor
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// StreamEventsParams defines parameters for StreamEvents.
type StreamEventsParams struct {
	// Type Filter by event type prefix
	Type        *string `form:"type,omitempty" json:"type,omitempty"`
	LastEventID *string `json:"Last-Event-ID,omitempty"`
}

// ListExecutionsParams defines parameters for ListExecutions.
type ListExecutionsParams struct {
	Status        *string `form:"status,omitempty" json:"status,omitempty"`
	Target        *string `form:"target,omitempty" json:"target,omitempty"`
	Action        *string `form:"action,omitempty" json:"action,omitempty"`
	CorrelationId *string `form:"correlation_id,omitempty" json:"correlation_id,omitempty"`

	// Cursor Opaque cursor from a previous response's next_cursor
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// RequestExecutionParams defines parameters for RequestExecution.
type RequestExecutionParams struct {
	// IdempotencyKey Client-generated key; replays within 24h return the original response
	IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
}

// GetGraphParams defines parameters for GetGraph.
type GetGraphParams struct {
	// Root Start entity (UUID or slug); omit for whole graph (capped)
	Root    *string   `form:"root,omitempty" json:"root,omitempty"`
	Depth   *int      `form:"depth,omitempty" json:"depth,omitempty"`
	RelType *[]string `form:"rel_type,omitempty" json:"rel_type,omitempty"`

	// Include include=status joins entity_status and populates GraphView.health
	Include *[]GetGraphParamsInclude `form:"include,omitempty" json:"include,omitempty"`
}

// GetGraphParamsInclude defines parameters for GetGraph.
type GetGraphParamsInclude string

// SearchKnowledgeParams defines parameters for SearchKnowledge.
type SearchKnowledgeParams struct {
	Q     string `form:"q" json:"q"`
	Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"`
}

// QueryMetricsParams defines parameters for QueryMetrics.
type QueryMetricsParams struct {
	EntityId *string                   `form:"entity_id,omitempty" json:"entity_id,omitempty"`
	Metric   *[]string                 `form:"metric,omitempty" json:"metric,omitempty"`
	Rollup   *QueryMetricsParamsRollup `form:"rollup,omitempty" json:"rollup,omitempty"`
	From     *FromTime                 `form:"from,omitempty" json:"from,omitempty"`
	To       *ToTime                   `form:"to,omitempty" json:"to,omitempty"`
}

// QueryMetricsParamsRollup defines parameters for QueryMetrics.
type QueryMetricsParamsRollup string

// CreateEntityTypeParams defines parameters for CreateEntityType.
type CreateEntityTypeParams struct {
	// IdempotencyKey Client-generated key; replays within 24h return the original response
	IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
}

// PatchEntityTypeParams defines parameters for PatchEntityType.
type PatchEntityTypeParams struct {
	// IfMatch ETag from a prior GET; 412 on version mismatch
	IfMatch IfMatch `json:"If-Match"`
}

// ListPatternsParams defines parameters for ListPatterns.
type ListPatternsParams struct {
	EntityType *string `form:"entity_type,omitempty" json:"entity_type,omitempty"`
	Action     *string `form:"action,omitempty" json:"action,omitempty"`
	Status     *string `form:"status,omitempty" json:"status,omitempty"`

	// Cursor Opaque cursor from a previous response's next_cursor
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// PatchPatternJSONBody defines parameters for PatchPattern.
type PatchPatternJSONBody struct {
	Note        *string                     `json:"note,omitempty"`
	Quarantined *bool                       `json:"quarantined,omitempty"`
	Status      *PatchPatternJSONBodyStatus `json:"status,omitempty"`
}

// PatchPatternParams defines parameters for PatchPattern.
type PatchPatternParams struct {
	// IfMatch ETag from a prior GET; 412 on version mismatch
	IfMatch IfMatch `json:"If-Match"`
}

// PatchPatternJSONBodyStatus defines parameters for PatchPattern.
type PatchPatternJSONBodyStatus string

// CreateApprovalRuleParams defines parameters for CreateApprovalRule.
type CreateApprovalRuleParams struct {
	// IdempotencyKey Client-generated key; replays within 24h return the original response
	IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
}

// PatchApprovalRuleParams defines parameters for PatchApprovalRule.
type PatchApprovalRuleParams struct {
	// IfMatch ETag from a prior GET; 412 on version mismatch
	IfMatch IfMatch `json:"If-Match"`
}

// PatchAutonomySettingsJSONBody defines parameters for PatchAutonomySettings.
type PatchAutonomySettingsJSONBody map[string]string

// EndRelationshipParams defines parameters for EndRelationship.
type EndRelationshipParams struct {
	Source  string `form:"source" json:"source"`
	Target  string `form:"target" json:"target"`
	RelType string `form:"rel_type" json:"rel_type"`
}

// CreateRelationshipParams defines parameters for CreateRelationship.
type CreateRelationshipParams struct {
	// IdempotencyKey Client-generated key; replays within 24h return the original response
	IdempotencyKey *IdempotencyKey `json:"Idempotency-Key,omitempty"`
}

// ListSignalsParams defines parameters for ListSignals.
type ListSignalsParams struct {
	State    *string                    `form:"state,omitempty" json:"state,omitempty"`
	Severity *ListSignalsParamsSeverity `form:"severity,omitempty" json:"severity,omitempty"`
	EntityId *string                    `form:"entity_id,omitempty" json:"entity_id,omitempty"`
	Kind     *string                    `form:"kind,omitempty" json:"kind,omitempty"`

	// Cursor Opaque cursor from a previous response's next_cursor
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// ListSignalsParamsSeverity defines parameters for ListSignals.
type ListSignalsParamsSeverity string

// MuteSignalJSONBody defines parameters for MuteSignal.
type MuteSignalJSONBody struct {
	MuteUntil time.Time `json:"mute_until"`
	Note      *string   `json:"note,omitempty"`
}

// ResolveSignalJSONBody defines parameters for ResolveSignal.
type ResolveSignalJSONBody struct {
	Note *string `json:"note,omitempty"`
}

// ListSkillsParams defines parameters for ListSkills.
type ListSkillsParams struct {
	AppliesTo *string `form:"applies_to,omitempty" json:"applies_to,omitempty"`
	Action    *string `form:"action,omitempty" json:"action,omitempty"`
	Status    *string `form:"status,omitempty" json:"status,omitempty"`

	// Cursor Opaque cursor from a previous response's next_cursor
	Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"`
	Limit  *Limit  `form:"limit,omitempty" json:"limit,omitempty"`
}

// PatchSkillJSONBody defines parameters for PatchSkill.
type PatchSkillJSONBody struct {
	Note          *string                   `json:"note,omitempty"`
	PinnedVersion *int                      `json:"pinned_version,omitempty"`
	Status        *PatchSkillJSONBodyStatus `json:"status,omitempty"`
}

// PatchSkillParams defines parameters for PatchSkill.
type PatchSkillParams struct {
	// IfMatch ETag from a prior GET; 412 on version mismatch
	IfMatch IfMatch `json:"If-Match"`
}

// PatchSkillJSONBodyStatus defines parameters for PatchSkill.
type PatchSkillJSONBodyStatus string

// GetTrendsParams defines parameters for GetTrends.
type GetTrendsParams struct {
	From *FromTime `form:"from,omitempty" json:"from,omitempty"`
	To   *ToTime   `form:"to,omitempty" json:"to,omitempty"`
}

// DecideApprovalJSONRequestBody defines body for DecideApproval for application/json ContentType.
type DecideApprovalJSONRequestBody DecideApprovalJSONBody

// CreateCheckJSONRequestBody defines body for CreateCheck for application/json ContentType.
type CreateCheckJSONRequestBody = CheckCreate

// PatchCheckJSONRequestBody defines body for PatchCheck for application/json ContentType.
type PatchCheckJSONRequestBody = CheckPatch

// EnrollClientJSONRequestBody defines body for EnrollClient for application/json ContentType.
type EnrollClientJSONRequestBody = EnrollRequest

// CreateEntityJSONRequestBody defines body for CreateEntity for application/json ContentType.
type CreateEntityJSONRequestBody = EntityCreate

// ProvisionEntityJSONRequestBody defines body for ProvisionEntity for application/json ContentType.
type ProvisionEntityJSONRequestBody = ProvisionRequest

// PatchEntityJSONRequestBody defines body for PatchEntity for application/json ContentType.
type PatchEntityJSONRequestBody = EntityPatch

// RequestExecutionJSONRequestBody defines body for RequestExecution for application/json ContentType.
type RequestExecutionJSONRequestBody = ExecutionRequest

// CreateEntityTypeJSONRequestBody defines body for CreateEntityType for application/json ContentType.
type CreateEntityTypeJSONRequestBody = EntityTypeCreate

// PatchEntityTypeJSONRequestBody defines body for PatchEntityType for application/json ContentType.
type PatchEntityTypeJSONRequestBody = EntityTypePatch

// PatchPatternJSONRequestBody defines body for PatchPattern for application/json ContentType.
type PatchPatternJSONRequestBody PatchPatternJSONBody

// CreateApprovalRuleJSONRequestBody defines body for CreateApprovalRule for application/json ContentType.
type CreateApprovalRuleJSONRequestBody = ApprovalRuleCreate

// PatchApprovalRuleJSONRequestBody defines body for PatchApprovalRule for application/json ContentType.
type PatchApprovalRuleJSONRequestBody = ApprovalRuleCreate

// PatchAutonomySettingsJSONRequestBody defines body for PatchAutonomySettings for application/json ContentType.
type PatchAutonomySettingsJSONRequestBody PatchAutonomySettingsJSONBody

// CreateRelationshipJSONRequestBody defines body for CreateRelationship for application/json ContentType.
type CreateRelationshipJSONRequestBody = RelationshipCreate

// MuteSignalJSONRequestBody defines body for MuteSignal for application/json ContentType.
type MuteSignalJSONRequestBody MuteSignalJSONBody

// ResolveSignalJSONRequestBody defines body for ResolveSignal for application/json ContentType.
type ResolveSignalJSONRequestBody ResolveSignalJSONBody

// PatchSkillJSONRequestBody defines body for PatchSkill for application/json ContentType.
type PatchSkillJSONRequestBody PatchSkillJSONBody

// ServerInterface represents all server handlers.
type ServerInterface interface {
	// Agent behavior log
	// (GET /agent-activity)
	QueryAgentActivity(w http.ResponseWriter, r *http.Request, params QueryAgentActivityParams)
	// List approvals
	// (GET /approvals)
	ListApprovals(w http.ResponseWriter, r *http.Request, params ListApprovalsParams)
	// Approve or deny (single-use token verified server-side)
	// (POST /approvals/{id}/decision)
	DecideApproval(w http.ResponseWriter, r *http.Request, id EntityId, params DecideApprovalParams)
	// Audit log
	// (GET /audit)
	QueryAudit(w http.ResponseWriter, r *http.Request, params QueryAuditParams)
	// List check definitions
	// (GET /checks)
	ListChecks(w http.ResponseWriter, r *http.Request, params ListChecksParams)
	// Create a check (checks-as-data, plan R3-7)
	// (POST /checks)
	CreateCheck(w http.ResponseWriter, r *http.Request, params CreateCheckParams)
	// Update or disable a check
	// (PATCH /checks/{id})
	PatchCheck(w http.ResponseWriter, r *http.Request, id EntityId, params PatchCheckParams)
	// Classifier decisions (the autonomous-decision audit trail)
	// (GET /classifications)
	ListClassifications(w http.ResponseWriter, r *http.Request, params ListClassificationsParams)
	// Enroll a new client — issue age key, create Infisical identity
	// (POST /clients/enroll)
	EnrollClient(w http.ResponseWriter, r *http.Request)
	// Get agent context delta since a timestamp
	// (GET /clients/{slug}/context)
	GetClientContext(w http.ResponseWriter, r *http.Request, slug EntitySlug, params GetClientContextParams)
	// List secrets accessible to this client
	// (GET /clients/{slug}/secrets)
	GetClientSecrets(w http.ResponseWriter, r *http.Request, slug EntitySlug)
	// One-round-trip overview for the control room home page
	// (GET /dashboard/summary)
	GetDashboardSummary(w http.ResponseWriter, r *http.Request)
	// List entities
	// (GET /entities)
	ListEntities(w http.ResponseWriter, r *http.Request, params ListEntitiesParams)
	// Create an entity
	// (POST /entities)
	CreateEntity(w http.ResponseWriter, r *http.Request, params CreateEntityParams)
	// Provision a compute entity (LXC, VM, container) on a host
	// (POST /entities/provision)
	ProvisionEntity(w http.ResponseWriter, r *http.Request, params ProvisionEntityParams)
	// Get entity by UUID or slug
	// (GET /entities/{id})
	GetEntity(w http.ResponseWriter, r *http.Request, id EntityId)
	// Update attributes or transition lifecycle state
	// (PATCH /entities/{id})
	PatchEntity(w http.ResponseWriter, r *http.Request, id EntityId, params PatchEntityParams)
	// Entities affected if this entity fails
	// (GET /entities/{id}/blast-radius)
	GetBlastRadius(w http.ResponseWriter, r *http.Request, id EntityId, params GetBlastRadiusParams)
	// Direct relationships of an entity (both directions)
	// (GET /entities/{id}/relations)
	GetEntityRelations(w http.ResponseWriter, r *http.Request, id EntityId, params GetEntityRelationsParams)
	// Poll provisioning progress for a compute entity
	// (GET /entities/{slug}/provision/status)
	GetProvisionStatus(w http.ResponseWriter, r *http.Request, slug EntitySlug)
	// Historical events
	// (GET /events)
	QueryEvents(w http.ResponseWriter, r *http.Request, params QueryEventsParams)
	// Live event stream (SSE)
	// (GET /events/stream)
	StreamEvents(w http.ResponseWriter, r *http.Request, params StreamEventsParams)
	// List executions
	// (GET /executions)
	ListExecutions(w http.ResponseWriter, r *http.Request, params ListExecutionsParams)
	// Request an execution (classify → approval check → enqueue)
	// (POST /executions)
	RequestExecution(w http.ResponseWriter, r *http.Request, params RequestExecutionParams)
	// Execution status + result
	// (GET /executions/{id})
	GetExecution(w http.ResponseWriter, r *http.Request, id EntityId)
	// Cancel a proposed/executing execution
	// (POST /executions/{id}/cancel)
	CancelExecution(w http.ResponseWriter, r *http.Request, id EntityId)
	// Regenerate seed YAMLs from current DB state (DR / version control)
	// (GET /export)
	ExportSeeds(w http.ResponseWriter, r *http.Request)
	// Subgraph for visualization (nodes + edges)
	// (GET /graph)
	GetGraph(w http.ResponseWriter, r *http.Request, params GetGraphParams)
	// Fleet health summary with trend indicators
	// (GET /health)
	GetFleetHealth(w http.ResponseWriter, r *http.Request)
	// Full-text search over knowledge entities (documents, runbooks)
	// (GET /knowledge/search)
	SearchKnowledge(w http.ResponseWriter, r *http.Request, params SearchKnowledgeParams)
	// All documents/runbooks linked to an entity
	// (GET /knowledge/{entity_id})
	GetEntityKnowledge(w http.ResponseWriter, r *http.Request, entityId string)
	// Query time-series metrics
	// (GET /metrics)
	QueryMetrics(w http.ResponseWriter, r *http.Request, params QueryMetricsParams)
	// Full ontology — entity types, relationship types, lifecycles
	// (GET /ontology)
	GetOntology(w http.ResponseWriter, r *http.Request)
	// Extend the ontology with a new entity type
	// (POST /ontology/entity-types)
	CreateEntityType(w http.ResponseWriter, r *http.Request, params CreateEntityTypeParams)
	// Update or deprecate an entity type
	// (PATCH /ontology/entity-types/{name})
	PatchEntityType(w http.ResponseWriter, r *http.Request, name string, params PatchEntityTypeParams)
	// List patterns
	// (GET /patterns)
	ListPatterns(w http.ResponseWriter, r *http.Request, params ListPatternsParams)
	// Transition a pattern (activate / invalidate / deprecate)
	// (PATCH /patterns/{id})
	PatchPattern(w http.ResponseWriter, r *http.Request, id EntityId, params PatchPatternParams)
	// List approval rules
	// (GET /policy/approval-rules)
	ListApprovalRules(w http.ResponseWriter, r *http.Request)
	// Propose a new approval rule (dual-control)
	// (POST /policy/approval-rules)
	CreateApprovalRule(w http.ResponseWriter, r *http.Request, params CreateApprovalRuleParams)
	// Propose a rule change (dual-control)
	// (PATCH /policy/approval-rules/{id})
	PatchApprovalRule(w http.ResponseWriter, r *http.Request, id EntityId, params PatchApprovalRuleParams)
	// Autonomy settings (kill-switch, never-auto-act list)
	// (GET /policy/autonomy)
	GetAutonomySettings(w http.ResponseWriter, r *http.Request)
	// Propose autonomy changes (dual-control; kill-switch OFF is immediate)
	// (PATCH /policy/autonomy)
	PatchAutonomySettings(w http.ResponseWriter, r *http.Request)
	// List risk classes
	// (GET /policy/risk-classes)
	ListRiskClasses(w http.ResponseWriter, r *http.Request)
	// End a relationship (sets valid_to; the edge is kept for history)
	// (DELETE /relationships)
	EndRelationship(w http.ResponseWriter, r *http.Request, params EndRelationshipParams)
	// Create a relationship edge
	// (POST /relationships)
	CreateRelationship(w http.ResponseWriter, r *http.Request, params CreateRelationshipParams)
	// List signals
	// (GET /signals)
	ListSignals(w http.ResponseWriter, r *http.Request, params ListSignalsParams)
	// Acknowledge a signal
	// (POST /signals/{id}/ack)
	AckSignal(w http.ResponseWriter, r *http.Request, id EntityId)
	// Mute a signal for a TTL
	// (POST /signals/{id}/mute)
	MuteSignal(w http.ResponseWriter, r *http.Request, id EntityId)
	// Resolve a signal manually
	// (POST /signals/{id}/resolve)
	ResolveSignal(w http.ResponseWriter, r *http.Request, id EntityId)
	// List skills (latest version per skill)
	// (GET /skills)
	ListSkills(w http.ResponseWriter, r *http.Request, params ListSkillsParams)
	// Transition a skill or pin a version
	// (PATCH /skills/{id})
	PatchSkill(w http.ResponseWriter, r *http.Request, id EntityId, params PatchSkillParams)
	// Version history of a skill
	// (GET /skills/{id}/versions)
	ListSkillVersions(w http.ResponseWriter, r *http.Request, id EntityId)
	// Trend analysis for all metrics on an entity
	// (GET /trends/{entity_id})
	GetTrends(w http.ResponseWriter, r *http.Request, entityId string, params GetTrendsParams)
}

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

type Unimplemented struct{}

// Agent behavior log
// (GET /agent-activity)
func (_ Unimplemented) QueryAgentActivity(w http.ResponseWriter, r *http.Request, params QueryAgentActivityParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List approvals
// (GET /approvals)
func (_ Unimplemented) ListApprovals(w http.ResponseWriter, r *http.Request, params ListApprovalsParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Approve or deny (single-use token verified server-side)
// (POST /approvals/{id}/decision)
func (_ Unimplemented) DecideApproval(w http.ResponseWriter, r *http.Request, id EntityId, params DecideApprovalParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Audit log
// (GET /audit)
func (_ Unimplemented) QueryAudit(w http.ResponseWriter, r *http.Request, params QueryAuditParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List check definitions
// (GET /checks)
func (_ Unimplemented) ListChecks(w http.ResponseWriter, r *http.Request, params ListChecksParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Create a check (checks-as-data, plan R3-7)
// (POST /checks)
func (_ Unimplemented) CreateCheck(w http.ResponseWriter, r *http.Request, params CreateCheckParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Update or disable a check
// (PATCH /checks/{id})
func (_ Unimplemented) PatchCheck(w http.ResponseWriter, r *http.Request, id EntityId, params PatchCheckParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Classifier decisions (the autonomous-decision audit trail)
// (GET /classifications)
func (_ Unimplemented) ListClassifications(w http.ResponseWriter, r *http.Request, params ListClassificationsParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Enroll a new client — issue age key, create Infisical identity
// (POST /clients/enroll)
func (_ Unimplemented) EnrollClient(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Get agent context delta since a timestamp
// (GET /clients/{slug}/context)
func (_ Unimplemented) GetClientContext(w http.ResponseWriter, r *http.Request, slug EntitySlug, params GetClientContextParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List secrets accessible to this client
// (GET /clients/{slug}/secrets)
func (_ Unimplemented) GetClientSecrets(w http.ResponseWriter, r *http.Request, slug EntitySlug) {
	w.WriteHeader(http.StatusNotImplemented)
}

// One-round-trip overview for the control room home page
// (GET /dashboard/summary)
func (_ Unimplemented) GetDashboardSummary(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List entities
// (GET /entities)
func (_ Unimplemented) ListEntities(w http.ResponseWriter, r *http.Request, params ListEntitiesParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Create an entity
// (POST /entities)
func (_ Unimplemented) CreateEntity(w http.ResponseWriter, r *http.Request, params CreateEntityParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Provision a compute entity (LXC, VM, container) on a host
// (POST /entities/provision)
func (_ Unimplemented) ProvisionEntity(w http.ResponseWriter, r *http.Request, params ProvisionEntityParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Get entity by UUID or slug
// (GET /entities/{id})
func (_ Unimplemented) GetEntity(w http.ResponseWriter, r *http.Request, id EntityId) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Update attributes or transition lifecycle state
// (PATCH /entities/{id})
func (_ Unimplemented) PatchEntity(w http.ResponseWriter, r *http.Request, id EntityId, params PatchEntityParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Entities affected if this entity fails
// (GET /entities/{id}/blast-radius)
func (_ Unimplemented) GetBlastRadius(w http.ResponseWriter, r *http.Request, id EntityId, params GetBlastRadiusParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Direct relationships of an entity (both directions)
// (GET /entities/{id}/relations)
func (_ Unimplemented) GetEntityRelations(w http.ResponseWriter, r *http.Request, id EntityId, params GetEntityRelationsParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Poll provisioning progress for a compute entity
// (GET /entities/{slug}/provision/status)
func (_ Unimplemented) GetProvisionStatus(w http.ResponseWriter, r *http.Request, slug EntitySlug) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Historical events
// (GET /events)
func (_ Unimplemented) QueryEvents(w http.ResponseWriter, r *http.Request, params QueryEventsParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Live event stream (SSE)
// (GET /events/stream)
func (_ Unimplemented) StreamEvents(w http.ResponseWriter, r *http.Request, params StreamEventsParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List executions
// (GET /executions)
func (_ Unimplemented) ListExecutions(w http.ResponseWriter, r *http.Request, params ListExecutionsParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Request an execution (classify → approval check → enqueue)
// (POST /executions)
func (_ Unimplemented) RequestExecution(w http.ResponseWriter, r *http.Request, params RequestExecutionParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Execution status + result
// (GET /executions/{id})
func (_ Unimplemented) GetExecution(w http.ResponseWriter, r *http.Request, id EntityId) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Cancel a proposed/executing execution
// (POST /executions/{id}/cancel)
func (_ Unimplemented) CancelExecution(w http.ResponseWriter, r *http.Request, id EntityId) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Regenerate seed YAMLs from current DB state (DR / version control)
// (GET /export)
func (_ Unimplemented) ExportSeeds(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Subgraph for visualization (nodes + edges)
// (GET /graph)
func (_ Unimplemented) GetGraph(w http.ResponseWriter, r *http.Request, params GetGraphParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Fleet health summary with trend indicators
// (GET /health)
func (_ Unimplemented) GetFleetHealth(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Full-text search over knowledge entities (documents, runbooks)
// (GET /knowledge/search)
func (_ Unimplemented) SearchKnowledge(w http.ResponseWriter, r *http.Request, params SearchKnowledgeParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// All documents/runbooks linked to an entity
// (GET /knowledge/{entity_id})
func (_ Unimplemented) GetEntityKnowledge(w http.ResponseWriter, r *http.Request, entityId string) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Query time-series metrics
// (GET /metrics)
func (_ Unimplemented) QueryMetrics(w http.ResponseWriter, r *http.Request, params QueryMetricsParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Full ontology — entity types, relationship types, lifecycles
// (GET /ontology)
func (_ Unimplemented) GetOntology(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Extend the ontology with a new entity type
// (POST /ontology/entity-types)
func (_ Unimplemented) CreateEntityType(w http.ResponseWriter, r *http.Request, params CreateEntityTypeParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Update or deprecate an entity type
// (PATCH /ontology/entity-types/{name})
func (_ Unimplemented) PatchEntityType(w http.ResponseWriter, r *http.Request, name string, params PatchEntityTypeParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List patterns
// (GET /patterns)
func (_ Unimplemented) ListPatterns(w http.ResponseWriter, r *http.Request, params ListPatternsParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Transition a pattern (activate / invalidate / deprecate)
// (PATCH /patterns/{id})
func (_ Unimplemented) PatchPattern(w http.ResponseWriter, r *http.Request, id EntityId, params PatchPatternParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List approval rules
// (GET /policy/approval-rules)
func (_ Unimplemented) ListApprovalRules(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Propose a new approval rule (dual-control)
// (POST /policy/approval-rules)
func (_ Unimplemented) CreateApprovalRule(w http.ResponseWriter, r *http.Request, params CreateApprovalRuleParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Propose a rule change (dual-control)
// (PATCH /policy/approval-rules/{id})
func (_ Unimplemented) PatchApprovalRule(w http.ResponseWriter, r *http.Request, id EntityId, params PatchApprovalRuleParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Autonomy settings (kill-switch, never-auto-act list)
// (GET /policy/autonomy)
func (_ Unimplemented) GetAutonomySettings(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Propose autonomy changes (dual-control; kill-switch OFF is immediate)
// (PATCH /policy/autonomy)
func (_ Unimplemented) PatchAutonomySettings(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List risk classes
// (GET /policy/risk-classes)
func (_ Unimplemented) ListRiskClasses(w http.ResponseWriter, r *http.Request) {
	w.WriteHeader(http.StatusNotImplemented)
}

// End a relationship (sets valid_to; the edge is kept for history)
// (DELETE /relationships)
func (_ Unimplemented) EndRelationship(w http.ResponseWriter, r *http.Request, params EndRelationshipParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Create a relationship edge
// (POST /relationships)
func (_ Unimplemented) CreateRelationship(w http.ResponseWriter, r *http.Request, params CreateRelationshipParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List signals
// (GET /signals)
func (_ Unimplemented) ListSignals(w http.ResponseWriter, r *http.Request, params ListSignalsParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Acknowledge a signal
// (POST /signals/{id}/ack)
func (_ Unimplemented) AckSignal(w http.ResponseWriter, r *http.Request, id EntityId) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Mute a signal for a TTL
// (POST /signals/{id}/mute)
func (_ Unimplemented) MuteSignal(w http.ResponseWriter, r *http.Request, id EntityId) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Resolve a signal manually
// (POST /signals/{id}/resolve)
func (_ Unimplemented) ResolveSignal(w http.ResponseWriter, r *http.Request, id EntityId) {
	w.WriteHeader(http.StatusNotImplemented)
}

// List skills (latest version per skill)
// (GET /skills)
func (_ Unimplemented) ListSkills(w http.ResponseWriter, r *http.Request, params ListSkillsParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Transition a skill or pin a version
// (PATCH /skills/{id})
func (_ Unimplemented) PatchSkill(w http.ResponseWriter, r *http.Request, id EntityId, params PatchSkillParams) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Version history of a skill
// (GET /skills/{id}/versions)
func (_ Unimplemented) ListSkillVersions(w http.ResponseWriter, r *http.Request, id EntityId) {
	w.WriteHeader(http.StatusNotImplemented)
}

// Trend analysis for all metrics on an entity
// (GET /trends/{entity_id})
func (_ Unimplemented) GetTrends(w http.ResponseWriter, r *http.Request, entityId string, params GetTrendsParams) {
	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

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

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

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

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

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

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

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

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

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

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

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

	err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), &params.Cursor)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", 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.QueryAgentActivity(w, r, params)
	}))

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

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

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

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

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

	err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), &params.Cursor)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", 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.ListApprovals(w, r, params)
	}))

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	// ------------- Path parameter "id" -------------
	var id EntityId

	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, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

	headers := r.Header

	// ------------- Optional header parameter "Idempotency-Key" -------------
	if valueList, found := headers[http.CanonicalHeaderKey("Idempotency-Key")]; found {
		var IdempotencyKey IdempotencyKey
		n := len(valueList)
		if n != 1 {
			siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "Idempotency-Key", Count: n})
			return
		}

		err = runtime.BindStyledParameterWithOptions("simple", "Idempotency-Key", valueList[0], &IdempotencyKey, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false})
		if err != nil {
			siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Idempotency-Key", Err: err})
			return
		}

		params.IdempotencyKey = &IdempotencyKey

	}

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), &params.Cursor)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", 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.QueryAudit(w, r, params)
	}))

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

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

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

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

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

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

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

	err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), &params.Cursor)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", 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.ListChecks(w, r, params)
	}))

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

	headers := r.Header

	// ------------- Optional header parameter "Idempotency-Key" -------------
	if valueList, found := headers[http.CanonicalHeaderKey("Idempotency-Key")]; found {
		var IdempotencyKey IdempotencyKey
		n := len(valueList)
		if n != 1 {
			siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "Idempotency-Key", Count: n})
			return
		}

		err = runtime.BindStyledParameterWithOptions("simple", "Idempotency-Key", valueList[0], &IdempotencyKey, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false})
		if err != nil {
			siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Idempotency-Key", Err: err})
			return
		}

		params.IdempotencyKey = &IdempotencyKey

	}

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	// ------------- Path parameter "id" -------------
	var id EntityId

	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, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

	headers := r.Header

	// ------------- Required header parameter "If-Match" -------------
	if valueList, found := headers[http.CanonicalHeaderKey("If-Match")]; found {
		var IfMatch IfMatch
		n := len(valueList)
		if n != 1 {
			siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "If-Match", Count: n})
			return
		}

		err = runtime.BindStyledParameterWithOptions("simple", "If-Match", valueList[0], &IfMatch, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true})
		if err != nil {
			siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "If-Match", Err: err})
			return
		}

		params.IfMatch = IfMatch

	} else {
		err := fmt.Errorf("Header parameter If-Match is required, but not found")
		siw.ErrorHandlerFunc(w, r, &RequiredHeaderError{ParamName: "If-Match", Err: err})
		return
	}

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

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

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

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

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

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

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

	err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), &params.Cursor)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", 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.ListClassifications(w, r, params)
	}))

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

	handler.ServeHTTP(w, r)
}

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

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	// ------------- Path parameter "slug" -------------
	var slug EntitySlug

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

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

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

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	// ------------- Path parameter "slug" -------------
	var slug EntitySlug

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

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

	handler.ServeHTTP(w, r)
}

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

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

	// ------------- 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 "state" -------------

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

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

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

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

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

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

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

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

	err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), &params.Cursor)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", 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.ListEntities(w, r, params)
	}))

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

	headers := r.Header

	// ------------- Optional header parameter "Idempotency-Key" -------------
	if valueList, found := headers[http.CanonicalHeaderKey("Idempotency-Key")]; found {
		var IdempotencyKey IdempotencyKey
		n := len(valueList)
		if n != 1 {
			siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "Idempotency-Key", Count: n})
			return
		}

		err = runtime.BindStyledParameterWithOptions("simple", "Idempotency-Key", valueList[0], &IdempotencyKey, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false})
		if err != nil {
			siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Idempotency-Key", Err: err})
			return
		}

		params.IdempotencyKey = &IdempotencyKey

	}

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

	headers := r.Header

	// ------------- Optional header parameter "Idempotency-Key" -------------
	if valueList, found := headers[http.CanonicalHeaderKey("Idempotency-Key")]; found {
		var IdempotencyKey IdempotencyKey
		n := len(valueList)
		if n != 1 {
			siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "Idempotency-Key", Count: n})
			return
		}

		err = runtime.BindStyledParameterWithOptions("simple", "Idempotency-Key", valueList[0], &IdempotencyKey, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false})
		if err != nil {
			siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Idempotency-Key", Err: err})
			return
		}

		params.IdempotencyKey = &IdempotencyKey

	}

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	// ------------- Path parameter "id" -------------
	var id EntityId

	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, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	// ------------- Path parameter "id" -------------
	var id EntityId

	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, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

	headers := r.Header

	// ------------- Required header parameter "If-Match" -------------
	if valueList, found := headers[http.CanonicalHeaderKey("If-Match")]; found {
		var IfMatch IfMatch
		n := len(valueList)
		if n != 1 {
			siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "If-Match", Count: n})
			return
		}

		err = runtime.BindStyledParameterWithOptions("simple", "If-Match", valueList[0], &IfMatch, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true})
		if err != nil {
			siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "If-Match", Err: err})
			return
		}

		params.IfMatch = IfMatch

	} else {
		err := fmt.Errorf("Header parameter If-Match is required, but not found")
		siw.ErrorHandlerFunc(w, r, &RequiredHeaderError{ParamName: "If-Match", Err: err})
		return
	}

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	// ------------- Path parameter "id" -------------
	var id EntityId

	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, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

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

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	// ------------- Path parameter "id" -------------
	var id EntityId

	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, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

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

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

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

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	// ------------- Path parameter "slug" -------------
	var slug EntitySlug

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

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

	// ------------- 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 "entity_id" -------------

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

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

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

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

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

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

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

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

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

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

	err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), &params.Cursor)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", 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.QueryEvents(w, r, params)
	}))

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

	// ------------- 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
	}

	headers := r.Header

	// ------------- Optional header parameter "Last-Event-ID" -------------
	if valueList, found := headers[http.CanonicalHeaderKey("Last-Event-ID")]; found {
		var LastEventID string
		n := len(valueList)
		if n != 1 {
			siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "Last-Event-ID", Count: n})
			return
		}

		err = runtime.BindStyledParameterWithOptions("simple", "Last-Event-ID", valueList[0], &LastEventID, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false})
		if err != nil {
			siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Last-Event-ID", Err: err})
			return
		}

		params.LastEventID = &LastEventID

	}

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

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

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

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

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

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

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

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

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

	err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), &params.Cursor)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", 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.ListExecutions(w, r, params)
	}))

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

	headers := r.Header

	// ------------- Optional header parameter "Idempotency-Key" -------------
	if valueList, found := headers[http.CanonicalHeaderKey("Idempotency-Key")]; found {
		var IdempotencyKey IdempotencyKey
		n := len(valueList)
		if n != 1 {
			siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "Idempotency-Key", Count: n})
			return
		}

		err = runtime.BindStyledParameterWithOptions("simple", "Idempotency-Key", valueList[0], &IdempotencyKey, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false})
		if err != nil {
			siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Idempotency-Key", Err: err})
			return
		}

		params.IdempotencyKey = &IdempotencyKey

	}

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	// ------------- Path parameter "id" -------------
	var id EntityId

	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, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	// ------------- Path parameter "id" -------------
	var id EntityId

	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, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

	handler.ServeHTTP(w, r)
}

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

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

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

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

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

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

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

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

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

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

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

	handler.ServeHTTP(w, r)
}

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

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

	// ------------- Required query parameter "q" -------------

	if paramValue := r.URL.Query().Get("q"); paramValue != "" {

	} else {
		siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "q"})
		return
	}

	err = runtime.BindQueryParameter("form", true, true, "q", r.URL.Query(), &params.Q)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "q", 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.SearchKnowledge(w, r, params)
	}))

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	// ------------- Path parameter "entity_id" -------------
	var entityId string

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

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

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

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

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

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

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

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

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

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

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

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

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

	handler.ServeHTTP(w, r)
}

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

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

	headers := r.Header

	// ------------- Optional header parameter "Idempotency-Key" -------------
	if valueList, found := headers[http.CanonicalHeaderKey("Idempotency-Key")]; found {
		var IdempotencyKey IdempotencyKey
		n := len(valueList)
		if n != 1 {
			siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "Idempotency-Key", Count: n})
			return
		}

		err = runtime.BindStyledParameterWithOptions("simple", "Idempotency-Key", valueList[0], &IdempotencyKey, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false})
		if err != nil {
			siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Idempotency-Key", Err: err})
			return
		}

		params.IdempotencyKey = &IdempotencyKey

	}

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	// ------------- Path parameter "name" -------------
	var name string

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

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

	headers := r.Header

	// ------------- Required header parameter "If-Match" -------------
	if valueList, found := headers[http.CanonicalHeaderKey("If-Match")]; found {
		var IfMatch IfMatch
		n := len(valueList)
		if n != 1 {
			siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "If-Match", Count: n})
			return
		}

		err = runtime.BindStyledParameterWithOptions("simple", "If-Match", valueList[0], &IfMatch, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true})
		if err != nil {
			siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "If-Match", Err: err})
			return
		}

		params.IfMatch = IfMatch

	} else {
		err := fmt.Errorf("Header parameter If-Match is required, but not found")
		siw.ErrorHandlerFunc(w, r, &RequiredHeaderError{ParamName: "If-Match", Err: err})
		return
	}

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

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

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

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

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

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

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

	err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), &params.Cursor)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", 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.ListPatterns(w, r, params)
	}))

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	// ------------- Path parameter "id" -------------
	var id EntityId

	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, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

	headers := r.Header

	// ------------- Required header parameter "If-Match" -------------
	if valueList, found := headers[http.CanonicalHeaderKey("If-Match")]; found {
		var IfMatch IfMatch
		n := len(valueList)
		if n != 1 {
			siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "If-Match", Count: n})
			return
		}

		err = runtime.BindStyledParameterWithOptions("simple", "If-Match", valueList[0], &IfMatch, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true})
		if err != nil {
			siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "If-Match", Err: err})
			return
		}

		params.IfMatch = IfMatch

	} else {
		err := fmt.Errorf("Header parameter If-Match is required, but not found")
		siw.ErrorHandlerFunc(w, r, &RequiredHeaderError{ParamName: "If-Match", Err: err})
		return
	}

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

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

	handler.ServeHTTP(w, r)
}

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

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

	headers := r.Header

	// ------------- Optional header parameter "Idempotency-Key" -------------
	if valueList, found := headers[http.CanonicalHeaderKey("Idempotency-Key")]; found {
		var IdempotencyKey IdempotencyKey
		n := len(valueList)
		if n != 1 {
			siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "Idempotency-Key", Count: n})
			return
		}

		err = runtime.BindStyledParameterWithOptions("simple", "Idempotency-Key", valueList[0], &IdempotencyKey, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false})
		if err != nil {
			siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Idempotency-Key", Err: err})
			return
		}

		params.IdempotencyKey = &IdempotencyKey

	}

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	// ------------- Path parameter "id" -------------
	var id EntityId

	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, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

	headers := r.Header

	// ------------- Required header parameter "If-Match" -------------
	if valueList, found := headers[http.CanonicalHeaderKey("If-Match")]; found {
		var IfMatch IfMatch
		n := len(valueList)
		if n != 1 {
			siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "If-Match", Count: n})
			return
		}

		err = runtime.BindStyledParameterWithOptions("simple", "If-Match", valueList[0], &IfMatch, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true})
		if err != nil {
			siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "If-Match", Err: err})
			return
		}

		params.IfMatch = IfMatch

	} else {
		err := fmt.Errorf("Header parameter If-Match is required, but not found")
		siw.ErrorHandlerFunc(w, r, &RequiredHeaderError{ParamName: "If-Match", Err: err})
		return
	}

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

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

	handler.ServeHTTP(w, r)
}

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

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

	handler.ServeHTTP(w, r)
}

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

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

	handler.ServeHTTP(w, r)
}

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

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

	// ------------- Required query parameter "source" -------------

	if paramValue := r.URL.Query().Get("source"); paramValue != "" {

	} else {
		siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "source"})
		return
	}

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

	// ------------- Required query parameter "target" -------------

	if paramValue := r.URL.Query().Get("target"); paramValue != "" {

	} else {
		siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "target"})
		return
	}

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

	// ------------- Required query parameter "rel_type" -------------

	if paramValue := r.URL.Query().Get("rel_type"); paramValue != "" {

	} else {
		siw.ErrorHandlerFunc(w, r, &RequiredParamError{ParamName: "rel_type"})
		return
	}

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

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

	headers := r.Header

	// ------------- Optional header parameter "Idempotency-Key" -------------
	if valueList, found := headers[http.CanonicalHeaderKey("Idempotency-Key")]; found {
		var IdempotencyKey IdempotencyKey
		n := len(valueList)
		if n != 1 {
			siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "Idempotency-Key", Count: n})
			return
		}

		err = runtime.BindStyledParameterWithOptions("simple", "Idempotency-Key", valueList[0], &IdempotencyKey, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: false})
		if err != nil {
			siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "Idempotency-Key", Err: err})
			return
		}

		params.IdempotencyKey = &IdempotencyKey

	}

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

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

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

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

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

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

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

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

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

	err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), &params.Cursor)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", 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.ListSignals(w, r, params)
	}))

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	// ------------- Path parameter "id" -------------
	var id EntityId

	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, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	// ------------- Path parameter "id" -------------
	var id EntityId

	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, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	// ------------- Path parameter "id" -------------
	var id EntityId

	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, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

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

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

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

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

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

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

	err = runtime.BindQueryParameter("form", true, false, "cursor", r.URL.Query(), &params.Cursor)
	if err != nil {
		siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "cursor", 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.ListSkills(w, r, params)
	}))

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	// ------------- Path parameter "id" -------------
	var id EntityId

	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, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

	headers := r.Header

	// ------------- Required header parameter "If-Match" -------------
	if valueList, found := headers[http.CanonicalHeaderKey("If-Match")]; found {
		var IfMatch IfMatch
		n := len(valueList)
		if n != 1 {
			siw.ErrorHandlerFunc(w, r, &TooManyValuesForParamError{ParamName: "If-Match", Count: n})
			return
		}

		err = runtime.BindStyledParameterWithOptions("simple", "If-Match", valueList[0], &IfMatch, runtime.BindStyledParameterOptions{ParamLocation: runtime.ParamLocationHeader, Explode: false, Required: true})
		if err != nil {
			siw.ErrorHandlerFunc(w, r, &InvalidParamFormatError{ParamName: "If-Match", Err: err})
			return
		}

		params.IfMatch = IfMatch

	} else {
		err := fmt.Errorf("Header parameter If-Match is required, but not found")
		siw.ErrorHandlerFunc(w, r, &RequiredHeaderError{ParamName: "If-Match", Err: err})
		return
	}

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	// ------------- Path parameter "id" -------------
	var id EntityId

	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, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

	handler.ServeHTTP(w, r)
}

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

	var err error

	// ------------- Path parameter "entity_id" -------------
	var entityId string

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

	ctx := r.Context()

	ctx = context.WithValue(ctx, BearerAuthScopes, []string{})

	r = r.WithContext(ctx)

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

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

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

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

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

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

	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+"/agent-activity", wrapper.QueryAgentActivity)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/approvals", wrapper.ListApprovals)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/approvals/{id}/decision", wrapper.DecideApproval)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/audit", wrapper.QueryAudit)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/checks", wrapper.ListChecks)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/checks", wrapper.CreateCheck)
	})
	r.Group(func(r chi.Router) {
		r.Patch(options.BaseURL+"/checks/{id}", wrapper.PatchCheck)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/classifications", wrapper.ListClassifications)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/clients/enroll", wrapper.EnrollClient)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/clients/{slug}/context", wrapper.GetClientContext)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/clients/{slug}/secrets", wrapper.GetClientSecrets)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/dashboard/summary", wrapper.GetDashboardSummary)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/entities", wrapper.ListEntities)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/entities", wrapper.CreateEntity)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/entities/provision", wrapper.ProvisionEntity)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/entities/{id}", wrapper.GetEntity)
	})
	r.Group(func(r chi.Router) {
		r.Patch(options.BaseURL+"/entities/{id}", wrapper.PatchEntity)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/entities/{id}/blast-radius", wrapper.GetBlastRadius)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/entities/{id}/relations", wrapper.GetEntityRelations)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/entities/{slug}/provision/status", wrapper.GetProvisionStatus)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/events", wrapper.QueryEvents)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/events/stream", wrapper.StreamEvents)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/executions", wrapper.ListExecutions)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/executions", wrapper.RequestExecution)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/executions/{id}", wrapper.GetExecution)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/executions/{id}/cancel", wrapper.CancelExecution)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/export", wrapper.ExportSeeds)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/graph", wrapper.GetGraph)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/health", wrapper.GetFleetHealth)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/knowledge/search", wrapper.SearchKnowledge)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/knowledge/{entity_id}", wrapper.GetEntityKnowledge)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/metrics", wrapper.QueryMetrics)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/ontology", wrapper.GetOntology)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/ontology/entity-types", wrapper.CreateEntityType)
	})
	r.Group(func(r chi.Router) {
		r.Patch(options.BaseURL+"/ontology/entity-types/{name}", wrapper.PatchEntityType)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/patterns", wrapper.ListPatterns)
	})
	r.Group(func(r chi.Router) {
		r.Patch(options.BaseURL+"/patterns/{id}", wrapper.PatchPattern)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/policy/approval-rules", wrapper.ListApprovalRules)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/policy/approval-rules", wrapper.CreateApprovalRule)
	})
	r.Group(func(r chi.Router) {
		r.Patch(options.BaseURL+"/policy/approval-rules/{id}", wrapper.PatchApprovalRule)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/policy/autonomy", wrapper.GetAutonomySettings)
	})
	r.Group(func(r chi.Router) {
		r.Patch(options.BaseURL+"/policy/autonomy", wrapper.PatchAutonomySettings)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/policy/risk-classes", wrapper.ListRiskClasses)
	})
	r.Group(func(r chi.Router) {
		r.Delete(options.BaseURL+"/relationships", wrapper.EndRelationship)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/relationships", wrapper.CreateRelationship)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/signals", wrapper.ListSignals)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/signals/{id}/ack", wrapper.AckSignal)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/signals/{id}/mute", wrapper.MuteSignal)
	})
	r.Group(func(r chi.Router) {
		r.Post(options.BaseURL+"/signals/{id}/resolve", wrapper.ResolveSignal)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/skills", wrapper.ListSkills)
	})
	r.Group(func(r chi.Router) {
		r.Patch(options.BaseURL+"/skills/{id}", wrapper.PatchSkill)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/skills/{id}/versions", wrapper.ListSkillVersions)
	})
	r.Group(func(r chi.Router) {
		r.Get(options.BaseURL+"/trends/{entity_id}", wrapper.GetTrends)
	})

	return r
}

type PendingApprovalJSONResponse Approval

type ProblemApplicationProblemPlusJSONResponse Problem

type SignalUpdatedJSONResponse Signal

type QueryAgentActivityRequestObject struct {
	Params QueryAgentActivityParams
}

type QueryAgentActivityResponseObject interface {
	VisitQueryAgentActivityResponse(w http.ResponseWriter) error
}

type QueryAgentActivity200JSONResponse struct {
	Items      []AgentActivity `json:"items"`
	NextCursor *string         `json:"next_cursor"`
}

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

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

type QueryAgentActivitydefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response QueryAgentActivitydefaultApplicationProblemPlusJSONResponse) VisitQueryAgentActivityResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type ListApprovalsRequestObject struct {
	Params ListApprovalsParams
}

type ListApprovalsResponseObject interface {
	VisitListApprovalsResponse(w http.ResponseWriter) error
}

type ListApprovals200JSONResponse struct {
	Items      []Approval `json:"items"`
	NextCursor *string    `json:"next_cursor"`
}

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

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

type ListApprovalsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response ListApprovalsdefaultApplicationProblemPlusJSONResponse) VisitListApprovalsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type DecideApprovalRequestObject struct {
	Id     EntityId `json:"id"`
	Params DecideApprovalParams
	Body   *DecideApprovalJSONRequestBody
}

type DecideApprovalResponseObject interface {
	VisitDecideApprovalResponse(w http.ResponseWriter) error
}

type DecideApproval200JSONResponse Approval

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

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

type DecideApprovaldefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response DecideApprovaldefaultApplicationProblemPlusJSONResponse) VisitDecideApprovalResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type QueryAuditRequestObject struct {
	Params QueryAuditParams
}

type QueryAuditResponseObject interface {
	VisitQueryAuditResponse(w http.ResponseWriter) error
}

type QueryAudit200JSONResponse struct {
	Items      []AuditEntry `json:"items"`
	NextCursor *string      `json:"next_cursor"`
}

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

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

type QueryAuditdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response QueryAuditdefaultApplicationProblemPlusJSONResponse) VisitQueryAuditResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type ListChecksRequestObject struct {
	Params ListChecksParams
}

type ListChecksResponseObject interface {
	VisitListChecksResponse(w http.ResponseWriter) error
}

type ListChecks200JSONResponse struct {
	Items      []Check `json:"items"`
	NextCursor *string `json:"next_cursor"`
}

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

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

type ListChecksdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response ListChecksdefaultApplicationProblemPlusJSONResponse) VisitListChecksResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type CreateCheckRequestObject struct {
	Params CreateCheckParams
	Body   *CreateCheckJSONRequestBody
}

type CreateCheckResponseObject interface {
	VisitCreateCheckResponse(w http.ResponseWriter) error
}

type CreateCheck201JSONResponse Check

func (response CreateCheck201JSONResponse) VisitCreateCheckResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(201)

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

type CreateCheckdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response CreateCheckdefaultApplicationProblemPlusJSONResponse) VisitCreateCheckResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type PatchCheckRequestObject struct {
	Id     EntityId `json:"id"`
	Params PatchCheckParams
	Body   *PatchCheckJSONRequestBody
}

type PatchCheckResponseObject interface {
	VisitPatchCheckResponse(w http.ResponseWriter) error
}

type PatchCheck200JSONResponse Check

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

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

type PatchCheckdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response PatchCheckdefaultApplicationProblemPlusJSONResponse) VisitPatchCheckResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type ListClassificationsRequestObject struct {
	Params ListClassificationsParams
}

type ListClassificationsResponseObject interface {
	VisitListClassificationsResponse(w http.ResponseWriter) error
}

type ListClassifications200JSONResponse struct {
	Items      []Classification `json:"items"`
	NextCursor *string          `json:"next_cursor"`
}

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

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

type ListClassificationsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response ListClassificationsdefaultApplicationProblemPlusJSONResponse) VisitListClassificationsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type EnrollClientRequestObject struct {
	Body *EnrollClientJSONRequestBody
}

type EnrollClientResponseObject interface {
	VisitEnrollClientResponse(w http.ResponseWriter) error
}

type EnrollClient200JSONResponse EnrollResponse

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

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

type EnrollClientdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response EnrollClientdefaultApplicationProblemPlusJSONResponse) VisitEnrollClientResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type GetClientContextRequestObject struct {
	Slug   EntitySlug `json:"slug"`
	Params GetClientContextParams
}

type GetClientContextResponseObject interface {
	VisitGetClientContextResponse(w http.ResponseWriter) error
}

type GetClientContext200JSONResponse ClientContext

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

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

type GetClientContextdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response GetClientContextdefaultApplicationProblemPlusJSONResponse) VisitGetClientContextResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type GetClientSecretsRequestObject struct {
	Slug EntitySlug `json:"slug"`
}

type GetClientSecretsResponseObject interface {
	VisitGetClientSecretsResponse(w http.ResponseWriter) error
}

type GetClientSecrets200JSONResponse ClientSecrets

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

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

type GetClientSecretsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response GetClientSecretsdefaultApplicationProblemPlusJSONResponse) VisitGetClientSecretsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type GetDashboardSummaryRequestObject struct {
}

type GetDashboardSummaryResponseObject interface {
	VisitGetDashboardSummaryResponse(w http.ResponseWriter) error
}

type GetDashboardSummary200JSONResponse DashboardSummary

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

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

type GetDashboardSummarydefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response GetDashboardSummarydefaultApplicationProblemPlusJSONResponse) VisitGetDashboardSummaryResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type ListEntitiesRequestObject struct {
	Params ListEntitiesParams
}

type ListEntitiesResponseObject interface {
	VisitListEntitiesResponse(w http.ResponseWriter) error
}

type ListEntities200JSONResponse struct {
	Items      []Entity `json:"items"`
	NextCursor *string  `json:"next_cursor"`
}

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

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

type ListEntitiesdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response ListEntitiesdefaultApplicationProblemPlusJSONResponse) VisitListEntitiesResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type CreateEntityRequestObject struct {
	Params CreateEntityParams
	Body   *CreateEntityJSONRequestBody
}

type CreateEntityResponseObject interface {
	VisitCreateEntityResponse(w http.ResponseWriter) error
}

type CreateEntity201ResponseHeaders struct {
	ETag string
}

type CreateEntity201JSONResponse struct {
	Body    Entity
	Headers CreateEntity201ResponseHeaders
}

func (response CreateEntity201JSONResponse) VisitCreateEntityResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.Header().Set("ETag", fmt.Sprint(response.Headers.ETag))
	w.WriteHeader(201)

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

type CreateEntitydefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response CreateEntitydefaultApplicationProblemPlusJSONResponse) VisitCreateEntityResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type ProvisionEntityRequestObject struct {
	Params ProvisionEntityParams
	Body   *ProvisionEntityJSONRequestBody
}

type ProvisionEntityResponseObject interface {
	VisitProvisionEntityResponse(w http.ResponseWriter) error
}

type ProvisionEntity201ResponseHeaders struct {
	ETag string
}

type ProvisionEntity201JSONResponse struct {
	Body    ProvisionResponse
	Headers ProvisionEntity201ResponseHeaders
}

func (response ProvisionEntity201JSONResponse) VisitProvisionEntityResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.Header().Set("ETag", fmt.Sprint(response.Headers.ETag))
	w.WriteHeader(201)

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

type ProvisionEntitydefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response ProvisionEntitydefaultApplicationProblemPlusJSONResponse) VisitProvisionEntityResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type GetEntityRequestObject struct {
	Id EntityId `json:"id"`
}

type GetEntityResponseObject interface {
	VisitGetEntityResponse(w http.ResponseWriter) error
}

type GetEntity200ResponseHeaders struct {
	ETag string
}

type GetEntity200JSONResponse struct {
	Body    Entity
	Headers GetEntity200ResponseHeaders
}

func (response GetEntity200JSONResponse) VisitGetEntityResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.Header().Set("ETag", fmt.Sprint(response.Headers.ETag))
	w.WriteHeader(200)

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

type GetEntitydefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response GetEntitydefaultApplicationProblemPlusJSONResponse) VisitGetEntityResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type PatchEntityRequestObject struct {
	Id     EntityId `json:"id"`
	Params PatchEntityParams
	Body   *PatchEntityJSONRequestBody
}

type PatchEntityResponseObject interface {
	VisitPatchEntityResponse(w http.ResponseWriter) error
}

type PatchEntity200ResponseHeaders struct {
	ETag string
}

type PatchEntity200JSONResponse struct {
	Body    Entity
	Headers PatchEntity200ResponseHeaders
}

func (response PatchEntity200JSONResponse) VisitPatchEntityResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.Header().Set("ETag", fmt.Sprint(response.Headers.ETag))
	w.WriteHeader(200)

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

type PatchEntitydefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response PatchEntitydefaultApplicationProblemPlusJSONResponse) VisitPatchEntityResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type GetBlastRadiusRequestObject struct {
	Id     EntityId `json:"id"`
	Params GetBlastRadiusParams
}

type GetBlastRadiusResponseObject interface {
	VisitGetBlastRadiusResponse(w http.ResponseWriter) error
}

type GetBlastRadius200JSONResponse struct {
	Items []struct {
		Depth  int    `json:"depth"`
		Entity Entity `json:"entity"`
	} `json:"items"`
}

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

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

type GetBlastRadiusdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response GetBlastRadiusdefaultApplicationProblemPlusJSONResponse) VisitGetBlastRadiusResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type GetEntityRelationsRequestObject struct {
	Id     EntityId `json:"id"`
	Params GetEntityRelationsParams
}

type GetEntityRelationsResponseObject interface {
	VisitGetEntityRelationsResponse(w http.ResponseWriter) error
}

type GetEntityRelations200JSONResponse struct {
	Items []Relationship `json:"items"`
}

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

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

type GetEntityRelationsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response GetEntityRelationsdefaultApplicationProblemPlusJSONResponse) VisitGetEntityRelationsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type GetProvisionStatusRequestObject struct {
	Slug EntitySlug `json:"slug"`
}

type GetProvisionStatusResponseObject interface {
	VisitGetProvisionStatusResponse(w http.ResponseWriter) error
}

type GetProvisionStatus200JSONResponse ProvisionStatus

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

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

type GetProvisionStatusdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response GetProvisionStatusdefaultApplicationProblemPlusJSONResponse) VisitGetProvisionStatusResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type QueryEventsRequestObject struct {
	Params QueryEventsParams
}

type QueryEventsResponseObject interface {
	VisitQueryEventsResponse(w http.ResponseWriter) error
}

type QueryEvents200JSONResponse struct {
	Items      []Event `json:"items"`
	NextCursor *string `json:"next_cursor"`
}

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

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

type QueryEventsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response QueryEventsdefaultApplicationProblemPlusJSONResponse) VisitQueryEventsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type StreamEventsRequestObject struct {
	Params StreamEventsParams
}

type StreamEventsResponseObject interface {
	VisitStreamEventsResponse(w http.ResponseWriter) error
}

type StreamEvents200TexteventStreamResponse struct {
	Body          io.Reader
	ContentLength int64
}

func (response StreamEvents200TexteventStreamResponse) VisitStreamEventsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "text/event-stream")
	if response.ContentLength != 0 {
		w.Header().Set("Content-Length", fmt.Sprint(response.ContentLength))
	}
	w.WriteHeader(200)

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

type StreamEventsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response StreamEventsdefaultApplicationProblemPlusJSONResponse) VisitStreamEventsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type ListExecutionsRequestObject struct {
	Params ListExecutionsParams
}

type ListExecutionsResponseObject interface {
	VisitListExecutionsResponse(w http.ResponseWriter) error
}

type ListExecutions200JSONResponse struct {
	Items      []Execution `json:"items"`
	NextCursor *string     `json:"next_cursor"`
}

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

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

type ListExecutionsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response ListExecutionsdefaultApplicationProblemPlusJSONResponse) VisitListExecutionsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type RequestExecutionRequestObject struct {
	Params RequestExecutionParams
	Body   *RequestExecutionJSONRequestBody
}

type RequestExecutionResponseObject interface {
	VisitRequestExecutionResponse(w http.ResponseWriter) error
}

type RequestExecution201JSONResponse Execution

func (response RequestExecution201JSONResponse) VisitRequestExecutionResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(201)

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

type RequestExecutiondefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response RequestExecutiondefaultApplicationProblemPlusJSONResponse) VisitRequestExecutionResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type GetExecutionRequestObject struct {
	Id EntityId `json:"id"`
}

type GetExecutionResponseObject interface {
	VisitGetExecutionResponse(w http.ResponseWriter) error
}

type GetExecution200JSONResponse Execution

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

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

type GetExecutiondefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response GetExecutiondefaultApplicationProblemPlusJSONResponse) VisitGetExecutionResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type CancelExecutionRequestObject struct {
	Id EntityId `json:"id"`
}

type CancelExecutionResponseObject interface {
	VisitCancelExecutionResponse(w http.ResponseWriter) error
}

type CancelExecution200JSONResponse Execution

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

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

type CancelExecutiondefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response CancelExecutiondefaultApplicationProblemPlusJSONResponse) VisitCancelExecutionResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type ExportSeedsRequestObject struct {
}

type ExportSeedsResponseObject interface {
	VisitExportSeedsResponse(w http.ResponseWriter) error
}

type ExportSeeds200JSONResponse struct {
	// Inventory YAML document
	Inventory string `json:"inventory"`

	// Ontology YAML document
	Ontology string `json:"ontology"`

	// Policy YAML document
	Policy string `json:"policy"`
}

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

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

type ExportSeedsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response ExportSeedsdefaultApplicationProblemPlusJSONResponse) VisitExportSeedsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type GetGraphRequestObject struct {
	Params GetGraphParams
}

type GetGraphResponseObject interface {
	VisitGetGraphResponse(w http.ResponseWriter) error
}

type GetGraph200JSONResponse GraphView

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

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

type GetGraphdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response GetGraphdefaultApplicationProblemPlusJSONResponse) VisitGetGraphResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type GetFleetHealthRequestObject struct {
}

type GetFleetHealthResponseObject interface {
	VisitGetFleetHealthResponse(w http.ResponseWriter) error
}

type GetFleetHealth200JSONResponse HealthSummary

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

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

type GetFleetHealthdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response GetFleetHealthdefaultApplicationProblemPlusJSONResponse) VisitGetFleetHealthResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type SearchKnowledgeRequestObject struct {
	Params SearchKnowledgeParams
}

type SearchKnowledgeResponseObject interface {
	VisitSearchKnowledgeResponse(w http.ResponseWriter) error
}

type SearchKnowledge200JSONResponse struct {
	Items []KnowledgeHit `json:"items"`
}

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

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

type SearchKnowledgedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response SearchKnowledgedefaultApplicationProblemPlusJSONResponse) VisitSearchKnowledgeResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type GetEntityKnowledgeRequestObject struct {
	EntityId string `json:"entity_id"`
}

type GetEntityKnowledgeResponseObject interface {
	VisitGetEntityKnowledgeResponse(w http.ResponseWriter) error
}

type GetEntityKnowledge200JSONResponse struct {
	Items []KnowledgeHit `json:"items"`
}

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

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

type GetEntityKnowledgedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response GetEntityKnowledgedefaultApplicationProblemPlusJSONResponse) VisitGetEntityKnowledgeResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type QueryMetricsRequestObject struct {
	Params QueryMetricsParams
}

type QueryMetricsResponseObject interface {
	VisitQueryMetricsResponse(w http.ResponseWriter) error
}

type QueryMetrics200JSONResponse struct {
	Items []MetricSeries `json:"items"`
}

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

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

type QueryMetricsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response QueryMetricsdefaultApplicationProblemPlusJSONResponse) VisitQueryMetricsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type GetOntologyRequestObject struct {
}

type GetOntologyResponseObject interface {
	VisitGetOntologyResponse(w http.ResponseWriter) error
}

type GetOntology200JSONResponse struct {
	EntityTypes       []EntityType       `json:"entity_types"`
	Lifecycles        []LifecycleDef     `json:"lifecycles"`
	RelationshipTypes []RelationshipType `json:"relationship_types"`
}

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

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

type GetOntologydefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response GetOntologydefaultApplicationProblemPlusJSONResponse) VisitGetOntologyResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type CreateEntityTypeRequestObject struct {
	Params CreateEntityTypeParams
	Body   *CreateEntityTypeJSONRequestBody
}

type CreateEntityTypeResponseObject interface {
	VisitCreateEntityTypeResponse(w http.ResponseWriter) error
}

type CreateEntityType201JSONResponse EntityType

func (response CreateEntityType201JSONResponse) VisitCreateEntityTypeResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(201)

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

type CreateEntityType202JSONResponse struct{ PendingApprovalJSONResponse }

func (response CreateEntityType202JSONResponse) VisitCreateEntityTypeResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(202)

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

type CreateEntityTypedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response CreateEntityTypedefaultApplicationProblemPlusJSONResponse) VisitCreateEntityTypeResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type PatchEntityTypeRequestObject struct {
	Name   string `json:"name"`
	Params PatchEntityTypeParams
	Body   *PatchEntityTypeJSONRequestBody
}

type PatchEntityTypeResponseObject interface {
	VisitPatchEntityTypeResponse(w http.ResponseWriter) error
}

type PatchEntityType200JSONResponse EntityType

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

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

type PatchEntityType202JSONResponse struct{ PendingApprovalJSONResponse }

func (response PatchEntityType202JSONResponse) VisitPatchEntityTypeResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(202)

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

type PatchEntityTypedefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response PatchEntityTypedefaultApplicationProblemPlusJSONResponse) VisitPatchEntityTypeResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type ListPatternsRequestObject struct {
	Params ListPatternsParams
}

type ListPatternsResponseObject interface {
	VisitListPatternsResponse(w http.ResponseWriter) error
}

type ListPatterns200JSONResponse struct {
	Items      []Pattern `json:"items"`
	NextCursor *string   `json:"next_cursor"`
}

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

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

type ListPatternsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response ListPatternsdefaultApplicationProblemPlusJSONResponse) VisitListPatternsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type PatchPatternRequestObject struct {
	Id     EntityId `json:"id"`
	Params PatchPatternParams
	Body   *PatchPatternJSONRequestBody
}

type PatchPatternResponseObject interface {
	VisitPatchPatternResponse(w http.ResponseWriter) error
}

type PatchPattern200JSONResponse Pattern

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

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

type PatchPattern202JSONResponse struct{ PendingApprovalJSONResponse }

func (response PatchPattern202JSONResponse) VisitPatchPatternResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(202)

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

type PatchPatterndefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response PatchPatterndefaultApplicationProblemPlusJSONResponse) VisitPatchPatternResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type ListApprovalRulesRequestObject struct {
}

type ListApprovalRulesResponseObject interface {
	VisitListApprovalRulesResponse(w http.ResponseWriter) error
}

type ListApprovalRules200JSONResponse struct {
	Items []ApprovalRule `json:"items"`
}

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

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

type ListApprovalRulesdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response ListApprovalRulesdefaultApplicationProblemPlusJSONResponse) VisitListApprovalRulesResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type CreateApprovalRuleRequestObject struct {
	Params CreateApprovalRuleParams
	Body   *CreateApprovalRuleJSONRequestBody
}

type CreateApprovalRuleResponseObject interface {
	VisitCreateApprovalRuleResponse(w http.ResponseWriter) error
}

type CreateApprovalRule202JSONResponse struct{ PendingApprovalJSONResponse }

func (response CreateApprovalRule202JSONResponse) VisitCreateApprovalRuleResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(202)

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

type CreateApprovalRuledefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response CreateApprovalRuledefaultApplicationProblemPlusJSONResponse) VisitCreateApprovalRuleResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type PatchApprovalRuleRequestObject struct {
	Id     EntityId `json:"id"`
	Params PatchApprovalRuleParams
	Body   *PatchApprovalRuleJSONRequestBody
}

type PatchApprovalRuleResponseObject interface {
	VisitPatchApprovalRuleResponse(w http.ResponseWriter) error
}

type PatchApprovalRule202JSONResponse struct{ PendingApprovalJSONResponse }

func (response PatchApprovalRule202JSONResponse) VisitPatchApprovalRuleResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(202)

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

type PatchApprovalRuledefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response PatchApprovalRuledefaultApplicationProblemPlusJSONResponse) VisitPatchApprovalRuleResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type GetAutonomySettingsRequestObject struct {
}

type GetAutonomySettingsResponseObject interface {
	VisitGetAutonomySettingsResponse(w http.ResponseWriter) error
}

type GetAutonomySettings200JSONResponse struct {
	Items []AutonomySetting `json:"items"`
}

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

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

type GetAutonomySettingsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response GetAutonomySettingsdefaultApplicationProblemPlusJSONResponse) VisitGetAutonomySettingsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type PatchAutonomySettingsRequestObject struct {
	Body *PatchAutonomySettingsJSONRequestBody
}

type PatchAutonomySettingsResponseObject interface {
	VisitPatchAutonomySettingsResponse(w http.ResponseWriter) error
}

type PatchAutonomySettings200JSONResponse struct {
	Items []AutonomySetting `json:"items"`
}

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

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

type PatchAutonomySettings202JSONResponse struct{ PendingApprovalJSONResponse }

func (response PatchAutonomySettings202JSONResponse) VisitPatchAutonomySettingsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(202)

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

type PatchAutonomySettingsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response PatchAutonomySettingsdefaultApplicationProblemPlusJSONResponse) VisitPatchAutonomySettingsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type ListRiskClassesRequestObject struct {
}

type ListRiskClassesResponseObject interface {
	VisitListRiskClassesResponse(w http.ResponseWriter) error
}

type ListRiskClasses200JSONResponse struct {
	Items []RiskClass `json:"items"`
}

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

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

type ListRiskClassesdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response ListRiskClassesdefaultApplicationProblemPlusJSONResponse) VisitListRiskClassesResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type EndRelationshipRequestObject struct {
	Params EndRelationshipParams
}

type EndRelationshipResponseObject interface {
	VisitEndRelationshipResponse(w http.ResponseWriter) error
}

type EndRelationship204Response struct {
}

func (response EndRelationship204Response) VisitEndRelationshipResponse(w http.ResponseWriter) error {
	w.WriteHeader(204)
	return nil
}

type EndRelationshipdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response EndRelationshipdefaultApplicationProblemPlusJSONResponse) VisitEndRelationshipResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type CreateRelationshipRequestObject struct {
	Params CreateRelationshipParams
	Body   *CreateRelationshipJSONRequestBody
}

type CreateRelationshipResponseObject interface {
	VisitCreateRelationshipResponse(w http.ResponseWriter) error
}

type CreateRelationship201JSONResponse Relationship

func (response CreateRelationship201JSONResponse) VisitCreateRelationshipResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(201)

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

type CreateRelationshipdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response CreateRelationshipdefaultApplicationProblemPlusJSONResponse) VisitCreateRelationshipResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type ListSignalsRequestObject struct {
	Params ListSignalsParams
}

type ListSignalsResponseObject interface {
	VisitListSignalsResponse(w http.ResponseWriter) error
}

type ListSignals200JSONResponse struct {
	Items      []Signal `json:"items"`
	NextCursor *string  `json:"next_cursor"`
}

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

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

type ListSignalsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response ListSignalsdefaultApplicationProblemPlusJSONResponse) VisitListSignalsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type AckSignalRequestObject struct {
	Id EntityId `json:"id"`
}

type AckSignalResponseObject interface {
	VisitAckSignalResponse(w http.ResponseWriter) error
}

type AckSignal200JSONResponse struct{ SignalUpdatedJSONResponse }

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

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

type AckSignaldefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response AckSignaldefaultApplicationProblemPlusJSONResponse) VisitAckSignalResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type MuteSignalRequestObject struct {
	Id   EntityId `json:"id"`
	Body *MuteSignalJSONRequestBody
}

type MuteSignalResponseObject interface {
	VisitMuteSignalResponse(w http.ResponseWriter) error
}

type MuteSignal200JSONResponse struct{ SignalUpdatedJSONResponse }

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

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

type MuteSignaldefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response MuteSignaldefaultApplicationProblemPlusJSONResponse) VisitMuteSignalResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type ResolveSignalRequestObject struct {
	Id   EntityId `json:"id"`
	Body *ResolveSignalJSONRequestBody
}

type ResolveSignalResponseObject interface {
	VisitResolveSignalResponse(w http.ResponseWriter) error
}

type ResolveSignal200JSONResponse struct{ SignalUpdatedJSONResponse }

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

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

type ResolveSignaldefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response ResolveSignaldefaultApplicationProblemPlusJSONResponse) VisitResolveSignalResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type ListSkillsRequestObject struct {
	Params ListSkillsParams
}

type ListSkillsResponseObject interface {
	VisitListSkillsResponse(w http.ResponseWriter) error
}

type ListSkills200JSONResponse struct {
	Items      []Skill `json:"items"`
	NextCursor *string `json:"next_cursor"`
}

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

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

type ListSkillsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response ListSkillsdefaultApplicationProblemPlusJSONResponse) VisitListSkillsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type PatchSkillRequestObject struct {
	Id     EntityId `json:"id"`
	Params PatchSkillParams
	Body   *PatchSkillJSONRequestBody
}

type PatchSkillResponseObject interface {
	VisitPatchSkillResponse(w http.ResponseWriter) error
}

type PatchSkill200JSONResponse Skill

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

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

type PatchSkill202JSONResponse struct{ PendingApprovalJSONResponse }

func (response PatchSkill202JSONResponse) VisitPatchSkillResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(202)

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

type PatchSkilldefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response PatchSkilldefaultApplicationProblemPlusJSONResponse) VisitPatchSkillResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type ListSkillVersionsRequestObject struct {
	Id EntityId `json:"id"`
}

type ListSkillVersionsResponseObject interface {
	VisitListSkillVersionsResponse(w http.ResponseWriter) error
}

type ListSkillVersions200JSONResponse struct {
	Items []Skill `json:"items"`
}

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

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

type ListSkillVersionsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response ListSkillVersionsdefaultApplicationProblemPlusJSONResponse) VisitListSkillVersionsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

type GetTrendsRequestObject struct {
	EntityId string `json:"entity_id"`
	Params   GetTrendsParams
}

type GetTrendsResponseObject interface {
	VisitGetTrendsResponse(w http.ResponseWriter) error
}

type GetTrends200JSONResponse struct {
	Items []Trend `json:"items"`
}

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

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

type GetTrendsdefaultApplicationProblemPlusJSONResponse struct {
	Body       Problem
	StatusCode int
}

func (response GetTrendsdefaultApplicationProblemPlusJSONResponse) VisitGetTrendsResponse(w http.ResponseWriter) error {
	w.Header().Set("Content-Type", "application/problem+json")
	w.WriteHeader(response.StatusCode)

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

// StrictServerInterface represents all server handlers.
type StrictServerInterface interface {
	// Agent behavior log
	// (GET /agent-activity)
	QueryAgentActivity(ctx context.Context, request QueryAgentActivityRequestObject) (QueryAgentActivityResponseObject, error)
	// List approvals
	// (GET /approvals)
	ListApprovals(ctx context.Context, request ListApprovalsRequestObject) (ListApprovalsResponseObject, error)
	// Approve or deny (single-use token verified server-side)
	// (POST /approvals/{id}/decision)
	DecideApproval(ctx context.Context, request DecideApprovalRequestObject) (DecideApprovalResponseObject, error)
	// Audit log
	// (GET /audit)
	QueryAudit(ctx context.Context, request QueryAuditRequestObject) (QueryAuditResponseObject, error)
	// List check definitions
	// (GET /checks)
	ListChecks(ctx context.Context, request ListChecksRequestObject) (ListChecksResponseObject, error)
	// Create a check (checks-as-data, plan R3-7)
	// (POST /checks)
	CreateCheck(ctx context.Context, request CreateCheckRequestObject) (CreateCheckResponseObject, error)
	// Update or disable a check
	// (PATCH /checks/{id})
	PatchCheck(ctx context.Context, request PatchCheckRequestObject) (PatchCheckResponseObject, error)
	// Classifier decisions (the autonomous-decision audit trail)
	// (GET /classifications)
	ListClassifications(ctx context.Context, request ListClassificationsRequestObject) (ListClassificationsResponseObject, error)
	// Enroll a new client — issue age key, create Infisical identity
	// (POST /clients/enroll)
	EnrollClient(ctx context.Context, request EnrollClientRequestObject) (EnrollClientResponseObject, error)
	// Get agent context delta since a timestamp
	// (GET /clients/{slug}/context)
	GetClientContext(ctx context.Context, request GetClientContextRequestObject) (GetClientContextResponseObject, error)
	// List secrets accessible to this client
	// (GET /clients/{slug}/secrets)
	GetClientSecrets(ctx context.Context, request GetClientSecretsRequestObject) (GetClientSecretsResponseObject, error)
	// One-round-trip overview for the control room home page
	// (GET /dashboard/summary)
	GetDashboardSummary(ctx context.Context, request GetDashboardSummaryRequestObject) (GetDashboardSummaryResponseObject, error)
	// List entities
	// (GET /entities)
	ListEntities(ctx context.Context, request ListEntitiesRequestObject) (ListEntitiesResponseObject, error)
	// Create an entity
	// (POST /entities)
	CreateEntity(ctx context.Context, request CreateEntityRequestObject) (CreateEntityResponseObject, error)
	// Provision a compute entity (LXC, VM, container) on a host
	// (POST /entities/provision)
	ProvisionEntity(ctx context.Context, request ProvisionEntityRequestObject) (ProvisionEntityResponseObject, error)
	// Get entity by UUID or slug
	// (GET /entities/{id})
	GetEntity(ctx context.Context, request GetEntityRequestObject) (GetEntityResponseObject, error)
	// Update attributes or transition lifecycle state
	// (PATCH /entities/{id})
	PatchEntity(ctx context.Context, request PatchEntityRequestObject) (PatchEntityResponseObject, error)
	// Entities affected if this entity fails
	// (GET /entities/{id}/blast-radius)
	GetBlastRadius(ctx context.Context, request GetBlastRadiusRequestObject) (GetBlastRadiusResponseObject, error)
	// Direct relationships of an entity (both directions)
	// (GET /entities/{id}/relations)
	GetEntityRelations(ctx context.Context, request GetEntityRelationsRequestObject) (GetEntityRelationsResponseObject, error)
	// Poll provisioning progress for a compute entity
	// (GET /entities/{slug}/provision/status)
	GetProvisionStatus(ctx context.Context, request GetProvisionStatusRequestObject) (GetProvisionStatusResponseObject, error)
	// Historical events
	// (GET /events)
	QueryEvents(ctx context.Context, request QueryEventsRequestObject) (QueryEventsResponseObject, error)
	// Live event stream (SSE)
	// (GET /events/stream)
	StreamEvents(ctx context.Context, request StreamEventsRequestObject) (StreamEventsResponseObject, error)
	// List executions
	// (GET /executions)
	ListExecutions(ctx context.Context, request ListExecutionsRequestObject) (ListExecutionsResponseObject, error)
	// Request an execution (classify → approval check → enqueue)
	// (POST /executions)
	RequestExecution(ctx context.Context, request RequestExecutionRequestObject) (RequestExecutionResponseObject, error)
	// Execution status + result
	// (GET /executions/{id})
	GetExecution(ctx context.Context, request GetExecutionRequestObject) (GetExecutionResponseObject, error)
	// Cancel a proposed/executing execution
	// (POST /executions/{id}/cancel)
	CancelExecution(ctx context.Context, request CancelExecutionRequestObject) (CancelExecutionResponseObject, error)
	// Regenerate seed YAMLs from current DB state (DR / version control)
	// (GET /export)
	ExportSeeds(ctx context.Context, request ExportSeedsRequestObject) (ExportSeedsResponseObject, error)
	// Subgraph for visualization (nodes + edges)
	// (GET /graph)
	GetGraph(ctx context.Context, request GetGraphRequestObject) (GetGraphResponseObject, error)
	// Fleet health summary with trend indicators
	// (GET /health)
	GetFleetHealth(ctx context.Context, request GetFleetHealthRequestObject) (GetFleetHealthResponseObject, error)
	// Full-text search over knowledge entities (documents, runbooks)
	// (GET /knowledge/search)
	SearchKnowledge(ctx context.Context, request SearchKnowledgeRequestObject) (SearchKnowledgeResponseObject, error)
	// All documents/runbooks linked to an entity
	// (GET /knowledge/{entity_id})
	GetEntityKnowledge(ctx context.Context, request GetEntityKnowledgeRequestObject) (GetEntityKnowledgeResponseObject, error)
	// Query time-series metrics
	// (GET /metrics)
	QueryMetrics(ctx context.Context, request QueryMetricsRequestObject) (QueryMetricsResponseObject, error)
	// Full ontology — entity types, relationship types, lifecycles
	// (GET /ontology)
	GetOntology(ctx context.Context, request GetOntologyRequestObject) (GetOntologyResponseObject, error)
	// Extend the ontology with a new entity type
	// (POST /ontology/entity-types)
	CreateEntityType(ctx context.Context, request CreateEntityTypeRequestObject) (CreateEntityTypeResponseObject, error)
	// Update or deprecate an entity type
	// (PATCH /ontology/entity-types/{name})
	PatchEntityType(ctx context.Context, request PatchEntityTypeRequestObject) (PatchEntityTypeResponseObject, error)
	// List patterns
	// (GET /patterns)
	ListPatterns(ctx context.Context, request ListPatternsRequestObject) (ListPatternsResponseObject, error)
	// Transition a pattern (activate / invalidate / deprecate)
	// (PATCH /patterns/{id})
	PatchPattern(ctx context.Context, request PatchPatternRequestObject) (PatchPatternResponseObject, error)
	// List approval rules
	// (GET /policy/approval-rules)
	ListApprovalRules(ctx context.Context, request ListApprovalRulesRequestObject) (ListApprovalRulesResponseObject, error)
	// Propose a new approval rule (dual-control)
	// (POST /policy/approval-rules)
	CreateApprovalRule(ctx context.Context, request CreateApprovalRuleRequestObject) (CreateApprovalRuleResponseObject, error)
	// Propose a rule change (dual-control)
	// (PATCH /policy/approval-rules/{id})
	PatchApprovalRule(ctx context.Context, request PatchApprovalRuleRequestObject) (PatchApprovalRuleResponseObject, error)
	// Autonomy settings (kill-switch, never-auto-act list)
	// (GET /policy/autonomy)
	GetAutonomySettings(ctx context.Context, request GetAutonomySettingsRequestObject) (GetAutonomySettingsResponseObject, error)
	// Propose autonomy changes (dual-control; kill-switch OFF is immediate)
	// (PATCH /policy/autonomy)
	PatchAutonomySettings(ctx context.Context, request PatchAutonomySettingsRequestObject) (PatchAutonomySettingsResponseObject, error)
	// List risk classes
	// (GET /policy/risk-classes)
	ListRiskClasses(ctx context.Context, request ListRiskClassesRequestObject) (ListRiskClassesResponseObject, error)
	// End a relationship (sets valid_to; the edge is kept for history)
	// (DELETE /relationships)
	EndRelationship(ctx context.Context, request EndRelationshipRequestObject) (EndRelationshipResponseObject, error)
	// Create a relationship edge
	// (POST /relationships)
	CreateRelationship(ctx context.Context, request CreateRelationshipRequestObject) (CreateRelationshipResponseObject, error)
	// List signals
	// (GET /signals)
	ListSignals(ctx context.Context, request ListSignalsRequestObject) (ListSignalsResponseObject, error)
	// Acknowledge a signal
	// (POST /signals/{id}/ack)
	AckSignal(ctx context.Context, request AckSignalRequestObject) (AckSignalResponseObject, error)
	// Mute a signal for a TTL
	// (POST /signals/{id}/mute)
	MuteSignal(ctx context.Context, request MuteSignalRequestObject) (MuteSignalResponseObject, error)
	// Resolve a signal manually
	// (POST /signals/{id}/resolve)
	ResolveSignal(ctx context.Context, request ResolveSignalRequestObject) (ResolveSignalResponseObject, error)
	// List skills (latest version per skill)
	// (GET /skills)
	ListSkills(ctx context.Context, request ListSkillsRequestObject) (ListSkillsResponseObject, error)
	// Transition a skill or pin a version
	// (PATCH /skills/{id})
	PatchSkill(ctx context.Context, request PatchSkillRequestObject) (PatchSkillResponseObject, error)
	// Version history of a skill
	// (GET /skills/{id}/versions)
	ListSkillVersions(ctx context.Context, request ListSkillVersionsRequestObject) (ListSkillVersionsResponseObject, error)
	// Trend analysis for all metrics on an entity
	// (GET /trends/{entity_id})
	GetTrends(ctx context.Context, request GetTrendsRequestObject) (GetTrendsResponseObject, 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
}

// QueryAgentActivity operation middleware
func (sh *strictHandler) QueryAgentActivity(w http.ResponseWriter, r *http.Request, params QueryAgentActivityParams) {
	var request QueryAgentActivityRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.QueryAgentActivity(ctx, request.(QueryAgentActivityRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "QueryAgentActivity")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(QueryAgentActivityResponseObject); ok {
		if err := validResponse.VisitQueryAgentActivityResponse(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))
	}
}

// ListApprovals operation middleware
func (sh *strictHandler) ListApprovals(w http.ResponseWriter, r *http.Request, params ListApprovalsParams) {
	var request ListApprovalsRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListApprovals(ctx, request.(ListApprovalsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListApprovals")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListApprovalsResponseObject); ok {
		if err := validResponse.VisitListApprovalsResponse(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))
	}
}

// DecideApproval operation middleware
func (sh *strictHandler) DecideApproval(w http.ResponseWriter, r *http.Request, id EntityId, params DecideApprovalParams) {
	var request DecideApprovalRequestObject

	request.Id = id
	request.Params = params

	var body DecideApprovalJSONRequestBody
	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.DecideApproval(ctx, request.(DecideApprovalRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "DecideApproval")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(DecideApprovalResponseObject); ok {
		if err := validResponse.VisitDecideApprovalResponse(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))
	}
}

// QueryAudit operation middleware
func (sh *strictHandler) QueryAudit(w http.ResponseWriter, r *http.Request, params QueryAuditParams) {
	var request QueryAuditRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.QueryAudit(ctx, request.(QueryAuditRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "QueryAudit")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(QueryAuditResponseObject); ok {
		if err := validResponse.VisitQueryAuditResponse(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))
	}
}

// ListChecks operation middleware
func (sh *strictHandler) ListChecks(w http.ResponseWriter, r *http.Request, params ListChecksParams) {
	var request ListChecksRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListChecks(ctx, request.(ListChecksRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListChecks")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListChecksResponseObject); ok {
		if err := validResponse.VisitListChecksResponse(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))
	}
}

// CreateCheck operation middleware
func (sh *strictHandler) CreateCheck(w http.ResponseWriter, r *http.Request, params CreateCheckParams) {
	var request CreateCheckRequestObject

	request.Params = params

	var body CreateCheckJSONRequestBody
	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.CreateCheck(ctx, request.(CreateCheckRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "CreateCheck")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(CreateCheckResponseObject); ok {
		if err := validResponse.VisitCreateCheckResponse(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))
	}
}

// PatchCheck operation middleware
func (sh *strictHandler) PatchCheck(w http.ResponseWriter, r *http.Request, id EntityId, params PatchCheckParams) {
	var request PatchCheckRequestObject

	request.Id = id
	request.Params = params

	var body PatchCheckJSONRequestBody
	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.PatchCheck(ctx, request.(PatchCheckRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "PatchCheck")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(PatchCheckResponseObject); ok {
		if err := validResponse.VisitPatchCheckResponse(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))
	}
}

// ListClassifications operation middleware
func (sh *strictHandler) ListClassifications(w http.ResponseWriter, r *http.Request, params ListClassificationsParams) {
	var request ListClassificationsRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListClassifications(ctx, request.(ListClassificationsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListClassifications")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListClassificationsResponseObject); ok {
		if err := validResponse.VisitListClassificationsResponse(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))
	}
}

// EnrollClient operation middleware
func (sh *strictHandler) EnrollClient(w http.ResponseWriter, r *http.Request) {
	var request EnrollClientRequestObject

	var body EnrollClientJSONRequestBody
	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.EnrollClient(ctx, request.(EnrollClientRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "EnrollClient")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(EnrollClientResponseObject); ok {
		if err := validResponse.VisitEnrollClientResponse(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))
	}
}

// GetClientContext operation middleware
func (sh *strictHandler) GetClientContext(w http.ResponseWriter, r *http.Request, slug EntitySlug, params GetClientContextParams) {
	var request GetClientContextRequestObject

	request.Slug = slug
	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetClientContext(ctx, request.(GetClientContextRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetClientContext")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetClientContextResponseObject); ok {
		if err := validResponse.VisitGetClientContextResponse(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))
	}
}

// GetClientSecrets operation middleware
func (sh *strictHandler) GetClientSecrets(w http.ResponseWriter, r *http.Request, slug EntitySlug) {
	var request GetClientSecretsRequestObject

	request.Slug = slug

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetClientSecrets(ctx, request.(GetClientSecretsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetClientSecrets")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetClientSecretsResponseObject); ok {
		if err := validResponse.VisitGetClientSecretsResponse(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))
	}
}

// GetDashboardSummary operation middleware
func (sh *strictHandler) GetDashboardSummary(w http.ResponseWriter, r *http.Request) {
	var request GetDashboardSummaryRequestObject

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetDashboardSummary(ctx, request.(GetDashboardSummaryRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetDashboardSummary")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetDashboardSummaryResponseObject); ok {
		if err := validResponse.VisitGetDashboardSummaryResponse(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))
	}
}

// ListEntities operation middleware
func (sh *strictHandler) ListEntities(w http.ResponseWriter, r *http.Request, params ListEntitiesParams) {
	var request ListEntitiesRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListEntities(ctx, request.(ListEntitiesRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListEntities")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListEntitiesResponseObject); ok {
		if err := validResponse.VisitListEntitiesResponse(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))
	}
}

// CreateEntity operation middleware
func (sh *strictHandler) CreateEntity(w http.ResponseWriter, r *http.Request, params CreateEntityParams) {
	var request CreateEntityRequestObject

	request.Params = params

	var body CreateEntityJSONRequestBody
	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.CreateEntity(ctx, request.(CreateEntityRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "CreateEntity")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(CreateEntityResponseObject); ok {
		if err := validResponse.VisitCreateEntityResponse(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))
	}
}

// ProvisionEntity operation middleware
func (sh *strictHandler) ProvisionEntity(w http.ResponseWriter, r *http.Request, params ProvisionEntityParams) {
	var request ProvisionEntityRequestObject

	request.Params = params

	var body ProvisionEntityJSONRequestBody
	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.ProvisionEntity(ctx, request.(ProvisionEntityRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ProvisionEntity")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ProvisionEntityResponseObject); ok {
		if err := validResponse.VisitProvisionEntityResponse(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))
	}
}

// GetEntity operation middleware
func (sh *strictHandler) GetEntity(w http.ResponseWriter, r *http.Request, id EntityId) {
	var request GetEntityRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetEntity(ctx, request.(GetEntityRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetEntity")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetEntityResponseObject); ok {
		if err := validResponse.VisitGetEntityResponse(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))
	}
}

// PatchEntity operation middleware
func (sh *strictHandler) PatchEntity(w http.ResponseWriter, r *http.Request, id EntityId, params PatchEntityParams) {
	var request PatchEntityRequestObject

	request.Id = id
	request.Params = params

	var body PatchEntityJSONRequestBody
	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.PatchEntity(ctx, request.(PatchEntityRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "PatchEntity")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(PatchEntityResponseObject); ok {
		if err := validResponse.VisitPatchEntityResponse(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))
	}
}

// GetBlastRadius operation middleware
func (sh *strictHandler) GetBlastRadius(w http.ResponseWriter, r *http.Request, id EntityId, params GetBlastRadiusParams) {
	var request GetBlastRadiusRequestObject

	request.Id = id
	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetBlastRadius(ctx, request.(GetBlastRadiusRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetBlastRadius")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetBlastRadiusResponseObject); ok {
		if err := validResponse.VisitGetBlastRadiusResponse(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))
	}
}

// GetEntityRelations operation middleware
func (sh *strictHandler) GetEntityRelations(w http.ResponseWriter, r *http.Request, id EntityId, params GetEntityRelationsParams) {
	var request GetEntityRelationsRequestObject

	request.Id = id
	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetEntityRelations(ctx, request.(GetEntityRelationsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetEntityRelations")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetEntityRelationsResponseObject); ok {
		if err := validResponse.VisitGetEntityRelationsResponse(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))
	}
}

// GetProvisionStatus operation middleware
func (sh *strictHandler) GetProvisionStatus(w http.ResponseWriter, r *http.Request, slug EntitySlug) {
	var request GetProvisionStatusRequestObject

	request.Slug = slug

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetProvisionStatus(ctx, request.(GetProvisionStatusRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetProvisionStatus")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetProvisionStatusResponseObject); ok {
		if err := validResponse.VisitGetProvisionStatusResponse(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))
	}
}

// QueryEvents operation middleware
func (sh *strictHandler) QueryEvents(w http.ResponseWriter, r *http.Request, params QueryEventsParams) {
	var request QueryEventsRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.QueryEvents(ctx, request.(QueryEventsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "QueryEvents")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(QueryEventsResponseObject); ok {
		if err := validResponse.VisitQueryEventsResponse(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))
	}
}

// StreamEvents operation middleware
func (sh *strictHandler) StreamEvents(w http.ResponseWriter, r *http.Request, params StreamEventsParams) {
	var request StreamEventsRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.StreamEvents(ctx, request.(StreamEventsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "StreamEvents")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(StreamEventsResponseObject); ok {
		if err := validResponse.VisitStreamEventsResponse(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))
	}
}

// ListExecutions operation middleware
func (sh *strictHandler) ListExecutions(w http.ResponseWriter, r *http.Request, params ListExecutionsParams) {
	var request ListExecutionsRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListExecutions(ctx, request.(ListExecutionsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListExecutions")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListExecutionsResponseObject); ok {
		if err := validResponse.VisitListExecutionsResponse(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))
	}
}

// RequestExecution operation middleware
func (sh *strictHandler) RequestExecution(w http.ResponseWriter, r *http.Request, params RequestExecutionParams) {
	var request RequestExecutionRequestObject

	request.Params = params

	var body RequestExecutionJSONRequestBody
	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.RequestExecution(ctx, request.(RequestExecutionRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "RequestExecution")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(RequestExecutionResponseObject); ok {
		if err := validResponse.VisitRequestExecutionResponse(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))
	}
}

// GetExecution operation middleware
func (sh *strictHandler) GetExecution(w http.ResponseWriter, r *http.Request, id EntityId) {
	var request GetExecutionRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetExecution(ctx, request.(GetExecutionRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetExecution")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetExecutionResponseObject); ok {
		if err := validResponse.VisitGetExecutionResponse(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))
	}
}

// CancelExecution operation middleware
func (sh *strictHandler) CancelExecution(w http.ResponseWriter, r *http.Request, id EntityId) {
	var request CancelExecutionRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.CancelExecution(ctx, request.(CancelExecutionRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "CancelExecution")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(CancelExecutionResponseObject); ok {
		if err := validResponse.VisitCancelExecutionResponse(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))
	}
}

// ExportSeeds operation middleware
func (sh *strictHandler) ExportSeeds(w http.ResponseWriter, r *http.Request) {
	var request ExportSeedsRequestObject

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ExportSeeds(ctx, request.(ExportSeedsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ExportSeeds")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ExportSeedsResponseObject); ok {
		if err := validResponse.VisitExportSeedsResponse(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))
	}
}

// GetGraph operation middleware
func (sh *strictHandler) GetGraph(w http.ResponseWriter, r *http.Request, params GetGraphParams) {
	var request GetGraphRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetGraph(ctx, request.(GetGraphRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetGraph")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetGraphResponseObject); ok {
		if err := validResponse.VisitGetGraphResponse(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))
	}
}

// GetFleetHealth operation middleware
func (sh *strictHandler) GetFleetHealth(w http.ResponseWriter, r *http.Request) {
	var request GetFleetHealthRequestObject

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetFleetHealth(ctx, request.(GetFleetHealthRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetFleetHealth")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetFleetHealthResponseObject); ok {
		if err := validResponse.VisitGetFleetHealthResponse(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))
	}
}

// SearchKnowledge operation middleware
func (sh *strictHandler) SearchKnowledge(w http.ResponseWriter, r *http.Request, params SearchKnowledgeParams) {
	var request SearchKnowledgeRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.SearchKnowledge(ctx, request.(SearchKnowledgeRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "SearchKnowledge")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(SearchKnowledgeResponseObject); ok {
		if err := validResponse.VisitSearchKnowledgeResponse(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))
	}
}

// GetEntityKnowledge operation middleware
func (sh *strictHandler) GetEntityKnowledge(w http.ResponseWriter, r *http.Request, entityId string) {
	var request GetEntityKnowledgeRequestObject

	request.EntityId = entityId

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetEntityKnowledge(ctx, request.(GetEntityKnowledgeRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetEntityKnowledge")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetEntityKnowledgeResponseObject); ok {
		if err := validResponse.VisitGetEntityKnowledgeResponse(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))
	}
}

// QueryMetrics operation middleware
func (sh *strictHandler) QueryMetrics(w http.ResponseWriter, r *http.Request, params QueryMetricsParams) {
	var request QueryMetricsRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.QueryMetrics(ctx, request.(QueryMetricsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "QueryMetrics")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(QueryMetricsResponseObject); ok {
		if err := validResponse.VisitQueryMetricsResponse(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))
	}
}

// GetOntology operation middleware
func (sh *strictHandler) GetOntology(w http.ResponseWriter, r *http.Request) {
	var request GetOntologyRequestObject

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetOntology(ctx, request.(GetOntologyRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetOntology")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetOntologyResponseObject); ok {
		if err := validResponse.VisitGetOntologyResponse(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))
	}
}

// CreateEntityType operation middleware
func (sh *strictHandler) CreateEntityType(w http.ResponseWriter, r *http.Request, params CreateEntityTypeParams) {
	var request CreateEntityTypeRequestObject

	request.Params = params

	var body CreateEntityTypeJSONRequestBody
	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.CreateEntityType(ctx, request.(CreateEntityTypeRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "CreateEntityType")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(CreateEntityTypeResponseObject); ok {
		if err := validResponse.VisitCreateEntityTypeResponse(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))
	}
}

// PatchEntityType operation middleware
func (sh *strictHandler) PatchEntityType(w http.ResponseWriter, r *http.Request, name string, params PatchEntityTypeParams) {
	var request PatchEntityTypeRequestObject

	request.Name = name
	request.Params = params

	var body PatchEntityTypeJSONRequestBody
	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.PatchEntityType(ctx, request.(PatchEntityTypeRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "PatchEntityType")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(PatchEntityTypeResponseObject); ok {
		if err := validResponse.VisitPatchEntityTypeResponse(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))
	}
}

// ListPatterns operation middleware
func (sh *strictHandler) ListPatterns(w http.ResponseWriter, r *http.Request, params ListPatternsParams) {
	var request ListPatternsRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListPatterns(ctx, request.(ListPatternsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListPatterns")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListPatternsResponseObject); ok {
		if err := validResponse.VisitListPatternsResponse(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))
	}
}

// PatchPattern operation middleware
func (sh *strictHandler) PatchPattern(w http.ResponseWriter, r *http.Request, id EntityId, params PatchPatternParams) {
	var request PatchPatternRequestObject

	request.Id = id
	request.Params = params

	var body PatchPatternJSONRequestBody
	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.PatchPattern(ctx, request.(PatchPatternRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "PatchPattern")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(PatchPatternResponseObject); ok {
		if err := validResponse.VisitPatchPatternResponse(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))
	}
}

// ListApprovalRules operation middleware
func (sh *strictHandler) ListApprovalRules(w http.ResponseWriter, r *http.Request) {
	var request ListApprovalRulesRequestObject

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListApprovalRules(ctx, request.(ListApprovalRulesRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListApprovalRules")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListApprovalRulesResponseObject); ok {
		if err := validResponse.VisitListApprovalRulesResponse(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))
	}
}

// CreateApprovalRule operation middleware
func (sh *strictHandler) CreateApprovalRule(w http.ResponseWriter, r *http.Request, params CreateApprovalRuleParams) {
	var request CreateApprovalRuleRequestObject

	request.Params = params

	var body CreateApprovalRuleJSONRequestBody
	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.CreateApprovalRule(ctx, request.(CreateApprovalRuleRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "CreateApprovalRule")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(CreateApprovalRuleResponseObject); ok {
		if err := validResponse.VisitCreateApprovalRuleResponse(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))
	}
}

// PatchApprovalRule operation middleware
func (sh *strictHandler) PatchApprovalRule(w http.ResponseWriter, r *http.Request, id EntityId, params PatchApprovalRuleParams) {
	var request PatchApprovalRuleRequestObject

	request.Id = id
	request.Params = params

	var body PatchApprovalRuleJSONRequestBody
	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.PatchApprovalRule(ctx, request.(PatchApprovalRuleRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "PatchApprovalRule")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(PatchApprovalRuleResponseObject); ok {
		if err := validResponse.VisitPatchApprovalRuleResponse(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))
	}
}

// GetAutonomySettings operation middleware
func (sh *strictHandler) GetAutonomySettings(w http.ResponseWriter, r *http.Request) {
	var request GetAutonomySettingsRequestObject

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetAutonomySettings(ctx, request.(GetAutonomySettingsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetAutonomySettings")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetAutonomySettingsResponseObject); ok {
		if err := validResponse.VisitGetAutonomySettingsResponse(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))
	}
}

// PatchAutonomySettings operation middleware
func (sh *strictHandler) PatchAutonomySettings(w http.ResponseWriter, r *http.Request) {
	var request PatchAutonomySettingsRequestObject

	var body PatchAutonomySettingsJSONRequestBody
	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.PatchAutonomySettings(ctx, request.(PatchAutonomySettingsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "PatchAutonomySettings")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(PatchAutonomySettingsResponseObject); ok {
		if err := validResponse.VisitPatchAutonomySettingsResponse(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))
	}
}

// ListRiskClasses operation middleware
func (sh *strictHandler) ListRiskClasses(w http.ResponseWriter, r *http.Request) {
	var request ListRiskClassesRequestObject

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListRiskClasses(ctx, request.(ListRiskClassesRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListRiskClasses")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListRiskClassesResponseObject); ok {
		if err := validResponse.VisitListRiskClassesResponse(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))
	}
}

// EndRelationship operation middleware
func (sh *strictHandler) EndRelationship(w http.ResponseWriter, r *http.Request, params EndRelationshipParams) {
	var request EndRelationshipRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.EndRelationship(ctx, request.(EndRelationshipRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "EndRelationship")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(EndRelationshipResponseObject); ok {
		if err := validResponse.VisitEndRelationshipResponse(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))
	}
}

// CreateRelationship operation middleware
func (sh *strictHandler) CreateRelationship(w http.ResponseWriter, r *http.Request, params CreateRelationshipParams) {
	var request CreateRelationshipRequestObject

	request.Params = params

	var body CreateRelationshipJSONRequestBody
	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.CreateRelationship(ctx, request.(CreateRelationshipRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "CreateRelationship")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(CreateRelationshipResponseObject); ok {
		if err := validResponse.VisitCreateRelationshipResponse(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))
	}
}

// ListSignals operation middleware
func (sh *strictHandler) ListSignals(w http.ResponseWriter, r *http.Request, params ListSignalsParams) {
	var request ListSignalsRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListSignals(ctx, request.(ListSignalsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListSignals")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListSignalsResponseObject); ok {
		if err := validResponse.VisitListSignalsResponse(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))
	}
}

// AckSignal operation middleware
func (sh *strictHandler) AckSignal(w http.ResponseWriter, r *http.Request, id EntityId) {
	var request AckSignalRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.AckSignal(ctx, request.(AckSignalRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "AckSignal")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(AckSignalResponseObject); ok {
		if err := validResponse.VisitAckSignalResponse(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))
	}
}

// MuteSignal operation middleware
func (sh *strictHandler) MuteSignal(w http.ResponseWriter, r *http.Request, id EntityId) {
	var request MuteSignalRequestObject

	request.Id = id

	var body MuteSignalJSONRequestBody
	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.MuteSignal(ctx, request.(MuteSignalRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "MuteSignal")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(MuteSignalResponseObject); ok {
		if err := validResponse.VisitMuteSignalResponse(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))
	}
}

// ResolveSignal operation middleware
func (sh *strictHandler) ResolveSignal(w http.ResponseWriter, r *http.Request, id EntityId) {
	var request ResolveSignalRequestObject

	request.Id = id

	var body ResolveSignalJSONRequestBody
	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.ResolveSignal(ctx, request.(ResolveSignalRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ResolveSignal")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ResolveSignalResponseObject); ok {
		if err := validResponse.VisitResolveSignalResponse(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))
	}
}

// ListSkills operation middleware
func (sh *strictHandler) ListSkills(w http.ResponseWriter, r *http.Request, params ListSkillsParams) {
	var request ListSkillsRequestObject

	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListSkills(ctx, request.(ListSkillsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListSkills")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListSkillsResponseObject); ok {
		if err := validResponse.VisitListSkillsResponse(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))
	}
}

// PatchSkill operation middleware
func (sh *strictHandler) PatchSkill(w http.ResponseWriter, r *http.Request, id EntityId, params PatchSkillParams) {
	var request PatchSkillRequestObject

	request.Id = id
	request.Params = params

	var body PatchSkillJSONRequestBody
	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.PatchSkill(ctx, request.(PatchSkillRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "PatchSkill")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(PatchSkillResponseObject); ok {
		if err := validResponse.VisitPatchSkillResponse(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))
	}
}

// ListSkillVersions operation middleware
func (sh *strictHandler) ListSkillVersions(w http.ResponseWriter, r *http.Request, id EntityId) {
	var request ListSkillVersionsRequestObject

	request.Id = id

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.ListSkillVersions(ctx, request.(ListSkillVersionsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "ListSkillVersions")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(ListSkillVersionsResponseObject); ok {
		if err := validResponse.VisitListSkillVersionsResponse(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))
	}
}

// GetTrends operation middleware
func (sh *strictHandler) GetTrends(w http.ResponseWriter, r *http.Request, entityId string, params GetTrendsParams) {
	var request GetTrendsRequestObject

	request.EntityId = entityId
	request.Params = params

	handler := func(ctx context.Context, w http.ResponseWriter, r *http.Request, request interface{}) (interface{}, error) {
		return sh.ssi.GetTrends(ctx, request.(GetTrendsRequestObject))
	}
	for _, middleware := range sh.middlewares {
		handler = middleware(handler, "GetTrends")
	}

	response, err := handler(r.Context(), w, r, request)

	if err != nil {
		sh.options.ResponseErrorHandlerFunc(w, r, err)
	} else if validResponse, ok := response.(GetTrendsResponseObject); ok {
		if err := validResponse.VisitGetTrendsResponse(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))
	}
}

// Base64 encoded, gzipped, json marshaled Swagger object
var swaggerSpec = []string{

	"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",
	"T3QHrO8AAA==",
}

// GetSwagger returns the content of the embedded swagger specification file
// or error if failed to decode
func decodeSpec() ([]byte, error) {
	zipped, err := base64.StdEncoding.DecodeString(strings.Join(swaggerSpec, ""))
	if err != nil {
		return nil, fmt.Errorf("error base64 decoding spec: %w", err)
	}
	zr, err := gzip.NewReader(bytes.NewReader(zipped))
	if err != nil {
		return nil, fmt.Errorf("error decompressing spec: %w", err)
	}
	var buf bytes.Buffer
	_, err = buf.ReadFrom(zr)
	if err != nil {
		return nil, fmt.Errorf("error decompressing spec: %w", err)
	}

	return buf.Bytes(), nil
}

var rawSpec = decodeSpecCached()

// a naive cached of a decoded swagger spec
func decodeSpecCached() func() ([]byte, error) {
	data, err := decodeSpec()
	return func() ([]byte, error) {
		return data, err
	}
}

// Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) {
	res := make(map[string]func() ([]byte, error))
	if len(pathToFile) > 0 {
		res[pathToFile] = rawSpec
	}

	return res
}

// GetSwagger returns the Swagger specification corresponding to the generated code
// in this file. The external references of Swagger specification are resolved.
// The logic of resolving external references is tightly connected to "import-mapping" feature.
// Externally referenced files must be embedded in the corresponding golang packages.
// Urls can be supported but this task was out of the scope.
func GetSwagger() (swagger *openapi3.T, err error) {
	resolvePath := PathToRawSpec("")

	loader := openapi3.NewLoader()
	loader.IsExternalRefsAllowed = true
	loader.ReadFromURIFunc = func(loader *openapi3.Loader, url *url.URL) ([]byte, error) {
		pathToFile := url.String()
		pathToFile = path.Clean(pathToFile)
		getSpec, ok := resolvePath[pathToFile]
		if !ok {
			err1 := fmt.Errorf("path not found: %s", pathToFile)
			return nil, err1
		}
		return getSpec()
	}
	var specData []byte
	specData, err = rawSpec()
	if err != nil {
		return
	}
	swagger, err = loader.LoadFromData(specData)
	if err != nil {
		return
	}
	return
}
