# generated by datamodel-codegen:
#   filename:  entity/services/connections/database/customDatabaseConnection.json
#   timestamp: 2022-10-03T15:16:21+00:00

from __future__ import annotations

from enum import Enum
from typing import Optional

from pydantic import BaseModel, Extra, Field

from .. import connectionBasicType


class CustomDatabaseType(Enum):
    CustomDatabase = 'CustomDatabase'


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

    type: CustomDatabaseType = Field(
        ..., description='Custom database service type', title='Service Type'
    )
    sourcePythonClass: str = Field(
        ...,
        description='Source Python Class Name to instantiated by the ingestion workflow',
        title='Source Python Class Name',
    )
    connectionOptions: Optional[connectionBasicType.ConnectionOptions] = Field(
        None, title='Connection Options'
    )
