# generated by datamodel-codegen:
#   filename:  schema/metadataIngestion/dashboardServiceMetadataPipeline.json
#   timestamp: 2022-08-10T12:38:08+00:00

from __future__ import annotations

from enum import Enum
from typing import Optional

from pydantic import BaseModel, Extra, Field

from ..type import filterPattern


class DashboardMetadataConfigType(Enum):
    DashboardMetadata = 'DashboardMetadata'


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

    type: Optional[DashboardMetadataConfigType] = Field(
        DashboardMetadataConfigType.DashboardMetadata, description='Pipeline type'
    )
    dashboardFilterPattern: Optional[filterPattern.FilterPattern] = Field(
        None,
        description='Regex to only fetch tables or databases that matches the pattern.',
    )
    chartFilterPattern: Optional[filterPattern.FilterPattern] = Field(
        None, description='Regex exclude tables or databases that matches the pattern.'
    )
    dbServiceName: Optional[str] = Field(
        None,
        description='Database Service Name for creation of lineage',
        title='Database Service Name',
    )
