# This file was auto-generated by Fern from our API Definition.

from __future__ import annotations

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class CreditGrantResourceInputSchedule_OneTime(UniversalBaseModel):
    schedule_type: typing.Literal["one_time"] = "one_time"

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow


class CreditGrantResourceInputSchedule_RateCycleStart(UniversalBaseModel):
    schedule_type: typing.Literal["rate_cycle_start"] = "rate_cycle_start"

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow


CreditGrantResourceInputSchedule = typing.Union[
    CreditGrantResourceInputSchedule_OneTime, CreditGrantResourceInputSchedule_RateCycleStart
]
