{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-postgresql/json-schema/microsoft-azure-postgresql-migration-schema.json",
  "title": "Migration",
  "description": "Properties of a migration.",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-postgresql-migrations-api-openapi.yml#/components/schemas/Migration",
  "type": "object",
  "properties": {
    "properties": {
      "$ref": "#/$defs/MigrationProperties",
      "description": "Migration properties.",
      "x-ms-client-flatten": true
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/TrackedResource"
    }
  ],
  "$defs": {
    "AdminCredentials": {
      "type": "object",
      "description": "Credentials of administrator users for source and target servers.",
      "properties": {
        "sourceServerPassword": {
          "type": "string",
          "format": "password",
          "description": "Password for the user of the source server.",
          "x-ms-mutability": [
            "update",
            "create"
          ],
          "x-ms-secret": true
        },
        "targetServerPassword": {
          "type": "string",
          "format": "password",
          "description": "Password for the user of the target server.",
          "x-ms-mutability": [
            "update",
            "create"
          ],
          "x-ms-secret": true
        }
      },
      "required": [
        "sourceServerPassword",
        "targetServerPassword"
      ]
    },
    "Cancel": {
      "type": "string",
      "description": "Indicates if cancel must be triggered for the entire migration.",
      "enum": [
        "True",
        "False"
      ],
      "x-ms-enum": {
        "name": "Cancel",
        "modelAsString": true,
        "values": [
          {
            "name": "True",
            "value": "True",
            "description": "Cancel must be triggered for the entire migration."
          },
          {
            "name": "False",
            "value": "False",
            "description": "Cancel must not be triggered for the entire migration."
          }
        ]
      }
    },
    "DatabaseMigrationState": {
      "type": "object",
      "description": "Migration state of a database.",
      "properties": {
        "databaseName": {
          "type": "string",
          "description": "Name of database."
        },
        "migrationState": {
          "$ref": "#/$defs/MigrationDatabaseState",
          "description": "Migration state of a database."
        },
        "migrationOperation": {
          "type": "string",
          "description": "Migration operation of a database."
        },
        "startedOn": {
          "type": "string",
          "format": "date-time",
          "description": "Start time of a migration state."
        },
        "endedOn": {
          "type": "string",
          "format": "date-time",
          "description": "End time of a migration state."
        },
        "fullLoadQueuedTables": {
          "type": "integer",
          "format": "int32",
          "description": "Number of tables queued for the migration of a database."
        },
        "fullLoadErroredTables": {
          "type": "integer",
          "format": "int32",
          "description": "Number of tables encountering errors during the migration of a database."
        },
        "fullLoadLoadingTables": {
          "type": "integer",
          "format": "int32",
          "description": "Number of tables loading during the migration of a database."
        },
        "fullLoadCompletedTables": {
          "type": "integer",
          "format": "int32",
          "description": "Number of tables loaded during the migration of a database."
        },
        "cdcUpdateCounter": {
          "type": "integer",
          "format": "int32",
          "description": "Change Data Capture update counter."
        },
        "cdcDeleteCounter": {
          "type": "integer",
          "format": "int32",
          "description": "Change Data Capture delete counter."
        },
        "cdcInsertCounter": {
          "type": "integer",
          "format": "int32",
          "description": "Change Data Capture insert counter."
        },
        "appliedChanges": {
          "type": "integer",
          "format": "int32",
          "description": "Change Data Capture applied changes counter."
        },
        "incomingChanges": {
          "type": "integer",
          "format": "int32",
          "description": "Change Data Capture incoming changes counter."
        },
        "latency": {
          "type": "integer",
          "format": "int32",
          "description": "Lag in seconds between source and target during online phase."
        },
        "message": {
          "type": "string",
          "description": "Error message, if any, for the migration state."
        }
      }
    },
    "DbLevelValidationStatus": {
      "type": "object",
      "description": "Validation status summary for a database.",
      "properties": {
        "databaseName": {
          "type": "string",
          "description": "Name of database."
        },
        "startedOn": {
          "type": "string",
          "format": "date-time",
          "description": "Start time of a database level validation."
        },
        "endedOn": {
          "type": "string",
          "format": "date-time",
          "description": "End time of a database level validation."
        },
        "summary": {
          "type": "array",
          "description": "Summary of database level validations.",
          "items": {
            "$ref": "#/$defs/ValidationSummaryItem"
          },
          "x-ms-identifiers": []
        }
      }
    },
    "DbServerMetadata": {
      "type": "object",
      "description": "Database server metadata.",
      "properties": {
        "location": {
          "type": "string",
          "description": "Location of database server.",
          "readOnly": true
        },
        "version": {
          "type": "string",
          "description": "Major version of PostgreSQL database engine."
        },
        "storageMb": {
          "type": "integer",
          "format": "int32",
          "description": "Storage size (in MB) for database server."
        },
        "sku": {
          "$ref": "#/$defs/ServerSku",
          "description": "Compute tier and size of the database server. This object is empty for an Azure Database for PostgreSQL single server."
        }
      }
    },
    "LogicalReplicationOnSourceServer": {
      "type": "string",
      "description": "Indicates whether to setup logical replication on source server, if needed.",
      "enum": [
        "True",
        "False"
      ],
      "x-ms-enum": {
        "name": "LogicalReplicationOnSourceServer",
        "modelAsString": true,
        "values": [
          {
            "name": "True",
            "value": "True",
            "description": "Logical replication will be set up on the source server."
          },
          {
            "name": "False",
            "value": "False",
            "description": "Logical replication will not be set up on the source server."
          }
        ]
      }
    },
    "MigrateRolesAndPermissions": {
      "type": "string",
      "description": "Indicates if roles and permissions must be migrated.",
      "enum": [
        "True",
        "False"
      ],
      "x-ms-enum": {
        "name": "MigrateRolesAndPermissions",
        "modelAsString": true,
        "values": [
          {
            "name": "True",
            "value": "True",
            "description": "Roles and permissions will be migrated."
          },
          {
            "name": "False",
            "value": "False",
            "description": "Roles and permissions will not be migrated."
          }
        ]
      }
    },
    "MigrationDatabaseState": {
      "type": "string",
      "description": "Migration state of a database.",
      "enum": [
        "InProgress",
        "WaitingForCutoverTrigger",
        "Failed",
        "Canceled",
        "Succeeded",
        "Canceling"
      ],
      "x-ms-enum": {
        "name": "MigrationDatabaseState",
        "modelAsString": true,
        "values": [
          {
            "name": "InProgress",
            "value": "InProgress",
            "description": "Migration is in progress for the database."
          },
          {
            "name": "WaitingForCutoverTrigger",
            "value": "WaitingForCutoverTrigger",
            "description": "Migration is waiting for cutover trigger for the database."
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Migration has failed for the database."
          },
          {
            "name": "Canceled",
            "value": "Canceled",
            "description": "Migration has been canceled for the database."
          },
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "Migration has succeeded for the database."
          },
          {
            "name": "Canceling",
            "value": "Canceling",
            "description": "Migration is being canceled for the database."
          }
        ]
      }
    },
    "MigrationMode": {
      "type": "string",
      "description": "Mode used to perform the migration.",
      "enum": [
        "Offline",
        "Online"
      ],
      "x-ms-enum": {
        "name": "MigrationMode",
        "modelAsString": true,
        "values": [
          {
            "name": "Offline",
            "value": "Offline",
            "description": "Offline migration mode."
          },
          {
            "name": "Online",
            "value": "Online",
            "description": "Online migration mode."
          }
        ]
      }
    },
    "MigrationOption": {
      "type": "string",
      "description": "Supported option for a migration.",
      "enum": [
        "Validate",
        "Migrate",
        "ValidateAndMigrate"
      ],
      "x-ms-enum": {
        "name": "MigrationOption",
        "modelAsString": true,
        "values": [
          {
            "name": "Validate",
            "value": "Validate",
            "description": "Validate the migration without performing it."
          },
          {
            "name": "Migrate",
            "value": "Migrate",
            "description": "Perform the migration."
          },
          {
            "name": "ValidateAndMigrate",
            "value": "ValidateAndMigrate",
            "description": "Validate and perform the migration."
          }
        ]
      }
    },
    "MigrationProperties": {
      "type": "object",
      "description": "Migration.",
      "properties": {
        "migrationId": {
          "type": "string",
          "description": "Identifier of a migration.",
          "readOnly": true
        },
        "currentStatus": {
          "$ref": "#/$defs/MigrationStatus",
          "description": "Current status of a migration.",
          "readOnly": true
        },
        "migrationInstanceResourceId": {
          "type": "string",
          "format": "arm-id",
          "description": "Identifier of the private endpoint migration instance."
        },
        "migrationMode": {
          "$ref": "#/$defs/MigrationMode",
          "description": "Mode used to perform the migration: Online or Offline."
        },
        "migrationOption": {
          "$ref": "#/$defs/MigrationOption",
          "description": "Supported option for a migration."
        },
        "sourceType": {
          "$ref": "#/$defs/SourceType",
          "description": "Source server type used for the migration: ApsaraDB_RDS, AWS, AWS_AURORA, AWS_EC2, AWS_RDS, AzureVM, Crunchy_PostgreSQL, Digital_Ocean_Droplets, Digital_Ocean_PostgreSQL, EDB, EDB_Oracle_Server, EDB_PostgreSQL, GCP, GCP_AlloyDB, GCP_CloudSQL, GCP_Compute, Heroku_PostgreSQL, Huawei_Compute, Huawei_RDS, OnPremises, PostgreSQLCosmosDB, PostgreSQLFlexibleServer, PostgreSQLSingleServer, or Supabase_PostgreSQL"
        },
        "sslMode": {
          "$ref": "#/$defs/SslMode",
          "description": "SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is 'VerifyFull'. Default SSL mode for other source types is 'Prefer'."
        },
        "sourceDbServerMetadata": {
          "$ref": "#/$defs/DbServerMetadata",
          "description": "Metadata of source database server.",
          "readOnly": true
        },
        "targetDbServerMetadata": {
          "$ref": "#/$defs/DbServerMetadata",
          "description": "Metadata of target database server.",
          "readOnly": true
        },
        "sourceDbServerResourceId": {
          "type": "string",
          "description": "Identifier of the source database server resource, when 'sourceType' is 'PostgreSQLSingleServer'. For other source types this must be set to ipaddress:port@username or hostname:port@username."
        },
        "sourceDbServerFullyQualifiedDomainName": {
          "type": "string",
          "description": "Fully qualified domain name (FQDN) or IP address of the source server. This property is optional. When provided, the migration service will always use it to connect to the source server."
        },
        "targetDbServerResourceId": {
          "type": "string",
          "description": "Identifier of the target database server resource.",
          "readOnly": true
        },
        "targetDbServerFullyQualifiedDomainName": {
          "type": "string",
          "description": "Fully qualified domain name (FQDN) or IP address of the target server. This property is optional. When provided, the migration service will always use it to connect to the target server."
        },
        "secretParameters": {
          "$ref": "#/$defs/MigrationSecretParameters",
          "description": "Migration secret parameters."
        },
        "dbsToMigrate": {
          "type": "array",
          "description": "Names of databases to migrate.",
          "maxItems": 50,
          "items": {
            "type": "string"
          }
        },
        "setupLogicalReplicationOnSourceDbIfNeeded": {
          "$ref": "#/$defs/LogicalReplicationOnSourceServer",
          "description": "Indicates whether to setup logical replication on source server, if needed."
        },
        "overwriteDbsInTarget": {
          "$ref": "#/$defs/OverwriteDatabasesOnTargetServer",
          "description": "Indicates if databases on the target server can be overwritten when already present. If set to 'False', when the migration workflow detects that the database already exists on the target server, it will wait for a confirmation."
        },
        "migrationWindowStartTimeInUtc": {
          "type": "string",
          "format": "date-time",
          "description": "Start time (UTC) for migration window."
        },
        "migrationWindowEndTimeInUtc": {
          "type": "string",
          "format": "date-time",
          "description": "End time (UTC) for migration window."
        },
        "migrateRoles": {
          "$ref": "#/$defs/MigrateRolesAndPermissions",
          "description": "Indicates if roles and permissions must be migrated."
        },
        "startDataMigration": {
          "$ref": "#/$defs/StartDataMigration",
          "description": "Indicates if data migration must start right away."
        },
        "triggerCutover": {
          "$ref": "#/$defs/TriggerCutover",
          "description": "Indicates if cutover must be triggered for the entire migration."
        },
        "dbsToTriggerCutoverOn": {
          "type": "array",
          "description": "When you want to trigger cutover for specific databases set 'triggerCutover' to 'True' and the names of the specific databases in this array.",
          "items": {
            "type": "string"
          }
        },
        "cancel": {
          "$ref": "#/$defs/Cancel",
          "description": "Indicates if cancel must be triggered for the entire migration."
        },
        "dbsToCancelMigrationOn": {
          "type": "array",
          "description": "When you want to trigger cancel for specific databases set 'triggerCutover' to 'True' and the names of the specific databases in this array.",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "MigrationSecretParameters": {
      "type": "object",
      "description": "Migration secret parameters.",
      "properties": {
        "adminCredentials": {
          "$ref": "#/$defs/AdminCredentials",
          "format": "password",
          "description": "Credentials of administrator users for source and target servers.",
          "x-ms-secret": true
        },
        "sourceServerUsername": {
          "type": "string",
          "description": "Gets or sets the name of the user for the source server. This user doesn't need to be an administrator.",
          "x-ms-mutability": [
            "update",
            "create"
          ]
        },
        "targetServerUsername": {
          "type": "string",
          "description": "Gets or sets the name of the user for the target server. This user doesn't need to be an administrator.",
          "x-ms-mutability": [
            "update",
            "create"
          ]
        }
      },
      "required": [
        "adminCredentials"
      ]
    },
    "MigrationState": {
      "type": "string",
      "description": "State of migration.",
      "enum": [
        "InProgress",
        "WaitingForUserAction",
        "Canceled",
        "Failed",
        "Succeeded",
        "ValidationFailed",
        "CleaningUp"
      ],
      "x-ms-enum": {
        "name": "MigrationState",
        "modelAsString": true,
        "values": [
          {
            "name": "InProgress",
            "value": "InProgress",
            "description": "Migration is in progress."
          },
          {
            "name": "WaitingForUserAction",
            "value": "WaitingForUserAction",
            "description": "Migration is waiting for user action."
          },
          {
            "name": "Canceled",
            "value": "Canceled",
            "description": "Migration has been canceled."
          },
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Migration has failed."
          },
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "Migration has succeeded."
          },
          {
            "name": "ValidationFailed",
            "value": "ValidationFailed",
            "description": "Validation for migration has failed."
          },
          {
            "name": "CleaningUp",
            "value": "CleaningUp",
            "description": "Migration is cleaning up resources."
          }
        ]
      }
    },
    "MigrationStatus": {
      "type": "object",
      "description": "State of migration.",
      "properties": {
        "state": {
          "$ref": "#/$defs/MigrationState",
          "description": "State of migration.",
          "readOnly": true
        },
        "error": {
          "type": "string",
          "description": "Error message, if any, for the migration state.",
          "readOnly": true
        },
        "currentSubStateDetails": {
          "$ref": "#/$defs/MigrationSubstateDetails",
          "description": "Current migration sub state details.",
          "readOnly": true
        }
      }
    },
    "MigrationSubstate": {
      "type": "string",
      "description": "Substate of migration.",
      "enum": [
        "PerformingPreRequisiteSteps",
        "WaitingForLogicalReplicationSetupRequestOnSourceDB",
        "WaitingForDBsToMigrateSpecification",
        "WaitingForTargetDBOverwriteConfirmation",
        "WaitingForDataMigrationScheduling",
        "WaitingForDataMigrationWindow",
        "MigratingData",
        "WaitingForCutoverTrigger",
        "CompletingMigration",
        "Completed",
        "CancelingRequestedDBMigrations",
        "ValidationInProgress"
      ],
      "x-ms-enum": {
        "name": "MigrationSubstate",
        "modelAsString": true,
        "values": [
          {
            "name": "PerformingPreRequisiteSteps",
            "value": "PerformingPreRequisiteSteps",
            "description": "Performing pre-requisite steps for migration."
          },
          {
            "name": "WaitingForLogicalReplicationSetupRequestOnSourceDB",
            "value": "WaitingForLogicalReplicationSetupRequestOnSourceDB",
            "description": "Waiting for logical replication setup request on source database."
          },
          {
            "name": "WaitingForDBsToMigrateSpecification",
            "value": "WaitingForDBsToMigrateSpecification",
            "description": "Waiting for databases to migrate specification."
          },
          {
            "name": "WaitingForTargetDBOverwriteConfirmation",
            "value": "WaitingForTargetDBOverwriteConfirmation",
            "description": "Waiting for target database overwrite confirmation."
          },
          {
            "name": "WaitingForDataMigrationScheduling",
            "value": "WaitingForDataMigrationScheduling",
            "description": "Waiting for data migration scheduling."
          },
          {
            "name": "WaitingForDataMigrationWindow",
            "value": "WaitingForDataMigrationWindow",
            "description": "Waiting for data migration window."
          },
          {
            "name": "MigratingData",
            "value": "MigratingData",
            "description": "Migrating data."
          },
          {
            "name": "WaitingForCutoverTrigger",
            "value": "WaitingForCutoverTrigger",
            "description": "Waiting for cutover trigger."
          },
          {
            "name": "CompletingMigration",
            "value": "CompletingMigration",
            "description": "Completing migration."
          },
          {
            "name": "Completed",
            "value": "Completed",
            "description": "Migration completed."
          },
          {
            "name": "CancelingRequestedDBMigrations",
            "value": "CancelingRequestedDBMigrations",
            "description": "Canceling requested database migrations."
          },
          {
            "name": "ValidationInProgress",
            "value": "ValidationInProgress",
            "description": "Validation in progress."
          }
        ]
      }
    },
    "MigrationSubstateDetails": {
      "type": "object",
      "description": "Details of migration substate.",
      "properties": {
        "currentSubState": {
          "$ref": "#/$defs/MigrationSubstate",
          "description": "Substate of migration.",
          "readOnly": true
        },
        "dbDetails": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/$defs/DatabaseMigrationState"
          }
        },
        "validationDetails": {
          "$ref": "#/$defs/ValidationDetails"
        }
      }
    },
    "OverwriteDatabasesOnTargetServer": {
      "type": "string",
      "description": "Indicates if databases on the target server can be overwritten when already present.",
      "enum": [
        "True",
        "False"
      ],
      "x-ms-enum": {
        "name": "OverwriteDatabasesOnTargetServer",
        "modelAsString": true,
        "values": [
          {
            "name": "True",
            "value": "True",
            "description": "Databases on the target server can be overwritten when already present."
          },
          {
            "name": "False",
            "value": "False",
            "description": "Databases on the target server cannot be overwritten when already present. When the migration workflow detects that the database already exists on the target server, it will wait for a confirmation."
          }
        ]
      }
    },
    "Resource": {
      "type": "object",
      "title": "Resource",
      "description": "Common fields that are returned in the response for all Azure Resource Manager resources",
      "properties": {
        "id": {
          "type": "string",
          "format": "arm-id",
          "description": "Fully qualified resource ID for the resource. E.g. \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}\"",
          "readOnly": true
        },
        "name": {
          "type": "string",
          "description": "The name of the resource",
          "readOnly": true
        },
        "type": {
          "type": "string",
          "description": "The type of the resource. E.g. \"Microsoft.Compute/virtualMachines\" or \"Microsoft.Storage/storageAccounts\"",
          "readOnly": true
        },
        "systemData": {
          "$ref": "#/$defs/systemData",
          "description": "Azure Resource Manager metadata containing createdBy and modifiedBy information.",
          "readOnly": true
        }
      },
      "x-ms-azure-resource": true
    },
    "ServerSku": {
      "type": "object",
      "description": "Compute information of a server.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Compute tier and size of the database server. This object is empty for an Azure Database for PostgreSQL single server."
        },
        "tier": {
          "$ref": "#/$defs/SkuTier",
          "description": "Tier of the compute assigned to a server."
        }
      }
    },
    "SkuTier": {
      "type": "string",
      "description": "Tier of the compute assigned to a server.",
      "enum": [
        "Burstable",
        "GeneralPurpose",
        "MemoryOptimized"
      ],
      "x-ms-enum": {
        "name": "SkuTier",
        "modelAsString": true,
        "values": [
          {
            "name": "Burstable",
            "value": "Burstable",
            "description": "Cost-effective tier for infrequent CPU usage, ideal for development and testing workloads with low performance requirements."
          },
          {
            "name": "GeneralPurpose",
            "value": "GeneralPurpose",
            "description": "Balanced compute and memory for most workloads, offering scalable performance and I/O throughput."
          },
          {
            "name": "MemoryOptimized",
            "value": "MemoryOptimized",
            "description": "High memory-to-core ratio for demanding workloads needing fast in-memory processing and high concurrency."
          }
        ]
      }
    },
    "SourceType": {
      "type": "string",
      "description": "Source server type used for the migration.",
      "enum": [
        "OnPremises",
        "AWS",
        "GCP",
        "AzureVM",
        "PostgreSQLSingleServer",
        "AWS_RDS",
        "AWS_AURORA",
        "AWS_EC2",
        "GCP_CloudSQL",
        "GCP_AlloyDB",
        "GCP_Compute",
        "EDB",
        "EDB_Oracle_Server",
        "EDB_PostgreSQL",
        "PostgreSQLFlexibleServer",
        "PostgreSQLCosmosDB",
        "Huawei_RDS",
        "Huawei_Compute",
        "Heroku_PostgreSQL",
        "Crunchy_PostgreSQL",
        "ApsaraDB_RDS",
        "Digital_Ocean_Droplets",
        "Digital_Ocean_PostgreSQL",
        "Supabase_PostgreSQL"
      ],
      "x-ms-enum": {
        "name": "SourceType",
        "modelAsString": true,
        "values": [
          {
            "name": "OnPremises",
            "value": "OnPremises",
            "description": "On-premises PostgreSQL server."
          },
          {
            "name": "AWS",
            "value": "AWS",
            "description": "Amazon Web Services PostgreSQL server."
          },
          {
            "name": "GCP",
            "value": "GCP",
            "description": "Google Cloud Platform PostgreSQL server."
          },
          {
            "name": "AzureVM",
            "value": "AzureVM",
            "description": "Azure Virtual Machine PostgreSQL server."
          },
          {
            "name": "PostgreSQLSingleServer",
            "value": "PostgreSQLSingleServer",
            "description": "Azure Database for PostgreSQL single server."
          },
          {
            "name": "AWS_RDS",
            "value": "AWS_RDS",
            "description": "Amazon RDS for PostgreSQL."
          },
          {
            "name": "AWS_AURORA",
            "value": "AWS_AURORA",
            "description": "Amazon Aurora for PostgreSQL."
          },
          {
            "name": "AWS_EC2",
            "value": "AWS_EC2",
            "description": "Amazon EC2 for PostgreSQL."
          },
          {
            "name": "GCP_CloudSQL",
            "value": "GCP_CloudSQL",
            "description": "Google Cloud SQL for PostgreSQL."
          },
          {
            "name": "GCP_AlloyDB",
            "value": "GCP_AlloyDB",
            "description": "Google Cloud AlloyDB for PostgreSQL."
          },
          {
            "name": "GCP_Compute",
            "value": "GCP_Compute",
            "description": "Google Compute Engine for PostgreSQL."
          },
          {
            "name": "EDB",
            "value": "EDB",
            "description": "EnterpriseDB PostgreSQL server."
          },
          {
            "name": "EDB_Oracle_Server",
            "value": "EDB_Oracle_Server",
            "description": "EnterpriseDB Oracle Server."
          },
          {
            "name": "EDB_PostgreSQL",
            "value": "EDB_PostgreSQL",
            "description": "EnterpriseDB PostgreSQL server."
          },
          {
            "name": "PostgreSQLFlexibleServer",
            "value": "PostgreSQLFlexibleServer",
            "description": "Azure Database for PostgreSQL flexible server."
          },
          {
            "name": "PostgreSQLCosmosDB",
            "value": "PostgreSQLCosmosDB",
            "description": ".NET Cosmos DB for PostgreSQL"
          },
          {
            "name": "Huawei_RDS",
            "value": "Huawei_RDS",
            "description": "Huawei RDS for PostgreSQL"
          },
          {
            "name": "Huawei_Compute",
            "value": "Huawei_Compute",
            "description": "Huawei Compute for PostgreSQL"
          },
          {
            "name": "Heroku_PostgreSQL",
            "value": "Heroku_PostgreSQL",
            "description": "Heroku PostgreSQL"
          },
          {
            "name": "Crunchy_PostgreSQL",
            "value": "Crunchy_PostgreSQL",
            "description": "Crunchy PostgreSQL"
          },
          {
            "name": "ApsaraDB_RDS",
            "value": "ApsaraDB_RDS",
            "description": "ApsaraDB RDS for PostgreSQL"
          },
          {
            "name": "Digital_Ocean_Droplets",
            "value": "Digital_Ocean_Droplets",
            "description": "Digital Ocean Droplets for PostgreSQL"
          },
          {
            "name": "Digital_Ocean_PostgreSQL",
            "value": "Digital_Ocean_PostgreSQL",
            "description": "Digital Ocean PostgreSQL"
          },
          {
            "name": "Supabase_PostgreSQL",
            "value": "Supabase_PostgreSQL",
            "description": "Supabase PostgreSQL"
          }
        ]
      }
    },
    "SslMode": {
      "type": "string",
      "description": "SSL mode used by a migration. Default SSL mode for 'PostgreSQLSingleServer' is 'VerifyFull'. Default SSL mode for other source types is 'Prefer'.",
      "enum": [
        "Prefer",
        "Require",
        "VerifyCA",
        "VerifyFull"
      ],
      "x-ms-enum": {
        "name": "SslMode",
        "modelAsString": true,
        "values": [
          {
            "name": "Prefer",
            "value": "Prefer",
            "description": "Prefer SSL connection. If the server does not support SSL, the connection will be established without SSL."
          },
          {
            "name": "Require",
            "value": "Require",
            "description": "Require SSL connection. If the server does not support SSL, the connection will fail."
          },
          {
            "name": "VerifyCA",
            "value": "VerifyCA",
            "description": "Require SSL connection and verify the server certificate against the CA certificate."
          },
          {
            "name": "VerifyFull",
            "value": "VerifyFull",
            "description": "Require SSL connection, verify the server certificate against the CA certificate, and verify that the server hostname matches the certificate."
          }
        ]
      }
    },
    "StartDataMigration": {
      "type": "string",
      "description": "Indicates if data migration must start right away.",
      "enum": [
        "True",
        "False"
      ],
      "x-ms-enum": {
        "name": "StartDataMigration",
        "modelAsString": true,
        "values": [
          {
            "name": "True",
            "value": "True",
            "description": "Data migration must start right away."
          },
          {
            "name": "False",
            "value": "False",
            "description": "Data migration must not start right away."
          }
        ]
      }
    },
    "TrackedResource": {
      "type": "object",
      "title": "Tracked Resource",
      "description": "The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'",
      "properties": {
        "tags": {
          "type": "object",
          "description": "Resource tags.",
          "additionalProperties": {
            "type": "string"
          },
          "x-ms-mutability": [
            "read",
            "create",
            "update"
          ]
        },
        "location": {
          "type": "string",
          "description": "The geo-location where the resource lives",
          "x-ms-mutability": [
            "read",
            "create"
          ]
        }
      },
      "required": [
        "location"
      ],
      "allOf": [
        {
          "$ref": "#/$defs/Resource"
        }
      ]
    },
    "TriggerCutover": {
      "type": "string",
      "description": "Indicates if cutover must be triggered for the entire migration.",
      "enum": [
        "True",
        "False"
      ],
      "x-ms-enum": {
        "name": "TriggerCutover",
        "modelAsString": true,
        "values": [
          {
            "name": "True",
            "value": "True",
            "description": "Cutover must be triggered for the entire migration."
          },
          {
            "name": "False",
            "value": "False",
            "description": "Cutover must not be triggered for the entire migration."
          }
        ]
      }
    },
    "ValidationDetails": {
      "type": "object",
      "description": "Details for the validation for migration.",
      "properties": {
        "status": {
          "$ref": "#/$defs/ValidationState",
          "description": "Validation status for migration."
        },
        "validationStartTimeInUtc": {
          "type": "string",
          "format": "date-time",
          "description": "Start time (UTC) for validation."
        },
        "validationEndTimeInUtc": {
          "type": "string",
          "format": "date-time",
          "description": "End time (UTC) for validation."
        },
        "serverLevelValidationDetails": {
          "type": "array",
          "description": "Details of server level validations.",
          "items": {
            "$ref": "#/$defs/ValidationSummaryItem"
          },
          "x-ms-identifiers": []
        },
        "dbLevelValidationDetails": {
          "type": "array",
          "description": "Details of server level validations.",
          "items": {
            "$ref": "#/$defs/DbLevelValidationStatus"
          },
          "x-ms-identifiers": [
            "databaseName"
          ]
        }
      }
    },
    "ValidationMessage": {
      "type": "object",
      "description": "Validation message object.",
      "properties": {
        "state": {
          "$ref": "#/$defs/ValidationState",
          "description": "Severity of validation message."
        },
        "message": {
          "type": "string",
          "description": "Validation message string."
        }
      }
    },
    "ValidationState": {
      "type": "string",
      "description": "Validation state for migration.",
      "enum": [
        "Failed",
        "Succeeded",
        "Warning"
      ],
      "x-ms-enum": {
        "name": "ValidationState",
        "modelAsString": true,
        "values": [
          {
            "name": "Failed",
            "value": "Failed",
            "description": "Validation has failed."
          },
          {
            "name": "Succeeded",
            "value": "Succeeded",
            "description": "Validation has succeeded."
          },
          {
            "name": "Warning",
            "value": "Warning",
            "description": "Validation has succeeded with warnings."
          }
        ]
      }
    },
    "ValidationSummaryItem": {
      "type": "object",
      "description": "Validation summary object.",
      "properties": {
        "type": {
          "type": "string",
          "description": "Validation type."
        },
        "state": {
          "$ref": "#/$defs/ValidationState",
          "description": "Validation status for migration."
        },
        "messages": {
          "type": "array",
          "description": "Validation messages.",
          "items": {
            "$ref": "#/$defs/ValidationMessage"
          },
          "x-ms-identifiers": []
        }
      }
    }
  }
}