# coding: utf-8

from typing import Dict, List  # noqa: F401

from fastapi import (  # noqa: F401
    APIRouter,
    Body,
    Cookie,
    Depends,
    Form,
    Header,
    Path,
    Query,
    Response,
    Security,
    status,
)

from vas_vw_bidi_api_fast.models.extra_models import TokenModel  # noqa: F401
from vas_vw_bidi_api_fast.models.charge_param_bpt_ev import ChargeParamBptEV
from vas_vw_bidi_api_fast.models.charge_param_bpt_ev_dyn import ChargeParamBptEVDyn
from vas_vw_bidi_api_fast.models.charge_param_bpt_se import ChargeParamBptSE
from vas_vw_bidi_api_fast.models.charge_param_bpt_se_dyn import ChargeParamBptSEDyn
from vas_vw_bidi_api_fast.models.charge_param_ev import ChargeParamEV
from vas_vw_bidi_api_fast.models.charge_param_se import ChargeParamSE
from vas_vw_bidi_api_fast.models.dtc_list import DtcList
from vas_vw_bidi_api_fast.models.freeze_frame import FreezeFrame
from vas_vw_bidi_api_fast.models.inventory import Inventory
from vas_vw_bidi_api_fast.models.model import Model
from vas_vw_bidi_api_fast.models.power_param_se import PowerParamSE
from vas_vw_bidi_api_fast.models.power_req_ev import PowerReqEV
from vas_vw_bidi_api_fast.models.power_status_ev import PowerStatusEV
from vas_vw_bidi_api_fast.models.time import Time
from vas_vw_bidi_api_fast.models.vin import VIN
from vas_vw_bidi_api_fast.models.version_info import VersionInfo


router = APIRouter(prefix="/v2gExt")


@router.post(
    "/bpt/chargeLoop",
    responses={
        200: {"description": "Success"},
        201: {"description": "Success -&gt; Missing parameters"},
        202: {"description": "Success -&gt; Unknown parameters"},
        400: {"description": "Bad Request -&gt; Operation not supported"},
        500: {"description": "Internal Server Error -&gt; Bug/error in the Rest2Dbus code"},
        502: {"description": "Bad Gateway -&gt; Dbus Service not available"},
    },
    tags=["default"],
    response_model_by_alias=True,
)
async def charge_loop_param_bpt_ev(
    charge_loop_param_bpt_data: ChargeParamBptEVDyn
 = Body(..., description="")
,
) -> None:
    """Set additional BPT parameters during Charge Loop"""
    ...


@router.get(
    "/bpt/chargeLoop",
    responses={
        200: {"model": ChargeParamBptSEDyn, "description": "Success"},
        400: {"description": "Bad Request -&gt; Operation not supported"},
        404: {"description": "Not Found -&gt; V2GExt BPT Interface not available"},
        500: {"description": "Internal Server Error -&gt; Bug/error in the Rest2Dbus code"},
        502: {"description": "Bad Gateway -&gt; Dbus Service not available"},
    },
    tags=["default"],
    response_model_by_alias=True,
)
async def charge_loop_param_bpt_se(
) -> ChargeParamBptSEDyn:
    """Return additional BPT parameters during Charge Loop"""
    ...


@router.post(
    "/bpt/chargeParam",
    responses={
        200: {"description": "Success"},
        201: {"description": "Success -&gt; Missing parameters"},
        202: {"description": "Success -&gt; Unknown parameters"},
        400: {"description": "Bad Request -&gt; Operation not supported"},
        404: {"description": "Not Found -&gt; V2GExt BPT Interface not available"},
        500: {"description": "Internal Server Error -&gt; Bug/error in the Rest2Dbus code"},
        502: {"description": "Bad Gateway -&gt; Dbus Service not available"},
    },
    tags=["default"],
    response_model_by_alias=True,
)
async def charge_param_bpt_ev(
    charge_param_bpt_data: ChargeParamBptEV
 = Body(..., description="")
,
) -> None:
    """Set additional BPT parameters for Charge Parameter Discovery Request"""
    ...


@router.get(
    "/bpt/chargeParam",
    responses={
        200: {"model": ChargeParamBptSE, "description": "Success"},
        400: {"description": "Bad Request -&gt; Operation not supported"},
        404: {"description": "Not Found -&gt; V2GExt BPT Interface not available"},
        500: {"description": "Internal Server Error -&gt; Bug/error in the Rest2Dbus code"},
        502: {"description": "Bad Gateway -&gt; Dbus Service not available"},
    },
    tags=["default"],
    response_model_by_alias=True,
)
async def charge_param_bpt_se(
) -> ChargeParamBptSE:
    """Return additional BPT parameters for Charge Parameter Discovery Response"""
    ...


@router.post(
    "/ilf/chargeParam",
    responses={
        200: {"description": "Success"},
        201: {"description": "Success -&gt; Missing parameters"},
        202: {"description": "Success -&gt; Unknown parameters"},
        400: {"description": "Bad Request -&gt; Operation not supported"},
        404: {"description": "Not Found -&gt; V2GExt Diagnostic Interface not available"},
        500: {"description": "Internal Server Error -&gt; Bug/error in the Rest2Dbus code"},
        502: {"description": "Bad Gateway -&gt; Dbus Service not available"},
    },
    tags=["default"],
    response_model_by_alias=True,
)
async def charge_param_ev(
    charge_param_data: ChargeParamEV
 = Body(..., description="")
,
) -> None:
    """Set additional parameters for Charge Parameter Discovery Request"""
    ...


@router.get(
    "/ilf/chargeParam",
    responses={
        200: {"model": ChargeParamSE, "description": "Success"},
        400: {"description": "Bad Request -&gt; Operation not supported"},
        404: {"description": "Not Found -&gt; V2GExt ILF Interface not available"},
        500: {"description": "Internal Server Error -&gt; Bug/error in the Rest2Dbus code"},
        502: {"description": "Bad Gateway -&gt; Dbus Service not available"},
    },
    tags=["default"],
    response_model_by_alias=True,
)
async def charge_param_se(
) -> ChargeParamSE:
    """Return additional parameters for Charge Parameter Discovery Response"""
    ...


@router.get(
    "/diag/events/{dtcState}",
    responses={
        200: {"model": DtcList, "description": "Success"},
        400: {"description": "Bad Request -&gt; Operation not supported"},
        404: {"description": "Not Found -&gt; V2GExt Diagnostic Interface not available"},
        500: {"description": "Internal Server Error -&gt; Bug/error in the Rest2Dbus code"},
        502: {"description": "Bad Gateway -&gt; Dbus Service not available"},
    },
    tags=["default"],
    response_model_by_alias=True,
)
async def diag_events(
    dtcState: str
 = Path(..., description="active or inactive DTCs")
,
) -> DtcList:
    """Return list of active or inactive Diagnostic Trouble Codes. - dtcState: {active, inactive}"""
    ...


@router.get(
    "/diag/freezeFrames/{dtcCode}",
    responses={
        200: {"model": List[FreezeFrame], "description": "Success"},
        201: {"description": "Success -&gt; Missing data in response"},
        400: {"description": "Bad Request -&gt; Operation not supported"},
        404: {"description": "Not Found -&gt; V2GExt Diagnostic Interface not available"},
        500: {"description": "Internal Server Error -&gt; Bug/error in the Rest2Dbus code"},
        502: {"description": "Bad Gateway -&gt; Dbus Service not available"},
    },
    tags=["default"],
    response_model_by_alias=True,
)
async def diag_freeze_frame(
    dtcCode: int
 = Path(..., description="freeze frame of a DTC")
,
) -> List[FreezeFrame]:
    """Return Freeze Frame for given Diagnostic Trouble Codes"""
    ...


@router.get(
    "/diag/inventory",
    responses={
        200: {"model": Inventory, "description": "Success"},
        400: {"description": "Bad Request -&gt; Operation not supported"},
        404: {"description": "Not Found -&gt; V2GExt Diagnostic Interface not available"},
        500: {"description": "Internal Server Error -&gt; Bug/error in the Rest2Dbus code"},
        502: {"description": "Bad Gateway -&gt; Dbus Service not available"},
    },
    tags=["default"],
    response_model_by_alias=True,
)
async def diag_inventory_data(
) -> Inventory:
    """Return ICCPD inventory data"""
    ...


@router.post(
    "/bap/model",
    responses={
        200: {"description": "Success"},
        400: {"description": "Bad Request -&gt; Operation not supported"},
        404: {"description": "Not Found -&gt; V2GExt Diagnostic Interface not available"},
        500: {"description": "Internal Server Error -&gt; Bug/error in the Rest2Dbus code"},
        502: {"description": "Bad Gateway -&gt; Dbus Service not available"},
    },
    tags=["default"],
    response_model_by_alias=True,
)
async def model_ev(
    ev_model: Model
 = Body(..., description="")
,
) -> None:
    """Provide brand and model name of the EV"""
    ...


@router.post(
    "/ilf/powerReq",
    responses={
        200: {"description": "Success"},
        201: {"description": "Success -&gt; Missing parameters"},
        202: {"description": "Success -&gt; Unknown parameters"},
        400: {"description": "Bad Request -&gt; Operation not supported"},
        404: {"description": "Not Found -&gt; V2GExt ILF Interface not available"},
        500: {"description": "Internal Server Error -&gt; Bug/error in the Rest2Dbus code"},
        502: {"description": "Bad Gateway -&gt; Dbus Service not available"},
    },
    tags=["default"],
    response_model_by_alias=True,
)
async def power_req_ev(
    power_req_data: PowerReqEV
 = Body(..., description="")
,
) -> None:
    """Set additional parameters for Power Delivery Request"""
    ...


@router.post(
    "/bap/powerStatus",
    responses={
        200: {"description": "Success"},
        201: {"description": "Success -&gt; Missing parameters"},
        202: {"description": "Success -&gt; Unknown parameters"},
        400: {"description": "Bad Request -&gt; Operation not supported"},
        404: {"description": "Not Found -&gt; V2GExt ILF Interface not available"},
        500: {"description": "Internal Server Error -&gt; Bug/error in the Rest2Dbus code"},
        502: {"description": "Bad Gateway -&gt; Dbus Service not available"},
    },
    tags=["default"],
    response_model_by_alias=True,
)
async def power_state_ev(
    power_status_data: PowerStatusEV
 = Body(..., description="")
,
) -> None:
    """Display additional parameters from BAP"""
    ...


@router.get(
    "/ilf/powerParam",
    responses={
        200: {"model": PowerParamSE, "description": "Success"},
        400: {"description": "Bad Request -&gt; Operation not supported"},
        404: {"description": "Not Found -&gt; V2GExt ILF Interface not available"},
        500: {"description": "Internal Server Error -&gt; Bug/error in the Rest2Dbus code"},
        502: {"description": "Bad Gateway -&gt; Dbus Service not available"},
    },
    tags=["default"],
    response_model_by_alias=True,
)
async def power_state_se(
) -> PowerParamSE:
    """Return additional parameters for Charging Status Response"""
    ...


@router.post(
    "/bap/refTime",
    responses={
        200: {"description": "Success"},
        400: {"description": "Bad Request -&gt; Operation not supported"},
        404: {"description": "Not Found -&gt; V2GExt Diagnostic Interface not available"},
        500: {"description": "Internal Server Error -&gt; Bug/error in the Rest2Dbus code"},
        502: {"description": "Bad Gateway -&gt; Dbus Service not available"},
    },
    tags=["default"],
    response_model_by_alias=True,
)
async def time_ev(
    ev_time: Time
 = Body(..., description="")
,
) -> None:
    """Indicate vehicle local time"""
    ...


@router.get(
    "/ilf/version",
    responses={
        200: {"model": VersionInfo, "description": "Success"},
        400: {"description": "Bad Request -&gt; Operation not supported"},
    },
    tags=["default"],
    response_model_by_alias=True,
)
async def version_info_evse(
) -> VersionInfo:
    """Return used version of V2GExt in EVSE"""
    ...


@router.post(
    "/ilf/vin",
    responses={
        200: {"description": "Success"},
        400: {"description": "Bad Request -&gt; Operation not supported"},
        404: {"description": "Not Found -&gt; V2GExt Diagnostic Interface not available"},
        500: {"description": "Internal Server Error -&gt; Bug/error in the Rest2Dbus code"},
        502: {"description": "Bad Gateway -&gt; Dbus Service not available"},
    },
    tags=["default"],
    response_model_by_alias=True,
)
async def vin_ev(
    vin_data: VIN
 = Body(..., description="")
,
) -> None:
    """Indicate Vehicle Identifier Number"""
    ...
