from typing import Optional
from tdw_catalog.utils import MetadataFieldType
import tdw_catalog.metadata_template.field as field
[docs]class Field(field.MetadataTemplateField[int]):
"""
Track numbers associated with the :class:`.Dataset`, like total number of allowed users
Attributes
----------
None
"""
def __init__(self, key: str, default_value: Optional[int],
optional: Optional[bool]) -> None:
super().__init__(key, default_value, optional)
def serialize(self) -> dict:
res = super().serialize()
res["default_value"] = str(self.default_value)
res["field_type"] = MetadataFieldType.FT_INTEGER
return res