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

from __future__ import annotations
import dataclasses
from ..shared import priceintervalfixedfeequantitytransitionparams as shared_priceintervalfixedfeequantitytransitionparams
from dataclasses_json import Undefined, dataclass_json
from datetime import datetime
from enum import Enum
from orb import utils
from typing import Optional, Union

class EditPriceIntervalParamsEndDateEndDate(str, Enum):
    r"""The updated end date of this price interval. If not specified, the start date will not be updated."""
    START_OF_TERM = 'start_of_term'
    END_OF_TERM = 'end_of_term'



@dataclasses.dataclass
class EditPriceIntervalParamsEndDate:
    pass

class EditPriceIntervalParamsStartDateStartDate(str, Enum):
    r"""The updated start date of this price interval. If not specified, the start date will not be updated."""
    START_OF_TERM = 'start_of_term'
    END_OF_TERM = 'end_of_term'



@dataclasses.dataclass
class EditPriceIntervalParamsStartDate:
    pass


@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class EditPriceIntervalParams:
    price_interval_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('price_interval_id') }})
    r"""The id of the price interval to edit."""
    end_date: Optional[Union[datetime, EditPriceIntervalParamsEndDateEndDate]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('end_date') }})
    r"""The updated end date of this price interval. If not specified, the start date will not be updated."""
    fixed_fee_quantity_transitions: Optional[list[shared_priceintervalfixedfeequantitytransitionparams.PriceIntervalFixedFeeQuantityTransitionParams]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('fixed_fee_quantity_transitions') }})
    r"""A list of fixed fee quantity transitions to use for this price interval. Note that this list will overwrite all existing fixed fee quantity transitions on the price interval."""
    start_date: Optional[Union[datetime, EditPriceIntervalParamsStartDateStartDate]] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('start_date') }})
    r"""The updated start date of this price interval. If not specified, the start date will not be updated."""
    

