intelligence/src/PSSailpoint.Intelligence/Model/Intelidentitygraphlink.ps1

#
# Identity Security Cloud API - Intelligence
# 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

Deep link into Identity Graph UI for the resolved identity at the aggregate root. Omitted when the tenant lacks the idg:base license. To access the Identity Graph UI, the user must have the **Identity Graph Read Only** user level assigned.

.PARAMETER Href
Absolute URL to the Identity Graph view. Omitted when the tenant lacks idg:base or when the IDN UI host cannot be resolved from sp-tenant. Query parameters include `entity` and `id` for the resolved identity. The `entity` value reflects identity type: `human_identity` for Human responses and `machine_identity` for NHI responses.
.OUTPUTS

Intelidentitygraphlink<PSCustomObject>
#>


function Initialize-Intelidentitygraphlink {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Href}
    )

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

        if (!$Href) {
            throw "invalid value for 'Href', 'Href' cannot be null."
        }


        $PSO = [PSCustomObject]@{
            "href" = ${Href}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to Intelidentitygraphlink<PSCustomObject>

.DESCRIPTION

Convert from JSON to Intelidentitygraphlink<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

Intelidentitygraphlink<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in Intelidentitygraphlink
        $AllProperties = ("href")
        foreach ($name in $JsonParameters.PsObject.Properties.Name) {
            if (!($AllProperties.Contains($name))) {
                throw "Error! JSON key '$name' not found in the properties: $($AllProperties)"
            }
        }

        If ([string]::IsNullOrEmpty($Json) -or $Json -eq "{}") { # empty json
            throw "Error! Empty JSON cannot be serialized due to the required property 'href' missing."
        }

        if (!([bool]($JsonParameters.PSobject.Properties.name -match "href"))) {
            throw "Error! JSON cannot be serialized due to the required property 'href' missing."
        } else {
            $Href = $JsonParameters.PSobject.Properties["href"].value
        }

        $PSO = [PSCustomObject]@{
            "href" = ${Href}
        }

        return $PSO
    }

}