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

from __future__ import annotations

from enum import Enum
from typing import List, Optional

from pydantic import AnyUrl, BaseModel, Extra, Field, SecretStr

from .. import connectionBasicType


class PowerBiType(Enum):
    PowerBI = 'PowerBI'


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

    type: Optional[PowerBiType] = Field('PowerBI', description='Service Type')
    clientId: str = Field(..., description='client_id for the PowerBI.')
    clientSecret: SecretStr = Field(..., description='clientSecret for the PowerBI.')
    credentials: Optional[str] = Field(None, description='Credentials for the PowerBI.')
    redirectURI: Optional[str] = Field(
        None, description='Dashboard redirect URI for the PowerBI.'
    )
    hostPort: AnyUrl = Field(..., description='Dashboard URL for the power BI.')
    scope: Optional[List[str]] = Field(None, description='PowerBI secrets.')
    supportsMetadataExtraction: Optional[
        connectionBasicType.SupportsMetadataExtraction
    ] = None
