from lib.services.redis.parametergroup_client import ParameterGroupClientInterface
from lib.api_schema.response.flava_services.redis.v1_0 import (
    parametergroup as schema,
)


class FlavaParameterGroupClient(ParameterGroupClientInterface):
    """Service client for the Flava ParameterGroup 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 ParameterGroup API."""
        return schema

    def get_parameter_groups_path(self, project_name):
        """Provide the API endpoint path for parameter groups."""
        return f"/projects/{project_name}/parameterGroups"

    def get_parameter_group_path(self, project_name, parameter_group_name):
        """Provide the API endpoint path for a specific parameter group."""
        return f"/projects/{project_name}/parameterGroups/{parameter_group_name}"

    def get_parameter_group_parameters_path(self, project_name, parameter_group_name):
        """Provide the API endpoint path for parameter group parameters."""
        return f"/projects/{project_name}/parameterGroups/{parameter_group_name}/parameters"

    def get_parameter_group_validate_path(self, project_name, parameter_group_name):
        """Provide the API endpoint path for parameter group validation."""
        return f"/projects/{project_name}/parameterGroups/{parameter_group_name}/validate"
