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

from __future__ import annotations
import dataclasses
from ..shared import matrixconfig1 as shared_matrixconfig1
from ..shared import tierconfig as shared_tierconfig
from ..shared import type as shared_type
from dataclasses_json import Undefined, dataclass_json
from orb import utils
from typing import Optional


@dataclass_json(undefined=Undefined.EXCLUDE)

@dataclasses.dataclass
class SubLineItem1:
    amount: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('amount') }})
    r"""The total amount for this sub line item."""
    name: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('name') }})
    quantity: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('quantity') }})
    type: shared_type.Type = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('type') }})
    r"""An identifier for a sub line item that is specific to a pricing model."""
    matrix_config: Optional[shared_matrixconfig1.MatrixConfig1] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('matrix_config'), 'exclude': lambda f: f is None }})
    r"""Only available if `type` is `matrix`. Contains the values of the matrix that this `sub_line_item` represents."""
    tier_config: Optional[shared_tierconfig.TierConfig] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('tier_config'), 'exclude': lambda f: f is None }})
    r"""Only available if `type` is `tier`. Contains the range of units in this tier and the unit amount."""
    

