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

from __future__ import annotations
import dataclasses
from calendly import utils
from dataclasses_json import Undefined, dataclass_json
from enum import Enum

class CancellationCancelerTypeEnum(str, Enum):
    HOST = 'host'
    INVITEE = 'invitee'


@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class Cancellation:
    r"""Provides data pertaining to the cancellation of the Event"""
    
    canceled_by: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canceled_by') }})
    r"""Name of the person whom canceled"""  
    canceler_type: CancellationCancelerTypeEnum = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('canceler_type') }})  
    reason: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('reason') }})
    r"""Reason that the cancellation occurred"""  
    