/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IServiceProviderResponseList. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IServiceProviderResponseList. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IServiceProviderResponseList FromJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject json ? new ServiceProviderResponseList(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IMSTeamsChannel. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IMSTeamsChannel. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IMSTeamsChannel FromJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject json ? new MSTeamsChannel(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IBotProperties. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IBotProperties. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IBotProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject json ? new BotProperties(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IConnectionItemName. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IConnectionItemName. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IConnectionItemName FromJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject json ? new ConnectionItemName(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IEnterpriseChannelCheckNameAvailabilityResponse. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IEnterpriseChannelCheckNameAvailabilityResponse. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IEnterpriseChannelCheckNameAvailabilityResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject json ? new EnterpriseChannelCheckNameAvailabilityResponse(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IOperationEntityListResult. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IOperationEntityListResult. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IOperationEntityListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject json ? new OperationEntityListResult(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IDirectLineSite. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IDirectLineSite. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IDirectLineSite FromJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject json ? new DirectLineSite(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IChannel. /// Note: the Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IChannel 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.BotService.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IChannel. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.IChannel FromJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode node) { if (!(node is Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject json)) { return(null); } // Polymorphic type -- select the appropriate constructor using the discriminator switch (json.StringProperty("channelName")) { case "FacebookChannel": { return(new FacebookChannel(json)); } case "EmailChannel": { return(new EmailChannel(json)); } case "MsTeamsChannel": { return(new MSTeamsChannel(json)); } case "SkypeChannel": { return(new SkypeChannel(json)); } case "KikChannel": { return(new KikChannel(json)); } case "WebChatChannel": { return(new WebChatChannel(json)); } case "DirectLineChannel": { return(new DirectLineChannel(json)); } case "TelegramChannel": { return(new TelegramChannel(json)); } case "SmsChannel": { return(new SmsChannel(json)); } case "SlackChannel": { return(new SlackChannel(json)); } } return(new Channel(json)); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.IAny. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns>an instance of Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.IAny.</returns> public static Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.IAny FromJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject json ? new Any(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.ICheckNameAvailabilityRequestBody. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.ICheckNameAvailabilityRequestBody. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.BotService.Models.Api20180712.ICheckNameAvailabilityRequestBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.BotService.Runtime.Json.JsonObject json ? new CheckNameAvailabilityRequestBody(json) : null); }