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

from __future__ import annotations
import dataclasses
from ..shared import billablemetricsimple as shared_billablemetricsimple
from ..shared import metricgroup as shared_metricgroup
from ..shared import usage as shared_usage
from dataclasses_json import Undefined, dataclass_json
from enum import Enum
from orb import utils

class GroupedSubscriptionUsageRecordViewMode(str, Enum):
    PERIODIC = 'periodic'
    CUMULATIVE = 'cumulative'


@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class GroupedSubscriptionUsageRecord:
    billable_metric: shared_billablemetricsimple.BillableMetricSimple = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('billable_metric') }})
    metric_group: shared_metricgroup.MetricGroup = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('metric_group') }})
    usage: list[shared_usage.Usage] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('usage') }})
    view_mode: GroupedSubscriptionUsageRecordViewMode = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('view_mode') }})
    

