public/Get-CTRecordingGeneral.ps1

Function Get-CTRecordingGeneral {
    [cmdletBinding(
        DefaultParameterSetName='Hanwha',
        #SupportsShouldProcess = $true,
        ConfirmImpact='high'
        )]
    Param(
        [Parameter(
            Mandatory=$true,
            ParameterSetName='Hanwha'
        )]
        [String]$IP,

        [Parameter(
            Mandatory=$true,
            ParameterSetName='Hanwha'
        )]
        [pscredential]$Credential,

        [Parameter(
            Mandatory=$true,
            ParameterSetName='Hanwha'
        )]
        [String]$Channel
    )
    DynamicParam {
        $DynamicParameters = @{
            CameraType = @{
                Mandatory = $true
                Position = 1
                ParameterSetName = "Hanwha"
                Enum = $Script:SupportedCameraModels
            }
        }
        
        return New-DynamicParameterSet -ParameterTable $DynamicParameters

    }
    Begin {
        Write-Debug "[Get-CTRecordingGeneral] Started"
        $CameraType = $PSBoundParameters.CameraType

        #Build Submission Object
        $obj = @{
            IP = $IP
            Credential = $Credential
            Channel = $Channel
        }

        #Choose Camera Model
        Switch ($CameraType) {
            Hanwha {
                return Get-HanwhaRecordingGeneral -Object $obj
            }
        }
    }
}