/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="SqlMigrationServiceProperties" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal SqlMigrationServiceProperties(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } {_provisioningState = If( json?.PropertyT<Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} {_integrationRuntimeState = If( json?.PropertyT<Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("integrationRuntimeState"), out var __jsonIntegrationRuntimeState) ? (string)__jsonIntegrationRuntimeState : (string)IntegrationRuntimeState;} AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="OfflineConfiguration" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal OfflineConfiguration(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _offline = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonBoolean>("offline"), out var __jsonOffline) ? (bool?)__jsonOffline : Offline; } { _lastBackupName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("lastBackupName"), out var __jsonLastBackupName) ? (string)__jsonLastBackupName : (string)LastBackupName; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="DatabaseMigrationListResult" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal DatabaseMigrationListResult(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _value = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonArray>("value"), out var __jsonValue) ? If(__jsonValue as Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.IDatabaseMigration[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.IDatabaseMigration)(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.DatabaseMigration.FromJson(__u)))))() : null : Value; } { _nextLink = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="SourceLocation" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal SourceLocation(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _fileShare = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("fileShare"), out var __jsonFileShare) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.SqlFileShare.FromJson(__jsonFileShare) : FileShare; } { _azureBlob = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("azureBlob"), out var __jsonAzureBlob) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.AzureBlob.FromJson(__jsonAzureBlob) : AzureBlob; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="BackupConfiguration" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal BackupConfiguration(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _sourceLocation = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("sourceLocation"), out var __jsonSourceLocation) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.SourceLocation.FromJson(__jsonSourceLocation) : SourceLocation; } { _targetLocation = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("targetLocation"), out var __jsonTargetLocation) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.TargetLocation.FromJson(__jsonTargetLocation) : TargetLocation; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="IntegrationRuntimeMonitoringData" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal IntegrationRuntimeMonitoringData(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; } { _node = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonArray>("nodes"), out var __jsonNodes) ? If(__jsonNodes as Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.INodeMonitoringData[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.INodeMonitoringData)(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.NodeMonitoringData.FromJson(__u)))))() : null : Node; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="DeleteNode" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal DeleteNode(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _nodeName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("nodeName"), out var __jsonNodeName) ? (string)__jsonNodeName : (string)NodeName; } { _integrationRuntimeName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("integrationRuntimeName"), out var __jsonIntegrationRuntimeName) ? (string)__jsonIntegrationRuntimeName : (string)IntegrationRuntimeName; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="ErrorInfo" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal ErrorInfo(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _code = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code; } { _message = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="AuthenticationKeys" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal AuthenticationKeys(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _authKey1 = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("authKey1"), out var __jsonAuthKey1) ? (string)__jsonAuthKey1 : (string)AuthKey1; } { _authKey2 = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("authKey2"), out var __jsonAuthKey2) ? (string)__jsonAuthKey2 : (string)AuthKey2; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="TargetLocation" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal TargetLocation(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _storageAccountResourceId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("storageAccountResourceId"), out var __jsonStorageAccountResourceId) ? (string)__jsonStorageAccountResourceId : (string)StorageAccountResourceId; } { _accountKey = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("accountKey"), out var __jsonAccountKey) ? (string)__jsonAccountKey : (string)AccountKey; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="SqlFileShare" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal SqlFileShare(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _path = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("path"), out var __jsonPath) ? (string)__jsonPath : (string)Path; } { _username = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("username"), out var __jsonUsername) ? (string)__jsonUsername : (string)Username; } { _password = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("password"), out var __jsonPassword) ? new System.Net.NetworkCredential("", (string)__jsonPassword).SecurePassword : Password; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="ProxyResource" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; } { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; } { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="DatabaseMigrationSqlVM" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal DatabaseMigrationSqlVM(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } __proxyResource = new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.ProxyResource(json); { _systemData = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.SystemData.FromJson(__jsonSystemData) : SystemData; } { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.DatabaseMigrationPropertiesSqlVM.FromJson(__jsonProperties) : Property; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="SqlDbMigrationStatusDetails" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal SqlDbMigrationStatusDetails(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _migrationState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("migrationState"), out var __jsonMigrationState) ? (string)__jsonMigrationState : (string)MigrationState; } { _sqlDataCopyError = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonArray>("sqlDataCopyErrors"), out var __jsonSqlDataCopyErrors) ? If(__jsonSqlDataCopyErrors as Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <string[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (string)(__u is Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null))))() : null : SqlDataCopyError; } { _listOfCopyProgressDetail = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonArray>("listOfCopyProgressDetails"), out var __jsonListOfCopyProgressDetails) ? If(__jsonListOfCopyProgressDetails as Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonArray, out var __q) ? new global::System.Func <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.ICopyProgressDetails[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p) => (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.ICopyProgressDetails)(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.CopyProgressDetails.FromJson(__p)))))() : null : ListOfCopyProgressDetail; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="OperationsDisplayDefinition" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal OperationsDisplayDefinition(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _provider = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider; } { _resource = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource; } { _operation = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation; } { _description = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="DatabaseMigrationPropertiesSqlMi" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal DatabaseMigrationPropertiesSqlMi(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } __databaseMigrationProperties = new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.DatabaseMigrationProperties(json); { _backupConfiguration = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("backupConfiguration"), out var __jsonBackupConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.BackupConfiguration.FromJson(__jsonBackupConfiguration) : BackupConfiguration; } { _offlineConfiguration = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("offlineConfiguration"), out var __jsonOfflineConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.OfflineConfiguration.FromJson(__jsonOfflineConfiguration) : OfflineConfiguration; } { _migrationStatusDetail = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("migrationStatusDetails"), out var __jsonMigrationStatusDetails) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.MigrationStatusDetails.FromJson(__jsonMigrationStatusDetails) : MigrationStatusDetail; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="DatabaseMigrationPropertiesSqlDb" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal DatabaseMigrationPropertiesSqlDb(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } __databaseMigrationProperties = new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.DatabaseMigrationProperties(json); { _migrationStatusDetail = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("migrationStatusDetails"), out var __jsonMigrationStatusDetails) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.SqlDbMigrationStatusDetails.FromJson(__jsonMigrationStatusDetails) : MigrationStatusDetail; } { _targetSqlConnection = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("targetSqlConnection"), out var __jsonTargetSqlConnection) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.SqlConnectionInformation.FromJson(__jsonTargetSqlConnection) : TargetSqlConnection; } { _offlineConfiguration = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("offlineConfiguration"), out var __jsonOfflineConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.SqlDbOfflineConfiguration.FromJson(__jsonOfflineConfiguration) : OfflineConfiguration; } { _tableList = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonArray>("tableList"), out var __jsonTableList) ? If(__jsonTableList as Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonArray, out var __v) ? new global::System.Func <string[]>(() => global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u) => (string)(__u is Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null))))() : null : TableList; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="OperationsDefinition" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal OperationsDefinition(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _display = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.OperationsDisplayDefinition.FromJson(__jsonDisplay) : Display; } { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; } { _isDataAction = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonBoolean>("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : IsDataAction; } { _origin = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin; } { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.OperationsDefinitionProperties.FromJson(__jsonProperties) : Property; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="DatabaseMigrationPropertiesSqlVM" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal DatabaseMigrationPropertiesSqlVM(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } __databaseMigrationProperties = new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.DatabaseMigrationProperties(json); { _backupConfiguration = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("backupConfiguration"), out var __jsonBackupConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.BackupConfiguration.FromJson(__jsonBackupConfiguration) : BackupConfiguration; } { _offlineConfiguration = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("offlineConfiguration"), out var __jsonOfflineConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.OfflineConfiguration.FromJson(__jsonOfflineConfiguration) : OfflineConfiguration; } { _targetDatabaseCollation = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("targetDatabaseCollation"), out var __jsonTargetDatabaseCollation) ? (string)__jsonTargetDatabaseCollation : (string)TargetDatabaseCollation; } { _provisioningError = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("provisioningError"), out var __jsonProvisioningError) ? (string)__jsonProvisioningError : (string)ProvisioningError; } { _migrationStatusDetail = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("migrationStatusDetails"), out var __jsonMigrationStatusDetails) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.MigrationStatusDetails.FromJson(__jsonMigrationStatusDetails) : MigrationStatusDetail; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="SqlMigrationServiceUpdate" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal SqlMigrationServiceUpdate(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.SqlMigrationServiceUpdateTags.FromJson(__jsonTags) : Tag; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="MigrationOperationInput" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal MigrationOperationInput(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _migrationOperationId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("migrationOperationId"), out var __jsonMigrationOperationId) ? (string)__jsonMigrationOperationId : (string)MigrationOperationId; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="SqlMigrationService" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal SqlMigrationService(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.TrackedResource(json); { _property = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.SqlMigrationServiceProperties.FromJson(__jsonProperties) : Property; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="NodeMonitoringData" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal NodeMonitoringData(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _additionalProperty = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("additionalProperties"), out var __jsonAdditionalProperties) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.NodeMonitoringDataAdditionalProperties.FromJson(__jsonAdditionalProperties) : AdditionalProperty; } { _nodeName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("nodeName"), out var __jsonNodeName) ? (string)__jsonNodeName : (string)NodeName; } { _availableMemoryInMb = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber>("availableMemoryInMB"), out var __jsonAvailableMemoryInMb) ? (int?)__jsonAvailableMemoryInMb : AvailableMemoryInMb; } { _cpuUtilization = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber>("cpuUtilization"), out var __jsonCpuUtilization) ? (int?)__jsonCpuUtilization : CpuUtilization; } { _concurrentJobsLimit = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber>("concurrentJobsLimit"), out var __jsonConcurrentJobsLimit) ? (int?)__jsonConcurrentJobsLimit : ConcurrentJobsLimit; } { _concurrentJobsRunning = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber>("concurrentJobsRunning"), out var __jsonConcurrentJobsRunning) ? (int?)__jsonConcurrentJobsRunning : ConcurrentJobsRunning; } { _maxConcurrentJob = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber>("maxConcurrentJobs"), out var __jsonMaxConcurrentJobs) ? (int?)__jsonMaxConcurrentJobs : MaxConcurrentJob; } { _sentByte = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber>("sentBytes"), out var __jsonSentBytes) ? (double?)__jsonSentBytes : SentByte; } { _receivedByte = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber>("receivedBytes"), out var __jsonReceivedBytes) ? (double?)__jsonReceivedBytes : ReceivedByte; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="DataMigrationIdentity" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal DataMigrationIdentity(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _resourceGroupName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName; } { _sqlDbInstanceName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("sqlDbInstanceName"), out var __jsonSqlDbInstanceName) ? (string)__jsonSqlDbInstanceName : (string)SqlDbInstanceName; } { _targetDbName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("targetDbName"), out var __jsonTargetDbName) ? (string)__jsonTargetDbName : (string)TargetDbName; } { _subscriptionId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId; } { _managedInstanceName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("managedInstanceName"), out var __jsonManagedInstanceName) ? (string)__jsonManagedInstanceName : (string)ManagedInstanceName; } { _sqlVirtualMachineName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("sqlVirtualMachineName"), out var __jsonSqlVirtualMachineName) ? (string)__jsonSqlVirtualMachineName : (string)SqlVirtualMachineName; } { _sqlMigrationServiceName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("sqlMigrationServiceName"), out var __jsonSqlMigrationServiceName) ? (string)__jsonSqlMigrationServiceName : (string)SqlMigrationServiceName; } { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="SqlBackupFileInfo" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal SqlBackupFileInfo(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _fileName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("fileName"), out var __jsonFileName) ? (string)__jsonFileName : (string)FileName; } { _status = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status; } { _totalSize = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber>("totalSize"), out var __jsonTotalSize) ? (long?)__jsonTotalSize : TotalSize; } { _dataRead = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber>("dataRead"), out var __jsonDataRead) ? (long?)__jsonDataRead : DataRead; } { _dataWritten = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber>("dataWritten"), out var __jsonDataWritten) ? (long?)__jsonDataWritten : DataWritten; } { _copyThroughput = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber>("copyThroughput"), out var __jsonCopyThroughput) ? (double?)__jsonCopyThroughput : CopyThroughput; } { _copyDuration = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber>("copyDuration"), out var __jsonCopyDuration) ? (int?)__jsonCopyDuration : CopyDuration; } { _familySequenceNumber = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber>("familySequenceNumber"), out var __jsonFamilySequenceNumber) ? (int?)__jsonFamilySequenceNumber : FamilySequenceNumber; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="TrackedResource" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _systemData = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.SystemData.FromJson(__jsonSystemData) : SystemData; } { _location = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location; } { _tag = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.TrackedResourceTags.FromJson(__jsonTags) : Tag; } { _id = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("id"), out var __jsonId) ? (string)__jsonId : (string)Id; } { _name = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("name"), out var __jsonName) ? (string)__jsonName : (string)Name; } { _type = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("type"), out var __jsonType) ? (string)__jsonType : (string)Type; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="SystemData" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _createdBy = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)CreatedBy; } { _createdByType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)CreatedByType; } { _createdAt = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt; } { _lastModifiedBy = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)LastModifiedBy; } { _lastModifiedByType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)LastModifiedByType; } { _lastModifiedAt = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : LastModifiedAt : LastModifiedAt; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="SqlConnectionInformation" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal SqlConnectionInformation(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _dataSource = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("dataSource"), out var __jsonDataSource) ? (string)__jsonDataSource : (string)DataSource; } { _authentication = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("authentication"), out var __jsonAuthentication) ? (string)__jsonAuthentication : (string)Authentication; } { _userName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("userName"), out var __jsonUserName) ? (string)__jsonUserName : (string)UserName; } { _password = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("password"), out var __jsonPassword) ? new System.Net.NetworkCredential("", (string)__jsonPassword).SecurePassword : Password; } { _encryptConnection = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonBoolean>("encryptConnection"), out var __jsonEncryptConnection) ? (bool?)__jsonEncryptConnection : EncryptConnection; } { _trustServerCertificate = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonBoolean>("trustServerCertificate"), out var __jsonTrustServerCertificate) ? (bool?)__jsonTrustServerCertificate : TrustServerCertificate; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="CopyProgressDetails" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal CopyProgressDetails(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _tableName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("tableName"), out var __jsonTableName) ? (string)__jsonTableName : (string)TableName; } { _status = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status; } { _parallelCopyType = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("parallelCopyType"), out var __jsonParallelCopyType) ? (string)__jsonParallelCopyType : (string)ParallelCopyType; } { _usedParallelCopy = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber>("usedParallelCopies"), out var __jsonUsedParallelCopies) ? (int?)__jsonUsedParallelCopies : UsedParallelCopy; } { _dataRead = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber>("dataRead"), out var __jsonDataRead) ? (long?)__jsonDataRead : DataRead; } { _dataWritten = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber>("dataWritten"), out var __jsonDataWritten) ? (long?)__jsonDataWritten : DataWritten; } { _rowsRead = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber>("rowsRead"), out var __jsonRowsRead) ? (long?)__jsonRowsRead : RowsRead; } { _rowsCopied = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber>("rowsCopied"), out var __jsonRowsCopied) ? (long?)__jsonRowsCopied : RowsCopied; } { _copyStart = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("copyStart"), out var __jsonCopyStart) ? global::System.DateTime.TryParse((string)__jsonCopyStart, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCopyStartValue) ? __jsonCopyStartValue : CopyStart : CopyStart; } { _copyThroughput = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber>("copyThroughput"), out var __jsonCopyThroughput) ? (double?)__jsonCopyThroughput : CopyThroughput; } { _copyDuration = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber>("copyDuration"), out var __jsonCopyDuration) ? (int?)__jsonCopyDuration : CopyDuration; } AfterFromJson(json); }
/// <summary> /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject into a new instance of <see cref="DatabaseMigrationProperties" />. /// </summary> /// <param name="json">A Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject instance to deserialize from.</param> internal DatabaseMigrationProperties(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); if (returnNow) { return; } { _sourceSqlConnection = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("sourceSqlConnection"), out var __jsonSourceSqlConnection) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.SqlConnectionInformation.FromJson(__jsonSourceSqlConnection) : SourceSqlConnection; } { _migrationFailureError = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject>("migrationFailureError"), out var __jsonMigrationFailureError) ? Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.ErrorInfo.FromJson(__jsonMigrationFailureError) : MigrationFailureError; } { _kind = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("kind"), out var __jsonKind) ? (string)__jsonKind : (string)Kind; } { _scope = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("scope"), out var __jsonScope) ? (string)__jsonScope : (string)Scope; } { _provisioningState = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState; } { _migrationStatus = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("migrationStatus"), out var __jsonMigrationStatus) ? (string)__jsonMigrationStatus : (string)MigrationStatus; } { _startedOn = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("startedOn"), out var __jsonStartedOn) ? global::System.DateTime.TryParse((string)__jsonStartedOn, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartedOnValue) ? __jsonStartedOnValue : StartedOn : StartedOn; } { _endedOn = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("endedOn"), out var __jsonEndedOn) ? global::System.DateTime.TryParse((string)__jsonEndedOn, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonEndedOnValue) ? __jsonEndedOnValue : EndedOn : EndedOn; } { _sourceDatabaseName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("sourceDatabaseName"), out var __jsonSourceDatabaseName) ? (string)__jsonSourceDatabaseName : (string)SourceDatabaseName; } { _sourceServerName = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("sourceServerName"), out var __jsonSourceServerName) ? (string)__jsonSourceServerName : (string)SourceServerName; } { _migrationService = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("migrationService"), out var __jsonMigrationService) ? (string)__jsonMigrationService : (string)MigrationService; } { _migrationOperationId = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("migrationOperationId"), out var __jsonMigrationOperationId) ? (string)__jsonMigrationOperationId : (string)MigrationOperationId; } { _targetDatabaseCollation = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("targetDatabaseCollation"), out var __jsonTargetDatabaseCollation) ? (string)__jsonTargetDatabaseCollation : (string)TargetDatabaseCollation; } { _provisioningError = If(json?.PropertyT <Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString>("provisioningError"), out var __jsonProvisioningError) ? (string)__jsonProvisioningError : (string)ProvisioningError; } AfterFromJson(json); }