{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-batch/json-schema/microsoft-azure-batch-check-name-availability-result-schema.json",
  "title": "CheckNameAvailabilityResult",
  "description": "The CheckNameAvailability operation response.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_superseded/microsoft-azure-batch-location-api-openapi.yml#/components/schemas/CheckNameAvailabilityResult",
  "type": "object",
  "properties": {
    "nameAvailable": {
      "type": "boolean",
      "description": "Gets a boolean value that indicates whether the name is available for you to use. If true, the name is available. If false, the name has already been taken or invalid and cannot be used.",
      "readOnly": true
    },
    "reason": {
      "$ref": "#/$defs/NameAvailabilityReason",
      "description": "Gets the reason that a Batch account name could not be used. The Reason element is only returned if NameAvailable is false.",
      "readOnly": true
    },
    "message": {
      "type": "string",
      "description": "Gets an error message explaining the Reason value in more detail.",
      "readOnly": true
    }
  },
  "$defs": {
    "NameAvailabilityReason": {
      "type": "string",
      "description": "Gets the reason that a Batch account name could not be used. The Reason element is only returned if NameAvailable is false.",
      "enum": [
        "Invalid",
        "AlreadyExists"
      ],
      "x-ms-enum": {
        "name": "NameAvailabilityReason",
        "modelAsString": false,
        "values": [
          {
            "name": "Invalid",
            "value": "Invalid",
            "description": "The requested name is invalid."
          },
          {
            "name": "AlreadyExists",
            "value": "AlreadyExists",
            "description": "The requested name is already in use."
          }
        ]
      }
    }
  }
}