from lib.services.api_gateway.keys_client import KeysClientInterface
from lib.api_schema.response.flava_services.api_gateway.v1_0 import (
    keys as schema,
)


class FlavaKeysClient(KeysClientInterface):
    """Service client for the Flava API Gateway Keys resource.

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

    def get_schema(self):
        """Provide the response schema of the Keys resource."""
        return schema

    def get_keys_path(self, project):
        """Provide the API endpoint path for Keys resource."""
        return f"/v1/projects/{project}/keys"

    def get_key_keysets_path(self, project, key_id):
        """Provide the API endpoint path for key keysets."""
        return f"/v1/projects/{project}/keys/{key_id}/keysets"
