class InfoLogs:
    FETCHED_TABLES_FROM_FOLDER = "Successfully fetched {count} tables from folder: {folder}."
    FETCHED_COLUMNS = "Successfully fetched columns for table: {table_name} columns: {columns}"
    QUERY_RETRYING = "Retrying to build a new query..."
    QUERY_EXECUTING = "Executing query: {query}"
    QUERY_SUCCESS = "Query executed successfully."
    FETCHING_TABLES = "Fetching tables from folder: {folder}."
    FETCHING_COLUMNS = "Fetching columns for table: {table_name} in folder: {folder}."
    KYVOS_AUTH_METHOD = "Using Kyvos authentication method."
    KYVOS_URL_NOT_SET = "KYVOS_URL not set; skipping Kyvos setup."
    MCP_KYVOS_SERVER_STARTED = "Starting MCP Kyvos server."
    READ_ONLY_MODE_STATUS = "Read-only mode: {status}."
    MCP_KYVOS_SERVER_SHUTDOWN = "Shutting down MCP Kyvos server."
    TABLES_ADDED = "Added {count} Kyvos tables to resources."
    RECEIVED_JSON = "Received JSON:"
    SERVER_STARTED = "MCP Kyvos Server Started."
    INIT_MCP_SERVER = "Initializing MCP Kyvos Server application - Version: {version}"
    LOG_FILE_CREATED = "Log file for MCP Kyvos Server created at: {log_path}"
    DATABASE_CREATED = "Database for storing user access tokens initialized at: {DB_PATH}"
    KYVOS_URL_SET = "KYVOS_URL environment variable set successfully"
    KYVOS_USERNAME_SET = "KYVOS_USERNAME environment variable set successfully"
    KYVOS_PASSWORD_SET = "KYVOS_PASSWORD environment variable set successfully"
    VERIFY_SSL_SET = "VERIFY_SSL environment variable set successfully"
    KYVOS_PROMPT_FILE_SET = "KYVOS_PROMPT_FILE environment variable set successfully"
    STARTING_SERVER = "Starting MCP Kyvos Server."
    PROMPT_FILE_LOADED_DEFAULT = "Loaded prompt file from default project path."
    PROMPT_FILE_LOADED_ENV = "Loaded prompt file from user-defined path via environment variable."
    SSL_CERTIFICATE_FILE = "Path to the SSL certificate file"
    SSL_KEY_FILE = "Path to the SSL private key file"
    KYVOS_DEFAULT_FOLDER = "Folder which contains multiple sementic models"
    KYVOS_VERSION = "Version which kyvos server is running"
    PORT_LOGS = "Kyvos MCP Server is running on port {port}."
    MCP_SERVER_HOSTNAME_LOGS = "Kyvos MCP Server is running on following address {address}."

class WarningLogs:
    KYVOS_CONFIG_INCOMPLETE = "Kyvos configuration incomplete despite KYVOS_URL being present."
    FAILED_TO_ADD_AUTH_TOKEN = "Failed to add auth token to message."
    NO_SESSION_FOR_ID = "Could not find session for ID: {session_id}"
    RECEIVED_INVALID_SESSION_ID = "Received invalid session ID: {session_id}"
    RECEIVED_REQUEST_WITHOUT_SESSION_ID = "Received request without session_id."

class DebugLogs:
    KYVOS_CLIENT_INITIALIZED = "Initialized Kyvos client with URL: {url}"
    SENDING_MESSAGE = "Sending message to writer: {message}"
    VALIDATED_CLIENT_MESSAGE = "Validated client message: {message}"
    HANDLING_POST_MESSAGE = "Handling POST message."
    PARSED_SESSION_ID = "Parsed session ID: {session_id}."
    LOADING_ENV_FROM_FILE = "Loading environment from file: {env_file}"
    LOADING_DEFAULT_ENV = "Attempting to load environment from default .env file"
    KYVOS_FETCHER_INITIALIZED = "Initialized Kyvos fetcher"

class ErrorLogs:
    INVALID_KYVOS_CONFIG = "Invalid Kyvos configuration: {error}"
    UNEXPECTED_KYVOS_ERROR = "Unexpected error initializing Kyvos client: {error}"
    HTTP_ERROR_FETCHING_TABLES = "HTTP error while fetching tables from {url}: {error}"
    NETWORK_CONNECTION_ERROR = "Failed to establish a network connection to the Kyvos API at: {url}. Verify the URL and network connectivity. {error}"
    UNEXPECTED_ERROR_LISTING_TABLES = "Unexpected error while listing tables from Kyvos."
    NETWORK_ERROR_LISTING_TABLES = "Network error while listing tables: {error}"
    HTTP_ERROR_COLUMNS = "HTTP error while fetching columns for table '{table_name}': {error}"
    NETWORK_ERROR_COLUMNS = "Network error while accessing Kyvos API for table '{table_name}': {error}"
    UNEXPECTED_ERROR_COLUMNS = "Unexpected error while listing columns for table '{table_name}': {error}"
    SQL_ERROR_WITH_RESPONSE = "Sql Error: '{response}' for query '{query}', fix the SQL query for the error"
    QUERY_EXECUTION_FAILED = "Query execution failed: the query is incorrect."
    HTTP_ERROR_EXECUTING_QUERY = "HTTP error executing query '{query}': {error}"
    NETWORK_ERROR_EXECUTING_QUERY = "Network error executing query '{query}': {error}"
    UNEXPECTED_ERROR_EXECUTING_QUERY = "Unexpected error executing query '{query}': {error}"
    CLIENT_ERROR_LOG = "Client Error: {response_text}."
    CLIENT_ERROR_EXCEPTION = "Client error '{error_message}' for url '{url}'"
    KYVOS_FETCHER_INITIALIZATION_FAILED = "Failed to initialize KyvosFetcher."
    READ_ONLY_MODE_DETERMINE_FAILED = "Failed to determine read-only mode."
    KYVOS_BASE_URL_FETCH_FAILED = "Failed to fetch Kyvos base URL."
    UNEXPECTED_SERVER_STARTUP_ERROR = "Unexpected error during server startup."
    TABLE_FETCHING_ERROR = "Error fetching Kyvos tables: {error_message}"
    KYVOS_CONTEXT_MISSING = "Kyvos context is missing. Cannot list Kyvos tables."
    MISSING_KYVOS_CONTEXT = "Missing Kyvos context for tool registration."
    ERROR_ADDING_TOOLS = "Error adding Kyvos tools: {error_message}"
    SERVER_ERROR = "Error while running the server: {error_message}"
    FAILED_TO_PARSE_MESSAGE = "Failed to parse message: {error_message}"
    TOOL_EXECUTION_ERROR = "Tool execution error: {error}"
    MISSING_ARGUMENT = "Missing required argument: {error}"
    INVALID_KYVOS_ENV_INPUT = "Invalid input provided for Kyvos environment variables: {error}"
    UNEXPECTED_KYVOS_ENV_ERROR = "Unexpected error while setting Kyvos environment variables: {error}"
    STARTUP_FATAL_ERROR = "Fatal error in MCP Kyvos startup: {error}"
    MISSING_URL = "Missing required KYVOS_URL environment variable"
    MISSING_USERNAME = "Missing required KYVOS_USERNAME environment variable"
    MISSING_PASSWORD = "Missing required KYVOS_PASSWORD environment variable"

class ExceptionMessages:
    INVALID_CONFIG_EXCEPTION = "Invalid Kyvos configuration. Check your environment variables or config input."
    INIT_CLIENT_EXCEPTION = "Failed to initialize Kyvos client due to an unexpected error."
    HTTP_ERROR_FETCHING_TABLES = "HTTP error while fetching tables: {error_message}"
    NETWORK_CONNECTION_ERROR = "Failed to connect to the Kyvos API. Please check your network connection or verify the URL."
    UNEXPECTED_ERROR_LISTING_TABLES = "Unexpected error during Kyvos list_semantic_models call."
    NETWORK_ERROR_LISTING_TABLES = "Network error while listing tables."
    HTTP_ERROR_COLUMNS = "HTTP error while fetching column metadata: {details}"
    NETWORK_ERROR_COLUMNS = "Failed to connect to Kyvos API for column metadata."
    UNEXPECTED_ERROR_COLUMNS = "Unexpected error during Kyvos list_semantic_model_columns call."
    HTTP_STATUS_ERROR = "SQL execution failed with status code {code}: {text}"
    NETWORK_ERROR = "Network error while executing SQL query on Kyvos."
    UNEXPECTED_ERROR = "Unexpected error occurred while executing the SQL query."
    KYVOS_URL_MISSING = "Invalid or missing KYVOS_URL environment variable: {error}"
    KYVOS_URL_READ_ERROR = "Unexpected error while reading KYVOS_URL: {error}"
    FAILED_ENV_LOAD = "Failed to load environment variables."
    START_SERVER_FAILED = "Failed to start server."

class KyvosEndpoints:
    ENTITY_SEARCH = "/rest/entitySearch?version={version}"
    FOLDER_MODELS = "/rest/smodels/folder/{folder}?queryableModelsOnly=true&version={version}"
    SQL_METADATA = "/rest/smodels/sqlMetadata?version={version}"
    EXPORT_QUERY = "/rest/export/query?version={version}"

class HeaderKeys:
    ACCEPT = "Accept"
    CONTENT_TYPE = "Content-Type"
    AUTHORIZATION = "Authorization"

class EnvironmentVariables:
    KYVOS_DEFAULT_FOLDER = "KYVOS_DEFAULT_FOLDER"
    VERIFY_SSL = "VERIFY_SSL"
    KYVOS_URL = "KYVOS_URL"
    KYVOS_USERNAME = "KYVOS_USERNAME"
    KYVOS_PASSWORD = "KYVOS_PASSWORD"
    TRANSPORT = "TRANSPORT"
    PORT = "PORT"
    KYVOS_PROMPT_FILE = "KYVOS_PROMPT_FILE"
    MAX_ROWS ="MAX_ROWS"
    SSL_CERTIFICATE_FILE= "SSL_CERTIFILE"
    SSL_KEY_FILE="SSL_KEYFILE"
    KYVOS_VERSION="VERSION"
    SERVER_AUTH_TYPE="AUTH_TYPE"
    MCP_SERVER_HOSTNAME="MCP_SERVER_HOSTNAME"

class Descriptions:
    KYVOS_USERNAME_DESCRIPTION = "The Kyvos account username used to authenticate and log in to the Kyvos application."
    KYVOS_PASSWORD_DESCRIPTION = "The corresponding password for the provided KYVOS_USERNAME, used for authentication with the Kyvos application."
    KYVOS_URL_DESCRIPTION = "The base URL of the Kyvos server instance. This should point to the Kyvos REST API endpoint that the application will interact with."
    KYVOS_PROMPT_FILE_DESCRIPTION = "The file path to the .txt file that contains the prompt used to guide the large language model (LLM) for SPARK SQL generation."
    TRANSPORT_DESCRIPTION = "The type of communication transport to use. Valid options include stdio (standard input/output) and sse (Server-Sent Events)."
    KYVOS_DEFAULT_FOLDER_DESCRIPTION = "Folder containing multiple semantic models used for querying."
    OPENAI_API_KEY_DESCRIPTION = "The API key used to authenticate requests to OpenAI services. This key enables access to the language model for query interpretation and processing."
    VERIFY_SSL_DESCRIPTION = "A flag that determines whether SSL certificates should be verified when making HTTP requests to Kyvos. Set this to true to enforce SSL verification, or false to disable it (e.g., when using self-signed certificates in development environments)."
    ENV_FILE_DESCRIPTION = "The path to a `.env` file containing environment-specific configurations such as KYVOS_USERNAME, KYVOS_PASSWORD, KYVOS_URL, TRANSPORT, and other parameters. You can either use this file to load all parameters at once or specify them individually through command-line arguments or other configuration methods."
    MAX_ROWS= "Limit the number of rows in the response by specifying the row size."
    PORT_DESCRIPTION = "The port number on which the server will listen when using the Server-Sent Events (SSE) transport mode."
    SSL_KEY_FILE="Path to the SSL key file"
    SSL_CERTIFICATE_FILE="Path to the SSL certificate file"
    AUTH_TYPE="Auth type the user want authenticate basic or oauth"
    MCP_SERVER_HOSTNAME=" The address (hostname or IP) where the user wants the MCP server to run."