{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-communication-services/json-schema/microsoft-azure-communication-services-phone-number-operation-schema.json",
  "title": "PhoneNumberOperation",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-communication-services-phonenumbers-api-openapi.yml#/components/schemas/PhoneNumberOperation",
  "required": [
    "createdDateTime",
    "id",
    "operationType",
    "status"
  ],
  "type": "object",
  "properties": {
    "operationType": {
      "description": "The type of operation, e.g. Search",
      "enum": [
        "purchase",
        "releasePhoneNumber",
        "search",
        "updatePhoneNumberCapabilities",
        "reservationPurchase"
      ],
      "type": "string",
      "x-ms-enum": {
        "name": "PhoneNumberOperationType",
        "modelAsString": true
      }
    },
    "status": {
      "description": "Status of operation.",
      "enum": [
        "notStarted",
        "running",
        "succeeded",
        "failed"
      ],
      "type": "string",
      "x-ms-enum": {
        "name": "PhoneNumberOperationStatus",
        "modelAsString": true
      }
    },
    "resourceLocation": {
      "description": "URL for retrieving the result of the operation, if any.",
      "type": "string"
    },
    "createdDateTime": {
      "format": "date-time",
      "description": "The date that the operation was created.",
      "type": "string"
    },
    "error": {
      "$ref": "../../../Common/stable/2021-03-07/common.json#/components/schemas/CommunicationError"
    },
    "id": {
      "description": "Id of operation.",
      "type": "string"
    },
    "lastActionDateTime": {
      "format": "date-time",
      "description": "The most recent date that the operation was changed.",
      "type": "string",
      "readOnly": true
    }
  }
}