/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IServicePrincipalCertificateAuthInfo. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IServicePrincipalCertificateAuthInfo. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IServicePrincipalCertificateAuthInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject json ? new ServicePrincipalCertificateAuthInfo(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20.IOperationDisplay. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20.IOperationDisplay. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IAzureKeyVaultProperties. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IAzureKeyVaultProperties. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IAzureKeyVaultProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject json ? new AzureKeyVaultProperties(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ISourceConfiguration. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ISourceConfiguration. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ISourceConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject json ? new SourceConfiguration(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IConfluentBootstrapServer. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IConfluentBootstrapServer. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IConfluentBootstrapServer FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject json ? new ConfluentBootstrapServer(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.IAny. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns>an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.IAny.</returns> public static Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.IAny FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject json ? new Any(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ISecretInfoBase. /// Note: the Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ISecretInfoBase 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.ServiceLinker.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ISecretInfoBase. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ISecretInfoBase FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode node) { if (!(node is Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject json)) { return(null); } // Polymorphic type -- select the appropriate constructor using the discriminator switch (json.StringProperty("secretType")) { case "rawValue": { return(new ValueSecretInfo(json)); } case "keyVaultSecretReference": { return(new KeyVaultSecretReferenceSecretInfo(json)); } case "keyVaultSecretUri": { return(new KeyVaultSecretUriSecretInfo(json)); } } return(new SecretInfoBase(json)); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20.IErrorDetail. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20.IErrorDetail. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject json ? new ErrorDetail(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IValidateOperationResult. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IValidateOperationResult. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IValidateOperationResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject json ? new ValidateOperationResult(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IKeyVaultSecretReferenceSecretInfo. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IKeyVaultSecretReferenceSecretInfo. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IKeyVaultSecretReferenceSecretInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject json ? new KeyVaultSecretReferenceSecretInfo(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IUserAssignedIdentityAuthInfo. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IUserAssignedIdentityAuthInfo. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IUserAssignedIdentityAuthInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject json ? new UserAssignedIdentityAuthInfo(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IAuthInfoBase. /// Note: the Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IAuthInfoBase 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.ServiceLinker.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IAuthInfoBase. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IAuthInfoBase FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode node) { if (!(node is Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject json)) { return(null); } // Polymorphic type -- select the appropriate constructor using the discriminator switch (json.StringProperty("authType")) { case "secret": { return(new SecretAuthInfo(json)); } case "userAssignedIdentity": { return(new UserAssignedIdentityAuthInfo(json)); } case "systemAssignedIdentity": { return(new SystemAssignedIdentityAuthInfo(json)); } case "servicePrincipalSecret": { return(new ServicePrincipalSecretAuthInfo(json)); } case "servicePrincipalCertificate": { return(new ServicePrincipalCertificateAuthInfo(json)); } } return(new AuthInfoBase(json)); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20.IProxyResource. /// </summary> /// <param name="node">a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20.IProxyResource. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode node) { return(node is Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject json ? new ProxyResource(json) : null); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ITargetServiceBase. /// Note: the Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ITargetServiceBase 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.ServiceLinker.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ITargetServiceBase. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.ITargetServiceBase FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode node) { if (!(node is Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject json)) { return(null); } // Polymorphic type -- select the appropriate constructor using the discriminator switch (json.StringProperty("type")) { case "AzureResource": { return(new AzureResource(json)); } case "ConfluentBootstrapServer": { return(new ConfluentBootstrapServer(json)); } case "ConfluentSchemaRegistry": { return(new ConfluentSchemaRegistry(json)); } } return(new TargetServiceBase(json)); }
/// <summary> /// Deserializes a <see cref="Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode"/> into an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IAzureResourcePropertiesBase. /// Note: the Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IAzureResourcePropertiesBase 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.ServiceLinker.Runtime.Json.JsonNode" /> to deserialize from.</param> /// <returns> /// an instance of Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IAzureResourcePropertiesBase. /// </returns> public static Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Models.Api20220501.IAzureResourcePropertiesBase FromJson(Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonNode node) { if (!(node is Microsoft.Azure.PowerShell.Cmdlets.ServiceLinker.Runtime.Json.JsonObject json)) { return(null); } // Polymorphic type -- select the appropriate constructor using the discriminator switch (json.StringProperty("type")) { case "KeyVault": { return(new AzureKeyVaultProperties(json)); } } return(new AzureResourcePropertiesBase(json)); }