Model/PasswordInfo.ps1
# # Identity Security Cloud Beta API # Use these APIs to interact with the Identity Security Cloud 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 No description available. .PARAMETER IdentityId No description available. .PARAMETER SourceId No description available. .PARAMETER PublicKeyId No description available. .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-BetaPasswordInfo { [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: Tm.Beta => BetaPasswordInfo' | 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-BetaJsonToPasswordInfo { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: Tm.Beta => BetaPasswordInfo' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in BetaPasswordInfo $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 } } |