"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""

from __future__ import annotations
import dataclasses
import dateutil.parser
from ..shared import question as shared_question
from calendly import utils
from dataclasses_json import Undefined, dataclass_json
from datetime import datetime
from enum import Enum
from marshmallow import fields

class RoutingFormStatusEnum(str, Enum):
    r"""Indicates if the form is in \\"draft\\" or \\"published\\" status."""
    DRAFT = 'draft'
    PUBLISHED = 'published'


@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class RoutingForm:
    r"""Information about a routing form."""
    
    created_at: datetime = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('created_at'), 'encoder': utils.datetimeisoformat(False), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso') }})
    r"""The moment the routing form was created."""  
    name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }})
    r"""The routing form name (in human-readable format)."""  
    organization: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('organization') }})
    r"""The URI of the organization that's associated with the routing form."""  
    questions: list[shared_question.Question] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('questions') }})
    r"""An ordered collection of Routing Form non-deleted questions."""  
    status: RoutingFormStatusEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
    r"""Indicates if the form is in \\"draft\\" or \\"published\\" status."""  
    updated_at: datetime = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('updated_at'), 'encoder': utils.datetimeisoformat(False), 'decoder': dateutil.parser.isoparse, 'mm_field': fields.DateTime(format='iso') }})
    r"""The moment when the routing form was last updated."""  
    uri: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('uri') }})
    r"""Canonical reference (unique identifier) for the routing form."""  
    