jit-activations/src/PSSailpoint.JitActivations/Model/JITActivationFrictionPatchRequest.ps1
|
# # Identity Security Cloud API - JIT Activations # 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 Submission for the current friction step. .PARAMETER Type Kind of friction step being submitted. .PARAMETER SubmittedData Data submitted for this friction step. Omit when bypassing a step that allows bypass. .PARAMETER Bypass Whether to bypass this friction step. .OUTPUTS JITActivationFrictionPatchRequest<PSCustomObject> #> function Initialize-JITActivationFrictionPatchRequest { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("TICKET", "JUSTIFICATION", "REAUTHENTICATION")] [PSCustomObject] ${Type}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${SubmittedData}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Bypass} = $false ) Process { 'Creating PSCustomObject: PSSailpoint.JitActivations => JITActivationFrictionPatchRequest' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Type) { throw "invalid value for 'Type', 'Type' cannot be null." } $PSO = [PSCustomObject]@{ "type" = ${Type} "submittedData" = ${SubmittedData} "bypass" = ${Bypass} } return $PSO } } <# .SYNOPSIS Convert from JSON to JITActivationFrictionPatchRequest<PSCustomObject> .DESCRIPTION Convert from JSON to JITActivationFrictionPatchRequest<PSCustomObject> .PARAMETER Json Json object .OUTPUTS JITActivationFrictionPatchRequest<PSCustomObject> #> function ConvertFrom-JsonToJITActivationFrictionPatchRequest { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.JitActivations => JITActivationFrictionPatchRequest' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in JITActivationFrictionPatchRequest $AllProperties = ("type", "submittedData", "bypass") foreach ($name in $JsonParameters.PsObject.Properties.Name) { if (!($AllProperties.Contains($name))) { throw "Error! JSON key '$name' not found in the properties: $($AllProperties)" } } If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json throw "Error! Empty JSON cannot be serialized due to the required property 'type' missing." } if (!([bool]($JsonParameters.PSobject.Properties.name -match "type"))) { throw "Error! JSON cannot be serialized due to the required property 'type' missing." } else { $Type = $JsonParameters.PSobject.Properties["type"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "submittedData"))) { #optional property not found $SubmittedData = $null } else { $SubmittedData = $JsonParameters.PSobject.Properties["submittedData"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "bypass"))) { #optional property not found $Bypass = $null } else { $Bypass = $JsonParameters.PSobject.Properties["bypass"].value } $PSO = [PSCustomObject]@{ "type" = ${Type} "submittedData" = ${SubmittedData} "bypass" = ${Bypass} } return $PSO } } |