beta/src/PSSailpointBeta/Model/CommonAccessResponse.ps1
# # IdentityNow Beta API # Use these APIs to interact with the IdentityNow 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 Access No description available. .PARAMETER Status CONFIRMED or DENIED .PARAMETER LastUpdated No description available. .PARAMETER ReviewedByUser true if user has confirmed or denied status .PARAMETER LastReviewed No description available. .OUTPUTS CommonAccessResponse<PSCustomObject> #> function Initialize-BetaCommonAccessResponse { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Access}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] [String] ${Status}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${LastUpdated}, [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${ReviewedByUser}, [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${LastReviewed} ) Process { 'Creating PSCustomObject: PSSailpointBeta => BetaCommonAccessResponse' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "access" = ${Access} "status" = ${Status} "lastUpdated" = ${LastUpdated} "reviewedByUser" = ${ReviewedByUser} "lastReviewed" = ${LastReviewed} } return $PSO } } <# .SYNOPSIS Convert from JSON to CommonAccessResponse<PSCustomObject> .DESCRIPTION Convert from JSON to CommonAccessResponse<PSCustomObject> .PARAMETER Json Json object .OUTPUTS CommonAccessResponse<PSCustomObject> #> function ConvertFrom-BetaJsonToCommonAccessResponse { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpointBeta => BetaCommonAccessResponse' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in BetaCommonAccessResponse $AllProperties = ("access", "status", "lastUpdated", "reviewedByUser", "lastReviewed") 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 "access"))) { #optional property not found $Access = $null } else { $Access = $JsonParameters.PSobject.Properties["access"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "status"))) { #optional property not found $Status = $null } else { $Status = $JsonParameters.PSobject.Properties["status"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "lastUpdated"))) { #optional property not found $LastUpdated = $null } else { $LastUpdated = $JsonParameters.PSobject.Properties["lastUpdated"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "reviewedByUser"))) { #optional property not found $ReviewedByUser = $null } else { $ReviewedByUser = $JsonParameters.PSobject.Properties["reviewedByUser"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "lastReviewed"))) { #optional property not found $LastReviewed = $null } else { $LastReviewed = $JsonParameters.PSobject.Properties["lastReviewed"].value } $PSO = [PSCustomObject]@{ "access" = ${Access} "status" = ${Status} "lastUpdated" = ${LastUpdated} "reviewedByUser" = ${ReviewedByUser} "lastReviewed" = ${LastReviewed} } return $PSO } } |