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

from __future__ import annotations
import dataclasses
from dataclasses_json import Undefined, dataclass_json
from orb import utils
from typing import Optional



@dataclasses.dataclass
class NewBillableMetricMetadata:
    r"""User-specified key value pairs, often useful for referencing internal resources or IDs. Returned as-is in the metric resource."""
    



@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class NewBillableMetric:
    description: Optional[str] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('description') }})
    r"""A description of the metric."""
    item_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('item_id') }})
    r"""The id of the item"""
    name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }})
    r"""The name of the metric."""
    sql: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('sql') }})
    r"""A sql string defining the metric."""
    metadata: Optional[NewBillableMetricMetadata] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('metadata') }})
    r"""User-specified key value pairs, often useful for referencing internal resources or IDs. Returned as-is in the metric resource."""
    

