// Code generated by github.com/99designs/gqlgen, DO NOT EDIT.

package model

import (
	"fmt"
	"io"
	"strconv"
	"time"
)

type APIToken struct {
	ID        int64       `json:"id"`
	TokenID   string      `json:"tokenId"`
	UserID    int64       `json:"userId"`
	RoleID    int64       `json:"roleId"`
	Name      *string     `json:"name,omitempty"`
	TTL       int         `json:"ttl"`
	Status    TokenStatus `json:"status"`
	CreatedAt time.Time   `json:"createdAt"`
	UpdatedAt time.Time   `json:"updatedAt"`
}

type APITokenWithSecret struct {
	ID        int64       `json:"id"`
	TokenID   string      `json:"tokenId"`
	UserID    int64       `json:"userId"`
	RoleID    int64       `json:"roleId"`
	Name      *string     `json:"name,omitempty"`
	TTL       int         `json:"ttl"`
	Status    TokenStatus `json:"status"`
	CreatedAt time.Time   `json:"createdAt"`
	UpdatedAt time.Time   `json:"updatedAt"`
	Token     string      `json:"token"`
}

type AgentConfig struct {
	Model             string           `json:"model"`
	MaxTokens         *int             `json:"maxTokens,omitempty"`
	Temperature       *float64         `json:"temperature,omitempty"`
	TopK              *int             `json:"topK,omitempty"`
	TopP              *float64         `json:"topP,omitempty"`
	MinLength         *int             `json:"minLength,omitempty"`
	MaxLength         *int             `json:"maxLength,omitempty"`
	RepetitionPenalty *float64         `json:"repetitionPenalty,omitempty"`
	FrequencyPenalty  *float64         `json:"frequencyPenalty,omitempty"`
	PresencePenalty   *float64         `json:"presencePenalty,omitempty"`
	Reasoning         *ReasoningConfig `json:"reasoning,omitempty"`
	Price             *ModelPrice      `json:"price,omitempty"`
}

type AgentLog struct {
	ID        int64     `json:"id"`
	Initiator AgentType `json:"initiator"`
	Executor  AgentType `json:"executor"`
	Task      string    `json:"task"`
	Result    string    `json:"result"`
	FlowID    int64     `json:"flowId"`
	TaskID    *int64    `json:"taskId,omitempty"`
	SubtaskID *int64    `json:"subtaskId,omitempty"`
	CreatedAt time.Time `json:"createdAt"`
}

type AgentPrompt struct {
	System *DefaultPrompt `json:"system"`
}

type AgentPrompts struct {
	System *DefaultPrompt `json:"system"`
	Human  *DefaultPrompt `json:"human"`
}

type AgentTestResult struct {
	Tests []*TestResult `json:"tests"`
}

type AgentTypeUsageStats struct {
	AgentType AgentType   `json:"agentType"`
	Stats     *UsageStats `json:"stats"`
}

type AgentsConfig struct {
	Simple       *AgentConfig `json:"simple"`
	SimpleJSON   *AgentConfig `json:"simpleJson"`
	PrimaryAgent *AgentConfig `json:"primaryAgent"`
	Assistant    *AgentConfig `json:"assistant"`
	Generator    *AgentConfig `json:"generator"`
	Refiner      *AgentConfig `json:"refiner"`
	Adviser      *AgentConfig `json:"adviser"`
	Reflector    *AgentConfig `json:"reflector"`
	Searcher     *AgentConfig `json:"searcher"`
	Enricher     *AgentConfig `json:"enricher"`
	Coder        *AgentConfig `json:"coder"`
	Installer    *AgentConfig `json:"installer"`
	Pentester    *AgentConfig `json:"pentester"`
}

type AgentsPrompts struct {
	PrimaryAgent  *AgentPrompt  `json:"primaryAgent"`
	Assistant     *AgentPrompt  `json:"assistant"`
	Pentester     *AgentPrompts `json:"pentester"`
	Coder         *AgentPrompts `json:"coder"`
	Installer     *AgentPrompts `json:"installer"`
	Searcher      *AgentPrompts `json:"searcher"`
	Memorist      *AgentPrompts `json:"memorist"`
	Adviser       *AgentPrompts `json:"adviser"`
	Generator     *AgentPrompts `json:"generator"`
	Refiner       *AgentPrompts `json:"refiner"`
	Reporter      *AgentPrompts `json:"reporter"`
	Reflector     *AgentPrompts `json:"reflector"`
	Enricher      *AgentPrompts `json:"enricher"`
	ToolCallFixer *AgentPrompts `json:"toolCallFixer"`
	Summarizer    *AgentPrompt  `json:"summarizer"`
}

type Assistant struct {
	ID        int64      `json:"id"`
	Title     string     `json:"title"`
	Status    StatusType `json:"status"`
	Provider  *Provider  `json:"provider"`
	FlowID    int64      `json:"flowId"`
	UseAgents bool       `json:"useAgents"`
	CreatedAt time.Time  `json:"createdAt"`
	UpdatedAt time.Time  `json:"updatedAt"`
}

type AssistantLog struct {
	ID           int64          `json:"id"`
	Type         MessageLogType `json:"type"`
	Message      string         `json:"message"`
	Thinking     *string        `json:"thinking,omitempty"`
	Result       string         `json:"result"`
	ResultFormat ResultFormat   `json:"resultFormat"`
	AppendPart   bool           `json:"appendPart"`
	FlowID       int64          `json:"flowId"`
	AssistantID  int64          `json:"assistantId"`
	CreatedAt    time.Time      `json:"createdAt"`
}

type CreateAPITokenInput struct {
	Name *string `json:"name,omitempty"`
	TTL  int     `json:"ttl"`
}

type CreateFlowTemplateInput struct {
	Title string `json:"title"`
	Text  string `json:"text"`
}

type CreateKnowledgeDocumentInput struct {
	DocType     KnowledgeDocType     `json:"docType"`
	Content     string               `json:"content"`
	Question    string               `json:"question"`
	Description *string              `json:"description,omitempty"`
	GuideType   *KnowledgeGuideType  `json:"guideType,omitempty"`
	AnswerType  *KnowledgeAnswerType `json:"answerType,omitempty"`
	CodeLang    *string              `json:"codeLang,omitempty"`
}

type DailyFlowsStats struct {
	Date  time.Time   `json:"date"`
	Stats *FlowsStats `json:"stats"`
}

type DailyToolcallsStats struct {
	Date  time.Time       `json:"date"`
	Stats *ToolcallsStats `json:"stats"`
}

type DailyUsageStats struct {
	Date  time.Time   `json:"date"`
	Stats *UsageStats `json:"stats"`
}

type DefaultPrompt struct {
	Type      PromptType `json:"type"`
	Template  string     `json:"template"`
	Variables []string   `json:"variables"`
}

type DefaultPrompts struct {
	Agents *AgentsPrompts `json:"agents"`
	Tools  *ToolsPrompts  `json:"tools"`
}

type DefaultProvidersConfig struct {
	Openai    *ProviderConfig `json:"openai"`
	Anthropic *ProviderConfig `json:"anthropic"`
	Gemini    *ProviderConfig `json:"gemini,omitempty"`
	Bedrock   *ProviderConfig `json:"bedrock,omitempty"`
	Ollama    *ProviderConfig `json:"ollama,omitempty"`
	Custom    *ProviderConfig `json:"custom,omitempty"`
	Deepseek  *ProviderConfig `json:"deepseek,omitempty"`
	Glm       *ProviderConfig `json:"glm,omitempty"`
	Kimi      *ProviderConfig `json:"kimi,omitempty"`
	Qwen      *ProviderConfig `json:"qwen,omitempty"`
}

type Flow struct {
	ID        int64       `json:"id"`
	Title     string      `json:"title"`
	Status    StatusType  `json:"status"`
	Terminals []*Terminal `json:"terminals,omitempty"`
	Provider  *Provider   `json:"provider"`
	CreatedAt time.Time   `json:"createdAt"`
	UpdatedAt time.Time   `json:"updatedAt"`
}

type FlowAssistant struct {
	Flow      *Flow      `json:"flow"`
	Assistant *Assistant `json:"assistant"`
}

type FlowExecutionStats struct {
	FlowID               int64                 `json:"flowId"`
	FlowTitle            string                `json:"flowTitle"`
	TotalDurationSeconds float64               `json:"totalDurationSeconds"`
	TotalToolcallsCount  int                   `json:"totalToolcallsCount"`
	TotalAssistantsCount int                   `json:"totalAssistantsCount"`
	Tasks                []*TaskExecutionStats `json:"tasks"`
}

type FlowFile struct {
	ID         string    `json:"id"`
	Name       string    `json:"name"`
	Path       string    `json:"path"`
	Size       int       `json:"size"`
	IsDir      bool      `json:"isDir"`
	ModifiedAt time.Time `json:"modifiedAt"`
}

type FlowStats struct {
	TotalTasksCount      int `json:"totalTasksCount"`
	TotalSubtasksCount   int `json:"totalSubtasksCount"`
	TotalAssistantsCount int `json:"totalAssistantsCount"`
}

type FlowTemplate struct {
	ID        int64     `json:"id"`
	UserID    int64     `json:"userId"`
	Title     string    `json:"title"`
	Text      string    `json:"text"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

type FlowsStats struct {
	TotalFlowsCount      int `json:"totalFlowsCount"`
	TotalTasksCount      int `json:"totalTasksCount"`
	TotalSubtasksCount   int `json:"totalSubtasksCount"`
	TotalAssistantsCount int `json:"totalAssistantsCount"`
}

type FunctionToolcallsStats struct {
	FunctionName         string  `json:"functionName"`
	IsAgent              bool    `json:"isAgent"`
	TotalCount           int     `json:"totalCount"`
	TotalDurationSeconds float64 `json:"totalDurationSeconds"`
	AvgDurationSeconds   float64 `json:"avgDurationSeconds"`
}

type KnowledgeDocument struct {
	ID          string               `json:"id"`
	DocType     KnowledgeDocType     `json:"docType"`
	Content     string               `json:"content"`
	Question    string               `json:"question"`
	Description *string              `json:"description,omitempty"`
	UserID      int64                `json:"userId"`
	FlowID      *int64               `json:"flowId,omitempty"`
	TaskID      *int64               `json:"taskId,omitempty"`
	SubtaskID   *int64               `json:"subtaskId,omitempty"`
	GuideType   *KnowledgeGuideType  `json:"guideType,omitempty"`
	AnswerType  *KnowledgeAnswerType `json:"answerType,omitempty"`
	CodeLang    *string              `json:"codeLang,omitempty"`
	PartSize    int                  `json:"partSize"`
	TotalSize   int                  `json:"totalSize"`
	Manual      bool                 `json:"manual"`
}

type KnowledgeDocumentWithScore struct {
	Score    float64            `json:"score"`
	Document *KnowledgeDocument `json:"document"`
}

type KnowledgeFilter struct {
	DocTypes    []KnowledgeDocType    `json:"docTypes,omitempty"`
	GuideTypes  []KnowledgeGuideType  `json:"guideTypes,omitempty"`
	AnswerTypes []KnowledgeAnswerType `json:"answerTypes,omitempty"`
	CodeLangs   []string              `json:"codeLangs,omitempty"`
	FlowID      *int64                `json:"flowId,omitempty"`
	Manual      *bool                 `json:"manual,omitempty"`
}

type MessageLog struct {
	ID           int64          `json:"id"`
	Type         MessageLogType `json:"type"`
	Message      string         `json:"message"`
	Thinking     *string        `json:"thinking,omitempty"`
	Result       string         `json:"result"`
	ResultFormat ResultFormat   `json:"resultFormat"`
	FlowID       int64          `json:"flowId"`
	TaskID       *int64         `json:"taskId,omitempty"`
	SubtaskID    *int64         `json:"subtaskId,omitempty"`
	CreatedAt    time.Time      `json:"createdAt"`
}

type ModelAgentsUsageStats struct {
	Model      string      `json:"model"`
	Provider   string      `json:"provider"`
	AgentTypes []AgentType `json:"agentTypes"`
	Stats      *UsageStats `json:"stats"`
}

type ModelConfig struct {
	Name        string      `json:"name"`
	Description *string     `json:"description,omitempty"`
	ReleaseDate *time.Time  `json:"releaseDate,omitempty"`
	Thinking    *bool       `json:"thinking,omitempty"`
	Price       *ModelPrice `json:"price,omitempty"`
}

type ModelPrice struct {
	Input      float64 `json:"input"`
	Output     float64 `json:"output"`
	CacheRead  float64 `json:"cacheRead"`
	CacheWrite float64 `json:"cacheWrite"`
}

type ModelUsageStats struct {
	Model    string      `json:"model"`
	Provider string      `json:"provider"`
	Stats    *UsageStats `json:"stats"`
}

type Mutation struct {
}

type PromptValidationResult struct {
	Result    ResultType                 `json:"result"`
	ErrorType *PromptValidationErrorType `json:"errorType,omitempty"`
	Message   *string                    `json:"message,omitempty"`
	Line      *int                       `json:"line,omitempty"`
	Details   *string                    `json:"details,omitempty"`
}

type PromptsConfig struct {
	Default     *DefaultPrompts `json:"default"`
	UserDefined []*UserPrompt   `json:"userDefined,omitempty"`
}

type Provider struct {
	Name string       `json:"name"`
	Type ProviderType `json:"type"`
}

type ProviderConfig struct {
	ID        int64         `json:"id"`
	Name      string        `json:"name"`
	Type      ProviderType  `json:"type"`
	Agents    *AgentsConfig `json:"agents"`
	CreatedAt time.Time     `json:"createdAt"`
	UpdatedAt time.Time     `json:"updatedAt"`
}

type ProviderTestResult struct {
	Simple       *AgentTestResult `json:"simple"`
	SimpleJSON   *AgentTestResult `json:"simpleJson"`
	PrimaryAgent *AgentTestResult `json:"primaryAgent"`
	Assistant    *AgentTestResult `json:"assistant"`
	Generator    *AgentTestResult `json:"generator"`
	Refiner      *AgentTestResult `json:"refiner"`
	Adviser      *AgentTestResult `json:"adviser"`
	Reflector    *AgentTestResult `json:"reflector"`
	Searcher     *AgentTestResult `json:"searcher"`
	Enricher     *AgentTestResult `json:"enricher"`
	Coder        *AgentTestResult `json:"coder"`
	Installer    *AgentTestResult `json:"installer"`
	Pentester    *AgentTestResult `json:"pentester"`
}

type ProviderUsageStats struct {
	Provider string      `json:"provider"`
	Stats    *UsageStats `json:"stats"`
}

type ProvidersConfig struct {
	Enabled     *ProvidersReadinessStatus `json:"enabled"`
	Default     *DefaultProvidersConfig   `json:"default"`
	UserDefined []*ProviderConfig         `json:"userDefined,omitempty"`
	Models      *ProvidersModelsList      `json:"models"`
}

type ProvidersModelsList struct {
	Openai    []*ModelConfig `json:"openai"`
	Anthropic []*ModelConfig `json:"anthropic"`
	Gemini    []*ModelConfig `json:"gemini"`
	Bedrock   []*ModelConfig `json:"bedrock,omitempty"`
	Ollama    []*ModelConfig `json:"ollama,omitempty"`
	Custom    []*ModelConfig `json:"custom,omitempty"`
	Deepseek  []*ModelConfig `json:"deepseek,omitempty"`
	Glm       []*ModelConfig `json:"glm,omitempty"`
	Kimi      []*ModelConfig `json:"kimi,omitempty"`
	Qwen      []*ModelConfig `json:"qwen,omitempty"`
}

type ProvidersReadinessStatus struct {
	Openai    bool `json:"openai"`
	Anthropic bool `json:"anthropic"`
	Gemini    bool `json:"gemini"`
	Bedrock   bool `json:"bedrock"`
	Ollama    bool `json:"ollama"`
	Custom    bool `json:"custom"`
	Deepseek  bool `json:"deepseek"`
	Glm       bool `json:"glm"`
	Kimi      bool `json:"kimi"`
	Qwen      bool `json:"qwen"`
}

type Query struct {
}

type ReasoningConfig struct {
	Effort    *ReasoningEffort `json:"effort,omitempty"`
	MaxTokens *int             `json:"maxTokens,omitempty"`
}

type Screenshot struct {
	ID        int64     `json:"id"`
	FlowID    int64     `json:"flowId"`
	TaskID    *int64    `json:"taskId,omitempty"`
	SubtaskID *int64    `json:"subtaskId,omitempty"`
	Name      string    `json:"name"`
	URL       string    `json:"url"`
	CreatedAt time.Time `json:"createdAt"`
}

type SearchLog struct {
	ID        int64     `json:"id"`
	Initiator AgentType `json:"initiator"`
	Executor  AgentType `json:"executor"`
	Engine    string    `json:"engine"`
	Query     string    `json:"query"`
	Result    string    `json:"result"`
	FlowID    int64     `json:"flowId"`
	TaskID    *int64    `json:"taskId,omitempty"`
	SubtaskID *int64    `json:"subtaskId,omitempty"`
	CreatedAt time.Time `json:"createdAt"`
}

type Settings struct {
	Debug              bool   `json:"debug"`
	AskUser            bool   `json:"askUser"`
	Version            string `json:"version"`
	DockerInside       bool   `json:"dockerInside"`
	IsDevelopMode      bool   `json:"isDevelopMode"`
	AssistantUseAgents bool   `json:"assistantUseAgents"`
}

type Subscription struct {
}

type Subtask struct {
	ID          int64      `json:"id"`
	Status      StatusType `json:"status"`
	Title       string     `json:"title"`
	Description string     `json:"description"`
	Result      string     `json:"result"`
	TaskID      int64      `json:"taskId"`
	CreatedAt   time.Time  `json:"createdAt"`
	UpdatedAt   time.Time  `json:"updatedAt"`
}

type SubtaskExecutionStats struct {
	SubtaskID            int64   `json:"subtaskId"`
	SubtaskTitle         string  `json:"subtaskTitle"`
	TotalDurationSeconds float64 `json:"totalDurationSeconds"`
	TotalToolcallsCount  int     `json:"totalToolcallsCount"`
}

type Task struct {
	ID        int64      `json:"id"`
	Title     string     `json:"title"`
	Status    StatusType `json:"status"`
	Input     string     `json:"input"`
	Result    string     `json:"result"`
	FlowID    int64      `json:"flowId"`
	Subtasks  []*Subtask `json:"subtasks,omitempty"`
	CreatedAt time.Time  `json:"createdAt"`
	UpdatedAt time.Time  `json:"updatedAt"`
}

type TaskExecutionStats struct {
	TaskID               int64                    `json:"taskId"`
	TaskTitle            string                   `json:"taskTitle"`
	TotalDurationSeconds float64                  `json:"totalDurationSeconds"`
	TotalToolcallsCount  int                      `json:"totalToolcallsCount"`
	Subtasks             []*SubtaskExecutionStats `json:"subtasks"`
}

type Terminal struct {
	ID        int64        `json:"id"`
	Type      TerminalType `json:"type"`
	Name      string       `json:"name"`
	Image     string       `json:"image"`
	Connected bool         `json:"connected"`
	CreatedAt time.Time    `json:"createdAt"`
}

type TerminalLog struct {
	ID        int64           `json:"id"`
	FlowID    int64           `json:"flowId"`
	TaskID    *int64          `json:"taskId,omitempty"`
	SubtaskID *int64          `json:"subtaskId,omitempty"`
	Type      TerminalLogType `json:"type"`
	Text      string          `json:"text"`
	Terminal  int64           `json:"terminal"`
	CreatedAt time.Time       `json:"createdAt"`
}

type TestResult struct {
	Name      string  `json:"name"`
	Type      string  `json:"type"`
	Result    bool    `json:"result"`
	Reasoning bool    `json:"reasoning"`
	Streaming bool    `json:"streaming"`
	Latency   *int    `json:"latency,omitempty"`
	Error     *string `json:"error,omitempty"`
}

type ToolCallLog struct {
	ID              int64          `json:"id"`
	CallID          string         `json:"callId"`
	Status          ToolCallStatus `json:"status"`
	Name            string         `json:"name"`
	Args            string         `json:"args"`
	Result          string         `json:"result"`
	DurationSeconds float64        `json:"durationSeconds"`
	FlowID          int64          `json:"flowId"`
	TaskID          *int64         `json:"taskId,omitempty"`
	SubtaskID       *int64         `json:"subtaskId,omitempty"`
	CreatedAt       time.Time      `json:"createdAt"`
	UpdatedAt       time.Time      `json:"updatedAt"`
}

type ToolcallsStats struct {
	TotalCount           int     `json:"totalCount"`
	TotalDurationSeconds float64 `json:"totalDurationSeconds"`
}

type ToolsPrompts struct {
	GetFlowDescription       *DefaultPrompt `json:"getFlowDescription"`
	GetTaskDescription       *DefaultPrompt `json:"getTaskDescription"`
	GetExecutionLogs         *DefaultPrompt `json:"getExecutionLogs"`
	GetFullExecutionContext  *DefaultPrompt `json:"getFullExecutionContext"`
	GetShortExecutionContext *DefaultPrompt `json:"getShortExecutionContext"`
	ChooseDockerImage        *DefaultPrompt `json:"chooseDockerImage"`
	ChooseUserLanguage       *DefaultPrompt `json:"chooseUserLanguage"`
	CollectToolCallID        *DefaultPrompt `json:"collectToolCallId"`
	DetectToolCallIDPattern  *DefaultPrompt `json:"detectToolCallIdPattern"`
	MonitorAgentExecution    *DefaultPrompt `json:"monitorAgentExecution"`
	PlanAgentTask            *DefaultPrompt `json:"planAgentTask"`
	WrapAgentTask            *DefaultPrompt `json:"wrapAgentTask"`
}

type UpdateAPITokenInput struct {
	Name   *string      `json:"name,omitempty"`
	Status *TokenStatus `json:"status,omitempty"`
}

type UpdateFlowTemplateInput struct {
	Title string `json:"title"`
	Text  string `json:"text"`
}

type UpdateKnowledgeDocumentInput struct {
	Content     string               `json:"content"`
	Question    *string              `json:"question,omitempty"`
	Description *string              `json:"description,omitempty"`
	DocType     *KnowledgeDocType    `json:"docType,omitempty"`
	GuideType   *KnowledgeGuideType  `json:"guideType,omitempty"`
	AnswerType  *KnowledgeAnswerType `json:"answerType,omitempty"`
	CodeLang    *string              `json:"codeLang,omitempty"`
}

type UsageStats struct {
	TotalUsageIn       int     `json:"totalUsageIn"`
	TotalUsageOut      int     `json:"totalUsageOut"`
	TotalUsageCacheIn  int     `json:"totalUsageCacheIn"`
	TotalUsageCacheOut int     `json:"totalUsageCacheOut"`
	TotalUsageCostIn   float64 `json:"totalUsageCostIn"`
	TotalUsageCostOut  float64 `json:"totalUsageCostOut"`
}

type UserPreferences struct {
	ID            int64   `json:"id"`
	FavoriteFlows []int64 `json:"favoriteFlows"`
}

type UserPrompt struct {
	ID        int64      `json:"id"`
	Type      PromptType `json:"type"`
	Template  string     `json:"template"`
	CreatedAt time.Time  `json:"createdAt"`
	UpdatedAt time.Time  `json:"updatedAt"`
}

type UserResource struct {
	ID        int64     `json:"id"`
	UserID    int64     `json:"userId"`
	Name      string    `json:"name"`
	Path      string    `json:"path"`
	Size      int       `json:"size"`
	IsDir     bool      `json:"isDir"`
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

type VectorStoreLog struct {
	ID        int64             `json:"id"`
	Initiator AgentType         `json:"initiator"`
	Executor  AgentType         `json:"executor"`
	Filter    string            `json:"filter"`
	Query     string            `json:"query"`
	Action    VectorStoreAction `json:"action"`
	Result    string            `json:"result"`
	FlowID    int64             `json:"flowId"`
	TaskID    *int64            `json:"taskId,omitempty"`
	SubtaskID *int64            `json:"subtaskId,omitempty"`
	CreatedAt time.Time         `json:"createdAt"`
}

type AgentConfigType string

const (
	AgentConfigTypeSimple       AgentConfigType = "simple"
	AgentConfigTypeSimpleJSON   AgentConfigType = "simple_json"
	AgentConfigTypePrimaryAgent AgentConfigType = "primary_agent"
	AgentConfigTypeAssistant    AgentConfigType = "assistant"
	AgentConfigTypeGenerator    AgentConfigType = "generator"
	AgentConfigTypeRefiner      AgentConfigType = "refiner"
	AgentConfigTypeAdviser      AgentConfigType = "adviser"
	AgentConfigTypeReflector    AgentConfigType = "reflector"
	AgentConfigTypeSearcher     AgentConfigType = "searcher"
	AgentConfigTypeEnricher     AgentConfigType = "enricher"
	AgentConfigTypeCoder        AgentConfigType = "coder"
	AgentConfigTypeInstaller    AgentConfigType = "installer"
	AgentConfigTypePentester    AgentConfigType = "pentester"
)

var AllAgentConfigType = []AgentConfigType{
	AgentConfigTypeSimple,
	AgentConfigTypeSimpleJSON,
	AgentConfigTypePrimaryAgent,
	AgentConfigTypeAssistant,
	AgentConfigTypeGenerator,
	AgentConfigTypeRefiner,
	AgentConfigTypeAdviser,
	AgentConfigTypeReflector,
	AgentConfigTypeSearcher,
	AgentConfigTypeEnricher,
	AgentConfigTypeCoder,
	AgentConfigTypeInstaller,
	AgentConfigTypePentester,
}

func (e AgentConfigType) IsValid() bool {
	switch e {
	case AgentConfigTypeSimple, AgentConfigTypeSimpleJSON, AgentConfigTypePrimaryAgent, AgentConfigTypeAssistant, AgentConfigTypeGenerator, AgentConfigTypeRefiner, AgentConfigTypeAdviser, AgentConfigTypeReflector, AgentConfigTypeSearcher, AgentConfigTypeEnricher, AgentConfigTypeCoder, AgentConfigTypeInstaller, AgentConfigTypePentester:
		return true
	}
	return false
}

func (e AgentConfigType) String() string {
	return string(e)
}

func (e *AgentConfigType) UnmarshalGQL(v interface{}) error {
	str, ok := v.(string)
	if !ok {
		return fmt.Errorf("enums must be strings")
	}

	*e = AgentConfigType(str)
	if !e.IsValid() {
		return fmt.Errorf("%s is not a valid AgentConfigType", str)
	}
	return nil
}

func (e AgentConfigType) MarshalGQL(w io.Writer) {
	fmt.Fprint(w, strconv.Quote(e.String()))
}

type AgentType string

const (
	AgentTypePrimaryAgent  AgentType = "primary_agent"
	AgentTypeReporter      AgentType = "reporter"
	AgentTypeGenerator     AgentType = "generator"
	AgentTypeRefiner       AgentType = "refiner"
	AgentTypeReflector     AgentType = "reflector"
	AgentTypeEnricher      AgentType = "enricher"
	AgentTypeAdviser       AgentType = "adviser"
	AgentTypeCoder         AgentType = "coder"
	AgentTypeMemorist      AgentType = "memorist"
	AgentTypeSearcher      AgentType = "searcher"
	AgentTypeInstaller     AgentType = "installer"
	AgentTypePentester     AgentType = "pentester"
	AgentTypeSummarizer    AgentType = "summarizer"
	AgentTypeToolCallFixer AgentType = "tool_call_fixer"
	AgentTypeAssistant     AgentType = "assistant"
)

var AllAgentType = []AgentType{
	AgentTypePrimaryAgent,
	AgentTypeReporter,
	AgentTypeGenerator,
	AgentTypeRefiner,
	AgentTypeReflector,
	AgentTypeEnricher,
	AgentTypeAdviser,
	AgentTypeCoder,
	AgentTypeMemorist,
	AgentTypeSearcher,
	AgentTypeInstaller,
	AgentTypePentester,
	AgentTypeSummarizer,
	AgentTypeToolCallFixer,
	AgentTypeAssistant,
}

func (e AgentType) IsValid() bool {
	switch e {
	case AgentTypePrimaryAgent, AgentTypeReporter, AgentTypeGenerator, AgentTypeRefiner, AgentTypeReflector, AgentTypeEnricher, AgentTypeAdviser, AgentTypeCoder, AgentTypeMemorist, AgentTypeSearcher, AgentTypeInstaller, AgentTypePentester, AgentTypeSummarizer, AgentTypeToolCallFixer, AgentTypeAssistant:
		return true
	}
	return false
}

func (e AgentType) String() string {
	return string(e)
}

func (e *AgentType) UnmarshalGQL(v interface{}) error {
	str, ok := v.(string)
	if !ok {
		return fmt.Errorf("enums must be strings")
	}

	*e = AgentType(str)
	if !e.IsValid() {
		return fmt.Errorf("%s is not a valid AgentType", str)
	}
	return nil
}

func (e AgentType) MarshalGQL(w io.Writer) {
	fmt.Fprint(w, strconv.Quote(e.String()))
}

type KnowledgeAnswerType string

const (
	KnowledgeAnswerTypeGuide         KnowledgeAnswerType = "guide"
	KnowledgeAnswerTypeVulnerability KnowledgeAnswerType = "vulnerability"
	KnowledgeAnswerTypeCode          KnowledgeAnswerType = "code"
	KnowledgeAnswerTypeTool          KnowledgeAnswerType = "tool"
	KnowledgeAnswerTypeOther         KnowledgeAnswerType = "other"
)

var AllKnowledgeAnswerType = []KnowledgeAnswerType{
	KnowledgeAnswerTypeGuide,
	KnowledgeAnswerTypeVulnerability,
	KnowledgeAnswerTypeCode,
	KnowledgeAnswerTypeTool,
	KnowledgeAnswerTypeOther,
}

func (e KnowledgeAnswerType) IsValid() bool {
	switch e {
	case KnowledgeAnswerTypeGuide, KnowledgeAnswerTypeVulnerability, KnowledgeAnswerTypeCode, KnowledgeAnswerTypeTool, KnowledgeAnswerTypeOther:
		return true
	}
	return false
}

func (e KnowledgeAnswerType) String() string {
	return string(e)
}

func (e *KnowledgeAnswerType) UnmarshalGQL(v interface{}) error {
	str, ok := v.(string)
	if !ok {
		return fmt.Errorf("enums must be strings")
	}

	*e = KnowledgeAnswerType(str)
	if !e.IsValid() {
		return fmt.Errorf("%s is not a valid KnowledgeAnswerType", str)
	}
	return nil
}

func (e KnowledgeAnswerType) MarshalGQL(w io.Writer) {
	fmt.Fprint(w, strconv.Quote(e.String()))
}

type KnowledgeDocType string

const (
	KnowledgeDocTypeAnswer KnowledgeDocType = "answer"
	KnowledgeDocTypeGuide  KnowledgeDocType = "guide"
	KnowledgeDocTypeCode   KnowledgeDocType = "code"
)

var AllKnowledgeDocType = []KnowledgeDocType{
	KnowledgeDocTypeAnswer,
	KnowledgeDocTypeGuide,
	KnowledgeDocTypeCode,
}

func (e KnowledgeDocType) IsValid() bool {
	switch e {
	case KnowledgeDocTypeAnswer, KnowledgeDocTypeGuide, KnowledgeDocTypeCode:
		return true
	}
	return false
}

func (e KnowledgeDocType) String() string {
	return string(e)
}

func (e *KnowledgeDocType) UnmarshalGQL(v interface{}) error {
	str, ok := v.(string)
	if !ok {
		return fmt.Errorf("enums must be strings")
	}

	*e = KnowledgeDocType(str)
	if !e.IsValid() {
		return fmt.Errorf("%s is not a valid KnowledgeDocType", str)
	}
	return nil
}

func (e KnowledgeDocType) MarshalGQL(w io.Writer) {
	fmt.Fprint(w, strconv.Quote(e.String()))
}

type KnowledgeGuideType string

const (
	KnowledgeGuideTypeInstall     KnowledgeGuideType = "install"
	KnowledgeGuideTypeConfigure   KnowledgeGuideType = "configure"
	KnowledgeGuideTypeUse         KnowledgeGuideType = "use"
	KnowledgeGuideTypePentest     KnowledgeGuideType = "pentest"
	KnowledgeGuideTypeDevelopment KnowledgeGuideType = "development"
	KnowledgeGuideTypeOther       KnowledgeGuideType = "other"
)

var AllKnowledgeGuideType = []KnowledgeGuideType{
	KnowledgeGuideTypeInstall,
	KnowledgeGuideTypeConfigure,
	KnowledgeGuideTypeUse,
	KnowledgeGuideTypePentest,
	KnowledgeGuideTypeDevelopment,
	KnowledgeGuideTypeOther,
}

func (e KnowledgeGuideType) IsValid() bool {
	switch e {
	case KnowledgeGuideTypeInstall, KnowledgeGuideTypeConfigure, KnowledgeGuideTypeUse, KnowledgeGuideTypePentest, KnowledgeGuideTypeDevelopment, KnowledgeGuideTypeOther:
		return true
	}
	return false
}

func (e KnowledgeGuideType) String() string {
	return string(e)
}

func (e *KnowledgeGuideType) UnmarshalGQL(v interface{}) error {
	str, ok := v.(string)
	if !ok {
		return fmt.Errorf("enums must be strings")
	}

	*e = KnowledgeGuideType(str)
	if !e.IsValid() {
		return fmt.Errorf("%s is not a valid KnowledgeGuideType", str)
	}
	return nil
}

func (e KnowledgeGuideType) MarshalGQL(w io.Writer) {
	fmt.Fprint(w, strconv.Quote(e.String()))
}

type MessageLogType string

const (
	MessageLogTypeAnswer   MessageLogType = "answer"
	MessageLogTypeReport   MessageLogType = "report"
	MessageLogTypeThoughts MessageLogType = "thoughts"
	MessageLogTypeBrowser  MessageLogType = "browser"
	MessageLogTypeTerminal MessageLogType = "terminal"
	MessageLogTypeFile     MessageLogType = "file"
	MessageLogTypeSearch   MessageLogType = "search"
	MessageLogTypeAdvice   MessageLogType = "advice"
	MessageLogTypeAsk      MessageLogType = "ask"
	MessageLogTypeInput    MessageLogType = "input"
	MessageLogTypeDone     MessageLogType = "done"
)

var AllMessageLogType = []MessageLogType{
	MessageLogTypeAnswer,
	MessageLogTypeReport,
	MessageLogTypeThoughts,
	MessageLogTypeBrowser,
	MessageLogTypeTerminal,
	MessageLogTypeFile,
	MessageLogTypeSearch,
	MessageLogTypeAdvice,
	MessageLogTypeAsk,
	MessageLogTypeInput,
	MessageLogTypeDone,
}

func (e MessageLogType) IsValid() bool {
	switch e {
	case MessageLogTypeAnswer, MessageLogTypeReport, MessageLogTypeThoughts, MessageLogTypeBrowser, MessageLogTypeTerminal, MessageLogTypeFile, MessageLogTypeSearch, MessageLogTypeAdvice, MessageLogTypeAsk, MessageLogTypeInput, MessageLogTypeDone:
		return true
	}
	return false
}

func (e MessageLogType) String() string {
	return string(e)
}

func (e *MessageLogType) UnmarshalGQL(v interface{}) error {
	str, ok := v.(string)
	if !ok {
		return fmt.Errorf("enums must be strings")
	}

	*e = MessageLogType(str)
	if !e.IsValid() {
		return fmt.Errorf("%s is not a valid MessageLogType", str)
	}
	return nil
}

func (e MessageLogType) MarshalGQL(w io.Writer) {
	fmt.Fprint(w, strconv.Quote(e.String()))
}

type PromptType string

const (
	PromptTypePrimaryAgent             PromptType = "primary_agent"
	PromptTypeAssistant                PromptType = "assistant"
	PromptTypePentester                PromptType = "pentester"
	PromptTypeQuestionPentester        PromptType = "question_pentester"
	PromptTypeCoder                    PromptType = "coder"
	PromptTypeQuestionCoder            PromptType = "question_coder"
	PromptTypeInstaller                PromptType = "installer"
	PromptTypeQuestionInstaller        PromptType = "question_installer"
	PromptTypeSearcher                 PromptType = "searcher"
	PromptTypeQuestionSearcher         PromptType = "question_searcher"
	PromptTypeMemorist                 PromptType = "memorist"
	PromptTypeQuestionMemorist         PromptType = "question_memorist"
	PromptTypeAdviser                  PromptType = "adviser"
	PromptTypeQuestionAdviser          PromptType = "question_adviser"
	PromptTypeGenerator                PromptType = "generator"
	PromptTypeSubtasksGenerator        PromptType = "subtasks_generator"
	PromptTypeRefiner                  PromptType = "refiner"
	PromptTypeSubtasksRefiner          PromptType = "subtasks_refiner"
	PromptTypeReporter                 PromptType = "reporter"
	PromptTypeTaskReporter             PromptType = "task_reporter"
	PromptTypeReflector                PromptType = "reflector"
	PromptTypeQuestionReflector        PromptType = "question_reflector"
	PromptTypeEnricher                 PromptType = "enricher"
	PromptTypeQuestionEnricher         PromptType = "question_enricher"
	PromptTypeToolcallFixer            PromptType = "toolcall_fixer"
	PromptTypeInputToolcallFixer       PromptType = "input_toolcall_fixer"
	PromptTypeSummarizer               PromptType = "summarizer"
	PromptTypeImageChooser             PromptType = "image_chooser"
	PromptTypeLanguageChooser          PromptType = "language_chooser"
	PromptTypeFlowDescriptor           PromptType = "flow_descriptor"
	PromptTypeTaskDescriptor           PromptType = "task_descriptor"
	PromptTypeExecutionLogs            PromptType = "execution_logs"
	PromptTypeFullExecutionContext     PromptType = "full_execution_context"
	PromptTypeShortExecutionContext    PromptType = "short_execution_context"
	PromptTypeToolCallIDCollector      PromptType = "tool_call_id_collector"
	PromptTypeToolCallIDDetector       PromptType = "tool_call_id_detector"
	PromptTypeQuestionExecutionMonitor PromptType = "question_execution_monitor"
	PromptTypeQuestionTaskPlanner      PromptType = "question_task_planner"
	PromptTypeTaskAssignmentWrapper    PromptType = "task_assignment_wrapper"
)

var AllPromptType = []PromptType{
	PromptTypePrimaryAgent,
	PromptTypeAssistant,
	PromptTypePentester,
	PromptTypeQuestionPentester,
	PromptTypeCoder,
	PromptTypeQuestionCoder,
	PromptTypeInstaller,
	PromptTypeQuestionInstaller,
	PromptTypeSearcher,
	PromptTypeQuestionSearcher,
	PromptTypeMemorist,
	PromptTypeQuestionMemorist,
	PromptTypeAdviser,
	PromptTypeQuestionAdviser,
	PromptTypeGenerator,
	PromptTypeSubtasksGenerator,
	PromptTypeRefiner,
	PromptTypeSubtasksRefiner,
	PromptTypeReporter,
	PromptTypeTaskReporter,
	PromptTypeReflector,
	PromptTypeQuestionReflector,
	PromptTypeEnricher,
	PromptTypeQuestionEnricher,
	PromptTypeToolcallFixer,
	PromptTypeInputToolcallFixer,
	PromptTypeSummarizer,
	PromptTypeImageChooser,
	PromptTypeLanguageChooser,
	PromptTypeFlowDescriptor,
	PromptTypeTaskDescriptor,
	PromptTypeExecutionLogs,
	PromptTypeFullExecutionContext,
	PromptTypeShortExecutionContext,
	PromptTypeToolCallIDCollector,
	PromptTypeToolCallIDDetector,
	PromptTypeQuestionExecutionMonitor,
	PromptTypeQuestionTaskPlanner,
	PromptTypeTaskAssignmentWrapper,
}

func (e PromptType) IsValid() bool {
	switch e {
	case PromptTypePrimaryAgent, PromptTypeAssistant, PromptTypePentester, PromptTypeQuestionPentester, PromptTypeCoder, PromptTypeQuestionCoder, PromptTypeInstaller, PromptTypeQuestionInstaller, PromptTypeSearcher, PromptTypeQuestionSearcher, PromptTypeMemorist, PromptTypeQuestionMemorist, PromptTypeAdviser, PromptTypeQuestionAdviser, PromptTypeGenerator, PromptTypeSubtasksGenerator, PromptTypeRefiner, PromptTypeSubtasksRefiner, PromptTypeReporter, PromptTypeTaskReporter, PromptTypeReflector, PromptTypeQuestionReflector, PromptTypeEnricher, PromptTypeQuestionEnricher, PromptTypeToolcallFixer, PromptTypeInputToolcallFixer, PromptTypeSummarizer, PromptTypeImageChooser, PromptTypeLanguageChooser, PromptTypeFlowDescriptor, PromptTypeTaskDescriptor, PromptTypeExecutionLogs, PromptTypeFullExecutionContext, PromptTypeShortExecutionContext, PromptTypeToolCallIDCollector, PromptTypeToolCallIDDetector, PromptTypeQuestionExecutionMonitor, PromptTypeQuestionTaskPlanner, PromptTypeTaskAssignmentWrapper:
		return true
	}
	return false
}

func (e PromptType) String() string {
	return string(e)
}

func (e *PromptType) UnmarshalGQL(v interface{}) error {
	str, ok := v.(string)
	if !ok {
		return fmt.Errorf("enums must be strings")
	}

	*e = PromptType(str)
	if !e.IsValid() {
		return fmt.Errorf("%s is not a valid PromptType", str)
	}
	return nil
}

func (e PromptType) MarshalGQL(w io.Writer) {
	fmt.Fprint(w, strconv.Quote(e.String()))
}

type PromptValidationErrorType string

const (
	PromptValidationErrorTypeSyntaxError          PromptValidationErrorType = "syntax_error"
	PromptValidationErrorTypeUnauthorizedVariable PromptValidationErrorType = "unauthorized_variable"
	PromptValidationErrorTypeRenderingFailed      PromptValidationErrorType = "rendering_failed"
	PromptValidationErrorTypeEmptyTemplate        PromptValidationErrorType = "empty_template"
	PromptValidationErrorTypeVariableTypeMismatch PromptValidationErrorType = "variable_type_mismatch"
	PromptValidationErrorTypeUnknownType          PromptValidationErrorType = "unknown_type"
)

var AllPromptValidationErrorType = []PromptValidationErrorType{
	PromptValidationErrorTypeSyntaxError,
	PromptValidationErrorTypeUnauthorizedVariable,
	PromptValidationErrorTypeRenderingFailed,
	PromptValidationErrorTypeEmptyTemplate,
	PromptValidationErrorTypeVariableTypeMismatch,
	PromptValidationErrorTypeUnknownType,
}

func (e PromptValidationErrorType) IsValid() bool {
	switch e {
	case PromptValidationErrorTypeSyntaxError, PromptValidationErrorTypeUnauthorizedVariable, PromptValidationErrorTypeRenderingFailed, PromptValidationErrorTypeEmptyTemplate, PromptValidationErrorTypeVariableTypeMismatch, PromptValidationErrorTypeUnknownType:
		return true
	}
	return false
}

func (e PromptValidationErrorType) String() string {
	return string(e)
}

func (e *PromptValidationErrorType) UnmarshalGQL(v interface{}) error {
	str, ok := v.(string)
	if !ok {
		return fmt.Errorf("enums must be strings")
	}

	*e = PromptValidationErrorType(str)
	if !e.IsValid() {
		return fmt.Errorf("%s is not a valid PromptValidationErrorType", str)
	}
	return nil
}

func (e PromptValidationErrorType) MarshalGQL(w io.Writer) {
	fmt.Fprint(w, strconv.Quote(e.String()))
}

type ProviderType string

const (
	ProviderTypeOpenai    ProviderType = "openai"
	ProviderTypeAnthropic ProviderType = "anthropic"
	ProviderTypeGemini    ProviderType = "gemini"
	ProviderTypeBedrock   ProviderType = "bedrock"
	ProviderTypeOllama    ProviderType = "ollama"
	ProviderTypeCustom    ProviderType = "custom"
	ProviderTypeDeepseek  ProviderType = "deepseek"
	ProviderTypeGlm       ProviderType = "glm"
	ProviderTypeKimi      ProviderType = "kimi"
	ProviderTypeQwen      ProviderType = "qwen"
)

var AllProviderType = []ProviderType{
	ProviderTypeOpenai,
	ProviderTypeAnthropic,
	ProviderTypeGemini,
	ProviderTypeBedrock,
	ProviderTypeOllama,
	ProviderTypeCustom,
	ProviderTypeDeepseek,
	ProviderTypeGlm,
	ProviderTypeKimi,
	ProviderTypeQwen,
}

func (e ProviderType) IsValid() bool {
	switch e {
	case ProviderTypeOpenai, ProviderTypeAnthropic, ProviderTypeGemini, ProviderTypeBedrock, ProviderTypeOllama, ProviderTypeCustom, ProviderTypeDeepseek, ProviderTypeGlm, ProviderTypeKimi, ProviderTypeQwen:
		return true
	}
	return false
}

func (e ProviderType) String() string {
	return string(e)
}

func (e *ProviderType) UnmarshalGQL(v interface{}) error {
	str, ok := v.(string)
	if !ok {
		return fmt.Errorf("enums must be strings")
	}

	*e = ProviderType(str)
	if !e.IsValid() {
		return fmt.Errorf("%s is not a valid ProviderType", str)
	}
	return nil
}

func (e ProviderType) MarshalGQL(w io.Writer) {
	fmt.Fprint(w, strconv.Quote(e.String()))
}

type ReasoningEffort string

const (
	ReasoningEffortHigh   ReasoningEffort = "high"
	ReasoningEffortMedium ReasoningEffort = "medium"
	ReasoningEffortLow    ReasoningEffort = "low"
)

var AllReasoningEffort = []ReasoningEffort{
	ReasoningEffortHigh,
	ReasoningEffortMedium,
	ReasoningEffortLow,
}

func (e ReasoningEffort) IsValid() bool {
	switch e {
	case ReasoningEffortHigh, ReasoningEffortMedium, ReasoningEffortLow:
		return true
	}
	return false
}

func (e ReasoningEffort) String() string {
	return string(e)
}

func (e *ReasoningEffort) UnmarshalGQL(v interface{}) error {
	str, ok := v.(string)
	if !ok {
		return fmt.Errorf("enums must be strings")
	}

	*e = ReasoningEffort(str)
	if !e.IsValid() {
		return fmt.Errorf("%s is not a valid ReasoningEffort", str)
	}
	return nil
}

func (e ReasoningEffort) MarshalGQL(w io.Writer) {
	fmt.Fprint(w, strconv.Quote(e.String()))
}

type ResultFormat string

const (
	ResultFormatPlain    ResultFormat = "plain"
	ResultFormatMarkdown ResultFormat = "markdown"
	ResultFormatTerminal ResultFormat = "terminal"
)

var AllResultFormat = []ResultFormat{
	ResultFormatPlain,
	ResultFormatMarkdown,
	ResultFormatTerminal,
}

func (e ResultFormat) IsValid() bool {
	switch e {
	case ResultFormatPlain, ResultFormatMarkdown, ResultFormatTerminal:
		return true
	}
	return false
}

func (e ResultFormat) String() string {
	return string(e)
}

func (e *ResultFormat) UnmarshalGQL(v interface{}) error {
	str, ok := v.(string)
	if !ok {
		return fmt.Errorf("enums must be strings")
	}

	*e = ResultFormat(str)
	if !e.IsValid() {
		return fmt.Errorf("%s is not a valid ResultFormat", str)
	}
	return nil
}

func (e ResultFormat) MarshalGQL(w io.Writer) {
	fmt.Fprint(w, strconv.Quote(e.String()))
}

type ResultType string

const (
	ResultTypeSuccess ResultType = "success"
	ResultTypeError   ResultType = "error"
)

var AllResultType = []ResultType{
	ResultTypeSuccess,
	ResultTypeError,
}

func (e ResultType) IsValid() bool {
	switch e {
	case ResultTypeSuccess, ResultTypeError:
		return true
	}
	return false
}

func (e ResultType) String() string {
	return string(e)
}

func (e *ResultType) UnmarshalGQL(v interface{}) error {
	str, ok := v.(string)
	if !ok {
		return fmt.Errorf("enums must be strings")
	}

	*e = ResultType(str)
	if !e.IsValid() {
		return fmt.Errorf("%s is not a valid ResultType", str)
	}
	return nil
}

func (e ResultType) MarshalGQL(w io.Writer) {
	fmt.Fprint(w, strconv.Quote(e.String()))
}

type StatusType string

const (
	StatusTypeCreated  StatusType = "created"
	StatusTypeRunning  StatusType = "running"
	StatusTypeWaiting  StatusType = "waiting"
	StatusTypeFinished StatusType = "finished"
	StatusTypeFailed   StatusType = "failed"
)

var AllStatusType = []StatusType{
	StatusTypeCreated,
	StatusTypeRunning,
	StatusTypeWaiting,
	StatusTypeFinished,
	StatusTypeFailed,
}

func (e StatusType) IsValid() bool {
	switch e {
	case StatusTypeCreated, StatusTypeRunning, StatusTypeWaiting, StatusTypeFinished, StatusTypeFailed:
		return true
	}
	return false
}

func (e StatusType) String() string {
	return string(e)
}

func (e *StatusType) UnmarshalGQL(v interface{}) error {
	str, ok := v.(string)
	if !ok {
		return fmt.Errorf("enums must be strings")
	}

	*e = StatusType(str)
	if !e.IsValid() {
		return fmt.Errorf("%s is not a valid StatusType", str)
	}
	return nil
}

func (e StatusType) MarshalGQL(w io.Writer) {
	fmt.Fprint(w, strconv.Quote(e.String()))
}

type TerminalLogType string

const (
	TerminalLogTypeStdin  TerminalLogType = "stdin"
	TerminalLogTypeStdout TerminalLogType = "stdout"
	TerminalLogTypeStderr TerminalLogType = "stderr"
)

var AllTerminalLogType = []TerminalLogType{
	TerminalLogTypeStdin,
	TerminalLogTypeStdout,
	TerminalLogTypeStderr,
}

func (e TerminalLogType) IsValid() bool {
	switch e {
	case TerminalLogTypeStdin, TerminalLogTypeStdout, TerminalLogTypeStderr:
		return true
	}
	return false
}

func (e TerminalLogType) String() string {
	return string(e)
}

func (e *TerminalLogType) UnmarshalGQL(v interface{}) error {
	str, ok := v.(string)
	if !ok {
		return fmt.Errorf("enums must be strings")
	}

	*e = TerminalLogType(str)
	if !e.IsValid() {
		return fmt.Errorf("%s is not a valid TerminalLogType", str)
	}
	return nil
}

func (e TerminalLogType) MarshalGQL(w io.Writer) {
	fmt.Fprint(w, strconv.Quote(e.String()))
}

type TerminalType string

const (
	TerminalTypePrimary   TerminalType = "primary"
	TerminalTypeSecondary TerminalType = "secondary"
)

var AllTerminalType = []TerminalType{
	TerminalTypePrimary,
	TerminalTypeSecondary,
}

func (e TerminalType) IsValid() bool {
	switch e {
	case TerminalTypePrimary, TerminalTypeSecondary:
		return true
	}
	return false
}

func (e TerminalType) String() string {
	return string(e)
}

func (e *TerminalType) UnmarshalGQL(v interface{}) error {
	str, ok := v.(string)
	if !ok {
		return fmt.Errorf("enums must be strings")
	}

	*e = TerminalType(str)
	if !e.IsValid() {
		return fmt.Errorf("%s is not a valid TerminalType", str)
	}
	return nil
}

func (e TerminalType) MarshalGQL(w io.Writer) {
	fmt.Fprint(w, strconv.Quote(e.String()))
}

type TokenStatus string

const (
	TokenStatusActive  TokenStatus = "active"
	TokenStatusRevoked TokenStatus = "revoked"
	TokenStatusExpired TokenStatus = "expired"
)

var AllTokenStatus = []TokenStatus{
	TokenStatusActive,
	TokenStatusRevoked,
	TokenStatusExpired,
}

func (e TokenStatus) IsValid() bool {
	switch e {
	case TokenStatusActive, TokenStatusRevoked, TokenStatusExpired:
		return true
	}
	return false
}

func (e TokenStatus) String() string {
	return string(e)
}

func (e *TokenStatus) UnmarshalGQL(v interface{}) error {
	str, ok := v.(string)
	if !ok {
		return fmt.Errorf("enums must be strings")
	}

	*e = TokenStatus(str)
	if !e.IsValid() {
		return fmt.Errorf("%s is not a valid TokenStatus", str)
	}
	return nil
}

func (e TokenStatus) MarshalGQL(w io.Writer) {
	fmt.Fprint(w, strconv.Quote(e.String()))
}

type ToolCallStatus string

const (
	ToolCallStatusReceived ToolCallStatus = "received"
	ToolCallStatusRunning  ToolCallStatus = "running"
	ToolCallStatusFinished ToolCallStatus = "finished"
	ToolCallStatusFailed   ToolCallStatus = "failed"
)

var AllToolCallStatus = []ToolCallStatus{
	ToolCallStatusReceived,
	ToolCallStatusRunning,
	ToolCallStatusFinished,
	ToolCallStatusFailed,
}

func (e ToolCallStatus) IsValid() bool {
	switch e {
	case ToolCallStatusReceived, ToolCallStatusRunning, ToolCallStatusFinished, ToolCallStatusFailed:
		return true
	}
	return false
}

func (e ToolCallStatus) String() string {
	return string(e)
}

func (e *ToolCallStatus) UnmarshalGQL(v interface{}) error {
	str, ok := v.(string)
	if !ok {
		return fmt.Errorf("enums must be strings")
	}

	*e = ToolCallStatus(str)
	if !e.IsValid() {
		return fmt.Errorf("%s is not a valid ToolCallStatus", str)
	}
	return nil
}

func (e ToolCallStatus) MarshalGQL(w io.Writer) {
	fmt.Fprint(w, strconv.Quote(e.String()))
}

type UsageStatsPeriod string

const (
	UsageStatsPeriodWeek    UsageStatsPeriod = "week"
	UsageStatsPeriodMonth   UsageStatsPeriod = "month"
	UsageStatsPeriodQuarter UsageStatsPeriod = "quarter"
)

var AllUsageStatsPeriod = []UsageStatsPeriod{
	UsageStatsPeriodWeek,
	UsageStatsPeriodMonth,
	UsageStatsPeriodQuarter,
}

func (e UsageStatsPeriod) IsValid() bool {
	switch e {
	case UsageStatsPeriodWeek, UsageStatsPeriodMonth, UsageStatsPeriodQuarter:
		return true
	}
	return false
}

func (e UsageStatsPeriod) String() string {
	return string(e)
}

func (e *UsageStatsPeriod) UnmarshalGQL(v interface{}) error {
	str, ok := v.(string)
	if !ok {
		return fmt.Errorf("enums must be strings")
	}

	*e = UsageStatsPeriod(str)
	if !e.IsValid() {
		return fmt.Errorf("%s is not a valid UsageStatsPeriod", str)
	}
	return nil
}

func (e UsageStatsPeriod) MarshalGQL(w io.Writer) {
	fmt.Fprint(w, strconv.Quote(e.String()))
}

type VectorStoreAction string

const (
	VectorStoreActionRetrieve VectorStoreAction = "retrieve"
	VectorStoreActionStore    VectorStoreAction = "store"
)

var AllVectorStoreAction = []VectorStoreAction{
	VectorStoreActionRetrieve,
	VectorStoreActionStore,
}

func (e VectorStoreAction) IsValid() bool {
	switch e {
	case VectorStoreActionRetrieve, VectorStoreActionStore:
		return true
	}
	return false
}

func (e VectorStoreAction) String() string {
	return string(e)
}

func (e *VectorStoreAction) UnmarshalGQL(v interface{}) error {
	str, ok := v.(string)
	if !ok {
		return fmt.Errorf("enums must be strings")
	}

	*e = VectorStoreAction(str)
	if !e.IsValid() {
		return fmt.Errorf("%s is not a valid VectorStoreAction", str)
	}
	return nil
}

func (e VectorStoreAction) MarshalGQL(w io.Writer) {
	fmt.Fprint(w, strconv.Quote(e.String()))
}
