"""
Data API namespace.

AUTO-GENERATED by scripts/generate_sdk.py - DO NOT EDIT MANUALLY!
Regenerate with: python scripts/generate_sdk.py --category data
"""
from __future__ import annotations

from typing import Any, Dict, List, Optional

from ._base import AsyncBaseAPI, BaseAPI


class DataAPI(BaseAPI):
    """Data namespace: security."""

    def security(
        self,
        *,
        identifier: str,
        fields: Optional[List[Any]] = None,
        options: Optional[Dict[str, Any]] = None,
        context: Optional[Dict[str, Any]] = None,
    ) -> Any:
        """Get raw security data

        Raw data access for a security.

        Args:
        identifier: TepiloraCode or ISIN
        fields: Fields to return"""
        params: Dict[str, Any] = {}
        params["identifier"] = identifier
        if fields is not None:
            params["fields"] = fields
        return self._call("data.security", params=params, options=options, context=context)



class AsyncDataAPI(AsyncBaseAPI):
    """Data namespace: security."""

    async def security(
        self,
        *,
        identifier: str,
        fields: Optional[List[Any]] = None,
        options: Optional[Dict[str, Any]] = None,
        context: Optional[Dict[str, Any]] = None,
    ) -> Any:
        """Get raw security data

        Raw data access for a security.

        Args:
        identifier: TepiloraCode or ISIN
        fields: Fields to return"""
        params: Dict[str, Any] = {}
        params["identifier"] = identifier
        if fields is not None:
            params["fields"] = fields
        return await self._call("data.security", params=params, options=options, context=context)


