beta/src/PSSailpointBeta/Model/RoleMiningSessionResponse.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 Scope
No description available.
.PARAMETER MinNumIdentitiesInPotentialRole
Minimum number of identities in a potential role
.PARAMETER PrescribedPruneThreshold
The computed (or prescribed) prune threshold for this session
.PARAMETER PruneThreshold
The prune threshold to be used for this role mining session
.PARAMETER PotentialRoleCount
The number of potential roles
.PARAMETER PotentialRolesReadyCount
The number of potential roles which have completed processing
.PARAMETER Status
No description available.
.PARAMETER Id
Session Id for this role mining session
.PARAMETER CreatedDate
The date-time when this role mining session was created.
.PARAMETER ModifiedDate
The date-time when this role mining session was completed.
.PARAMETER Type
No description available.
.OUTPUTS

RoleMiningSessionResponse<PSCustomObject>
#>


function Initialize-BetaRoleMiningSessionResponse {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${Scope},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${MinNumIdentitiesInPotentialRole},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${PrescribedPruneThreshold},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${PruneThreshold},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${PotentialRoleCount},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int32]]
        ${PotentialRolesReadyCount},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${Status},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Id},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[System.DateTime]]
        ${CreatedDate},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[System.DateTime]]
        ${ModifiedDate},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [ValidateSet("SPECIALIZED", "COMMON")]
        [PSCustomObject]
        ${Type}
    )

    Process {
        'Creating PSCustomObject: PSSailpointBeta => BetaRoleMiningSessionResponse' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug


        $PSO = [PSCustomObject]@{
            "scope" = ${Scope}
            "minNumIdentitiesInPotentialRole" = ${MinNumIdentitiesInPotentialRole}
            "prescribedPruneThreshold" = ${PrescribedPruneThreshold}
            "pruneThreshold" = ${PruneThreshold}
            "potentialRoleCount" = ${PotentialRoleCount}
            "potentialRolesReadyCount" = ${PotentialRolesReadyCount}
            "status" = ${Status}
            "id" = ${Id}
            "createdDate" = ${CreatedDate}
            "modifiedDate" = ${ModifiedDate}
            "type" = ${Type}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to RoleMiningSessionResponse<PSCustomObject>

.DESCRIPTION

Convert from JSON to RoleMiningSessionResponse<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

RoleMiningSessionResponse<PSCustomObject>
#>

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

    Process {
        'Converting JSON to PSCustomObject: PSSailpointBeta => BetaRoleMiningSessionResponse' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in BetaRoleMiningSessionResponse
        $AllProperties = ("scope", "minNumIdentitiesInPotentialRole", "prescribedPruneThreshold", "pruneThreshold", "potentialRoleCount", "potentialRolesReadyCount", "status", "id", "createdDate", "modifiedDate", "type")
        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 "scope"))) { #optional property not found
            $Scope = $null
        } else {
            $Scope = $JsonParameters.PSobject.Properties["scope"].value
        }

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

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

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

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

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "potentialRolesReadyCount"))) { #optional property not found
            $PotentialRolesReadyCount = $null
        } else {
            $PotentialRolesReadyCount = $JsonParameters.PSobject.Properties["potentialRolesReadyCount"].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 "id"))) { #optional property not found
            $Id = $null
        } else {
            $Id = $JsonParameters.PSobject.Properties["id"].value
        }

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

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

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

        $PSO = [PSCustomObject]@{
            "scope" = ${Scope}
            "minNumIdentitiesInPotentialRole" = ${MinNumIdentitiesInPotentialRole}
            "prescribedPruneThreshold" = ${PrescribedPruneThreshold}
            "pruneThreshold" = ${PruneThreshold}
            "potentialRoleCount" = ${PotentialRoleCount}
            "potentialRolesReadyCount" = ${PotentialRolesReadyCount}
            "status" = ${Status}
            "id" = ${Id}
            "createdDate" = ${CreatedDate}
            "modifiedDate" = ${ModifiedDate}
            "type" = ${Type}
        }

        return $PSO
    }

}