beta/src/PSSailpointBeta/Model/SodViolationCheckResult.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 The inner object representing the completed SOD Violation check .PARAMETER Message No description available. .PARAMETER ClientMetadata Arbitrary key-value pairs. They will never be processed by the IdentityNow system but will be returned on completion of the violation check. .PARAMETER ViolationContexts No description available. .PARAMETER ViolatedPolicies A list of the Policies that were violated .OUTPUTS SodViolationCheckResult<PSCustomObject> #> function Initialize-BetaSodViolationCheckResult { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${Message}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true)] [System.Collections.Hashtable] ${ClientMetadata}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${ViolationContexts}, [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${ViolatedPolicies} ) Process { 'Creating PSCustomObject: PSSailpointBeta => BetaSodViolationCheckResult' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "message" = ${Message} "clientMetadata" = ${ClientMetadata} "violationContexts" = ${ViolationContexts} "violatedPolicies" = ${ViolatedPolicies} } return $PSO } } <# .SYNOPSIS Convert from JSON to SodViolationCheckResult<PSCustomObject> .DESCRIPTION Convert from JSON to SodViolationCheckResult<PSCustomObject> .PARAMETER Json Json object .OUTPUTS SodViolationCheckResult<PSCustomObject> #> function ConvertFrom-BetaJsonToSodViolationCheckResult { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpointBeta => BetaSodViolationCheckResult' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in BetaSodViolationCheckResult $AllProperties = ("message", "clientMetadata", "violationContexts", "violatedPolicies") 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 "message"))) { #optional property not found $Message = $null } else { $Message = $JsonParameters.PSobject.Properties["message"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "clientMetadata"))) { #optional property not found $ClientMetadata = $null } else { $ClientMetadata = $JsonParameters.PSobject.Properties["clientMetadata"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "violationContexts"))) { #optional property not found $ViolationContexts = $null } else { $ViolationContexts = $JsonParameters.PSobject.Properties["violationContexts"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "violatedPolicies"))) { #optional property not found $ViolatedPolicies = $null } else { $ViolatedPolicies = $JsonParameters.PSobject.Properties["violatedPolicies"].value } $PSO = [PSCustomObject]@{ "message" = ${Message} "clientMetadata" = ${ClientMetadata} "violationContexts" = ${ViolationContexts} "violatedPolicies" = ${ViolatedPolicies} } return $PSO } } |