from lib.services.faas.functions_client import FunctionsClientInterface
from lib.api_schema.response.flava_services.faas.v1_0 import functions as schema


class FlavaFunctionsClient(FunctionsClientInterface):
    """Service client for the functions API of Flava FaaS.

    This client provides the schema and path to each API endpoint for dependency
    injection.

    For a full list of available parameters and endpoints, please refer to the
    official API reference:
    https://faas-core-api-mdev.linecorp-dev.com/swagger/index.html#/Functions
    """

    def get_schema(self):
        """Provide the response schema of the functions API."""
        return schema

    def get_functions_path(self, project_name):
        """Provide the API endpoint path for functions API."""
        return f"/projects/{project_name}/functions"
