Model/TestSourceConnectionMultihost200Response.ps1
# # Identity Security Cloud Beta API # Use these APIs to interact with the Identity Security Cloud platform to achieve repeatable, automated processes with greater scalability. These APIs are in beta and are subject to change. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs. # Version: 3.1.0-beta # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Success Source's test connection status. .PARAMETER Message Source's test connection message. .PARAMETER Timing Source's test connection timing. .PARAMETER ResultType Source's human-readable result type. .PARAMETER TestConnectionDetails Source's human-readable test connection details. .OUTPUTS TestSourceConnectionMultihost200Response<PSCustomObject> #> function Initialize-BetaTestSourceConnectionMultihost200Response { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Success}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Message}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Timing}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("SOURCE_STATE_ERROR_CLUSTER", "SOURCE_STATE_ERROR_SOURCE", "SOURCE_STATE_ERROR_VA", "SOURCE_STATE_FAILURE_CLUSTER", "SOURCE_STATE_FAILURE_SOURCE", "SOURCE_STATE_HEALTHY", "SOURCE_STATE_UNCHECKED_CLUSTER", "SOURCE_STATE_UNCHECKED_CLUSTER_NO_SOURCES", "SOURCE_STATE_UNCHECKED_SOURCE", "SOURCE_STATE_UNCHECKED_SOURCE_NO_ACCOUNTS", "SOURCE_STATE_ERROR_ACCOUNT_FILE_IMPORT")] [PSCustomObject] ${ResultType}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${TestConnectionDetails} ) Process { 'Creating PSCustomObject: PSSailpoint.Beta => BetaTestSourceConnectionMultihost200Response' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "success" = ${Success} "message" = ${Message} "timing" = ${Timing} "resultType" = ${ResultType} "testConnectionDetails" = ${TestConnectionDetails} } return $PSO } } <# .SYNOPSIS Convert from JSON to TestSourceConnectionMultihost200Response<PSCustomObject> .DESCRIPTION Convert from JSON to TestSourceConnectionMultihost200Response<PSCustomObject> .PARAMETER Json Json object .OUTPUTS TestSourceConnectionMultihost200Response<PSCustomObject> #> function ConvertFrom-BetaJsonToTestSourceConnectionMultihost200Response { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.Beta => BetaTestSourceConnectionMultihost200Response' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in BetaTestSourceConnectionMultihost200Response $AllProperties = ("success", "message", "timing", "resultType", "testConnectionDetails") foreach ($name in $JsonParameters.PsObject.Properties.Name) { if (!($AllProperties.Contains($name))) { throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" } } if (!([bool]($JsonParameters.PSobject.Properties.name -match "success"))) { #optional property not found $Success = $null } else { $Success = $JsonParameters.PSobject.Properties["success"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "message"))) { #optional property not found $Message = $null } else { $Message = $JsonParameters.PSobject.Properties["message"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "timing"))) { #optional property not found $Timing = $null } else { $Timing = $JsonParameters.PSobject.Properties["timing"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "resultType"))) { #optional property not found $ResultType = $null } else { $ResultType = $JsonParameters.PSobject.Properties["resultType"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "testConnectionDetails"))) { #optional property not found $TestConnectionDetails = $null } else { $TestConnectionDetails = $JsonParameters.PSobject.Properties["testConnectionDetails"].value } $PSO = [PSCustomObject]@{ "success" = ${Success} "message" = ${Message} "timing" = ${Timing} "resultType" = ${ResultType} "testConnectionDetails" = ${TestConnectionDetails} } return $PSO } } |