{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/PostLocationVoicemailGroupObject",
  "title": "PostLocationVoicemailGroupObject",
  "type": "object",
  "required": [
    "name",
    "extension",
    "passcode",
    "languageCode",
    "messageStorage",
    "notifications",
    "faxMessage",
    "transferToNumber",
    "emailCopyOfMessage"
  ],
  "properties": {
    "name": {
      "type": "string",
      "example": "VGName",
      "description": "Set name to create new voicemail group for a particular location for a customer."
    },
    "phoneNumber": {
      "type": "string",
      "example": "+1234234324",
      "description": "Set voicemail group phone number for this particular location."
    },
    "extension": {
      "type": "number",
      "example": 23455,
      "description": "Set unique voicemail group extension number for this particular location."
    },
    "firstName": {
      "type": "string",
      "example": "Customer",
      "description": "Set voicemail group caller ID first name. This field has been deprecated. Please use `directLineCallerIdName` and `dialByName` instead."
    },
    "lastName": {
      "type": "string",
      "example": "Support",
      "description": "Set voicemail group called ID last name. This field has been deprecated. Please use `directLineCallerIdName` and `dialByName` instead."
    },
    "passcode": {
      "type": "number",
      "example": 1234,
      "description": "Set passcode to access voicemail group when calling."
    },
    "languageCode": {
      "type": "string",
      "example": "en_us",
      "description": "Language code for voicemail group audio announcement."
    },
    "messageStorage": {
      "type": "object",
      "required": [
        "storageType"
      ],
      "properties": {
        "storageType": {
          "type": "string",
          "enum": [
            "INTERNAL",
            "EXTERNAL"
          ],
          "description": "Message storage type.\n * `INTERNAL` - Set to `INTERNAL` to store messages in internal mailbox.\n * `EXTERNAL` - Set to `EXTERNAL` to send messages to the email address provided.\n"
        },
        "externalEmail": {
          "type": "string",
          "example": "user@flex2.cisco.com",
          "description": "Set external email to forward the messages."
        }
      },
      "description": "Message storage information"
    },
    "notifications": {
      "type": "object",
      "required": [
        "enabled"
      ],
      "properties": {
        "enabled": {
          "type": "boolean",
          "example": true,
          "description": "Set to `true` to enable message notification."
        },
        "destination": {
          "type": "string",
          "example": "user@flex2.cisco.com",
          "description": "Set email to SMS gateway to send notifications."
        }
      },
      "description": "Message notifications"
    },
    "faxMessage": {
      "type": "object",
      "required": [
        "enabled"
      ],
      "properties": {
        "enabled": {
          "type": "boolean",
          "example": true,
          "description": "Set to `true` to enable fax messaging."
        },
        "phoneNumber": {
          "type": "string",
          "example": "+1234234324",
          "description": "Set valid phone number to receive fax message."
        },
        "extension": {
          "type": "number",
          "example": 23455,
          "description": "Set fax messaging extension number."
        }
      },
      "description": "Fax message information"
    },
    "transferToNumber": {
      "type": "object",
      "required": [
        "enabled"
      ],
      "properties": {
        "enabled": {
          "type": "boolean",
          "example": true,
          "description": "Set to `true` to enable to transfer message."
        },
        "destination": {
          "type": "string",
          "example": "+12147691003",
          "description": "Set phone number and dial '0' to transfer message to the provided number."
        }
      },
      "description": "Transfer message information"
    },
    "emailCopyOfMessage": {
      "type": "object",
      "required": [
        "enabled"
      ],
      "properties": {
        "enabled": {
          "type": "boolean",
          "example": true,
          "description": "Set to `true` to enable email message copy."
        },
        "emailId": {
          "type": "string",
          "example": "user@flex2.cisco.com",
          "description": "Set email to receive message copy to the email address provided."
        }
      },
      "description": "Message copy information"
    },
    "directLineCallerIdName": {
      "$ref": "#/components/schemas/DirectLineCallerIdNameObject",
      "description": "Settings for the direct line caller ID name to be shown for this voicemail group."
    },
    "dialByName": {
      "type": "string",
      "example": "Hakim Smith",
      "description": "The name to be used for dial by name functions.  Characters of `%`,  `+`, `\\`, `\"` and Unicode characters are not allowed."
    }
  }
}