# generated by datamodel-codegen:
#   filename:  schema/entity/services/connections/database/deltaLakeConnection.json
#   timestamp: 2022-04-20T15:52:56+00:00

from __future__ import annotations

from enum import Enum
from typing import Optional

from pydantic import BaseModel, Extra, Field

from .. import connectionBasicType


class DeltaLakeType(Enum):
    DeltaLake = 'DeltaLake'


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

    type: Optional[DeltaLakeType] = Field('DeltaLake', description='Service Type')
    metastoreHostPort: Optional[str] = Field(
        None, description='Host and port of remote Hive Metastore.'
    )
    metastoreFilePath: Optional[str] = Field(
        None, description='File path of local Hive Metastore.'
    )
    appName: Optional[str] = Field(None, description='pySpark App Name')
    connectionOptions: Optional[connectionBasicType.ConnectionOptions] = None
    connectionArguments: Optional[connectionBasicType.ConnectionArguments] = None
    supportsMetadataExtraction: Optional[
        connectionBasicType.SupportsMetadataExtraction
    ] = None
