{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-maps/json-schema/microsoft-azure-maps-route-operation-schema.json",
  "title": "RouteOperation",
  "description": "This object is returned from a successful Get Operation request.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-maps-route-api-openapi.yml#/components/schemas/RouteOperation",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the asynchronous operation."
    },
    "status": {
      "$ref": "#/$defs/StatusEnum",
      "description": "Current status of the async operation."
    },
    "kind": {
      "$ref": "#/$defs/RouteOperationKindEnum",
      "description": "Type of asynchronous operation"
    },
    "result": {
      "$ref": "#/$defs/RouteOperationResult",
      "description": "The result of async operation"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the operation was created."
    },
    "lastActionAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the operation status was updated."
    },
    "error": {
      "$ref": "#/$defs/CommonErrorDetail",
      "description": "The error detail."
    }
  },
  "$defs": {
    "CommonErrorDetail": {
      "type": "object",
      "description": "The error detail.",
      "properties": {
        "code": {
          "type": "string",
          "description": "The error code.",
          "readOnly": true
        },
        "message": {
          "type": "string",
          "description": "The error message.",
          "readOnly": true
        },
        "target": {
          "type": "string",
          "description": "The error target.",
          "readOnly": true
        },
        "details": {
          "type": "array",
          "description": "The error details.",
          "items": {
            "$ref": "#/$defs/CommonErrorDetail"
          },
          "readOnly": true,
          "x-ms-identifiers": []
        },
        "additionalInfo": {
          "type": "array",
          "description": "The error additional info.",
          "items": {
            "$ref": "#/$defs/ErrorAdditionalInfo"
          },
          "readOnly": true,
          "x-ms-identifiers": []
        }
      }
    },
    "ErrorAdditionalInfo": {
      "type": "object",
      "description": "The resource management error additional info.",
      "properties": {
        "type": {
          "type": "string",
          "description": "The additional info type.",
          "readOnly": true
        },
        "info": {
          "type": "object",
          "description": "The additional info.",
          "additionalProperties": {
            "type": "string"
          },
          "readOnly": true
        }
      }
    },
    "RouteOperationKindEnum": {
      "type": "string",
      "description": "Type of asynchronous operation",
      "enum": [
        "RouteMatrix"
      ],
      "x-ms-enum": {
        "name": "RouteOperationKindEnum",
        "modelAsString": true,
        "values": [
          {
            "name": "RouteMatrix",
            "value": "RouteMatrix",
            "description": "Route matrix asynchronous job."
          }
        ]
      }
    },
    "RouteOperationResult": {
      "type": "object",
      "description": "The result of async operation",
      "properties": {
        "resultUrl": {
          "type": "string",
          "format": "uri",
          "description": "URL to the get the result of async operation"
        }
      }
    },
    "StatusEnum": {
      "type": "string",
      "description": "Current status of the async operation.",
      "enum": [
        "NotStarted",
        "Running",
        "Completed",
        "Failed"
      ],
      "x-ms-enum": {
        "name": "StatusEnum",
        "modelAsString": true,
        "values": [
          {
            "name": "NotStarted",
            "value": "NotStarted",
            "description": "The operation has not started yet."
          },
          {
            "name": "Running",
            "value": "Running",
            "description": "The operation is running."
          },
          {
            "name": "Completed",
            "value": "Completed",
            "description": "The operation has completed successfully."
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "The operation has failed."
          }
        ]
      }
    }
  }
}