# generated by datamodel-codegen:
#   filename:  schema/metadataIngestion/databaseServiceQueryUsagePipeline.json
#   timestamp: 2022-06-23T06:27:50+00:00

from __future__ import annotations

from enum import Enum
from typing import Optional

from pydantic import BaseModel, Extra, Field


class DatabaseUsageConfigType(Enum):
    DatabaseUsage = 'DatabaseUsage'


class DatabaseServiceQueryUsagePipeline(BaseModel):
    class Config:
        extra = Extra.forbid

    type: Optional[DatabaseUsageConfigType] = Field(
        DatabaseUsageConfigType.DatabaseUsage, description='Pipeline type'
    )
    queryLogDuration: Optional[int] = Field(
        '1',
        description='Configuration to tune how far we want to look back in query logs to process usage data.',
    )
    stageFileLocation: Optional[str] = Field(
        '/tmp/query_log',
        description='Temporary file name to store the query logs before processing. Absolute file path required.',
    )
    resultLimit: Optional[int] = Field(
        '100', description='Configuration to set the limit for query logs'
    )
    queryLogFilePath: Optional[str] = Field(
        None, description='Configuration to set the file path for query logs'
    )
