v3/src/PSSailpoint/Model/PasswordInfo.ps1
# # Identity Security Cloud V3 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: 3.0.0 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS No summary available. .DESCRIPTION No description available. .PARAMETER IdentityId Identity ID .PARAMETER SourceId source ID .PARAMETER PublicKeyId public key ID .PARAMETER PublicKey User's public key with Base64 encoding .PARAMETER Accounts Account info related to queried identity and source .PARAMETER Policies Password constraints .OUTPUTS PasswordInfo<PSCustomObject> #> function Initialize-PasswordInfo { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${IdentityId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${SourceId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${PublicKeyId}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${PublicKey}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${Accounts}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String[]] ${Policies} ) Process { 'Creating PSCustomObject: PSSailpoint => PasswordInfo' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "identityId" = ${IdentityId} "sourceId" = ${SourceId} "publicKeyId" = ${PublicKeyId} "publicKey" = ${PublicKey} "accounts" = ${Accounts} "policies" = ${Policies} } return $PSO } } <# .SYNOPSIS Convert from JSON to PasswordInfo<PSCustomObject> .DESCRIPTION Convert from JSON to PasswordInfo<PSCustomObject> .PARAMETER Json Json object .OUTPUTS PasswordInfo<PSCustomObject> #> function ConvertFrom-JsonToPasswordInfo { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint => PasswordInfo' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in PasswordInfo $AllProperties = ("identityId", "sourceId", "publicKeyId", "publicKey", "accounts", "policies") 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 "identityId"))) { #optional property not found $IdentityId = $null } else { $IdentityId = $JsonParameters.PSobject.Properties["identityId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "sourceId"))) { #optional property not found $SourceId = $null } else { $SourceId = $JsonParameters.PSobject.Properties["sourceId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "publicKeyId"))) { #optional property not found $PublicKeyId = $null } else { $PublicKeyId = $JsonParameters.PSobject.Properties["publicKeyId"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "publicKey"))) { #optional property not found $PublicKey = $null } else { $PublicKey = $JsonParameters.PSobject.Properties["publicKey"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "accounts"))) { #optional property not found $Accounts = $null } else { $Accounts = $JsonParameters.PSobject.Properties["accounts"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "policies"))) { #optional property not found $Policies = $null } else { $Policies = $JsonParameters.PSobject.Properties["policies"].value } $PSO = [PSCustomObject]@{ "identityId" = ${IdentityId} "sourceId" = ${SourceId} "publicKeyId" = ${PublicKeyId} "publicKey" = ${PublicKey} "accounts" = ${Accounts} "policies" = ${Policies} } return $PSO } } |