{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-postgresql/json-schema/microsoft-azure-postgresql-migration-name-availability-schema.json",
  "title": "MigrationNameAvailability",
  "description": "Availability of a migration name.",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-postgresql-openapi.yml#/components/schemas/MigrationNameAvailability",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Name of the migration to check for validity and availability."
    },
    "type": {
      "type": "string",
      "description": "Type of resource."
    },
    "nameAvailable": {
      "type": "boolean",
      "description": "Indicates if the migration name is available.",
      "readOnly": true
    },
    "reason": {
      "$ref": "#/$defs/MigrationNameAvailabilityReason"
    },
    "message": {
      "type": "string",
      "description": "Migration name availability message.",
      "readOnly": true
    }
  },
  "required": [
    "name",
    "type"
  ],
  "$defs": {
    "MigrationNameAvailabilityReason": {
      "type": "string",
      "description": "Migration name availability reason.",
      "enum": [
        "Invalid",
        "AlreadyExists"
      ],
      "x-ms-enum": {
        "name": "MigrationNameAvailabilityReason",
        "modelAsString": true,
        "values": [
          {
            "name": "Invalid",
            "value": "Invalid",
            "description": "Migration name is invalid."
          },
          {
            "name": "AlreadyExists",
            "value": "AlreadyExists",
            "description": "Migration name already exists."
          }
        ]
      }
    }
  }
}