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