from enum import Enum
from typing import Literal

from pydantic import BaseModel, Field

from prefect import flow


class CardinalDirection(Enum):
    NORTH = "north"
    SOUTH = "south"
    EAST = "east"
    WEST = "west"

class Adventure(BaseModel):
    destination: Literal["mountain", "beach", "city"] = Field(
        default="beach", description="Where to go on vacation"
    )
    direction: CardinalDirection
    bring_passport: bool = Field(
        default=False, description="Whether to bring a passport"
    )
    n_friends: int = Field(
        default=42, description="How many friends to bring on vacation"
    )
    

@flow
def where_to_go(adventure: Adventure) -> None:
    print(f"Let's go to the {adventure.destination}!")

if __name__ == "__main__":
    where_to_go.serve("enums")