from lib.services.cqa.test_fos_api_client import TestFOSAPIClientInterface
from lib.api_schema.response.flava_services.cqa.v1_0 import (
    test_fos_api as schema,
)


class FlavaTestFOSAPIClient(TestFOSAPIClientInterface):
    """Service client for the Flava CQA App TestFOSAPI.

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

    NOTE: This is a no-auth service. No authentication headers are required.
    """

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

    def get_fos_object_path(self, bucket_name, object_name):
        """Provide the API endpoint path for get_fos_object."""
        return f"/get_fos_object/{bucket_name}/{object_name}"

    def get_list_objects_path(self, bucket_name):
        """Provide the API endpoint path for list_objects."""
        return f"/list_objects/{bucket_name}"

    def get_create_fos_object_path(self, bucket_name, object_name):
        """Provide the API endpoint path for create_fos_object."""
        return f"/create_fos_object/{bucket_name}/{object_name}"

    def get_delete_fos_object_path(self, bucket_name, object_name):
        """Provide the API endpoint path for delete_fos_object."""
        return f"/delete_fos_object/{bucket_name}/{object_name}"

    def get_test_fos_buckets_path(self, bucket_name, object_name):
        """Provide the API endpoint path for test_fos_buckets."""
        return f"/test_fos/buckets/{bucket_name}/{object_name}"

    def get_test_fos_crud_path(self, bucket_name, object_name):
        """Provide the API endpoint path for test_fos_crud."""
        return f"/test_fos_crud/{bucket_name}/{object_name}"

    def get_update_bucket_path(self, bucket_name, action):
        """Provide the API endpoint path for update_bucket."""
        return f"/update_bucket/{bucket_name}/{action}"
