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

from __future__ import annotations
import dataclasses
import requests as requests_http
from ...models.components import phonenumber as components_phonenumber
from dataclasses_json import Undefined, dataclass_json
from retellclient import utils
from typing import Optional


@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class CreatePhoneNumberRequestBody:
    agent_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('agent_id') }})
    r"""Unique agent id to associate with this phone number. Can be updated with [Update Phone Agent](/api/update-phone-agent)."""
    area_code: Optional[int] = dataclasses.field(default=213, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('area_code'), 'exclude': lambda f: f is None }})
    r"""The desired area code of the number. Must be valid US area code, which is a 3 digit integer."""
    



@dataclasses.dataclass
class CreatePhoneNumberResponse:
    content_type: str = dataclasses.field()
    r"""HTTP response content type for this operation"""
    raw_response: requests_http.Response = dataclasses.field()
    r"""Raw HTTP response; suitable for custom response parsing"""
    status_code: int = dataclasses.field()
    r"""HTTP response status code for this operation"""
    phone_number: Optional[components_phonenumber.PhoneNumber] = dataclasses.field(default=None)
    r"""Successfully created a new phone number."""
    

