/// <summary>
        /// Serializes this instance of <see cref="IntegrationRuntimeMonitoringData" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="IntegrationRuntimeMonitoringData" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString(this._name.ToString()) : null, "name", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._node)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.XNodeArray();
                    foreach (var __x in this._node)
                    {
                        AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                    }
                    container.Add("nodes", __w);
                }
            }
            AfterToJson(ref container);
            return(container);
        }
Esempio n. 2
0
        /// <summary>
        /// Serializes this instance of <see cref="DatabaseMigrationPropertiesSqlDb" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="DatabaseMigrationPropertiesSqlDb" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            __databaseMigrationProperties?.ToJson(container, serializationMode);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._migrationStatusDetail ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) this._migrationStatusDetail.ToJson(null, serializationMode) : null, "migrationStatusDetails", container.Add);
            }
            AddIf(null != this._targetSqlConnection ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) this._targetSqlConnection.ToJson(null, serializationMode) : null, "targetSqlConnection", container.Add);
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._offlineConfiguration ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) this._offlineConfiguration.ToJson(null, serializationMode) : null, "offlineConfiguration", container.Add);
            }
            if (null != this._tableList)
            {
                var __w = new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.XNodeArray();
                foreach (var __x in this._tableList)
                {
                    AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                }
                container.Add("tableList", __w);
            }
            AfterToJson(ref container);
            return(container);
        }
Esempio n. 3
0
        /// <summary>
        /// Serializes this instance of <see cref="SqlDbMigrationStatusDetails" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="SqlDbMigrationStatusDetails" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._migrationState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString(this._migrationState.ToString()) : null, "migrationState", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._sqlDataCopyError)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.XNodeArray();
                    foreach (var __x in this._sqlDataCopyError)
                    {
                        AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString(__x.ToString()) : null, __w.Add);
                    }
                    container.Add("sqlDataCopyErrors", __w);
                }
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._listOfCopyProgressDetail)
                {
                    var __r = new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.XNodeArray();
                    foreach (var __s in this._listOfCopyProgressDetail)
                    {
                        AddIf(__s?.ToJson(null, serializationMode), __r.Add);
                    }
                    container.Add("listOfCopyProgressDetails", __r);
                }
            }
            AfterToJson(ref container);
            return(container);
        }
Esempio n. 4
0
        /// <summary>
        /// Serializes this instance of <see cref="SqlBackupSetInfo" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="SqlBackupSetInfo" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._backupSetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString(this._backupSetId.ToString()) : null, "backupSetId", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._firstLsn)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString(this._firstLsn.ToString()) : null, "firstLSN", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._lastLsn)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString(this._lastLsn.ToString()) : null, "lastLSN", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._backupType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString(this._backupType.ToString()) : null, "backupType", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._listOfBackupFile)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.XNodeArray();
                    foreach (var __x in this._listOfBackupFile)
                    {
                        AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                    }
                    container.Add("listOfBackupFiles", __w);
                }
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._backupStartDate ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString(this._backupStartDate?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "backupStartDate", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._backupFinishDate ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString(this._backupFinishDate?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK", global::System.Globalization.CultureInfo.InvariantCulture)) : null, "backupFinishDate", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._isBackupRestored ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonBoolean((bool)this._isBackupRestored) : null, "isBackupRestored", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._hasBackupChecksum ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonBoolean((bool)this._hasBackupChecksum) : null, "hasBackupChecksums", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._familyCount ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber((int)this._familyCount) : null, "familyCount", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._ignoreReason)
                {
                    var __r = new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.XNodeArray();
                    foreach (var __s in this._ignoreReason)
                    {
                        AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString(__s.ToString()) : null, __r.Add);
                    }
                    container.Add("ignoreReasons", __r);
                }
            }
            AfterToJson(ref container);
            return(container);
        }
        /// <summary>
        /// Serializes this instance of <see cref="MigrationStatusDetails" /> into a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" />.
        /// </summary>
        /// <param name="container">The <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject"/> container to serialize this object into. If the caller
        /// passes in <c>null</c>, a new instance will be created and returned to the caller.</param>
        /// <param name="serializationMode">Allows the caller to choose the depth of the serialization. See <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode"/>.</param>
        /// <returns>
        /// a serialized instance of <see cref="MigrationStatusDetails" /> as a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" />.
        /// </returns>
        public Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode serializationMode)
        {
            container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject();

            bool returnNow = false;

            BeforeToJson(ref container, ref returnNow);
            if (returnNow)
            {
                return(container);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._fullBackupSetInfo ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) this._fullBackupSetInfo.ToJson(null, serializationMode) : null, "fullBackupSetInfo", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._lastRestoredBackupSetInfo ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) this._lastRestoredBackupSetInfo.ToJson(null, serializationMode) : null, "lastRestoredBackupSetInfo", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._migrationState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString(this._migrationState.ToString()) : null, "migrationState", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._activeBackupSet)
                {
                    var __w = new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.XNodeArray();
                    foreach (var __x in this._activeBackupSet)
                    {
                        AddIf(__x?.ToJson(null, serializationMode), __w.Add);
                    }
                    container.Add("activeBackupSets", __w);
                }
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._invalidFile)
                {
                    var __r = new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.XNodeArray();
                    foreach (var __s in this._invalidFile)
                    {
                        AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString(__s.ToString()) : null, __r.Add);
                    }
                    container.Add("invalidFiles", __r);
                }
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._blobContainerName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString(this._blobContainerName.ToString()) : null, "blobContainerName", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._isFullBackupRestored ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonBoolean((bool)this._isFullBackupRestored) : null, "isFullBackupRestored", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._restoreBlockingReason)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString(this._restoreBlockingReason.ToString()) : null, "restoreBlockingReason", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._completeRestoreErrorMessage)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString(this._completeRestoreErrorMessage.ToString()) : null, "completeRestoreErrorMessage", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                if (null != this._fileUploadBlockingError)
                {
                    var __m = new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.XNodeArray();
                    foreach (var __n in this._fileUploadBlockingError)
                    {
                        AddIf(null != (((object)__n)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString(__n.ToString()) : null, __m.Add);
                    }
                    container.Add("fileUploadBlockingErrors", __m);
                }
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._currentRestoringFilename)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString(this._currentRestoringFilename.ToString()) : null, "currentRestoringFilename", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != (((object)this._lastRestoredFilename)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonString(this._lastRestoredFilename.ToString()) : null, "lastRestoredFilename", container.Add);
            }
            if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.SerializationMode.IncludeReadOnly))
            {
                AddIf(null != this._pendingLogBackupsCount ? (Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNumber((int)this._pendingLogBackupsCount) : null, "pendingLogBackupsCount", container.Add);
            }
            AfterToJson(ref container);
            return(container);
        }