# @generated
# This file was automatically generated by the ncae-sdk code generator.
# DO NOT EDIT MANUALLY, ANY CHANGES WILL BE OVERWRITTEN.

from collections.abc import Iterator
from typing import Final

from typing_extensions import Unpack

from ncae_sdk._sync.endpoint import Endpoint
from ncae_sdk._util import map_sync
from ncae_sdk.resources._schema import (
    UsageLog,
    UsageLogFilter,
    UsageLogFilterModel,
)


class UsageLogEndpoint(Endpoint):
    BASE_PATH: Final[str] = "logger/v1/usage-log"

    def list(self, **filters: Unpack[UsageLogFilter]) -> Iterator[UsageLog]:
        results = self._list(self.BASE_PATH, UsageLogFilterModel, filters)
        return map_sync(UsageLog.parse_api, results)
