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

from __future__ import annotations
import dataclasses
from .shipmentcreaterequest import ShipmentCreateRequest
from dataclasses_json import Undefined, dataclass_json
from shippo import utils
from typing import Optional


@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class BatchShipmentBase:
    shipment: ShipmentCreateRequest = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('shipment') }})
    carrier_account: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('carrier_account'), 'exclude': lambda f: f is None }})
    r"""Object ID of the carrier account to be used for this shipment (will override batch default)"""
    metadata: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('metadata'), 'exclude': lambda f: f is None }})
    r"""A string of up to 100 characters that can be filled with any additional information you want
    to attach to the object.
    """
    servicelevel_token: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('servicelevel_token'), 'exclude': lambda f: f is None }})
    r"""A token that sets the shipping method for the batch, overriding the batch default.
    Servicelevel tokens can be found <a href=\"#tag/Service-Levels\">in this list</a> 
    or <a href=\"#operation/ListCarrierAccounts\">at this endpoint</a>.
    """
    

