beta/src/PSSailpointBeta/Api/BetaAccessRequestIdentityMetricsApi.ps1

#
# IdentityNow Beta API
# Use these APIs to interact with the IdentityNow 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

Return access request identity metrics

.DESCRIPTION

Use this API to return information access metrics.

.PARAMETER IdentityId
Manager's identity ID.

.PARAMETER RequestedObjectId
Requested access item's ID.

.PARAMETER Type
Requested access item's type.

.PARAMETER WithHttpInfo

A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response

.OUTPUTS

SystemCollectionsHashtable
#>

function Get-BetaAccessRequestIdentityMetrics {
    [CmdletBinding()]
    Param (
        [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${IdentityId},
        [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${RequestedObjectId},
        [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
        [String]
        ${Type},
        [Switch]
        $WithHttpInfo
    )

    Process {
        'Calling method: Get-BetaAccessRequestIdentityMetrics' | Write-Debug
        $PSBoundParameters | Out-DebugParameter | Write-Debug

        $LocalVarAccepts = @()
        $LocalVarContentTypes = @()
        $LocalVarQueryParameters = @{}
        $LocalVarHeaderParameters = @{}
        $LocalVarFormParameters = @{}
        $LocalVarPathParameters = @{}
        $LocalVarCookieParameters = @{}
        $LocalVarBodyParameter = $null

        # HTTP header 'Accept' (if needed)
        $LocalVarAccepts = @('application/json')

        $LocalVarUri = '/access-request-identity-metrics/{identityId}/requested-objects/{requestedObjectId}/type/{type}'
        if (!$IdentityId) {
            throw "Error! The required parameter `IdentityId` missing when calling getAccessRequestIdentityMetrics."
        }
        $LocalVarUri = $LocalVarUri.replace('{identityId}', [System.Web.HTTPUtility]::UrlEncode($IdentityId))
        if (!$RequestedObjectId) {
            throw "Error! The required parameter `RequestedObjectId` missing when calling getAccessRequestIdentityMetrics."
        }
        $LocalVarUri = $LocalVarUri.replace('{requestedObjectId}', [System.Web.HTTPUtility]::UrlEncode($RequestedObjectId))
        if (!$Type) {
            throw "Error! The required parameter `Type` missing when calling getAccessRequestIdentityMetrics."
        }
        $LocalVarUri = $LocalVarUri.replace('{type}', [System.Web.HTTPUtility]::UrlEncode($Type))



        $LocalVarResult = Invoke-BetaApiClient -Method 'GET' `
                                -Uri $LocalVarUri `
                                -Accepts $LocalVarAccepts `
                                -ContentTypes $LocalVarContentTypes `
                                -Body $LocalVarBodyParameter `
                                -HeaderParameters $LocalVarHeaderParameters `
                                -QueryParameters $LocalVarQueryParameters `
                                -FormParameters $LocalVarFormParameters `
                                -CookieParameters $LocalVarCookieParameters `
                                -ReturnType "SystemCollectionsHashtable" `
                                -IsBodyNullable $false

        if ($WithHttpInfo.IsPresent) {
            return $LocalVarResult
        } else {
            return $LocalVarResult["Response"]
        }
    }
}