# generated by fastapi-codegen:
# filename: openapi.yaml
# timestamp: 2025-06-29T11:11:02+00:00
from __future__ import annotations
from datetime import datetime
from typing import Optional
from pydantic import AnyUrl, BaseModel, Field, constr
class RoutesV2PhoneNumber(BaseModel):
account_sid: Optional[
constr(pattern=r'^AC[0-9a-fA-F]{32}$', min_length=34, max_length=34)
] = Field(None, description='The unique SID identifier of the Account.')
date_created: Optional[datetime] = Field(
None,
description='The date that this phone number was assigned an Inbound Processing Region, given in ISO 8601 format.',
)
date_updated: Optional[datetime] = Field(
None,
description='The date that the Inbound Processing Region was updated for this phone number, given in ISO 8601 format.',
)
friendly_name: Optional[str] = Field(
None,
description='A human readable description of the Inbound Processing Region assignments for this phone number, up to 64 characters.',
)
phone_number: Optional[str] = Field(
None, description='The phone number in E.164 format'
)
sid: Optional[
constr(pattern=r'^QQ[0-9a-fA-F]{32}$', min_length=34, max_length=34)
] = Field(
None,
description='A 34 character string that uniquely identifies the Inbound Processing Region assignments for this phone number.',
)
url: Optional[AnyUrl] = Field(None, description='The absolute URL of the resource.')
voice_region: Optional[str] = Field(
None,
description='The Inbound Processing Region used for this phone number for voice.',
)
class RoutesV2SipDomain(BaseModel):
account_sid: Optional[
constr(pattern=r'^AC[0-9a-fA-F]{32}$', min_length=34, max_length=34)
] = None
date_created: Optional[datetime] = None
date_updated: Optional[datetime] = None
friendly_name: Optional[str] = None
sid: Optional[
constr(pattern=r'^QQ[0-9a-fA-F]{32}$', min_length=34, max_length=34)
] = None
sip_domain: Optional[str] = None
url: Optional[AnyUrl] = None
voice_region: Optional[str] = None
class RoutesV2Trunks(BaseModel):
account_sid: Optional[
constr(pattern=r'^AC[0-9a-fA-F]{32}$', min_length=34, max_length=34)
] = Field(None, description='The unique SID identifier of the Account.')
date_created: Optional[datetime] = Field(
None,
description='The date that this SIP Trunk was assigned an Inbound Processing Region, given in ISO 8601 format.',
)
date_updated: Optional[datetime] = Field(
None,
description='The date that the Inbound Processing Region was updated for this SIP Trunk, given in ISO 8601 format.',
)
friendly_name: Optional[str] = Field(
None,
description='A human readable description of the Inbound Processing Region assignments for this SIP Trunk, up to 64 characters.',
)
sid: Optional[
constr(pattern=r'^QQ[0-9a-fA-F]{32}$', min_length=34, max_length=34)
] = Field(
None,
description='A 34 character string that uniquely identifies the Inbound Processing Region assignments for this SIP Trunk.',
)
sip_trunk_domain: Optional[str] = Field(
None, description='The absolute URL of the SIP Trunk'
)
url: Optional[AnyUrl] = Field(None, description='The absolute URL of the resource.')
voice_region: Optional[str] = Field(
None,
description='The Inbound Processing Region used for this SIP Trunk for voice.',
)
class V2PhoneNumbersPhoneNumberPostRequest(BaseModel):
FriendlyName: Optional[str] = Field(
None,
description='A human readable description of this resource, up to 64 characters.',
)
VoiceRegion: Optional[str] = Field(
None,
description='The Inbound Processing Region used for this phone number for voice',
)
class V2SipDomainsSipDomainPostRequest(BaseModel):
FriendlyName: Optional[str] = Field(None, description='')
VoiceRegion: Optional[str] = Field(None, description='')
class V2TrunksSipTrunkDomainPostRequest(BaseModel):
FriendlyName: Optional[str] = Field(
None,
description='A human readable description of this resource, up to 64 characters.',
)
VoiceRegion: Optional[str] = Field(
None,
description='The Inbound Processing Region used for this SIP Trunk for voice',
)