v3/src/Tm.V3/Model/DependantAppConnections.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 CloudAppId
Id of the connected Application
.PARAMETER Description
Description of the connected Application
.PARAMETER Enabled
Is the Application enabled
.PARAMETER ProvisionRequestEnabled
Is Provisioning enabled for connected Application
.PARAMETER AccountSource
No description available.
.PARAMETER LauncherCount
The amount of launchers for connected Application (long type)
.PARAMETER MatchAllAccount
Is Provisioning enabled for connected Application
.PARAMETER Owner
The owner of the connected Application
.PARAMETER AppCenterEnabled
Is App Center enabled for connected Application
.OUTPUTS

DependantAppConnections<PSCustomObject>
#>


function Initialize-DependantAppConnections {
    [CmdletBinding()]
    Param (
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${CloudAppId},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [String]
        ${Description},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${Enabled} = $true,
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${ProvisionRequestEnabled} = $true,
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject]
        ${AccountSource},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Int64]]
        ${LauncherCount},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${MatchAllAccount} = $false,
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [PSCustomObject[]]
        ${Owner},
        [Parameter(ValueFromPipelineByPropertyName = $true)]
        [System.Nullable[Boolean]]
        ${AppCenterEnabled} = $false
    )

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


        $PSO = [PSCustomObject]@{
            "cloudAppId" = ${CloudAppId}
            "description" = ${Description}
            "enabled" = ${Enabled}
            "provisionRequestEnabled" = ${ProvisionRequestEnabled}
            "accountSource" = ${AccountSource}
            "launcherCount" = ${LauncherCount}
            "matchAllAccount" = ${MatchAllAccount}
            "owner" = ${Owner}
            "appCenterEnabled" = ${AppCenterEnabled}
        }

        return $PSO
    }
}

<#
.SYNOPSIS

Convert from JSON to DependantAppConnections<PSCustomObject>

.DESCRIPTION

Convert from JSON to DependantAppConnections<PSCustomObject>

.PARAMETER Json

Json object

.OUTPUTS

DependantAppConnections<PSCustomObject>
#>

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

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

        $JsonParameters = ConvertFrom-Json -InputObject $Json

        # check if Json contains properties not defined in DependantAppConnections
        $AllProperties = ("cloudAppId", "description", "enabled", "provisionRequestEnabled", "accountSource", "launcherCount", "matchAllAccount", "owner", "appCenterEnabled")
        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 "cloudAppId"))) { #optional property not found
            $CloudAppId = $null
        } else {
            $CloudAppId = $JsonParameters.PSobject.Properties["cloudAppId"].value
        }

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

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

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

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

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

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

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

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

        $PSO = [PSCustomObject]@{
            "cloudAppId" = ${CloudAppId}
            "description" = ${Description}
            "enabled" = ${Enabled}
            "provisionRequestEnabled" = ${ProvisionRequestEnabled}
            "accountSource" = ${AccountSource}
            "launcherCount" = ${LauncherCount}
            "matchAllAccount" = ${MatchAllAccount}
            "owner" = ${Owner}
            "appCenterEnabled" = ${AppCenterEnabled}
        }

        return $PSO
    }

}