Source code for tdw_catalog.metadata_template.license_expiry

from datetime import date
from typing import Optional

import tdw_catalog.metadata_template.date_field as date_field
import tdw_catalog.metadata_template.field as field


[docs]class Field(field.RecommendedTemplateMetadataField[date], date_field.Field): """ Monitor data license term limtis Attributes ---------- None """ def __init__(self, key: str, default_value: Optional[date], optional: Optional[bool]) -> None: super().__init__(key, default_value, optional) def serialize(self) -> dict: res = super().serialize() res["recommended_type"] = "expiryDate" return res