Model/DecisionStatistics.ps1
|
# # Identity Security Cloud API - Next Generation Certification Campaigns # Use these APIs to interact with the Identity Security Cloud platform to achieve repeatable, automated processes with greater scalability. 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: v1 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER Approved Count of approval decisions for this item type. .PARAMETER Revoked Count of revoke decisions for this item type. .PARAMETER Acknowledged Count of acknowledge decisions for this item type. .PARAMETER DecisionsMade Count of decisions made so far for this item type. .PARAMETER DecisionsTotal Count of all decisions for this item type, both made and yet-to-be-made. .OUTPUTS DecisionStatistics<PSCustomObject> #> function Initialize-DecisionStatistics { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Approved}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Revoked}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${Acknowledged}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${DecisionsMade}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Int32]] ${DecisionsTotal} ) Process { 'Creating PSCustomObject: PSSailpoint.GovCertification => DecisionStatistics' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "approved" = ${Approved} "revoked" = ${Revoked} "acknowledged" = ${Acknowledged} "decisionsMade" = ${DecisionsMade} "decisionsTotal" = ${DecisionsTotal} } return $PSO } } <# .SYNOPSIS Convert from JSON to DecisionStatistics<PSCustomObject> .DESCRIPTION Convert from JSON to DecisionStatistics<PSCustomObject> .PARAMETER Json Json object .OUTPUTS DecisionStatistics<PSCustomObject> #> function ConvertFrom-JsonToDecisionStatistics { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.GovCertification => DecisionStatistics' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in DecisionStatistics $AllProperties = ("approved", "revoked", "acknowledged", "decisionsMade", "decisionsTotal") 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 "approved"))) { #optional property not found $Approved = $null } else { $Approved = $JsonParameters.PSobject.Properties["approved"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "revoked"))) { #optional property not found $Revoked = $null } else { $Revoked = $JsonParameters.PSobject.Properties["revoked"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "acknowledged"))) { #optional property not found $Acknowledged = $null } else { $Acknowledged = $JsonParameters.PSobject.Properties["acknowledged"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "decisionsMade"))) { #optional property not found $DecisionsMade = $null } else { $DecisionsMade = $JsonParameters.PSobject.Properties["decisionsMade"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "decisionsTotal"))) { #optional property not found $DecisionsTotal = $null } else { $DecisionsTotal = $JsonParameters.PSobject.Properties["decisionsTotal"].value } $PSO = [PSCustomObject]@{ "approved" = ${Approved} "revoked" = ${Revoked} "acknowledged" = ${Acknowledged} "decisionsMade" = ${DecisionsMade} "decisionsTotal" = ${DecisionsTotal} } return $PSO } } |