# generated by datamodel-codegen:
#   filename:  OptionsMarketdata/OptionsExpirations.json

from __future__ import annotations

from datetime import date
from typing import List

from msgspec import Struct


class OptionsExpirations(Struct, omit_defaults=True):
    expirations: List[date]
    underlying: str
    wrap: str

    # Constructor that takes all field titles as arguments for convenience
    @classmethod
    def new(
        cls,
        expirations: List[date],
        underlying: str,
        wrap: str,
    ):
        return cls(
            expirations,
            underlying,
            wrap,
        )

    def __str__(self) -> str:
        return f"OptionsExpirations(expirations={self.expirations},underlying={self.underlying},wrap={self.wrap})"
