from lib.services.redis.dbrole_client import DBRoleClientInterface
from lib.api_schema.response.flava_services.redis.v1_0 import (
    dbrole as schema,
)


class FlavaDBRoleClient(DBRoleClientInterface):
    """Service client for the Flava DBRole API.

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

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

    def get_db_roles_path(self, project_name):
        """Provide the API endpoint path for db roles."""
        return f"/projects/{project_name}/dbRoles"
