Model/ApprovalStatusDto.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 Forwarded True if the request for this item was forwarded from one owner to another. .PARAMETER OriginalOwner No description available. .PARAMETER CurrentOwner No description available. .PARAMETER Modified Time at which item was modified. .PARAMETER Status No description available. .PARAMETER Scheme No description available. .PARAMETER ErrorMessages If the request failed, includes any error messages that were generated. .PARAMETER Comment Comment, if any, provided by the approver. .PARAMETER RemoveDate The date the role or access profile or entitlement is no longer assigned to the specified identity. .OUTPUTS ApprovalStatusDto<PSCustomObject> #> function Initialize-ApprovalStatusDto { [CmdletBinding()] Param ( [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[Boolean]] ${Forwarded} = $false, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${OriginalOwner}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject] ${CurrentOwner}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${Modified}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("PENDING", "APPROVED", "REJECTED", "EXPIRED", "CANCELLED", "ARCHIVED")] [PSCustomObject] ${Status}, [Parameter(ValueFromPipelineByPropertyName = $true)] [ValidateSet("APP_OWNER", "SOURCE_OWNER", "MANAGER", "ROLE_OWNER", "ACCESS_PROFILE_OWNER", "ENTITLEMENT_OWNER", "GOVERNANCE_GROUP")] [PSCustomObject] ${Scheme}, [Parameter(ValueFromPipelineByPropertyName = $true)] [PSCustomObject[]] ${ErrorMessages}, [Parameter(ValueFromPipelineByPropertyName = $true)] [String] ${Comment}, [Parameter(ValueFromPipelineByPropertyName = $true)] [System.Nullable[System.DateTime]] ${RemoveDate} ) Process { 'Creating PSCustomObject: PSSailpoint.V3 => ApprovalStatusDto' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $PSO = [PSCustomObject]@{ "forwarded" = ${Forwarded} "originalOwner" = ${OriginalOwner} "currentOwner" = ${CurrentOwner} "modified" = ${Modified} "status" = ${Status} "scheme" = ${Scheme} "errorMessages" = ${ErrorMessages} "comment" = ${Comment} "removeDate" = ${RemoveDate} } return $PSO } } <# .SYNOPSIS Convert from JSON to ApprovalStatusDto<PSCustomObject> .DESCRIPTION Convert from JSON to ApprovalStatusDto<PSCustomObject> .PARAMETER Json Json object .OUTPUTS ApprovalStatusDto<PSCustomObject> #> function ConvertFrom-JsonToApprovalStatusDto { Param( [AllowEmptyString()] [string]$Json ) Process { 'Converting JSON to PSCustomObject: PSSailpoint.V3 => ApprovalStatusDto' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $JsonParameters = ConvertFrom-Json -InputObject $Json # check if Json contains properties not defined in ApprovalStatusDto $AllProperties = ("forwarded", "originalOwner", "currentOwner", "modified", "status", "scheme", "errorMessages", "comment", "removeDate") 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 "forwarded"))) { #optional property not found $Forwarded = $null } else { $Forwarded = $JsonParameters.PSobject.Properties["forwarded"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "originalOwner"))) { #optional property not found $OriginalOwner = $null } else { $OriginalOwner = $JsonParameters.PSobject.Properties["originalOwner"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "currentOwner"))) { #optional property not found $CurrentOwner = $null } else { $CurrentOwner = $JsonParameters.PSobject.Properties["currentOwner"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "modified"))) { #optional property not found $Modified = $null } else { $Modified = $JsonParameters.PSobject.Properties["modified"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "status"))) { #optional property not found $Status = $null } else { $Status = $JsonParameters.PSobject.Properties["status"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "scheme"))) { #optional property not found $Scheme = $null } else { $Scheme = $JsonParameters.PSobject.Properties["scheme"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "errorMessages"))) { #optional property not found $ErrorMessages = $null } else { $ErrorMessages = $JsonParameters.PSobject.Properties["errorMessages"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "comment"))) { #optional property not found $Comment = $null } else { $Comment = $JsonParameters.PSobject.Properties["comment"].value } if (!([bool]($JsonParameters.PSobject.Properties.name -match "removeDate"))) { #optional property not found $RemoveDate = $null } else { $RemoveDate = $JsonParameters.PSobject.Properties["removeDate"].value } $PSO = [PSCustomObject]@{ "forwarded" = ${Forwarded} "originalOwner" = ${OriginalOwner} "currentOwner" = ${CurrentOwner} "modified" = ${Modified} "status" = ${Status} "scheme" = ${Scheme} "errorMessages" = ${ErrorMessages} "comment" = ${Comment} "removeDate" = ${RemoveDate} } return $PSO } } |