from lib.services.api_gateway.keysets_client import KeysetsClientInterface
from lib.api_schema.response.flava_services.api_gateway.v1_0 import (
    keysets as schema,
)


class FlavaKeysetsClient(KeysetsClientInterface):
    """Service client for the Flava API Gateway Keysets 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 Keysets resource."""
        return schema

    def get_keysets_path(self, project):
        """Provide the API endpoint path for Keysets resource."""
        return f"/v1/projects/{project}/keysets"

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

    def get_keyset_stages_path(self, project, keyset_id):
        """Provide the API endpoint path for keyset stages."""
        return f"/v1/projects/{project}/keysets/{keyset_id}/stages"
