/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.IErrorInfo. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.IErrorInfo. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.IErrorInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json ? new ErrorInfo(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.ICopyProgressDetails. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.ICopyProgressDetails. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.ICopyProgressDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json ? new CopyProgressDetails(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.IDatabaseMigrationPropertiesSqlMi. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.IDatabaseMigrationPropertiesSqlMi. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.IDatabaseMigrationPropertiesSqlMi FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json ? new DatabaseMigrationPropertiesSqlMi(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.IIntegrationRuntimeMonitoringData. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.IIntegrationRuntimeMonitoringData. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.IIntegrationRuntimeMonitoringData FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json ? new IntegrationRuntimeMonitoringData(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.ISqlMigrationServiceProperties. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.ISqlMigrationServiceProperties. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.ISqlMigrationServiceProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json ? new SqlMigrationServiceProperties(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.INodeMonitoringDataAdditionalProperties. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.INodeMonitoringDataAdditionalProperties. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.INodeMonitoringDataAdditionalProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json ? new NodeMonitoringDataAdditionalProperties(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.IOperationsDisplayDefinition. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.IOperationsDisplayDefinition. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.IOperationsDisplayDefinition FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json ? new OperationsDisplayDefinition(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.IProxyResource. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.IProxyResource. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json ? new ProxyResource(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.IOperationListResult. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.IOperationListResult. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json ? new OperationListResult(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.IDatabaseMigrationProperties. /// Note: the Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.IDatabaseMigrationProperties interface /// is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the payload. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.IDatabaseMigrationProperties. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.IDatabaseMigrationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode node) { if (!(node is Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json)) { return(null); } // Polymorphic type -- select the appropriate constructor using the discriminator switch (json.StringProperty("kind")) { case "SqlDb": { return(new DatabaseMigrationPropertiesSqlDb(json)); } case "SqlMi": { return(new DatabaseMigrationPropertiesSqlMi(json)); } case "SqlVm": { return(new DatabaseMigrationPropertiesSqlVM(json)); } } return(new DatabaseMigrationProperties(json)); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.IRegenAuthKeys. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.IRegenAuthKeys. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.IRegenAuthKeys FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json ? new RegenAuthKeys(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.ISqlDbOfflineConfiguration. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.ISqlDbOfflineConfiguration. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.ISqlDbOfflineConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json ? new SqlDbOfflineConfiguration(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.ITrackedResourceTags. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.ITrackedResourceTags. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20220330Preview.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json ? new TrackedResourceTags(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.IDataMigrationIdentity. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.IDataMigrationIdentity. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.IDataMigrationIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json ? new DataMigrationIdentity(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.ISqlConnectionInformation. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.ISqlConnectionInformation. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Models.Api20211030Preview.ISqlConnectionInformation FromJson(Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.DataMigration.Runtime.Json.JsonObject json ? new SqlConnectionInformation(json) : null); }