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

from __future__ import annotations
import dataclasses
import requests as requests_http
from calendly import utils
from dataclasses_json import Undefined, dataclass_json
from enum import Enum
from typing import Optional

class PostSchedulingLinksRequestBodyMaxEventCountEnum(str, Enum):
    r"""The max number of events that can be scheduled using this scheduling link."""
    ONE = '1'

class PostSchedulingLinksRequestBodyOwnerTypeEnum(str, Enum):
    r"""Resource type (currently, this is always EventType)"""
    EVENT_TYPE = 'EventType'


@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class PostSchedulingLinksRequestBody:
    
    max_event_count: PostSchedulingLinksRequestBodyMaxEventCountEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('max_event_count') }})
    r"""The max number of events that can be scheduled using this scheduling link."""  
    owner: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('owner') }})
    r"""A link to the resource that owns this Scheduling Link (currently, this is always an Event Type)"""  
    owner_type: PostSchedulingLinksRequestBodyOwnerTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('owner_type') }})
    r"""Resource type (currently, this is always EventType)"""  
    

@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class PostSchedulingLinksErrorResponseDetails:
    
    message: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message') }})  
    parameter: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('parameter'), 'exclude': lambda f: f is None }})  
    

@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class PostSchedulingLinksErrorResponse:
    r"""Error Object"""
    
    message: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('message') }})  
    title: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('title') }})  
    details: Optional[list[PostSchedulingLinksErrorResponseDetails]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('details'), 'exclude': lambda f: f is None }})  
    
class PostSchedulingLinks201ApplicationJSONResourceOwnerTypeEnum(str, Enum):
    r"""Resource type (currently, this is always EventType)"""
    EVENT_TYPE = 'EventType'


@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class PostSchedulingLinks201ApplicationJSONResource:
    
    booking_url: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('booking_url') }})
    r"""Scheduling link url"""  
    owner: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('owner'), 'exclude': lambda f: f is None }})
    r"""A link to the resource that owns this Scheduling Link (currently, this is always an Event Type)"""  
    owner_type: Optional[PostSchedulingLinks201ApplicationJSONResourceOwnerTypeEnum] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('owner_type'), 'exclude': lambda f: f is None }})
    r"""Resource type (currently, this is always EventType)"""  
    

@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class PostSchedulingLinks201ApplicationJSON:
    r"""Created"""
    
    resource: PostSchedulingLinks201ApplicationJSONResource = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('resource') }})  
    

@dataclasses.dataclass
class PostSchedulingLinksResponse:
    
    content_type: str = dataclasses.field()  
    status_code: int = dataclasses.field()  
    error_response: Optional[PostSchedulingLinksErrorResponse] = dataclasses.field(default=None)
    r"""Request is not valid"""  
    post_scheduling_links_201_application_json_object: Optional[PostSchedulingLinks201ApplicationJSON] = dataclasses.field(default=None)
    r"""Created"""  
    raw_response: Optional[requests_http.Response] = dataclasses.field(default=None)  
    