from typing import Optional
import tdw_catalog.metadata.currency as currency_field
import tdw_catalog.metadata.field as field
from tdw_catalog.utils import CurrencyFieldValue
[docs]class Field(field.RecommendedMetadataField[CurrencyFieldValue],
currency_field.Field):
"""
Track and report on the data license cost
Attributes
----------
None
"""
def __init__(self, key: str, currency: Optional[str],
amount: Optional[float]) -> None:
currency_field.Field.__init__(self, key, currency, amount)
def serialize(self) -> dict:
res = super().serialize()
res["recommended_type"] = "cost"
return res