{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/CallerIdInfo",
  "title": "CallerIdInfo",
  "type": "object",
  "required": [
    "types",
    "selected",
    "tollFreeLocationNumber",
    "firstName",
    "lastName",
    "blockInForwardCallsEnabled",
    "locationExternalCallerIdName"
  ],
  "properties": {
    "types": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/CallerIdSelectedType"
      },
      "description": "Allowed types for the `selected` field. This field is read-only and cannot be modified."
    },
    "selected": {
      "type": "string",
      "enum": [
        "DIRECT_LINE",
        "LOCATION_NUMBER",
        "CUSTOM"
      ],
      "description": "Which type of outgoing Caller ID will be used. This setting is for the number portion.\n * `DIRECT_LINE` - Outgoing caller ID will show the caller's direct line number.\n * `LOCATION_NUMBER` - Outgoing caller ID will show the main number for the location.\n * `CUSTOM` - Outgoing caller ID will show the value from the customNumber field.\n"
    },
    "directNumber": {
      "type": "string",
      "example": "2025551212",
      "description": "Direct number which will be shown if `DIRECT_LINE` is selected."
    },
    "extensionNumber": {
      "type": "string",
      "example": "3456",
      "description": "Extension number of the virtual line."
    },
    "locationNumber": {
      "type": "string",
      "example": "2025551212",
      "description": "Location number which will be shown if `LOCATION_NUMBER` is selected."
    },
    "tollFreeLocationNumber": {
      "type": "boolean",
      "description": "Flag to indicate if the location number is toll-free number."
    },
    "customNumber": {
      "type": "string",
      "example": "2025551212",
      "description": "Custom number which will be shown if CUSTOM is selected. This value must be a number from the virtual line's location or from another location with the same country, PSTN provider, and zone (only applicable for India locations) as the virtual line's location."
    },
    "firstName": {
      "type": "string",
      "example": "Hakim",
      "description": "Virtual line's Caller ID first name. The characters `%`,  `+`, ``, `\"` and Unicode characters are not allowed. This field has been deprecated. Please use `directLineCallerIdName` and `dialByFirstName` instead."
    },
    "lastName": {
      "type": "string",
      "example": "Gonzales",
      "description": "Virtual line's Caller ID last name. The characters `%`,  `+`, ``, `\"` and Unicode characters are not allowed. This field has been deprecated. Please use `directLineCallerIdName` and `dialByLastName` instead."
    },
    "blockInForwardCallsEnabled": {
      "type": "boolean",
      "example": true,
      "description": "Block this virtual line's identity when receiving a call."
    },
    "externalCallerIdNamePolicy": {
      "type": "string",
      "enum": [
        "DIRECT_LINE",
        "LOCATION",
        "OTHER"
      ],
      "description": "Designates which type of External Caller ID Name policy is used. Default is `DIRECT_LINE`.\n * `DIRECT_LINE` - Outgoing caller ID will show the caller's direct line name.\n * `LOCATION` - Outgoing caller ID will show the external caller ID name for the location.\n * `OTHER` - Outgoing caller ID will show the value from the `customExternalCallerIdName` field.\n"
    },
    "customExternalCallerIdName": {
      "type": "string",
      "example": "Hakim custom",
      "description": "Custom external caller ID name which will be shown if external caller ID name policy is `OTHER`."
    },
    "locationExternalCallerIdName": {
      "type": "string",
      "example": "Hakim location",
      "description": "Location's external caller ID name which will be shown if external caller ID name policy is `LOCATION`."
    },
    "additionalExternalCallerIdDirectLineEnabled": {
      "type": "boolean",
      "example": true,
      "description": "Flag to indicate the virtual line's direct line number is available as an additional external caller ID for the virtual line."
    },
    "additionalExternalCallerIdLocationNumberEnabled": {
      "type": "boolean",
      "description": "Flag to indicate the location main number is available as an additional external caller ID for the virtual line."
    },
    "additionalExternalCallerIdCustomNumber": {
      "type": "string",
      "example": "2025552000",
      "description": "The custom number available as an additional external caller ID for the virtual line. This value must be a number from the virtual line's location or from another location with the same country, PSTN provider, and zone (only applicable for India locations) as the virtual line's location."
    },
    "directLineCallerIdName": {
      "$ref": "#/components/schemas/DirectLineCallerIdNameObject",
      "description": "Settings for the direct line caller ID name to be shown for this virtual line."
    },
    "dialByFirstName": {
      "type": "string",
      "example": "Hakim",
      "description": "The first name to be used for dial-by-name functions."
    },
    "dialByLastName": {
      "type": "string",
      "example": "Smith",
      "description": "The last name to be used for dial-by-name functions."
    }
  }
}