v2025/src/PSSailpoint.V2025/Model/JWKS.ps1
|
# # Identity Security Cloud V2025 API # 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: v2025 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION JSON Web Key Set containing the transmitter's public keys for verifying signed delivery requests. .PARAMETER Keys Array of JSON Web Keys. .OUTPUTS JWKS<PSCustomObject> #> function Initialize-V2025JWKS { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Keys} ) Process { 'Creating PSCustomObject: PSSailpoint.V2025 => V2025JWKS' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug if (!$Keys) { throw "invalid value for 'Keys', 'Keys' cannot be null." } $PSO = [PSCustomObject]@{ "keys" = ${Keys} } return $PSO } } <# .SYNOPSIS Convert from JSON to JWKS<PSCustomObject> .DESCRIPTION Convert from JSON to JWKS<PSCustomObject> .PARAMETER Json Json object .OUTPUTS JWKS<PSCustomObject> #> function ConvertFrom-V2025JsonToJWKS { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.V2025 => V2025JWKS' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in V2025JWKS $AllProperties = ("keys") 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 'keys' missing." } if (!([bool]($JsonParameters.PSobject.Properties.name -match "keys"))) { throw "Error! JSON cannot be serialized due to the required property 'keys' missing." } else { $Keys = $JsonParameters.PSobject.Properties["keys"].value } $PSO = [PSCustomObject]@{ "keys" = ${Keys} } return $PSO } } |