Model/IdentityCertDecisionSummary.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 EntitlementDecisionsMade
Number of entitlement decisions that have been made
.PARAMETER AccessProfileDecisionsMade
Number of access profile decisions that have been made
.PARAMETER RoleDecisionsMade
Number of role decisions that have been made
.PARAMETER AccountDecisionsMade
Number of account decisions that have been made
.PARAMETER EntitlementDecisionsTotal
The total number of entitlement decisions on the certification, both complete and incomplete
.PARAMETER AccessProfileDecisionsTotal
The total number of access profile decisions on the certification, both complete and incomplete
.PARAMETER RoleDecisionsTotal
The total number of role decisions on the certification, both complete and incomplete
.PARAMETER AccountDecisionsTotal
The total number of account decisions on the certification, both complete and incomplete
.PARAMETER EntitlementsApproved
The number of entitlement decisions that have been made which were approved
.PARAMETER EntitlementsRevoked
The number of entitlement decisions that have been made which were revoked
.PARAMETER AccessProfilesApproved
The number of access profile decisions that have been made which were approved
.PARAMETER AccessProfilesRevoked
The number of access profile decisions that have been made which were revoked
.PARAMETER RolesApproved
The number of role decisions that have been made which were approved
.PARAMETER RolesRevoked
The number of role decisions that have been made which were revoked
.PARAMETER AccountsApproved
The number of account decisions that have been made which were approved
.PARAMETER AccountsRevoked
The number of account decisions that have been made which were revoked
.OUTPUTS

IdentityCertDecisionSummary<PSCustomObject>
#>


function Initialize-IdentityCertDecisionSummary {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${EntitlementDecisionsMade},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${AccessProfileDecisionsMade},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${RoleDecisionsMade},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${AccountDecisionsMade},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${EntitlementDecisionsTotal},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${AccessProfileDecisionsTotal},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${RoleDecisionsTotal},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${AccountDecisionsTotal},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${EntitlementsApproved},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${EntitlementsRevoked},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${AccessProfilesApproved},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${AccessProfilesRevoked},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${RolesApproved},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${RolesRevoked},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${AccountsApproved},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${AccountsRevoked}
    )

    Process {
        'Creating PSCustomObject: PSSailpoint.V3 => IdentityCertDecisionSummary' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug


        $PSO = [PSCustomObject]@{
            "entitlementDecisionsMade" = ${EntitlementDecisionsMade}
            "accessProfileDecisionsMade" = ${AccessProfileDecisionsMade}
            "roleDecisionsMade" = ${RoleDecisionsMade}
            "accountDecisionsMade" = ${AccountDecisionsMade}
            "entitlementDecisionsTotal" = ${EntitlementDecisionsTotal}
            "accessProfileDecisionsTotal" = ${AccessProfileDecisionsTotal}
            "roleDecisionsTotal" = ${RoleDecisionsTotal}
            "accountDecisionsTotal" = ${AccountDecisionsTotal}
            "entitlementsApproved" = ${EntitlementsApproved}
            "entitlementsRevoked" = ${EntitlementsRevoked}
            "accessProfilesApproved" = ${AccessProfilesApproved}
            "accessProfilesRevoked" = ${AccessProfilesRevoked}
            "rolesApproved" = ${RolesApproved}
            "rolesRevoked" = ${RolesRevoked}
            "accountsApproved" = ${AccountsApproved}
            "accountsRevoked" = ${AccountsRevoked}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to IdentityCertDecisionSummary<PSCustomObject>

.DESCRIPTION

Convert from JSON to IdentityCertDecisionSummary<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

IdentityCertDecisionSummary<PSCustomObject>
#>

function ConvertFrom-JsonToIdentityCertDecisionSummary {
    Param(
        [AllowEmptyString()]
        [string]$Json
    )

    Process {
        'Converting JSON to PSCustomObject: PSSailpoint.V3 => IdentityCertDecisionSummary' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in IdentityCertDecisionSummary
        $AllProperties = ("entitlementDecisionsMade", "accessProfileDecisionsMade", "roleDecisionsMade", "accountDecisionsMade", "entitlementDecisionsTotal", "accessProfileDecisionsTotal", "roleDecisionsTotal", "accountDecisionsTotal", "entitlementsApproved", "entitlementsRevoked", "accessProfilesApproved", "accessProfilesRevoked", "rolesApproved", "rolesRevoked", "accountsApproved", "accountsRevoked")
        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 "entitlementDecisionsMade"))) { #optional property not found
            $EntitlementDecisionsMade = $null
        } else {
            $EntitlementDecisionsMade = $JsonParameters.PSobject.Properties["entitlementDecisionsMade"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "accessProfileDecisionsMade"))) { #optional property not found
            $AccessProfileDecisionsMade = $null
        } else {
            $AccessProfileDecisionsMade = $JsonParameters.PSobject.Properties["accessProfileDecisionsMade"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "roleDecisionsMade"))) { #optional property not found
            $RoleDecisionsMade = $null
        } else {
            $RoleDecisionsMade = $JsonParameters.PSobject.Properties["roleDecisionsMade"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "accountDecisionsMade"))) { #optional property not found
            $AccountDecisionsMade = $null
        } else {
            $AccountDecisionsMade = $JsonParameters.PSobject.Properties["accountDecisionsMade"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "entitlementDecisionsTotal"))) { #optional property not found
            $EntitlementDecisionsTotal = $null
        } else {
            $EntitlementDecisionsTotal = $JsonParameters.PSobject.Properties["entitlementDecisionsTotal"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "accessProfileDecisionsTotal"))) { #optional property not found
            $AccessProfileDecisionsTotal = $null
        } else {
            $AccessProfileDecisionsTotal = $JsonParameters.PSobject.Properties["accessProfileDecisionsTotal"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "roleDecisionsTotal"))) { #optional property not found
            $RoleDecisionsTotal = $null
        } else {
            $RoleDecisionsTotal = $JsonParameters.PSobject.Properties["roleDecisionsTotal"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "accountDecisionsTotal"))) { #optional property not found
            $AccountDecisionsTotal = $null
        } else {
            $AccountDecisionsTotal = $JsonParameters.PSobject.Properties["accountDecisionsTotal"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "entitlementsApproved"))) { #optional property not found
            $EntitlementsApproved = $null
        } else {
            $EntitlementsApproved = $JsonParameters.PSobject.Properties["entitlementsApproved"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "entitlementsRevoked"))) { #optional property not found
            $EntitlementsRevoked = $null
        } else {
            $EntitlementsRevoked = $JsonParameters.PSobject.Properties["entitlementsRevoked"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "accessProfilesApproved"))) { #optional property not found
            $AccessProfilesApproved = $null
        } else {
            $AccessProfilesApproved = $JsonParameters.PSobject.Properties["accessProfilesApproved"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "accessProfilesRevoked"))) { #optional property not found
            $AccessProfilesRevoked = $null
        } else {
            $AccessProfilesRevoked = $JsonParameters.PSobject.Properties["accessProfilesRevoked"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "rolesApproved"))) { #optional property not found
            $RolesApproved = $null
        } else {
            $RolesApproved = $JsonParameters.PSobject.Properties["rolesApproved"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "rolesRevoked"))) { #optional property not found
            $RolesRevoked = $null
        } else {
            $RolesRevoked = $JsonParameters.PSobject.Properties["rolesRevoked"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "accountsApproved"))) { #optional property not found
            $AccountsApproved = $null
        } else {
            $AccountsApproved = $JsonParameters.PSobject.Properties["accountsApproved"].value
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "accountsRevoked"))) { #optional property not found
            $AccountsRevoked = $null
        } else {
            $AccountsRevoked = $JsonParameters.PSobject.Properties["accountsRevoked"].value
        }

        $PSO = [PSCustomObject]@{
            "entitlementDecisionsMade" = ${EntitlementDecisionsMade}
            "accessProfileDecisionsMade" = ${AccessProfileDecisionsMade}
            "roleDecisionsMade" = ${RoleDecisionsMade}
            "accountDecisionsMade" = ${AccountDecisionsMade}
            "entitlementDecisionsTotal" = ${EntitlementDecisionsTotal}
            "accessProfileDecisionsTotal" = ${AccessProfileDecisionsTotal}
            "roleDecisionsTotal" = ${RoleDecisionsTotal}
            "accountDecisionsTotal" = ${AccountDecisionsTotal}
            "entitlementsApproved" = ${EntitlementsApproved}
            "entitlementsRevoked" = ${EntitlementsRevoked}
            "accessProfilesApproved" = ${AccessProfilesApproved}
            "accessProfilesRevoked" = ${AccessProfilesRevoked}
            "rolesApproved" = ${RolesApproved}
            "rolesRevoked" = ${RolesRevoked}
            "accountsApproved" = ${AccountsApproved}
            "accountsRevoked" = ${AccountsRevoked}
        }

        return $PSO
    }

}