access-requests/src/PSSailpoint.AccessRequests/Model/Entitlementstatesnapshotjitdetail.ps1

#
# Identity Security Cloud API - Access Requests
# 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: v1
# Generated by OpenAPI Generator: https://openapi-generator.tech
#

<#
.SYNOPSIS

No summary available.

.DESCRIPTION

A single JIT entitlement snapshot entry from the provisioning plan.

.PARAMETER ApplicationId
Application id for the entitlement attribute (same as EntitlementStateSnapshot.applicationId).
.PARAMETER AttributeName
Account attribute name for the entitlement (EntitlementStateSnapshot.attributeName).
.PARAMETER AttributeValues
Entitlement values for that attribute (EntitlementStateSnapshot.attributeValues).
.OUTPUTS

Entitlementstatesnapshotjitdetail<PSCustomObject>
#>


function Initialize-Entitlementstatesnapshotjitdetail {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${ApplicationId},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${AttributeName},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String[]]
        ${AttributeValues}
    )

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


        $PSO = [PSCustomObject]@{
            "applicationId" = ${ApplicationId}
            "attributeName" = ${AttributeName}
            "attributeValues" = ${AttributeValues}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to Entitlementstatesnapshotjitdetail<PSCustomObject>

.DESCRIPTION

Convert from JSON to Entitlementstatesnapshotjitdetail<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

Entitlementstatesnapshotjitdetail<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json
        $EntitlementstatesnapshotjitdetailAdditionalProperties = @{}

        # check if Json contains properties not defined in Entitlementstatesnapshotjitdetail
        $AllProperties = ("applicationId", "attributeName", "attributeValues")
        foreach ($name in $JsonParameters.PsObject.Properties.Name) {
            # store undefined properties in additionalProperties
            if (!($AllProperties.Contains($name))) {
                $EntitlementstatesnapshotjitdetailAdditionalProperties[$name] = $JsonParameters.PSobject.Properties[$name].value
            }
        }

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

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

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

        $PSO = [PSCustomObject]@{
            "applicationId" = ${ApplicationId}
            "attributeName" = ${AttributeName}
            "attributeValues" = ${AttributeValues}
            "AdditionalProperties" = $EntitlementstatesnapshotjitdetailAdditionalProperties
        }

        return $PSO
    }

}