Phone
A phone number.
Property | Type | Required | Description |
---|---|---|---|
countryCode | string | Yes | The international country code (e.g., “+1” for US/Canada). |
number | string | Yes | The local phone number without the country code. |
extension | string | No | Optional extension number for the phone line. |
isMobile | boolean | No | Indicates whether this is a mobile/cell phone number. |
Formats
Section titled “Formats”A JSON example of this model is:
{ "countryCode": "+1", "number": "555-123-4567", "extension": "123", "isMobile": true}
The JSON Schema for this model is:
$id: Phone.jsontype: objectproperties: countryCode: type: string description: The international country code (e.g., "+1" for US/Canada). number: type: string description: The local phone number without the country code. extension: type: string description: Optional extension number for the phone line. isMobile: type: boolean default: false description: Indicates whether this is a mobile/cell phone number.required: - countryCode - numberdescription: A phone number.
The TypeSpec code for this model is:
model Phone { /** The international country code (e.g., "+1" for US/Canada). */ countryCode: string;
/** The local phone number without the country code. */ number: string;
/** Optional extension number for the phone line. */ extension?: string;
/** Indicates whether this is a mobile/cell phone number. */ isMobile?: boolean = false;}