unsubscribe_enabled: bool = True preview_sample_size: int = Field(default=5, ge=1, le=20) VALID_ENUMS = { "message_type": MSG_TYPES, "attach_mode": {"none", "pdf", "file", "image"}, "rotation_strategy": {"sequential", "weighted"}, "subject_rotation": {"round_robin", "random", "fixed_first"}, "template_sequence_mode": {"repeat", "stop", "random"}, "phone_selection": {"round_robin", "random", "fixed"}, } def _ser(c: Campaign) -> dict: return { ---CREATE-SCHEMA--- MSG_TYPES = {"html", "plain", "both"} class CampaignIn(BaseModel): name: str = Field(min_length=1, max_length=250) recipient_list_id: Optional[int] = None subject_set_ids: list = [] template_ids: list = [] message_type: str = "html" # html|plain|both attach_mode: str = "none" # none|pdf|file|image attach_pdf: bool = False attach_pdf_template_id: Optional[int] = None attachment_id: Optional[int] = None variable_config: dict = {} account_ids: list = [] rotation_strategy: str = "sequential" rotation_weights: dict = {} subject_rotation: str = "round_robin" template_sequence_mode: str = "repeat" phone_selection: str = "round_robin" max_per_account: int = Field(default=200, ge=1, le=2000)