{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/azure-ai-search/json-schema/azure-ai-search-check-name-availability-output-schema.json",
  "title": "CheckNameAvailabilityOutput",
  "description": "Output of check name availability API.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/azure-ai-search-services-api-openapi.yml#/components/schemas/CheckNameAvailabilityOutput",
  "type": "object",
  "properties": {
    "nameAvailable": {
      "type": "boolean",
      "description": "A value indicating whether the name is available.",
      "readOnly": true,
      "x-ms-client-name": "IsNameAvailable"
    },
    "reason": {
      "$ref": "#/$defs/UnavailableNameReason",
      "description": "The reason why the name is not available. 'Invalid' indicates the name provided does not match the naming requirements (incorrect length, unsupported characters, etc.). 'AlreadyExists' indicates that the name is already in use and is therefore unavailable.",
      "readOnly": true
    },
    "message": {
      "type": "string",
      "description": "A message that explains why the name is invalid and provides resource naming requirements. Available only if 'Invalid' is returned in the 'reason' property.",
      "readOnly": true
    }
  },
  "$defs": {
    "UnavailableNameReason": {
      "type": "string",
      "description": "The reason why the name is not available. 'Invalid' indicates the name provided does not match the naming requirements (incorrect length, unsupported characters, etc.). 'AlreadyExists' indicates that the name is already in use and is therefore unavailable.",
      "enum": [
        "Invalid",
        "AlreadyExists"
      ],
      "x-ms-enum": {
        "name": "UnavailableNameReason",
        "modelAsString": true,
        "values": [
          {
            "name": "Invalid",
            "value": "Invalid",
            "description": "The search service name doesn't match naming requirements."
          },
          {
            "name": "AlreadyExists",
            "value": "AlreadyExists",
            "description": "The search service name is already assigned to a different search service."
          }
        ]
      }
    }
  }
}